mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2024-11-17 06:19:27 +08:00
Improved tally page
This commit is contained in:
parent
0d32ce61cb
commit
ff18a7a60c
1 changed files with 35 additions and 7 deletions
|
@ -194,13 +194,41 @@ export default function EquipmentTallyPage() {
|
||||||
{equipment.category}
|
{equipment.category}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell align="center" component="th" scope="row">
|
<TableCell align="center" component="th" scope="row">
|
||||||
{
|
<div style={styles.flex_column}>
|
||||||
equipment_instances.data?.filter(
|
<p style={{ ...styles.text_dark, ...styles.text_S }}>
|
||||||
(equipment_instance) =>
|
Available:
|
||||||
equipment_instance.equipment_name ==
|
{
|
||||||
equipment.name
|
equipment_instances.data?.filter(
|
||||||
).length
|
(equipment_instance) =>
|
||||||
}
|
equipment_instance.equipment_name ==
|
||||||
|
equipment.name &&
|
||||||
|
equipment_instance.status == "Available"
|
||||||
|
).length
|
||||||
|
}
|
||||||
|
</p>
|
||||||
|
<p style={{ ...styles.text_dark, ...styles.text_S }}>
|
||||||
|
Pending:
|
||||||
|
{
|
||||||
|
equipment_instances.data?.filter(
|
||||||
|
(equipment_instance) =>
|
||||||
|
equipment_instance.equipment_name ==
|
||||||
|
equipment.name &&
|
||||||
|
equipment_instance.status == "Pending"
|
||||||
|
).length
|
||||||
|
}
|
||||||
|
</p>
|
||||||
|
<p style={{ ...styles.text_dark, ...styles.text_S }}>
|
||||||
|
Broken:
|
||||||
|
{
|
||||||
|
equipment_instances.data?.filter(
|
||||||
|
(equipment_instance) =>
|
||||||
|
equipment_instance.equipment_name ==
|
||||||
|
equipment.name &&
|
||||||
|
equipment_instance.status == "Broken"
|
||||||
|
).length
|
||||||
|
}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in a new issue