Skip to content

Commit

Permalink
O3-2684: remove hard coded queue entry statuses (#1568)
Browse files Browse the repository at this point in the history
  • Loading branch information
cioan committed Jan 12, 2024
1 parent 72482e9 commit db7dd20
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,10 @@ const PatientInfo: React.FC<PatientInfoProps> = ({ patient }) => {
const priority = queueEntry?.priority ?? '';

const getServiceString = useCallback(() => {
switch (queueEntry?.status?.toLowerCase()) {
case 'waiting':
return `Waiting for ${queueEntry.service}`;
case 'in service':
return `Attending ${queueEntry.service}`;
case 'finished service':
return `Finished ${queueEntry.service}`;
default:
return '';
if (queueEntry?.status && queueEntry.service) {
return `${t(queueEntry.status)} - ${t(queueEntry.service)}`;
} else {
return '';
}
}, [queueEntry]);

Expand Down

0 comments on commit db7dd20

Please sign in to comment.