@@ -290,13 +287,16 @@ const Location = ({
id="manage-bed-button"
variant="secondary"
border
- className="mt-3 flex w-full items-center justify-between"
+ className={cn(
+ "mt-3 flex w-full items-center justify-between",
+ totalBeds != null && "opacity-50",
+ )}
href={`location/${id}/beds`}
>
Manage Beds
- {totalBeds}
+ {totalBeds ?? "--"}
diff --git a/src/Components/Notifications/ShowPushNotification.tsx b/src/Components/Notifications/ShowPushNotification.tsx
index 2d2faa5ff5f..ca465f98df7 100644
--- a/src/Components/Notifications/ShowPushNotification.tsx
+++ b/src/Components/Notifications/ShowPushNotification.tsx
@@ -1,9 +1,8 @@
-import { DetailRoute } from "../../Routers/types";
import useQuery from "../../Utils/request/useQuery";
import routes from "../../Redux/api";
import { NotificationData } from "./models";
-export default function ShowPushNotification({ id }: DetailRoute) {
+export default function ShowPushNotification({ id }: { id: string }) {
useQuery(routes.getNotificationData, {
pathParams: { id },
onResponse(res) {
diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx
index 0be6fe6b819..46dad347dd5 100644
--- a/src/Components/Patient/ManagePatients.tsx
+++ b/src/Components/Patient/ManagePatients.tsx
@@ -471,7 +471,7 @@ export const PatientManager = () => {
let patientList: ReactNode[] = [];
if (data?.count) {
- patientList = data.results.map((patient: any) => {
+ patientList = data.results.map((patient) => {
let patientUrl = "";
if (
patient.last_consultation &&
@@ -506,7 +506,7 @@ export const PatientManager = () => {
-
+
{patient?.last_consultation?.current_bed &&
patient?.last_consultation?.discharge_date === null ? (
@@ -541,9 +541,10 @@ export const PatientManager = () => {
) : (
-
+
diff --git a/src/Components/Patient/PatientConsentRecordBlock.tsx b/src/Components/Patient/PatientConsentRecordBlock.tsx
index 07931380cb6..b66a6cbd8aa 100644
--- a/src/Components/Patient/PatientConsentRecordBlock.tsx
+++ b/src/Components/Patient/PatientConsentRecordBlock.tsx
@@ -70,10 +70,7 @@ export default function PatientConsentRecordBlockGroup(props: {
{
- console.log(e.value);
- setPatientCodeStatus(e.value);
- }}
+ onChange={(e) => setPatientCodeStatus(e.value)}
value={
CONSENT_PATIENT_CODE_STATUS_CHOICES.find(
(c) => c.id === patientCodeStatus,
diff --git a/src/Components/Patient/PatientHome.tsx b/src/Components/Patient/PatientHome.tsx
index f6fe4f28a72..4b88df5bd20 100644
--- a/src/Components/Patient/PatientHome.tsx
+++ b/src/Components/Patient/PatientHome.tsx
@@ -253,7 +253,7 @@ export const PatientHome = (props: any) => {
return (
{
{field("nationality").value === "India" && (
-
-
+
Insurance Details
diff --git a/src/Components/Users/ManageUsers.tsx b/src/Components/Users/ManageUsers.tsx
index 2a00a2a8305..801ffae03af 100644
--- a/src/Components/Users/ManageUsers.tsx
+++ b/src/Components/Users/ManageUsers.tsx
@@ -415,7 +415,7 @@ export default function ManageUsers() {
}}
>
-
Linked Facilities
+
{t("linked_facilities")}
- Linked Skills
+ {t("linked_skills")}
{["DistrictAdmin", "StateAdmin"].includes(
@@ -781,7 +781,7 @@ export function UserFacilities(props: { user: any }) {
selected={facility}
setSelected={setFacility}
errors=""
- className="z-40"
+ className="z-40 w-full"
/>
{
selected={selectedSkill}
setSelected={setSelectedSkill}
errors=""
+ className="w-full"
userSkills={skills?.results || []}
/>
- Personal Information
+ {t("personal_information")}
- Local Body, District and State are Non Editable Settings.
+ {t("local_body")}, {t("district")}, {t("state")}{" "}
+ {t("are_non_editable_fields")}.
- {showEdit ? "Cancel" : "Edit User Profile"}
+ {showEdit ? t("cancel") : t("edit_user_profile")}
- Sign out
+ {t("sign_out")}
@@ -498,7 +499,7 @@ export default function UserProfile() {
id="username-profile-details"
>
- Username
+ {t("username")}
{userData?.username || "-"}
@@ -509,7 +510,7 @@ export default function UserProfile() {
id="contactno-profile-details"
>
- Contact No
+ {t("phone_number")}
{userData?.phone_number || "-"}
@@ -521,7 +522,7 @@ export default function UserProfile() {
id="whatsapp-profile-details"
>
- Whatsapp No
+ {t("whatsapp_number")}
{userData?.alt_phone_number || "-"}
@@ -532,7 +533,7 @@ export default function UserProfile() {
id="emailid-profile-details"
>
- Email address
+ {t("email")}
{userData?.email || "-"}
@@ -543,7 +544,7 @@ export default function UserProfile() {
id="firstname-profile-details"
>
- First Name
+ {t("first_name")}
{userData?.first_name || "-"}
@@ -554,7 +555,7 @@ export default function UserProfile() {
id="lastname-profile-details"
>
- Last Name
+ {t("last_name")}
{userData?.last_name || "-"}
@@ -565,7 +566,7 @@ export default function UserProfile() {
id="date_of_birth-profile-details"
>
- Date of Birth
+ {t("date_of_birth")}
{userData?.date_of_birth
@@ -575,7 +576,7 @@ export default function UserProfile() {
- Access Level
+ {t("access_level")}
{" "}
@@ -587,7 +588,7 @@ export default function UserProfile() {
id="gender-profile-details"
>
- Gender
+ {t("gender")}
{userData?.gender || "-"}
@@ -595,7 +596,7 @@ export default function UserProfile() {
- Local Body
+ {t("local_body")}
{userData?.local_body_object?.name || "-"}
@@ -603,7 +604,7 @@ export default function UserProfile() {
- District
+ {t("district")}
{userData?.district_object?.name || "-"}
@@ -611,7 +612,7 @@ export default function UserProfile() {
- State
+ {t("state")}
{userData?.state_object?.name || "-"}
@@ -619,7 +620,7 @@ export default function UserProfile() {
- Skills
+ {t("skills")}
- Average weekly working hours
+ {t("average_weekly_working_hours")}
{userData?.weekly_working_hours ?? "-"}
@@ -656,7 +657,7 @@ export default function UserProfile() {
id="videoconnectlink-profile-details"
>
- Video Connect Link
+ {t("video_conference_link")}
{userData?.video_connect_link ? (
@@ -685,18 +686,18 @@ export default function UserProfile() {
o.text}
optionValue={(o) => o.text}
- optionIcon={(o) => (
- {o.icon}
- )}
options={GENDER_TYPES}
/>
>
)}
-
+
@@ -796,7 +798,7 @@ export default function UserProfile() {
@@ -888,10 +890,10 @@ export default function UserProfile() {
- Language Selection
+ {t("language_selection")}
- Set your local language
+ {t("set_your_local_language")}
@@ -903,10 +905,10 @@ export default function UserProfile() {
- Software Update
+ {t("software_update")}
- Check for an available update
+ {t("check_for_available_update")}
@@ -915,7 +917,7 @@ export default function UserProfile() {
- Update available
+ {t("update_available")}
@@ -936,8 +938,8 @@ export default function UserProfile() {
)}
/>
{updateStatus.isChecking
- ? "Checking for update"
- : "Check for update"}
+ ? t("checking_for_update")
+ : t("check_for_update")}
)}
diff --git a/src/Locale/en.json b/src/Locale/en.json
index 5200361e1be..f23ec2f0fef 100644
--- a/src/Locale/en.json
+++ b/src/Locale/en.json
@@ -25,6 +25,7 @@
"last_name": "Last Name",
"email": "Email Address",
"phone_number": "Phone Number",
+ "whatsapp_number": "Whatsapp Number",
"district": "District",
"gender": "Gender",
"age": "Age",
@@ -277,6 +278,28 @@
"unsupported_browser": "Unsupported Browser",
"unsupported_browser_description": "Your browser ({{name}} version {{version}}) is not supported. Please update your browser to the latest version or switch to a supported browser for the best experience.",
"add_remarks": "Add remarks",
+ "middleware_hostname": "Middleware Hostname",
+ "personal_information": "Personal Information",
+ "are_non_editable_fields": "are non-editable fields",
+ "edit_user_profile": "Edit Profile",
+ "skills": "Skills",
+ "access_level": "Access Level",
+ "qualification": "Qualification",
+ "years_of_experience": "Years of Experience",
+ "years_of_experience_of_the_doctor": "Years of Experience of the Doctor",
+ "medical_council_registration": "Medical Council Registration",
+ "doctor_s_medical_council_registration": "Doctor's Medical Council Registration",
+ "video_conference_link": "Video Conference Link",
+ "new_password_confirmation": "Confirm New Password",
+ "current_password": "Current Password",
+ "change_password": "Change Password",
+ "language_selection": "Language Selection",
+ "set_your_local_language": "Set your local language",
+ "software_update": "Software Update",
+ "check_for_available_update": "Check for available update",
+ "update_available": "Update Available",
+ "checking_for_update": "Checking for update",
+ "check_for_update": "Check for Update",
"SORT_OPTIONS__-created_date": "Latest created date first",
"SORT_OPTIONS__created_date": "Oldest created date first",
"SORT_OPTIONS__-category_severity": "Highest Severity category first",
@@ -293,9 +316,7 @@
"SORT_OPTIONS__-name": "Patient name Z-A",
"SORT_OPTIONS__bed__name": "Bed No. 1-N",
"SORT_OPTIONS__-bed__name": "Bed No. N-1",
- "middleware_hostname": "Middleware Hostname",
"local_ip_address": "Local IP Address",
- "qualification": "Qualification",
"CONSULTATION_TAB__UPDATES": "Overview",
"CONSULTATION_TAB__FEED": "Feed",
"CONSULTATION_TAB__SUMMARY": "Vitals",
@@ -1056,9 +1077,10 @@
"patient_body": "Patient Body",
"vitals_monitor": "Vitals Monitor",
"resource_origin_facility": "Origin Facility",
- "resource_approving_facility" : "Resource approving facility",
- "consultation_not_filed": "You have not filed any consultation for this patient yet.",
- "consultation_not_filed_description": "Please file a consultation for this patient to continue.",
+ "resource_approving_facility": "Resource approving facility",
+ "create_consultation": "Create Consultation",
+ "patient_details": "Patient Details",
"width": "Width ({{unit}})",
- "length": "Length ({{unit}})"
-}
+ "length": "Length ({{unit}})",
+ "linked_skills": "Linked Skills"
+}
\ No newline at end of file
diff --git a/src/PluginEngine.tsx b/src/PluginEngine.tsx
new file mode 100644
index 00000000000..3d47dba4d81
--- /dev/null
+++ b/src/PluginEngine.tsx
@@ -0,0 +1,51 @@
+/* eslint-disable i18next/no-literal-string */
+import React, { Suspense } from "react";
+import { CareAppsContext, useCareApps } from "./Common/hooks/useCareApps";
+import { pluginMap } from "./pluginTypes";
+import { UserAssignedModel } from "./Components/Users/models";
+import ErrorBoundary from "./Components/Common/ErrorBoundary";
+
+export default function PluginEngine({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ return (
+
Loading plugins... }>
+