Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aasumitro/a22baeb21981557f8ce5bf6060d0fdf4 to your computer and use it in GitHub Desktop.
Save aasumitro/a22baeb21981557f8ce5bf6060d0fdf4 to your computer and use it in GitHub Desktop.
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