diff --git a/src/Components/EditItemInstanceModal/EditItemInstanceModal.tsx b/src/Components/EditItemInstanceModal/EditItemInstanceModal.tsx
index 10e3415..1015735 100644
--- a/src/Components/EditItemInstanceModal/EditItemInstanceModal.tsx
+++ b/src/Components/EditItemInstanceModal/EditItemInstanceModal.tsx
@@ -61,6 +61,9 @@ export default function EditItemInstanceModal(props: {
queryClient.invalidateQueries({
queryKey: ["equipment_instance", props.id],
});
+ queryClient.invalidateQueries({
+ queryKey: ["transactions"],
+ });
setError("Updated successfully");
toast(
`Item updated successfuly, ${
@@ -84,6 +87,7 @@ export default function EditItemInstanceModal(props: {
status: data[1].status,
});
}
+ props.setOpen(false);
},
});
diff --git a/src/Components/Types/Types.tsx b/src/Components/Types/Types.tsx
index ea60f65..c1d69f7 100644
--- a/src/Components/Types/Types.tsx
+++ b/src/Components/Types/Types.tsx
@@ -123,6 +123,7 @@ export type TransactionType = {
equipments: Array<{
id: number;
name: string;
+ status: string;
}>;
transaction_status: string;
timestamp: string;
diff --git a/src/Pages/TransactionsListPage/TransactionsListPage.tsx b/src/Pages/TransactionsListPage/TransactionsListPage.tsx
index 3f322d0..a9ab305 100644
--- a/src/Pages/TransactionsListPage/TransactionsListPage.tsx
+++ b/src/Pages/TransactionsListPage/TransactionsListPage.tsx
@@ -15,11 +15,13 @@ import Popup from "reactjs-popup";
import { useState } from "react";
import EditTransactionModal from "../../Components/EditTransactionModal/EditTransactionModal";
import TransactionFilterMenu from "../../Components/TransactionFilterMenu/TransactionFilterMenu";
+import EditItemInstanceModal from "../../Components/EditItemInstanceModal/EditItemInstanceModal";
export default function TransactionsListPage() {
const [EditTransactionOpen, SetEditTransactionOpen] = useState(false);
const [SelectedTransaction, SetSelectedTransaction] = useState(0);
const [EditEquipmentsOpen, SetEditEquipmentsOpen] = useState(false);
+ const [SelectedEquipment, SetSelectedEquipment] = useState(0);
const transactions = useQuery({
queryKey: ["transactions"],
queryFn: TransactionsAPI,
@@ -197,7 +199,7 @@ export default function TransactionsListPage() {
>
{transaction.remarks}
-
Edit Transaction Equipment Modal
+