Skip to content

feat(support): build support tickets module - submit, reply, status tracking#1145

Merged
yusuftomilola merged 2 commits into
DistinctCodes:mainfrom
devwums:feat/support-tickets-module-1086
Jun 26, 2026
Merged

feat(support): build support tickets module - submit, reply, status tracking#1145
yusuftomilola merged 2 commits into
DistinctCodes:mainfrom
devwums:feat/support-tickets-module-1086

Conversation

@devwums

@devwums devwums commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a full support ticketing system to ManageHub, replacing informal WhatsApp/verbal channels with tracked, prioritised, and auditable support requests.

New module: \�ackend/src/support/`n

Entities

  • \SupportTicket\ - \userId\ FK, \subject, \description\ (text), \category\ enum (billing/technical/access/booking/general), \priority\ enum (low/medium/high, default medium), \status\ enum (open/in_progress/resolved/closed), \�ssignedToId\ (nullable FK to users)
  • \TicketReply\ - \ icketId\ FK (CASCADE), \userId\ FK, \message\ (text), \isStaffReply\ boolean

DTOs (all with class-validator)

  • \CreateTicketDto, \CreateReplyDto, \UpdateTicketStatusDto, \AssignTicketDto, \QueryTicketsDto`n
    SupportService
  • \createTicket\ - creates ticket; emails all admins via \EmailService.sendTemplateEmail`n- \getMyTickets\ - member's own tickets only
  • \getTicket\ - owner or admin; throws \403\ otherwise
  • \�ddReply\ - owner or admin; emails the member when an admin replies
  • \updateStatus\ - admin only
  • \�ssignTicket\ - admin only; sets \�ssignedToId\ and/or \priority`n- \getAllTickets\ - admin only; QueryBuilder filters on \status, \category, \priority, \�ssignedToId`n
    SupportController
    | Method | Path | Guard |
    |--------|------|-------|
    | POST | /support | JWT |
    | GET | /support/my | JWT |
    | GET | /support/:id | JWT (owner or admin in service) |
    | POST | /support/:id/reply | JWT (owner or admin in service) |
    | PATCH | /support/:id/status | JWT + RolesGuard(ADMIN) |
    | PATCH | /support/:id/assign | JWT + RolesGuard(ADMIN) |
    | GET | /support | JWT + RolesGuard(ADMIN) |

AppModule

  • \SupportModule\ registered

closes #1086

…ng, and email notifications

- Add SupportTicket entity: uuid PK, userId FK, subject, description (text), category enum (billing/technical/access/booking/general), priority enum (low/medium/high, default medium), status enum (open/in_progress/resolved/closed), assignedToId FK (nullable)
- Add TicketReply entity: uuid PK, ticketId FK with CASCADE, userId FK, message (text), isStaffReply boolean
- Add CreateTicketDto, CreateReplyDto, UpdateTicketStatusDto, AssignTicketDto, QueryTicketsDto with class-validator decorators
- Add SupportService: createTicket (notifies all admins by email on submission), getMyTickets, getTicket (owner or admin only), addReply (owner or admin; emails member on staff reply), updateStatus (admin), assignTicket (admin; sets assignedToId and priority), getAllTickets (admin; filters by status, category, priority, assignedToId via QueryBuilder)
- Add SupportController: POST /support, GET /support/my, GET /support/:id, POST /support/:id/reply, PATCH /support/:id/status (admin), PATCH /support/:id/assign (admin), GET /support (admin) with @roles + RolesGuard
- Add SupportModule: registers SupportTicket and TicketReply; imports UsersModule for admin lookup
- Register SupportModule in AppModule
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

@devwums is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@yusuftomilola yusuftomilola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect

@yusuftomilola yusuftomilola merged commit 369c81a into DistinctCodes:main Jun 26, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GF-BE-11] Build support tickets backend module (submit, reply, status tracking)

2 participants