From 66b411ce67c9c3f3d841142128a2c29bbdf623cf Mon Sep 17 00:00:00 2001 From: Kevin Foong <55353265+kevin9foong@users.noreply.github.com> Date: Mon, 23 Dec 2024 10:58:47 +0800 Subject: [PATCH] feat: make typing more explicit for case in getStatusFromWorkflowStatus --- .../admin-form/responses/common/utils/mrfSubmissionView.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/features/admin-form/responses/common/utils/mrfSubmissionView.ts b/frontend/src/features/admin-form/responses/common/utils/mrfSubmissionView.ts index 4530cda82a..2543c60d08 100644 --- a/frontend/src/features/admin-form/responses/common/utils/mrfSubmissionView.ts +++ b/frontend/src/features/admin-form/responses/common/utils/mrfSubmissionView.ts @@ -17,7 +17,7 @@ export const getCurrentStepString = ( /** Gets the business friendly string for MRF submission status. */ export const getStatusFromWorkflowStatus = ( workflowStatus: WorkflowStatus | undefined, -) => { +): MRF_STATUS | '' => { switch (workflowStatus) { case WorkflowStatus.COMPLETED: case WorkflowStatus.APPROVED: @@ -25,7 +25,7 @@ export const getStatusFromWorkflowStatus = ( return MRF_STATUS.COMPLETED case WorkflowStatus.PENDING: return MRF_STATUS.PENDING - default: + case undefined: return '' } }