From 2412f268096db845a761221746ad5554a47cc257 Mon Sep 17 00:00:00 2001 From: "Pongot, Jophiel" Date: Wed, 10 Jan 2024 06:48:38 +0800 Subject: [PATCH] gibalhin ra nako --- .../EquipmentTallyPage/EquipmentTallyPage.tsx | 167 ++++++++++-------- 1 file changed, 94 insertions(+), 73 deletions(-) diff --git a/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx b/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx index f901683..14d2092 100644 --- a/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx +++ b/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx @@ -65,86 +65,95 @@ export default function EquipmentTallyPage() { width: "100%", minHeight: "100%", minWidth: "100%", - marginTop: "6rem" + marginTop: "6rem", }} > -
-
- - - theme.palette.getContrastText(theme.palette.background.paper), - }, - }} - value={filter} - onChange={(_event, newValue) => { - setFilter(newValue); - }} - freeSolo - id="custom-input-demo" - options={["Glassware", "Miscellaneous"]} - renderInput={(params) => ( -
- -
- )} - /> -
-
-

- Results Found:{" "} - { - equipment_instances?.data?.filter((equipment) => - filter !== null - ? // If filter is not null, we filter if it matches any criteria - equipment.equipment_name - .toLowerCase() - .includes(filter.toLowerCase()) || - equipment.category - .toLowerCase() - .includes(filter.toLowerCase()) || - equipment.last_updated - .toLowerCase() - .includes(filter?.toLowerCase()) || - equipment.status.toLowerCase() == filter.toLowerCase() - : // If filter keyword is null then we just pass through everything as if we did not filter at all - true - ).length - } -

-
-
+
+
+
+ + + theme.palette.getContrastText( + theme.palette.background.paper + ), + }, + }} + value={filter} + onChange={(_event, newValue) => { + setFilter(newValue); + }} + freeSolo + id="custom-input-demo" + options={["Glassware", "Miscellaneous"]} + renderInput={(params) => ( +
+ +
+ )} + /> +
+
+

+ Results Found:{" "} + { + equipment_instances?.data?.filter((equipment) => + filter !== null + ? // If filter is not null, we filter if it matches any criteria + equipment.equipment_name + .toLowerCase() + .includes(filter.toLowerCase()) || + equipment.category + .toLowerCase() + .includes(filter.toLowerCase()) || + equipment.last_updated + .toLowerCase() + .includes(filter?.toLowerCase()) || + equipment.status.toLowerCase() == filter.toLowerCase() + : // If filter keyword is null then we just pass through everything as if we did not filter at all + true + ).length + } +

+
+
+ ID @@ -229,7 +238,13 @@ export default function EquipmentTallyPage() { ).length }

-

+

Broken: {"\n"} { equipment_instances.data?.filter( @@ -240,7 +255,13 @@ export default function EquipmentTallyPage() { ).length }

-
+