From 47c1b4bd3c1448f5ea42b64155e8dfefdd05b60f Mon Sep 17 00:00:00 2001 From: Gokulram A Date: Tue, 12 Dec 2023 18:31:59 +0530 Subject: [PATCH] redesign location card --- .../Facility/LocationManagement.tsx | 90 +++++++++++-------- src/Components/Facility/models.tsx | 3 + 2 files changed, 57 insertions(+), 36 deletions(-) diff --git a/src/Components/Facility/LocationManagement.tsx b/src/Components/Facility/LocationManagement.tsx index c018a7c222b..ff15849d970 100644 --- a/src/Components/Facility/LocationManagement.tsx +++ b/src/Components/Facility/LocationManagement.tsx @@ -51,10 +51,11 @@ export default function LocationManagement({ facilityId }: Props) { - - className="my-8 flex grow flex-col gap-3 lg:mx-8"> - {(item) => } - +
+ className="my-8 grid gap-3 @4xl:grid-cols-2 @6xl:grid-cols-3 @[100rem]:grid-cols-4 lg:mx-8"> + {(item) => } + +
@@ -69,43 +70,60 @@ const Location = ({ name, description, middleware_address, + location_type, + created_date, + modified_date, id, }: LocationModel) => ( -
-
-
-

- {name} -

- {description || "-"} -

-

-

- {middleware_address} -

+
+
+
+
+

{name}

+
+

+ {location_type} +

+
+
+ + + Edit +
+

+ {description || "-"} +

+

+ Middleware Address: +

+

+ {middleware_address || "-"} +

-
- - - Edit - - - - Manage Beds - + + + Manage Beds + + +
+

+ Created: {created_date?.slice(0, 10)} +

+

+ Modified: {modified_date?.slice(0, 10)} +

); diff --git a/src/Components/Facility/models.tsx b/src/Components/Facility/models.tsx index 0d8a112e021..465f1d10866 100644 --- a/src/Components/Facility/models.tsx +++ b/src/Components/Facility/models.tsx @@ -204,9 +204,12 @@ export interface LocationModel { name?: string; description?: string; middleware_address?: string; + location_type?: string; facility?: { name: string; }; + created_date?: string; + modified_date?: string; } export interface BedModel {