feat(Navigation, UserRights, Localization): add worker schedules feature and enhance access control
All checks were successful
Deploy to production / deploy (push) Successful in 1m52s

- Updated navigation structure to include a new section for worker schedules, accessible to specific user roles.
- Introduced a new user right type for 'worker_schedule_read' to manage access permissions effectively.
- Added localization entries for worker schedules in multiple languages, ensuring consistent user experience across the application.
- Created a new route and component for managing worker schedules in the admin panel.
This commit is contained in:
Torsten Schulz (local)
2026-05-08 08:54:17 +02:00
parent 0f7220d0b1
commit 008cd7ae86
21 changed files with 354 additions and 11 deletions

View File

@@ -295,7 +295,7 @@ const menuStructure = {
path: "/admin/interests"
},
falukant: {
visible: ["mainadmin", "falukant"],
visible: ["mainadmin", "falukant", "worker_schedule_read"],
children: {
logentries: {
visible: ["mainadmin", "falukant"],
@@ -317,6 +317,10 @@ const menuStructure = {
visible: ["mainadmin", "falukant"],
path: "/admin/falukant/create-npc"
},
workerSchedules: {
visible: ["mainadmin", "worker_schedule_read"],
path: "/admin/falukant/worker-schedules"
},
}
},
minigames: {

View File

@@ -0,0 +1,9 @@
-- Adds user right required for Falukant worker schedule read access.
INSERT INTO "type".user_right (title)
SELECT 'worker_schedule_read'
WHERE NOT EXISTS (
SELECT 1
FROM "type".user_right
WHERE title = 'worker_schedule_read'
);

View File

@@ -38,6 +38,10 @@ const initializeUserRights = async() => {
where: { title: "match3"},
defaults: { title: "match3"}
});
await UserRightType.findOrCreate({
where: { title: "worker_schedule_read"},
defaults: { title: "worker_schedule_read"}
});
};
export default initializeUserRights;