From 9187b41e66812b2d2ba561dd326934a0a58cff84 Mon Sep 17 00:00:00 2001 From: Shelly011s Date: Tue, 1 Oct 2024 03:12:37 +0530 Subject: [PATCH] Added temporary UI for location card --- .../Facility/LocationManagement.tsx | 212 +++++++++++------- 1 file changed, 125 insertions(+), 87 deletions(-) diff --git a/src/Components/Facility/LocationManagement.tsx b/src/Components/Facility/LocationManagement.tsx index abf4a056695..83124d3336a 100644 --- a/src/Components/Facility/LocationManagement.tsx +++ b/src/Components/Facility/LocationManagement.tsx @@ -13,16 +13,18 @@ import ConfirmDialog from "../Common/ConfirmDialog"; import DialogModal from "../Common/Dialog"; import Uptime from "../Common/Uptime"; import useAuthUser from "../../Common/hooks/useAuthUser"; - +// import useQuery from "../../Utils/request/useQuery"; const Loading = lazy(() => import("../Common/Loading")); interface Props { facilityId: string; + // locationId: string; } interface LocationProps extends LocationModel { facilityId: string; disabled: boolean; + // locationId: string; setShowDeletePopup: (e: { open: boolean; name: string; id: string }) => void; } @@ -117,6 +119,7 @@ export default function LocationManagement({ facilityId }: Props) { ( -
-
-
-
-

- {name} -

-
-

- {location_type} + // locationId +}: LocationProps) => { + // const { loading, data, refetch } = useQuery(routes.listFacilityBeds, { + // query: { + // facility: facilityId, + // // location: locationId, + // // limit: resultsPerPage, + // // offset: (qParams.page ? qParams.page - 1 : 0) * resultsPerPage, + // }, + // }); + + return ( +

+
+
+
+

+ {name}

+
+

+ {location_type} +

+
-
-

- {description || "-"} -

-

- Middleware Address: -

-

- {middleware_address || "-"} -

- - Middleware Uptime -

- } - centerInfoPanel - /> -
- - - - Manage Beds - -
-
- - - Edit - -
-
- - setShowDeletePopup({ open: true, name: name ?? "", id: id ?? "" }) - } + {description || "-"} +

+

+ Middleware Address: +

+

- - Delete - + {middleware_address || "-"} +

+ + Middleware Uptime +

+ } + centerInfoPanel + /> +
+

Beds

+
+
+

Isolation

+

8 beds

+
+
+

ICU

+

5 beds

+
+
+

Oxygen Support

+

8 beds

+
+
+

Regular

+

20 beds

+
+
+ + + Manage Beds + +
+
+ + + Edit + +
+
+ + setShowDeletePopup({ open: true, name: name ?? "", id: id ?? "" }) + } + > + + Delete + +
-
-
- - +
+ + +
-
-); + ); +};