From 2855214faee38c0a2a41788baa082dc83d2811ee Mon Sep 17 00:00:00 2001 From: sudomarcma <1040211836@qq.com> Date: Fri, 18 Jul 2025 18:07:20 +0800 Subject: [PATCH] feat: Update manager permissions and enhance toast notifications with internationalization support --- backend/managerRoutes.js | 2 +- src/App.vue | 2 +- src/components/ManagerPermissions.vue | 115 +++++++++++++++---------- src/components/PersonnelManagement.vue | 16 ++-- src/components/Toast.vue | 2 +- src/composables/useToast.js | 1 + src/locales/en.json | 28 +++++- src/locales/ms.json | 71 +++++++++++++-- 8 files changed, 176 insertions(+), 61 deletions(-) diff --git a/backend/managerRoutes.js b/backend/managerRoutes.js index fe8977e..9a91c94 100644 --- a/backend/managerRoutes.js +++ b/backend/managerRoutes.js @@ -61,7 +61,7 @@ export default function(db) { }); // Definitive version using a dedicated database connection - router.post('/enabled-dates/update', checkPermission('view_all'), async (req, res) => { + router.post('/enabled-dates/update', checkPermission('manage_resources'), async (req, res) => { let connection; // Define connection here to ensure it's accessible in the 'finally' block try { const { datesToEnable, datesToDisable } = req.body; diff --git a/src/App.vue b/src/App.vue index 42b2b98..a7976c3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,7 +1,7 @@