feat: refactor schedule storage to vanity_hr schema, update onboarding command to /registro, and enhance horario flow with short name collection

This commit is contained in:
Marco Gallegos
2025-12-20 22:43:34 -06:00
parent 338108d7b7
commit d66e8118eb
16 changed files with 570 additions and 405 deletions

View File

@@ -2,15 +2,28 @@
"flow_name": "vacations",
"steps": [
{
"state": "INICIO_DIA",
"question": "🌴 **Solicitud de Vacaciones**\n\nVamos a registrar tu descanso. ¿Qué *día* inicia? (número, ej: 10)",
"handler": "recibir_inicio_dia",
"state": -2,
"variable": "AVISO_GENERAL",
"question": "🌴 SOLICITUD DE VACACIONES\n\nAntes de registrar tus fechas confirma que:\n\n• Ya hablaste con tu manager\n• Las fechas no se traslapan con guardias críticas\n• Sabes que el bot notificará al equipo de RH\n\nConfirma para continuar.",
"type": "keyboard",
"options": ["Continuar"]
},
{
"state": -1,
"variable": "INTRO_FECHAS",
"question": "SECCIÓN ÚNICA · FECHAS Y MOTIVO\n\nComparte las fechas exactas del descanso y cualquier comentario relevante.",
"type": "info"
},
{
"state": 0,
"variable": "INICIO_DIA",
"question": "¿Qué *día* inicia tu descanso? (número, ej: 10)",
"type": "text"
},
{
"state": "INICIO_MES",
"state": 1,
"variable": "INICIO_MES",
"question": "¿De qué *mes* inicia?",
"handler": "recibir_inicio_mes",
"type": "keyboard",
"options": [
"Enero", "Febrero", "Marzo",
@@ -20,22 +33,22 @@
]
},
{
"state": "INICIO_ANIO",
"question": "¿De qué *año* inicia?",
"handler": "recibir_inicio_anio",
"state": 2,
"variable": "INICIO_ANIO",
"question": "¿De qué *año* inicia? (elige el actual o el siguiente)",
"type": "keyboard",
"options": ["current_year", "next_year"]
},
{
"state": "FIN_DIA",
"state": 3,
"variable": "FIN_DIA",
"question": "¿Qué *día* termina tu descanso?",
"handler": "recibir_fin_dia",
"type": "text"
},
{
"state": "FIN_MES",
"state": 4,
"variable": "FIN_MES",
"question": "¿De qué *mes* termina?",
"handler": "recibir_fin_mes",
"type": "keyboard",
"options": [
"Enero", "Febrero", "Marzo",
@@ -45,17 +58,23 @@
]
},
{
"state": "FIN_ANIO",
"question": "¿De qué *año* termina tu descanso?",
"handler": "recibir_fin_anio",
"state": 5,
"variable": "FIN_ANIO",
"question": "¿De qué *año* termina tu descanso? (elige el actual o el siguiente)",
"type": "keyboard",
"options": ["current_year", "next_year"]
},
{
"state": "MOTIVO",
"state": 6,
"variable": "MOTIVO",
"question": "Entendido. ¿Cuál es el motivo o comentario adicional?",
"handler": "recibir_motivo_fin",
"type": "text"
},
{
"state": 99,
"variable": "FLOW_END",
"question": "✅ Solicitud registrada.\n\nRH validará la información y te confirmará si las fechas quedan asignadas. Si necesitas cambiar algo, vuelve a iniciar con /vacaciones.",
"type": "info"
}
]
}
}