mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2024-11-17 06:19:27 +08:00
nag butang kog total, borrowed pud, gifix ang magin top, coloran lang og red ang broken.
This commit is contained in:
parent
44341e2645
commit
f139a508b2
1 changed files with 29 additions and 3 deletions
|
@ -65,6 +65,7 @@ export default function EquipmentTallyPage() {
|
||||||
width: "100%",
|
width: "100%",
|
||||||
minHeight: "100%",
|
minHeight: "100%",
|
||||||
minWidth: "100%",
|
minWidth: "100%",
|
||||||
|
marginTop: "6rem"
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
@ -192,7 +193,7 @@ export default function EquipmentTallyPage() {
|
||||||
<TableCell align="center" component="th" scope="row">
|
<TableCell align="center" component="th" scope="row">
|
||||||
<div style={styles.flex_column}>
|
<div style={styles.flex_column}>
|
||||||
<p style={{ ...styles.text_dark, ...styles.text_S }}>
|
<p style={{ ...styles.text_dark, ...styles.text_S }}>
|
||||||
Available:
|
Available: {"\n"}
|
||||||
{
|
{
|
||||||
equipment_instances.data?.filter(
|
equipment_instances.data?.filter(
|
||||||
(equipment_instance) =>
|
(equipment_instance) =>
|
||||||
|
@ -203,7 +204,7 @@ export default function EquipmentTallyPage() {
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
<p style={{ ...styles.text_dark, ...styles.text_S }}>
|
<p style={{ ...styles.text_dark, ...styles.text_S }}>
|
||||||
Pending:
|
Pending: {"\n"}
|
||||||
{
|
{
|
||||||
equipment_instances.data?.filter(
|
equipment_instances.data?.filter(
|
||||||
(equipment_instance) =>
|
(equipment_instance) =>
|
||||||
|
@ -214,7 +215,18 @@ export default function EquipmentTallyPage() {
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
<p style={{ ...styles.text_dark, ...styles.text_S }}>
|
<p style={{ ...styles.text_dark, ...styles.text_S }}>
|
||||||
Broken:
|
Borrowed: {"\n"}
|
||||||
|
{
|
||||||
|
equipment_instances.data?.filter(
|
||||||
|
(equipment_instance) =>
|
||||||
|
equipment_instance.equipment_name ==
|
||||||
|
equipment.name &&
|
||||||
|
equipment_instance.status == "Borrowed"
|
||||||
|
).length
|
||||||
|
}
|
||||||
|
</p>
|
||||||
|
<p style={{ ...styles.text_dark, ...styles.text_S, color: colors.red }}>
|
||||||
|
Broken: {"\n"}
|
||||||
{
|
{
|
||||||
equipment_instances.data?.filter(
|
equipment_instances.data?.filter(
|
||||||
(equipment_instance) =>
|
(equipment_instance) =>
|
||||||
|
@ -224,6 +236,20 @@ export default function EquipmentTallyPage() {
|
||||||
).length
|
).length
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
|
<div style={{ borderTop: "1px solid #000", minWidth: "40%", alignSelf: "center" }}>
|
||||||
|
<p
|
||||||
|
style={{ ...styles.text_dark, ...styles.text_s }}
|
||||||
|
>
|
||||||
|
Total: {"\n"}
|
||||||
|
{
|
||||||
|
equipment_instances.data?.filter(
|
||||||
|
(equipment_instance) =>
|
||||||
|
equipment_instance.equipment_name ===
|
||||||
|
equipment.name
|
||||||
|
).length
|
||||||
|
}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
Loading…
Reference in a new issue