From f139a508b28112c0b98ee8e4c75dc5935f33d880 Mon Sep 17 00:00:00 2001 From: "Pongot, Jophiel" Date: Wed, 10 Jan 2024 06:30:14 +0800 Subject: [PATCH] nag butang kog total, borrowed pud, gifix ang magin top, coloran lang og red ang broken. --- .../EquipmentTallyPage/EquipmentTallyPage.tsx | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx b/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx index 38ab609..41df947 100644 --- a/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx +++ b/src/Pages/EquipmentTallyPage/EquipmentTallyPage.tsx @@ -65,6 +65,7 @@ export default function EquipmentTallyPage() { width: "100%", minHeight: "100%", minWidth: "100%", + marginTop: "6rem" }} >

- Available: + Available: {"\n"} { equipment_instances.data?.filter( (equipment_instance) => @@ -203,7 +204,7 @@ export default function EquipmentTallyPage() { }

- Pending: + Pending: {"\n"} { equipment_instances.data?.filter( (equipment_instance) => @@ -214,7 +215,18 @@ export default function EquipmentTallyPage() { }

- Broken: + Borrowed: {"\n"} + { + equipment_instances.data?.filter( + (equipment_instance) => + equipment_instance.equipment_name == + equipment.name && + equipment_instance.status == "Borrowed" + ).length + } +

+

+ Broken: {"\n"} { equipment_instances.data?.filter( (equipment_instance) => @@ -224,6 +236,20 @@ export default function EquipmentTallyPage() { ).length }

+
+

+ Total: {"\n"} + { + equipment_instances.data?.filter( + (equipment_instance) => + equipment_instance.equipment_name === + equipment.name + ).length + } +

+