Skip to content

Commit

Permalink
update to reroute to clinician queue page
Browse files Browse the repository at this point in the history
  • Loading branch information
jabahum committed Mar 27, 2024
1 parent f1c259c commit f14adee
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/login/login.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,24 @@ const Login: React.FC<LoginReferrer> = () => {
if (roles && roles.length > 0) {
if (roles.length > 1) {
const filteredRoles = roles.filter(
(item) => item.display !== null
(item) => item.display === "Provider"
);
if (filteredRoles.length > 0) {
navigate({ to: "/home" });
navigate({
to: `${window.getOpenmrsSpaBase()}home/clinical-room-patient-queues`,
});
return;
}
} else {
const role = roles[0]?.display;
if (role === "Triage") {
navigate({ to: "/triage-patient-queues" });
navigate({
to: `${window.getOpenmrsSpaBase()}home/triage-patient-queues`,
});
} else if (role === "Reception") {
navigate({ to: "/reception-patient-queues" });
} else if (
role === "Organizational: Clinician" ||
role === "Provider"
) {
navigate({ to: "/clinical-room-patient-queues" });
navigate({
to: `${window.getOpenmrsSpaBase()}home/reception-patient-queues`,
});
}
return;
}
Expand Down

0 comments on commit f14adee

Please sign in to comment.