From a6b692531044ffe5aa65663a123637c5f91a555c Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sat, 16 Dec 2023 14:59:41 +0800 Subject: [PATCH] Fix sidebar buttons width, simplified restriction of technician components in homepage, and adjusted equipment instance status to match backend changes --- src/Components/AddItemModal/AddItemModal.tsx | 10 +++++----- src/Components/DashboardPage/TechnicianWidgets.tsx | 4 ++-- src/Components/DrawerButton/DrawerButton.tsx | 4 ++-- .../EditItemInstanceModal/EditItemInstanceModal.tsx | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Components/AddItemModal/AddItemModal.tsx b/src/Components/AddItemModal/AddItemModal.tsx index de2d997..5904890 100644 --- a/src/Components/AddItemModal/AddItemModal.tsx +++ b/src/Components/AddItemModal/AddItemModal.tsx @@ -21,7 +21,7 @@ export default function AddItemModal() { const [item, setItem] = useState({ equipment: 0, remarks: "", - status: "WORKING", + status: "Available", }); const [error, setError] = useState(""); @@ -128,7 +128,7 @@ export default function AddItemModal() { ) => { setItem({ ...item, status: e.target.value }); @@ -142,9 +142,9 @@ export default function AddItemModal() { }} > } - label="Working" + label="Available" style={styles.text_dark} /> {queries[1].data ? queries[1].data.filter( - (equipment) => equipment.status == "WORKING" + (equipment) => equipment.status == "Available" ).length : 0}

@@ -186,7 +186,7 @@ export default function TechnicianWidgets() { > {queries[1].data ? queries[1].data.filter( - (equipment) => equipment.status == "BROKEN" + (equipment) => equipment.status == "Broken" ).length : 0}

diff --git a/src/Components/DrawerButton/DrawerButton.tsx b/src/Components/DrawerButton/DrawerButton.tsx index 22fbf44..3d513f1 100644 --- a/src/Components/DrawerButton/DrawerButton.tsx +++ b/src/Components/DrawerButton/DrawerButton.tsx @@ -23,8 +23,8 @@ export default function DrawerButton(props: props) { onMouseLeave={() => setClicked(false)} style={{ borderRadius: 24, - minWidth: "128px", - maxWidth: "128px", + minWidth: "196px", + maxWidth: "196px", borderColor: colors.button_border, borderStyle: "solid", borderWidth: "2px", diff --git a/src/Components/EditItemInstanceModal/EditItemInstanceModal.tsx b/src/Components/EditItemInstanceModal/EditItemInstanceModal.tsx index c093ebd..10e3415 100644 --- a/src/Components/EditItemInstanceModal/EditItemInstanceModal.tsx +++ b/src/Components/EditItemInstanceModal/EditItemInstanceModal.tsx @@ -205,7 +205,7 @@ export default function EditItemInstanceModal(props: { ) => { setItem({ ...item, status: e.target.value }); @@ -219,9 +219,9 @@ export default function EditItemInstanceModal(props: { }} > } - label="Working" + label="Available" style={styles.text_dark} />