diff --git a/src/Pages/EquipmentInstancesListPage/EquipmentInstancesFilteredListPage.tsx b/src/Pages/EquipmentInstancesListPage/EquipmentInstancesFilteredListPage.tsx index 9282acb..87f26eb 100644 --- a/src/Pages/EquipmentInstancesListPage/EquipmentInstancesFilteredListPage.tsx +++ b/src/Pages/EquipmentInstancesListPage/EquipmentInstancesFilteredListPage.tsx @@ -67,78 +67,79 @@ export default function EquipmentInstancesFilteredListPage() { flexWrap: "wrap", }} > -
- - - - - ID - - Name - - - Status - - - Category - - - Last Modified - - - - - {equipment_instances.data ? ( - equipment_instances.data - .filter((equipment) => equipment.category === filter_by) - .map((equipment) => ( - { - SetSelectedItem(equipment.id); - SetEditModalOpen(true); - }} - > - - {equipment.id} - - - {equipment.equipment_name} - + +
+ + + ID + + Name + + + Status + + + Category + + + Last Modified + + + + + {equipment_instances.data ? ( + equipment_instances.data + .filter((equipment) => equipment.category === filter_by) + .map((equipment) => ( + { + SetSelectedItem(equipment.id); + SetEditModalOpen(true); + }} + > + + {equipment.id} + + + {equipment.equipment_name} + - - {equipment.status} - - - {equipment.category} - - -
-
{equipment.last_updated}
-
- {equipment.last_updated_by - ? "by " + equipment.last_updated_by - : ""} -
+ + {equipment.status} + + + {equipment.category} + + +
+
{equipment.last_updated}
+
+ {equipment.last_updated_by + ? "by " + equipment.last_updated_by + : ""}
- - - )) - ) : ( - <> - )} - -
-
-
+ + + + )) + ) : ( + <> + )} + + + -
- - - - - ID - - Name - - - Status - - - Category - - - Last Modified - - - - - {equipment_instances.data ? ( - equipment_instances.data.map((equipment) => ( - { - SetSelectedItem(equipment.id); - SetEditModalOpen(true); - }} - > - - {equipment.id} - - - {equipment.equipment_name} - + +
+ + + ID + + Name + + + Status + + + Category + + + Last Modified + + + + + {equipment_instances.data ? ( + equipment_instances.data.map((equipment) => ( + { + SetSelectedItem(equipment.id); + SetEditModalOpen(true); + }} + > + + {equipment.id} + + + {equipment.equipment_name} + - - {equipment.status} - - - {equipment.category} - - -
-
{equipment.last_updated}
-
- {equipment.last_updated_by - ? "by " + equipment.last_updated_by - : ""} -
+ + {equipment.status} + + + {equipment.category} + + +
+
{equipment.last_updated}
+
+ {equipment.last_updated_by + ? "by " + equipment.last_updated_by + : ""}
- - - )) - ) : ( - <> - )} - -
-
-
+ + + + )) + ) : ( + <> + )} + + + -
- - - - - ID - - Name - - - Description - - - Category - - - Last Modified - - - - - {equipments.data ? ( - equipments.data.map((equipment) => ( - { - SetSelectedItem(equipment.id); - SetEditModalOpen(true); - }} - > - - {equipment.id} - - - {equipment.name} - + +
+ + + ID + + Name + + + Description + + + Category + + + Last Modified + + + + + {equipments.data ? ( + equipments.data.map((equipment) => ( + { + SetSelectedItem(equipment.id); + SetEditModalOpen(true); + }} + > + + {equipment.id} + + + {equipment.name} + - - {equipment.description} - - - {equipment.category} - - -
-
{equipment.last_updated}
-
- {equipment.last_updated_by - ? "by " + equipment.last_updated_by - : ""} -
+ + {equipment.description} + + + {equipment.category} + + +
+
{equipment.last_updated}
+
+ {equipment.last_updated_by + ? "by " + equipment.last_updated_by + : ""}
- - - )) - ) : ( - <> - )} - -
-
-
+ + + + )) + ) : ( + <> + )} + + + -
- - - - - - Transaction ID - - - SKU ID - - - Name - - - Description - - - Category - - - Date Modified - - - - - {equipment_logs.data ? ( - equipment_logs.data.map((equipment_log) => ( - - - {equipment_log.history_id} - - - {equipment_log.id} - - - {equipment_log.name} - + +
+ + + + Transaction ID + + + SKU ID + + + Name + + + Description + + + Category + + + Date Modified + + + + + {equipment_logs.data ? ( + equipment_logs.data.map((equipment_log) => ( + + + {equipment_log.history_id} + + + {equipment_log.id} + + + {equipment_log.name} + - - {equipment_log.description} - - - {equipment_log.category} - - -
-
{equipment_log.history_date}
-
- {equipment_log.history_user - ? "by " + equipment_log.history_user - : ""} -
+ + {equipment_log.description} + + + {equipment_log.category} + + +
+
{equipment_log.history_date}
+
+ {equipment_log.history_user + ? "by " + equipment_log.history_user + : ""}
- - - )) - ) : ( - <> - )} - -
-
-
+ + + + )) + ) : ( + <> + )} + + + ); diff --git a/src/Pages/TransactionsListPage/TransactionsListPage.tsx b/src/Pages/TransactionsListPage/TransactionsListPage.tsx index 0099e42..f5f480e 100644 --- a/src/Pages/TransactionsListPage/TransactionsListPage.tsx +++ b/src/Pages/TransactionsListPage/TransactionsListPage.tsx @@ -66,143 +66,144 @@ export default function TransactionsListPage() { flexWrap: "wrap", }} > -
- - - - - - ID - - - Borrower - - - Teacher - - - Status - - - Equipments - - - - - {transactions.data ? ( - transactions.data.map((transaction) => ( - +
+ + + + ID + + + Borrower + + + Teacher + + + Status + + + Equipments + + + + + {transactions.data ? ( + transactions.data.map((transaction) => ( + + { + SetSelectedTransaction(transaction.id); + SetEditTransactionOpen(true); + }} > - { - SetSelectedTransaction(transaction.id); - SetEditTransactionOpen(true); - }} - > - {transaction.id} - - { - SetSelectedTransaction(transaction.id); - SetEditTransactionOpen(true); - }} - > - {transaction.borrower.name} - - { - SetSelectedTransaction(transaction.id); - SetEditTransactionOpen(true); - }} - > - {transaction.teacher.name} - - { - SetSelectedTransaction(transaction.id); - SetEditTransactionOpen(true); - }} - > - {transaction.transaction_status} - - - -
- + {transaction.id} + + { + SetSelectedTransaction(transaction.id); + SetEditTransactionOpen(true); + }} + > + {transaction.borrower.name} + + { + SetSelectedTransaction(transaction.id); + SetEditTransactionOpen(true); + }} + > + {transaction.teacher.name} + + { + SetSelectedTransaction(transaction.id); + SetEditTransactionOpen(true); + }} + > + {transaction.transaction_status} + + + +
+ + + + ID + + + Name + + + + + {transaction.equipments.map((equipment) => ( { + SetEditTransactionOpen(false); + SetEditEquipmentsOpen(true); + }} > - ID + {equipment.id} - Name + {equipment.name} - - - {transaction.equipments.map((equipment) => ( - { - SetEditTransactionOpen(false); - SetEditEquipmentsOpen(true); - }} - > - - {equipment.id} - - - {equipment.name} - - - ))} - -
-
- - - )) - ) : ( - <> - )} - - - -
+ ))} + + + + + + )) + ) : ( + <> + )} + + +