up
This commit is contained in:
@@ -3,6 +3,41 @@
|
||||
* Descriptor del módulo Turnero — Oleada 1
|
||||
* Sistema de Turnero Inteligente con gestión de consentimientos informados.
|
||||
*/
|
||||
|
||||
// ── Links estáticos base ──────────────────────────────────────
|
||||
$_trLinks = [
|
||||
['name' => 'Dashboard', 'icon' => 'fas fa-tachometer-alt', 'route' => '/erp.php?m=turnero&v=dashboard'],
|
||||
['name' => 'Configuración', 'icon' => 'fas fa-sliders-h', 'route' => '/erp.php?m=turnero&v=configuracion'],
|
||||
['name' => 'Kiosko', 'icon' => 'fas fa-desktop', 'route' => '/erp.php?m=turnero&v=kiosko'],
|
||||
['name' => 'Pantalla TV Global', 'icon' => 'fas fa-th-large', 'route' => '/erp.php?m=turnero&v=display_global'],
|
||||
];
|
||||
|
||||
// ── Links dinámicos: un enlace por escritorio de Recepción ────
|
||||
try {
|
||||
$_trPdo = Database::getInstance()->getConnection();
|
||||
$_trDesks = $_trPdo->query(
|
||||
"SELECT id, nombre FROM turnero_lugares
|
||||
WHERE activo = 1 AND tipo = 'recepcion'
|
||||
ORDER BY sort_order ASC"
|
||||
)->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!empty($_trDesks)) {
|
||||
foreach ($_trDesks as $_d) {
|
||||
$_trLinks[] = [
|
||||
'name' => $_d['nombre'],
|
||||
'icon' => 'fas fa-concierge-bell',
|
||||
'route' => '/erp.php?m=turnero&v=recepcion&desk_id=' . (int)$_d['id'],
|
||||
];
|
||||
}
|
||||
} else {
|
||||
// Sin escritorios configurados: enlace genérico
|
||||
$_trLinks[] = ['name' => 'Recepción', 'icon' => 'fas fa-concierge-bell', 'route' => '/erp.php?m=turnero&v=recepcion'];
|
||||
}
|
||||
} catch (\Throwable $_) {
|
||||
// BD no disponible todavía (instalación inicial)
|
||||
$_trLinks[] = ['name' => 'Recepción', 'icon' => 'fas fa-concierge-bell', 'route' => '/erp.php?m=turnero&v=recepcion'];
|
||||
}
|
||||
|
||||
return [
|
||||
'slug' => 'turnero',
|
||||
'name' => 'Turnero',
|
||||
@@ -13,12 +48,5 @@ return [
|
||||
'sort_order' => 40,
|
||||
'oleada' => 1,
|
||||
'description' => 'Sistema de turnos presenciales en recepción con prioridades, consentimientos y pantallas TV',
|
||||
'links' => [
|
||||
['name' => 'Dashboard', 'icon' => 'fas fa-tachometer-alt', 'route' => '/erp.php?m=turnero&v=dashboard'],
|
||||
['name' => 'Recepción', 'icon' => 'fas fa-concierge-bell', 'route' => '/erp.php?m=turnero&v=recepcion'],
|
||||
['name' => 'Configuración', 'icon' => 'fas fa-sliders-h', 'route' => '/erp.php?m=turnero&v=configuracion'],
|
||||
['name' => 'Kiosko', 'icon' => 'fas fa-desktop', 'route' => '/erp.php?m=turnero&v=kiosko'],
|
||||
['name' => 'Pantalla TV', 'icon' => 'fas fa-tv', 'route' => '/erp.php?m=turnero&v=display'],
|
||||
['name' => 'Pantalla TV Global', 'icon' => 'fas fa-th-large', 'route' => '/erp.php?m=turnero&v=display_global'],
|
||||
],
|
||||
'links' => $_trLinks,
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user