You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hub admins schedule staff shifts in WhatsApp or a spreadsheet. There is no platform tool for roster management, meaning staff miss shift assignments and coverage gaps go undetected. A scheduling module centralises this.
Context
User entity: backend/src/users/entities/user.entity.ts — staff members have role === 'staff'
NotificationsModule: backend/src/notifications/ — notify staff when a new shift is assigned to them
Tasks
Create Shift entity: id, staffUserId (FK to User where role=staff), startTime (timestamptz), endTime (timestamptz), roleName (string, e.g. "Front Desk"), notes (text, nullable), createdByAdminId (FK to User), createdAt, updatedAt
POST /shifts — create shift (admin only); notify the assigned staff member via NotificationsModule
Overview
Hub admins schedule staff shifts in WhatsApp or a spreadsheet. There is no platform tool for roster management, meaning staff miss shift assignments and coverage gaps go undetected. A scheduling module centralises this.
Context
Userentity:backend/src/users/entities/user.entity.ts— staff members haverole === 'staff'NotificationsModule:backend/src/notifications/— notify staff when a new shift is assigned to themTasks
Shiftentity:id,staffUserId(FK to User where role=staff),startTime(timestamptz),endTime(timestamptz),roleName(string, e.g."Front Desk"),notes(text, nullable),createdByAdminId(FK to User),createdAt,updatedAtPOST /shifts— create shift (admin only); notify the assigned staff member viaNotificationsModulePATCH /shifts/:id— update shift details (admin only)DELETE /shifts/:id— delete shift (admin only)GET /shifts— list shifts (admin: all; staff: only own shifts); supports?startDate=and?endDate=date range filterGET /shifts/this-week— returns shifts for the current calendar week (Mon–Sun) for the requesting user (or all staff for admin)Files to Modify / Create
backend/src/shifts/(module, entity, controller, service, providers)backend/src/app.module.ts