diff --git a/dpdp-accelerator/react-apps/consent-portal/frontend/src/types/complaint.ts b/dpdp-accelerator/react-apps/consent-portal/frontend/src/types/complaint.ts index b6f207f3..92409acd 100644 --- a/dpdp-accelerator/react-apps/consent-portal/frontend/src/types/complaint.ts +++ b/dpdp-accelerator/react-apps/consent-portal/frontend/src/types/complaint.ts @@ -48,20 +48,15 @@ export const COMPLAINT_PRIORITIES: ComplaintPriorityAPI[] = ['CRITICAL', 'HIGH', // the DAO/service layer (DAOConstants, mysql.sql's CHK_COMPLAINT_STATUS) and this frontend both // predate that spec revision and consistently use WAITING_ON_CLIENT instead. Kept as-is rather // than renamed across the DB/enum layer for this pass - see the integration notes for this gap. -export type ComplaintStatus = - | 'OPEN' - | 'IN_PROGRESS' - | 'WAITING_ON_CLIENT' - | 'AWAITING_INTERNAL_REVIEW' - | 'RESOLVED' - -export const COMPLAINT_STATUSES: ComplaintStatus[] = [ +export const COMPLAINT_STATUSES = [ 'OPEN', 'IN_PROGRESS', 'WAITING_ON_CLIENT', 'AWAITING_INTERNAL_REVIEW', 'RESOLVED', -] +] as const + +export type ComplaintStatus = (typeof COMPLAINT_STATUSES)[number] export type ComplaintActorRoleAPI = 'USER' | 'COMPLAINT_OFFICER' | 'SYSTEM' export type ComplaintActorRole = 'DataPrincipal' | 'ComplaintOfficer' | 'System'