diff --git a/public/locale/en.json b/public/locale/en.json index 36c25a06682..e281d8239bf 100644 --- a/public/locale/en.json +++ b/public/locale/en.json @@ -5,6 +5,7 @@ "APPETITE__NO_TASTE_FOR_FOOD": "No taste for food", "APPETITE__REDUCED": "Reduced", "APPETITE__SATISFACTORY": "Satisfactory", + "APPROVED": "Approved", "AUTOMATED": "Automated", "BED_WITH_OXYGEN_SUPPORT": "Bed with Oxygen Support", "BLADDER_DRAINAGE__CONDOM_CATHETER": "Condom Catheter", @@ -140,6 +141,7 @@ "OXYGEN_MODALITY__NON_REBREATHING_MASK_short": "NRM", "OXYGEN_MODALITY__SIMPLE_FACE_MASK": "Simple Face Mask", "OXYGEN_MODALITY__SIMPLE_FACE_MASK_short": "SFM", + "PENDING": "Pending", "PRESCRIPTION_FREQUENCY_BD": "Twice daily", "PRESCRIPTION_FREQUENCY_HS": "Night only", "PRESCRIPTION_FREQUENCY_OD": "Once daily", @@ -205,6 +207,7 @@ "SORT_OPTIONS__taken_at": "Oldest taken date first", "Submit": "Submit", "TELEMEDICINE": "Telemedicine", + "TRANSPORTATION TO BE ARRANGED": "Transportation", "URINATION_FREQUENCY__DECREASED": "Decreased", "URINATION_FREQUENCY__INCREASED": "Increased", "URINATION_FREQUENCY__NORMAL": "Normal", @@ -905,6 +908,7 @@ "no_log_update_delta": "No changes since previous log update", "no_log_updates": "No log updates found", "no_notices_for_you": "No notices for you.", + "no_patients_found": "No Patients Found", "no_patients_to_show": "No patients to show.", "no_policy_added": "No Insurance Policy Added", "no_policy_found": "No Insurance Policy Found for this Patient", @@ -1102,6 +1106,7 @@ "resource_approving_facility": "Resource approving facility", "resource_origin_facility": "Origin Facility", "resource_request": "Resource Request", + "resource_status": "Resource Status", "result": "Result", "result_date": "Result Date", "result_details": "Result details", diff --git a/src/components/Common/AvatarEditModal.tsx b/src/components/Common/AvatarEditModal.tsx index 38b54b1f1d2..bcc61819fde 100644 --- a/src/components/Common/AvatarEditModal.tsx +++ b/src/components/Common/AvatarEditModal.tsx @@ -292,7 +292,7 @@ const AvatarEditModal = ({ {isProcessing ? ( ({ patientAssetBed: obj, socketUrl: getVitalsMonitorSocketUrl(obj.asset), })); - const { config, hash } = useVitalsAspectRatioConfig({ default: 6 / 11, sm: 17 / 11, @@ -88,7 +90,7 @@ export default function CentralNursingStation({ facilityId }: Props) { updatePage(page)} /> @@ -216,21 +218,23 @@ export default function CentralNursingStation({ facilityId }: Props) { {t("no_vitals_present")} ) : ( -
- {data.map((props, i) => ( -
- -
- ))} +
+
+ {data.map((props, i) => ( +
+ +
+ ))} +
)} diff --git a/src/components/Patient/ManagePatients.tsx b/src/components/Patient/ManagePatients.tsx index d42f0072794..0664532b0a1 100644 --- a/src/components/Patient/ManagePatients.tsx +++ b/src/components/Patient/ManagePatients.tsx @@ -392,7 +392,7 @@ export const PatientManager = () => { ); const LastAdmittedToTypeBadges = () => { - const badge = (key: string, value: any, id: string) => { + const badge = (key: string, value: string | undefined, id: string) => { return ( value && ( { }; const HasConsentTypesBadges = () => { - const badge = (key: string, value: any, id: string) => { + const badge = (key: string, value: string | undefined, id: string) => { return ( value && ( { managePatients = (

- No Patients Found + {t("no_patients_found")}

); @@ -875,6 +875,7 @@ export const PatientManager = () => { /> {!!params.facility && ( { triggerGoal("Doctor Connect Clicked", { diff --git a/src/components/Resource/ResourceList.tsx b/src/components/Resource/ResourceList.tsx index 8a12545d7d1..6eecf7fcef2 100644 --- a/src/components/Resource/ResourceList.tsx +++ b/src/components/Resource/ResourceList.tsx @@ -1,6 +1,7 @@ -import { navigate } from "raviger"; +import { Link, navigate } from "raviger"; import { useTranslation } from "react-i18next"; +import Chip from "@/CAREUI/display/Chip"; import CareIcon from "@/CAREUI/icons/CareIcon"; import { AdvancedFilterButton } from "@/CAREUI/interactive/FiltersSlideover"; @@ -11,7 +12,6 @@ import Page from "@/components/Common/Page"; import { ResourceModel } from "@/components/Facility/models"; import SearchInput from "@/components/Form/SearchInput"; import BadgesList from "@/components/Resource/ResourceBadges"; -import ResourceBlock from "@/components/Resource/ResourceBlock"; import { formatFilter } from "@/components/Resource/ResourceCommons"; import ListFilter from "@/components/Resource/ResourceFilter"; @@ -20,6 +20,7 @@ import useFilters from "@/hooks/useFilters"; import routes from "@/Utils/request/api"; import request from "@/Utils/request/request"; import useQuery from "@/Utils/request/useQuery"; +import { formatDateTime } from "@/Utils/utils"; export default function ListView() { const { @@ -48,15 +49,140 @@ export default function ListView() { const showResourceCardList = (data: ResourceModel[]) => { if (data && !data.length) { return ( -
+
{t("no_results_found")}
); } - return data.map((resource, i) => ( -
- + return data.map((resource: ResourceModel, i) => ( +
+
+
+
{resource.title}
+
+ +
+
+
+ +
+ {resource.category || ""} +
+ +
+
+
+ {resource.sub_category || "--"} +
+
+
+ +
+
+ {resource.status === "TRANSPORTATION TO BE ARRANGED" ? ( +
+ +
+ ) : ( +
+ +
+ )} + +
+ {resource.emergency && ( + + {t("emergency")} + + )} +
+
+ +
+
+ +
+ {formatDateTime(resource.modified_date) || "--"} +
+ +
+
+ +
+
+ +
+ {resource.origin_facility_object?.name} +
+ + +
+ +
+ {resource.approving_facility_object?.name} +
+ + +
+ +
+ {resource.assigned_facility_object?.name || + t("yet_to_be_decided")} +
+ +
+
+ + {t("all_details")} + +
+
)); }; @@ -79,7 +205,8 @@ export default function ListView() { breadcrumbs={false} options={ <> -
+
+
-
- {/* dummy div to align space as per board view */} -
-
- - - {t("board_view")} - +
advancedFilter.setShow(true)} /> + + + {t("board_view")} +
} @@ -123,10 +247,24 @@ export default function ListView() { {t("refresh_list")}
- -
- {data?.results && showResourceCardList(data?.results)} +
+
+ {t("resource")} +
+
+ {t("LOG_UPDATE_FIELD_LABEL__patient_category")} +
+
+ {t("consent__status")} +
+
+ {t("facilities")} +
+
+ {t("LOG_UPDATE_FIELD_LABEL__action")} +
+
{showResourceCardList(data?.results || [])}
diff --git a/src/hooks/useBreakpoints.ts b/src/hooks/useBreakpoints.ts index bba811ab88e..2b36e4664eb 100644 --- a/src/hooks/useBreakpoints.ts +++ b/src/hooks/useBreakpoints.ts @@ -1,6 +1,6 @@ import useWindowDimensions from "@/hooks/useWindowDimensions"; -type Breakpoints = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl"; +type Breakpoints = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "4k"; // Ensure that the breakpoint widths are sorted in ascending order. const BREAKPOINT_WIDTH: Record = { @@ -10,6 +10,8 @@ const BREAKPOINT_WIDTH: Record = { xl: 1280, "2xl": 1536, "3xl": 1920, + "4xl": 2560, + "4k": 3840, }; /**