From d0b0be1933f98c2b0b1d96cfe4520b3ddfe5c6a0 Mon Sep 17 00:00:00 2001 From: SathishAdithiyaaSV Date: Sun, 15 Dec 2024 01:06:10 +0530 Subject: [PATCH 1/5] Fix TriageForm --- src/components/Facility/TriageForm.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Facility/TriageForm.tsx b/src/components/Facility/TriageForm.tsx index 607adb0172f..8fcb1c202d5 100644 --- a/src/components/Facility/TriageForm.tsx +++ b/src/components/Facility/TriageForm.tsx @@ -189,6 +189,10 @@ export const TriageForm = ({ facilityId, id }: Props) => { }; const handleFormFieldChange = (event: FieldChangeEvent) => { + + if (!/^\d*$/.test(event.value as string) && event.name !== "entry_date") + return; + dispatch({ type: "set_form", form: { ...state.form, [event.name]: event.value }, From 845325a3b58cd83a86a2399f7c62138fbcea18a1 Mon Sep 17 00:00:00 2001 From: SathishAdithiyaaSV Date: Sun, 15 Dec 2024 11:47:21 +0530 Subject: [PATCH 2/5] Fix button size --- src/components/Resource/ResourceBoard.tsx | 6 +++++- src/components/Resource/ResourceList.tsx | 6 +++++- src/components/Shifting/ShiftingBoard.tsx | 6 +++++- src/components/Shifting/ShiftingList.tsx | 6 +++++- src/components/ui/button.tsx | 1 + 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/Resource/ResourceBoard.tsx b/src/components/Resource/ResourceBoard.tsx index 1f8ccafcb5d..9dcc38b7027 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..2b00ad615d4 100644 --- a/src/components/Resource/ResourceList.tsx +++ b/src/components/Resource/ResourceList.tsx @@ -222,7 +222,11 @@ export default function ListView() {
- diff --git a/src/components/Shifting/ShiftingBoard.tsx b/src/components/Shifting/ShiftingBoard.tsx index cd9f4300fd4..ac4e8a45636 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..bb1f10a0440 100644 --- a/src/components/Shifting/ShiftingList.tsx +++ b/src/components/Shifting/ShiftingList.tsx @@ -78,7 +78,11 @@ export default function ListView() {
- diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index 0125726ce73..a393fa8e1ba 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -30,6 +30,7 @@ const buttonVariants = cva( xs: "h-6 rounded-md px-2 text-xs", sm: "h-8 rounded-md px-3 text-xs", lg: "h-10 rounded-md px-8", + xl: "h-10.8 px-4 py-2", icon: "h-9 w-9", }, }, From 93b7d54541887bb72ff08000693ea2d80dfe33ef Mon Sep 17 00:00:00 2001 From: SathishAdithiyaaSV Date: Sun, 15 Dec 2024 13:01:17 +0530 Subject: [PATCH 3/5] Update Shifting and Resource page --- src/components/Resource/ResourceBoard.tsx | 2 +- src/components/Resource/ResourceList.tsx | 72 ++++++++++++----------- src/components/Shifting/ShiftingBoard.tsx | 2 +- src/components/Shifting/ShiftingList.tsx | 70 +++++++++++----------- 4 files changed, 77 insertions(+), 69 deletions(-) diff --git a/src/components/Resource/ResourceBoard.tsx b/src/components/Resource/ResourceBoard.tsx index 9dcc38b7027..c7fabee431a 100644 --- a/src/components/Resource/ResourceBoard.tsx +++ b/src/components/Resource/ResourceBoard.tsx @@ -82,7 +82,7 @@ export default function BoardView() { value={qParams.title} onChange={(e) => updateQuery({ [e.name]: e.value })} placeholder={t("search_resource")} - className="w-full md:w-60" + className="w-full md:w-60 mb-1" /> { - 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 mb-1" + /> + +
advancedFilter.setShow(true)} />
- - } - > +
+
@@ -286,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 ac4e8a45636..4c8c4f235bc 100644 --- a/src/components/Shifting/ShiftingBoard.tsx +++ b/src/components/Shifting/ShiftingBoard.tsx @@ -109,7 +109,7 @@ export default function BoardView() { value={qParams.patient_name} onChange={(e) => updateQuery({ [e.name]: e.value })} placeholder={t("search_patient")} - className="w-full md:w-60" + className="w-full md:w-60 mb-1" /> { - 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 mb-1" + /> -
- updateQuery({ [e.name]: e.value })} - placeholder={t("search_patient")} - /> -
- -
+
advancedFilter.setShow(true)} />
- - } - > +
+
+
@@ -125,6 +127,6 @@ export default function ListView() { {...advancedFilter} key={window.location.search} /> - +
); } From 69d26d4d75e7bc15f6f5e26a8657023411bf44f9 Mon Sep 17 00:00:00 2001 From: SathishAdithiyaaSV Date: Sun, 15 Dec 2024 13:10:53 +0530 Subject: [PATCH 4/5] Final commit --- src/components/Facility/TriageForm.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/Facility/TriageForm.tsx b/src/components/Facility/TriageForm.tsx index 8fcb1c202d5..607adb0172f 100644 --- a/src/components/Facility/TriageForm.tsx +++ b/src/components/Facility/TriageForm.tsx @@ -189,10 +189,6 @@ export const TriageForm = ({ facilityId, id }: Props) => { }; const handleFormFieldChange = (event: FieldChangeEvent) => { - - if (!/^\d*$/.test(event.value as string) && event.name !== "entry_date") - return; - dispatch({ type: "set_form", form: { ...state.form, [event.name]: event.value }, From d8c81d7721baa78b6014c51f9912980068fe66c3 Mon Sep 17 00:00:00 2001 From: SathishAdithiyaaSV Date: Sun, 15 Dec 2024 14:21:42 +0530 Subject: [PATCH 5/5] Update as requested --- src/components/Resource/ResourceBoard.tsx | 4 ++-- src/components/Resource/ResourceList.tsx | 4 ++-- src/components/Shifting/ShiftingBoard.tsx | 4 ++-- src/components/Shifting/ShiftingList.tsx | 4 ++-- src/components/ui/button.tsx | 1 - 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/components/Resource/ResourceBoard.tsx b/src/components/Resource/ResourceBoard.tsx index c7fabee431a..39b6f5184e5 100644 --- a/src/components/Resource/ResourceBoard.tsx +++ b/src/components/Resource/ResourceBoard.tsx @@ -82,7 +82,7 @@ export default function BoardView() { value={qParams.title} onChange={(e) => updateQuery({ [e.name]: e.value })} placeholder={t("search_resource")} - className="w-full md:w-60 mb-1" + className="w-full md:w-60" />