Skip to content

Commit

Permalink
(feat) O3-2684: Remove hard coded queue entry statuses (#920)
Browse files Browse the repository at this point in the history
* O3-2684: remove hard coded queue entry statuses
  • Loading branch information
cioan committed Jan 5, 2024
1 parent 17b2bb0 commit 724352a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function ActiveVisitsTable() {
content: (
<span className={styles.statusContainer}>
<StatusIcon status={entry.status.toLowerCase()} />
<span>{buildStatusString(entry.status.toLowerCase(), entry.service)}</span>
<span>{buildStatusString(entry.status, entry.service)}</span>
</span>
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ describe('ActiveVisitsTable: ', () => {
});

const expectedTableRows = [
/Eric Test Ric Not Urgent Waiting For Triage 206 hours and 2 minutes/,
/John Smith Emergency Attending Clinical Consultation 206 hours and 2 minutes/,
/Eric Test Ric Not Urgent Waiting - Triage 206 hours and 2 minutes/,
/John Smith Emergency In Service - Clinical consultation 206 hours and 2 minutes/,
];

expectedTableRows.forEach((row) => {
Expand Down
8 changes: 1 addition & 7 deletions packages/esm-service-queues-app/src/helpers/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ export const buildStatusString = (status: string, service: string) => {
return '';
}

if (status === 'waiting') {
return `${status} for ${service}`;
} else if (status === 'in service') {
return `Attending ${service}`;
} else if (status === 'finished service') {
return `Finished ${service}`;
}
return `${status} - ${service}`;
};

export const formatWaitTime = (waitTime: string, t) => {
Expand Down

0 comments on commit 724352a

Please sign in to comment.