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}
|
||||
</TableCell>
|
||||
<TableCell align="center" component="th" scope="row">
|
||||
{
|
||||
equipment_instances.data?.filter(
|
||||
(equipment_instance) =>
|
||||
equipment_instance.equipment_name ==
|
||||
equipment.name
|
||||
).length
|
||||
}
|
||||
<div style={styles.flex_column}>
|
||||
<p style={{ ...styles.text_dark, ...styles.text_S }}>
|
||||
Available:
|
||||
{
|
||||
equipment_instances.data?.filter(
|
||||
(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>
|
||||
</TableRow>
|
||||
))
|
||||
|
|
Loading…
Reference in a new issue