Skip to content

Commit

Permalink
Reword role to qualifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacobjeevan committed Nov 11, 2024
1 parent a8ff61f commit 0565d84
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
6 changes: 3 additions & 3 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
"URINATION_FREQUENCY__NORMAL": "Normal",
"USERMANAGEMENT_TAB__FACILITIES": "Linked Facilities",
"USERMANAGEMENT_TAB__PROFILE": "User Information",
"USERMANAGEMENT_TAB__ROLE_SKILLS": "Role & Skills",
"USERMANAGEMENT_TAB__QUALIFICATIONS_SKILLS": "Qualifications & Skills",
"USERMANAGEMENT_TAB__SKILLS": "Skills",
"VENTILATOR": "Detailed Update",
"VENTILATOR_MODE__CMV": "Control Mechanical Ventilation (CMV)",
Expand Down Expand Up @@ -1316,8 +1316,8 @@
"use_existing_abha_address": "Use Existing ABHA Address",
"user_deleted_successfuly": "User Deleted Successfuly",
"user_management": "User Management",
"user_role": "Role",
"user_role_note": "Search and assign the appropriate role for this user.",
"user_qualifications": "Qualifications",
"user_qualifications_note": "Enter appropriate qualifications for this user",
"username": "Username",
"username_already_exists": "This username already exists",
"users": "Users",
Expand Down
10 changes: 7 additions & 3 deletions src/components/Users/RoleAndSkillsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { useTranslation } from "react-i18next";

import userColumns from "@/components/Common/UserColumns";
import LinkedSkills from "@/components/Users/LinkedSkills";
import UserQualifications from "@/components/Users/UserQualifications";
import { UserModel } from "@/components/Users/models";

import UserRoles from "./UserRoles";

type Props = {
userData: UserModel;
username: string;
Expand All @@ -24,7 +23,12 @@ export default function RoleAndSkillsTab(props: Props) {
<div className="mt-10 flex flex-col gap-y-12">
{userData.user_type &&
["Doctor", "Nurse"].includes(userData.user_type) &&
userColumns(t("user_role"), t("user_role_note"), UserRoles, props)}
userColumns(
t("user_qualifications"),
t("user_qualifications_note"),
UserQualifications,
props,
)}
{userColumns(
t("linked_skills"),
t("linked_skills_note"),
Expand Down
6 changes: 3 additions & 3 deletions src/components/Users/UserHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ export default function UserHome(props: UserHomeProps) {

const TABS: {
PROFILE: tabChildProp;
ROLE_SKILLS: tabChildProp;
SKILLS: tabChildProp;
FACILITIES: tabChildProp;
} = {
PROFILE: { body: UserSummaryTab },
ROLE_SKILLS: {
SKILLS: {
body: RoleAndSkillsTab,
name: roleInfoBeVisible() ? "ROLE_SKILLS" : "SKILLS",
name: roleInfoBeVisible() ? "QUALIFICATIONS_SKILLS" : "SKILLS",
},
FACILITIES: { body: LinkedFacilitiesTab },
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const editFormReducer = (state: State, action: Action) => {
}
};

export default function UserRoles({ username }: { username: string }) {
export default function UserQualifications({ username }: { username: string }) {
const { t } = useTranslation();
const [states, dispatch] = useReducer(editFormReducer, initialState);
const formVals = useRef(initForm);
Expand Down

0 comments on commit 0565d84

Please sign in to comment.