mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2024-11-17 06:19:27 +08:00
Fix sidebar buttons width, simplified restriction of technician components in homepage, and adjusted equipment instance status to match backend changes
This commit is contained in:
parent
9bb312808e
commit
a6b6925310
4 changed files with 12 additions and 12 deletions
|
@ -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() {
|
|||
<RadioGroup
|
||||
aria-labelledby="demo-radio-buttons-group-label"
|
||||
value={item.status}
|
||||
defaultValue="Working"
|
||||
defaultValue="Available"
|
||||
name="radio-buttons-group"
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setItem({ ...item, status: e.target.value });
|
||||
|
@ -142,9 +142,9 @@ export default function AddItemModal() {
|
|||
}}
|
||||
>
|
||||
<FormControlLabel
|
||||
value="Working"
|
||||
value="Available"
|
||||
control={<Radio />}
|
||||
label="Working"
|
||||
label="Available"
|
||||
style={styles.text_dark}
|
||||
/>
|
||||
<FormControlLabel
|
||||
|
@ -213,7 +213,7 @@ export default function AddItemModal() {
|
|||
queryClient.invalidateQueries({
|
||||
queryKey: ["equipment_instances"],
|
||||
});
|
||||
setItem({ ...item, status: "WORKING", remarks: "" });
|
||||
setItem({ ...item, status: "Available", remarks: "" });
|
||||
} else {
|
||||
setError(JSON.stringify(data[1]));
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ export default function TechnicianWidgets() {
|
|||
>
|
||||
{queries[1].data
|
||||
? queries[1].data.filter(
|
||||
(equipment) => equipment.status == "WORKING"
|
||||
(equipment) => equipment.status == "Available"
|
||||
).length
|
||||
: 0}
|
||||
</p>
|
||||
|
@ -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}
|
||||
</p>
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -205,7 +205,7 @@ export default function EditItemInstanceModal(props: {
|
|||
<RadioGroup
|
||||
aria-labelledby="demo-radio-buttons-group-label"
|
||||
value={item.status}
|
||||
defaultValue="Working"
|
||||
defaultValue="Available"
|
||||
name="radio-buttons-group"
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
setItem({ ...item, status: e.target.value });
|
||||
|
@ -219,9 +219,9 @@ export default function EditItemInstanceModal(props: {
|
|||
}}
|
||||
>
|
||||
<FormControlLabel
|
||||
value="Working"
|
||||
value="Available"
|
||||
control={<Radio />}
|
||||
label="Working"
|
||||
label="Available"
|
||||
style={styles.text_dark}
|
||||
/>
|
||||
<FormControlLabel
|
||||
|
|
Loading…
Reference in a new issue