Created
July 7, 2022 14:17
-
-
Save aasumitro/a22baeb21981557f8ce5bf6060d0fdf4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export enum Test { | |
draft, | |
pending, | |
approved, | |
rejected, | |
pendingForApproval, | |
rejectedByAdmin | |
} | |
export namespace Test { | |
export const transformToText = (status: number): string => { | |
switch (status) { | |
case Test.draft: | |
return 'Your prescription request is created'; | |
case Test.pending: | |
return 'Please wait a moment your prescription is under review'; | |
case Test.approved: | |
return 'Your prescription is approved'; | |
case Test.rejected: | |
return 'Your prescription is rejected'; | |
case Test.pendingForApproval: | |
return 'Please wait a moment your prescription request is waiting for approval'; | |
case Test.rejectedByAdmin: | |
return 'Your prescription is rejected by our admin'; | |
} | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment