feat: menus por permission_type (1=info, 2=informes, 3=completo)
This commit is contained in:
@@ -96,6 +96,62 @@ $menuConfig = [
|
||||
'ciclo_cosecha_dia' => ['type' => 'function', 'function' => 'api_report', 'params' => ['endpoint_key' => 'cosecha_dn', 'filename' => 'ciclo_cosecha_hoy.xlsx', 'caption' => 'Ciclo de cosecha del día de hoy', 'date_mode' => 'today']],
|
||||
'ciclo_cosecha_historico' => ['type' => 'function', 'function' => 'api_report', 'params' => ['endpoint_key' => 'cosecha_dn', 'filename' => 'ciclo_cosecha_30dias.xlsx', 'caption' => 'Histórico ciclos de cosecha últimos 30 días', 'date_mode' => 'last_30']],
|
||||
],
|
||||
'per_type' => [
|
||||
'1' => [
|
||||
'greeting' => '¡Bienvenido! Escribe *menu* para recibir información.',
|
||||
'fallback' => 'Escribe *menu* para recibir información.',
|
||||
'commands' => [
|
||||
'menu' => 'show_menu_cat1',
|
||||
'info' => 'recibir_info_cat1',
|
||||
],
|
||||
'menus' => [
|
||||
'show_menu_cat1' => [
|
||||
'type' => 'list',
|
||||
'header' => 'Bienvenido',
|
||||
'body' => '¿Qué deseas hacer?',
|
||||
'footer' => 'Palmas360',
|
||||
'button' => 'Ver opciones',
|
||||
'sections' => [
|
||||
[
|
||||
'title' => 'Opciones',
|
||||
'rows' => [
|
||||
['id' => 'recibir_info_cat1', 'title' => 'Recibir Información', 'description' => 'Información útil para ti'],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'flows' => [
|
||||
'show_menu_cat1' => ['type' => 'menu', 'menu' => 'show_menu_cat1'],
|
||||
'recibir_info_cat1' => ['type' => 'function', 'function' => 'forward_to_ai'],
|
||||
],
|
||||
],
|
||||
'2' => [
|
||||
'greeting' => '¡Bienvenido! Escribe *menu* para descargar informes.',
|
||||
'fallback' => 'Escribe *menu* para descargar informes.',
|
||||
'commands' => [
|
||||
'menu' => 'show_menu_cat2',
|
||||
'informes' => 'descargar_informes',
|
||||
],
|
||||
'menus' => [
|
||||
'show_menu_cat2' => [
|
||||
'type' => 'list',
|
||||
'header' => 'Menú',
|
||||
'body' => 'Selecciona una opción:',
|
||||
'footer' => 'Palmas360',
|
||||
'button' => 'Ver opciones',
|
||||
'sections' => [
|
||||
[
|
||||
'title' => 'Opciones',
|
||||
'rows' => [
|
||||
['id' => 'descargar_informes', 'title' => 'Descargar Informes', 'description' => 'Accede a tus informes'],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
$companies = CompanyRepository::findAll(true);
|
||||
|
||||
Reference in New Issue
Block a user