fix: página de inicio coherente con cada rol al iniciar sesión
BD: home_page asignado a roles que lo tenían NULL: - recepcionista → /erp.php?m=turnero&v=recepcion - supervisor → /lab_dashboard.php - operador_bot → /index.php - readonly → /lab_ordenes.php login.php: fallback mejorado por módulos cuando home_page no aplica (turnero → recepcion, lab_dashboard → dashboard, etc.) index.php: redirige recepcionistas y roles sin whatsapp a su página correcta si por algún motivo llegan al panel de WhatsApp. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
0f07ee22c7
commit
ea0de4d487
@@ -53,12 +53,16 @@ if ($_POST && !$loginBlocked) {
|
||||
}
|
||||
if ($roleSlug === 'enfermero') {
|
||||
header('Location: enfermero_portal.php');
|
||||
} elseif (count($modules) === 1 && $modules[0] === 'lab_formularios') {
|
||||
} elseif (in_array('turnero', $modules, true)) {
|
||||
header('Location: erp.php?m=turnero&v=recepcion');
|
||||
} elseif (in_array('lab_dashboard', $modules, true)) {
|
||||
header('Location: lab_dashboard.php');
|
||||
} elseif (in_array('lab_formularios', $modules, true)) {
|
||||
header('Location: lab_formularios.php');
|
||||
} elseif (count($modules) === 2
|
||||
&& in_array('lab_domicilios', $modules, true)
|
||||
&& in_array('lab_ordenes', $modules, true)) {
|
||||
header('Location: lab_domicilios.php');
|
||||
} elseif (in_array('lab_ordenes', $modules, true)) {
|
||||
header('Location: lab_ordenes.php');
|
||||
} elseif (in_array('whatsapp', $modules, true)) {
|
||||
header('Location: index.php');
|
||||
} else {
|
||||
header('Location: index.php');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user