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
Members who encounter a broken chair, faulty air conditioning, or a safety hazard have no formal channel to report it in the platform. A maintenance request module creates a trackable workflow for the hub team to investigate and resolve.
Context
User entity: backend/src/users/entities/user.entity.ts
WorkspacesModule: backend/src/workspaces/ — workspace FK for issue location
NotificationsModule: backend/src/notifications/ — alert admins on new request; alert member on resolution
CloudinaryModule: backend/src/cloudinary/ — for optional photo attachment upload
POST /maintenance — member submits a request; sends in-app notification to all admins/staff
GET /maintenance/mine — member views their own submitted requests (paginated)
GET /maintenance — admin/staff views all requests (paginated, filterable by status, category, workspaceId)
PATCH /maintenance/:id/status — admin updates status to IN_PROGRESS or RESOLVED; when resolved, notify the reporting member via NotificationsModule and email
GET /maintenance/:id — detail view (admin or own request)
Overview
Members who encounter a broken chair, faulty air conditioning, or a safety hazard have no formal channel to report it in the platform. A maintenance request module creates a trackable workflow for the hub team to investigate and resolve.
Context
Userentity:backend/src/users/entities/user.entity.tsWorkspacesModule:backend/src/workspaces/— workspace FK for issue locationNotificationsModule:backend/src/notifications/— alert admins on new request; alert member on resolutionCloudinaryModule:backend/src/cloudinary/— for optional photo attachment uploadTasks
MaintenanceRequestentity:id,reportedByUserId(FK),workspaceId(FK, nullable — some issues are general),category(EQUIPMENT/FACILITY/SAFETY/OTHER),description(text),imageUrl(nullable),status(OPEN/IN_PROGRESS/RESOLVED),resolvedAt(nullable timestamptz),resolvedByStaffId(nullable FK),createdAt,updatedAtPOST /maintenance— member submits a request; sends in-app notification to all admins/staffGET /maintenance/mine— member views their own submitted requests (paginated)GET /maintenance— admin/staff views all requests (paginated, filterable bystatus,category,workspaceId)PATCH /maintenance/:id/status— admin updates status toIN_PROGRESSorRESOLVED; when resolved, notify the reporting member viaNotificationsModuleand emailGET /maintenance/:id— detail view (admin or own request)Files to Modify / Create
backend/src/maintenance/(module, entity, controller, service, providers)backend/src/app.module.ts