Skip to content

Commit

Permalink
Hides nurse read only user type (#7757)
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed May 7, 2024
1 parent a7d7b72 commit 6de143d
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions src/Common/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,12 @@ export interface OptionsType {
disabled?: boolean;
}

export type UserRole =
| "Pharmacist"
| "Volunteer"
| "StaffReadOnly"
| "Staff"
| "NurseReadOnly"
| "Nurse"
| "Doctor"
| "WardAdmin"
| "LocalBodyAdmin"
| "DistrictLabAdmin"
| "DistrictReadOnlyAdmin"
| "DistrictAdmin"
| "StateLabAdmin"
| "StateReadOnlyAdmin"
| "StateAdmin";

export const USER_TYPE_OPTIONS: {
id: UserRole;
role: string;
readOnly?: boolean;
}[] = [
export const USER_TYPE_OPTIONS = [
{ id: "Pharmacist", role: "Pharmacist", readOnly: false },
{ id: "Volunteer", role: "Volunteer", readOnly: false },
{ id: "StaffReadOnly", role: "Staff", readOnly: true },
{ id: "Staff", role: "Staff", readOnly: false },
{ id: "NurseReadOnly", role: "Nurse", readOnly: true },
// { id: "NurseReadOnly", role: "Nurse", readOnly: true },
{ id: "Nurse", role: "Nurse", readOnly: false },
{ id: "Doctor", role: "Doctor", readOnly: false },
{ id: "WardAdmin", role: "Ward Admin", readOnly: false },
Expand All @@ -61,7 +40,9 @@ export const USER_TYPE_OPTIONS: {
{ id: "StateLabAdmin", role: "State Lab Admin", readOnly: false },
{ id: "StateReadOnlyAdmin", role: "State Admin", readOnly: true },
{ id: "StateAdmin", role: "State Admin", readOnly: false },
];
] as const;

export type UserRole = (typeof USER_TYPE_OPTIONS)[number]["id"];

export const USER_TYPES = USER_TYPE_OPTIONS.map((o) => o.id);

Expand Down

0 comments on commit 6de143d

Please sign in to comment.