diff --git a/frontend/Frontend-Hotel/src/components/Layout2.jsx b/frontend/Frontend-Hotel/src/components/Layout2.jsx index 1c95a04..09e12ed 100644 --- a/frontend/Frontend-Hotel/src/components/Layout2.jsx +++ b/frontend/Frontend-Hotel/src/components/Layout2.jsx @@ -26,6 +26,9 @@ export default function Layout() { section.label === "Payroll" ? (user >= 1 && user <= 4 ? false : true) : section.label === "Hotel" ? (user === 1 ? false : true) : section.label === "Income" ? (user >= 1 && user <= 4 ? false : true) : + section.label === "Operations" ? (user >= 1 && user <= 4 ? false : true) : + section.label === "Services" ? (user >= 1 && user <= 6 ? false : true) : + section.label === "Reports" ? (user >= 1 && user <= 2 ? false : true) : section.label === "Housekeeper" ? (user === 6 ? false : true) : false, submenu: section.submenu?.map(item => ({ @@ -79,6 +82,14 @@ export default function Layout() { return true; } + if (section.label === "Payroll" && location.pathname.startsWith("/app/schedules")) { + return true; + } + + if (section.label === "Reports" && location.pathname.startsWith("/app/operational-reports")) { + return true; + } + return false; }); diff --git a/frontend/Frontend-Hotel/src/constants/menuconfig.js b/frontend/Frontend-Hotel/src/constants/menuconfig.js index 4dd6a8d..0961bc9 100644 --- a/frontend/Frontend-Hotel/src/constants/menuconfig.js +++ b/frontend/Frontend-Hotel/src/constants/menuconfig.js @@ -88,7 +88,8 @@ export const menuConfig = { { label: "Attendance", spanish_label: "Asistencia", route: "/app/payroll/attendance" }, { label: "Employees", spanish_label: "Empleados", route: "/app/payroll/employees" }, { label: "New Employee", spanish_label: "Nuevo Empleado", route: "/app/payroll/newemployee" }, - { label: "Contracts", spanish_label: "Contratos", route: "/app/payroll/contract" } + { label: "Contracts", spanish_label: "Contratos", route: "/app/payroll/contract" }, + { label: "Schedules", spanish_label: "Horarios", route: "/app/schedules" } ], }, services: { @@ -101,6 +102,14 @@ export const menuConfig = { { label: "Events & Venues", spanish_label: "Eventos y Salones", route: "/app/events" }, ], }, + reports: { + label: "Reports", + spanish_label: "Reportes", + basePath: "/app/operational-reports", + submenu: [ + { label: "Operational", spanish_label: "Operativos", route: "/app/operational-reports" }, + ], + }, // hotel: { // label: "Hotel", // spanish_label: "Hotel",