From 361885398594491f92ded59c5ae741ca2d0b42cd Mon Sep 17 00:00:00 2001 From: SathishAdithiyaaSV <164901276+SathishAdithiyaaSV@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:56:06 +0530 Subject: [PATCH] Fix: UI changes in shifting and resources pages (#9437) --- src/components/Resource/ResourceBoard.tsx | 6 +- src/components/Resource/ResourceList.tsx | 78 +++++++++++++---------- src/components/Shifting/ShiftingBoard.tsx | 6 +- src/components/Shifting/ShiftingList.tsx | 76 ++++++++++++---------- 4 files changed, 95 insertions(+), 71 deletions(-) diff --git a/src/components/Resource/ResourceBoard.tsx b/src/components/Resource/ResourceBoard.tsx index 1f8ccafcb5d..39b6f5184e5 100644 --- a/src/components/Resource/ResourceBoard.tsx +++ b/src/components/Resource/ResourceBoard.tsx @@ -93,7 +93,11 @@ export default function BoardView() { currentTab={boardFilter !== ACTIVE ? 1 : 0} />
- diff --git a/src/components/Resource/ResourceList.tsx b/src/components/Resource/ResourceList.tsx index 2b44599f120..0175c9d63ea 100644 --- a/src/components/Resource/ResourceList.tsx +++ b/src/components/Resource/ResourceList.tsx @@ -9,7 +9,7 @@ import { Button } from "@/components/ui/button"; import { ExportButton } from "@/components/Common/Export"; import Loading from "@/components/Common/Loading"; -import Page from "@/components/Common/Page"; +import PageTitle from "@/components/Common/PageTitle"; import { ResourceModel } from "@/components/Facility/models"; import SearchInput from "@/components/Form/SearchInput"; import BadgesList from "@/components/Resource/ResourceBadges"; @@ -194,45 +194,55 @@ export default function ListView() { }; return ( - { - const { data } = await request(routes.downloadResourceRequests, { - query: { ...appliedFilters, csv: true }, - }); - return data ?? null; - }} - filenamePrefix="resource_requests" - /> - } - breadcrumbs={false} - options={ - <> -
-
- updateQuery({ [e.name]: e.value })} - placeholder={t("search_resource")} - /> -
+
+
+
+ { + const { data } = await request( + routes.downloadResourceRequests, + { + query: { ...appliedFilters, csv: true }, + }, + ); + return data ?? null; + }} + filenamePrefix="resource_requests" + /> + } + breadcrumbs={false} + /> +
+ +
+ updateQuery({ [e.name]: e.value })} + placeholder={t("search_resource")} + className="w-full md:w-60" + /> -
- advancedFilter.setShow(true)} />
- - } - > +
+
@@ -282,6 +292,6 @@ export default function ListView() { showResourceStatus={true} key={window.location.search} /> - +
); } diff --git a/src/components/Shifting/ShiftingBoard.tsx b/src/components/Shifting/ShiftingBoard.tsx index cd9f4300fd4..068820d3311 100644 --- a/src/components/Shifting/ShiftingBoard.tsx +++ b/src/components/Shifting/ShiftingBoard.tsx @@ -124,7 +124,11 @@ export default function BoardView() { />
- diff --git a/src/components/Shifting/ShiftingList.tsx b/src/components/Shifting/ShiftingList.tsx index 3bf071f1cc2..e9051b1449b 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -8,7 +8,7 @@ import { Button } from "@/components/ui/button"; import { ExportButton } from "@/components/Common/Export"; import Loading from "@/components/Common/Loading"; -import Page from "@/components/Common/Page"; +import PageTitle from "@/components/Common/PageTitle"; import SearchInput from "@/components/Form/SearchInput"; import BadgesList from "@/components/Shifting/ShiftingBadges"; import { formatFilter } from "@/components/Shifting/ShiftingCommons"; @@ -49,46 +49,52 @@ export default function ListView() { }); return ( - { - const { data } = await request(routes.downloadShiftRequests, { - query: { ...formatFilter(qParams), csv: true }, - }); - return data ?? null; - }} - filenamePrefix="shift_requests" - /> - } - breadcrumbs={false} - options={ - <> -
+
+
+
+ { + const { data } = await request(routes.downloadShiftRequests, { + query: { ...formatFilter(qParams), csv: true }, + }); + return data ?? null; + }} + filenamePrefix="shift_requests" + /> + } + breadcrumbs={false} + /> +
+
+ updateQuery({ [e.name]: e.value })} + placeholder={t("search_patient")} + className="w-full md:w-60" + /> -
- updateQuery({ [e.name]: e.value })} - placeholder={t("search_patient")} - /> -
- -
- advancedFilter.setShow(true)} />
- - } - > +
+
+
@@ -121,6 +127,6 @@ export default function ListView() { {...advancedFilter} key={window.location.search} /> - +
); }