From ceaf4715dc148d73c425d36c0503cc732a03e957 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sat, 27 Dec 2025 20:52:02 +0000 Subject: [PATCH] Add invoices and stock events sections to PurchaseOrderInfo component - Introduced new icons for invoices and stock events. - Added collapsible sections for displaying invoices and stock events related to purchase orders. - Updated state management to handle the visibility of the new sections. --- .../PurchaseOrders/PurchaseOrderInfo.jsx | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/src/components/Dashboard/Inventory/PurchaseOrders/PurchaseOrderInfo.jsx b/src/components/Dashboard/Inventory/PurchaseOrders/PurchaseOrderInfo.jsx index 3c73a50..4f55010 100644 --- a/src/components/Dashboard/Inventory/PurchaseOrders/PurchaseOrderInfo.jsx +++ b/src/components/Dashboard/Inventory/PurchaseOrders/PurchaseOrderInfo.jsx @@ -28,6 +28,8 @@ import PostPurchaseOrder from './PostPurchaseOrder.jsx' import AcknowledgePurchaseOrder from './AcknowledgePurchaseOrder.jsx' import CancelPurchaseOrder from './CancelPurchaseOrder.jsx' import ShipmentIcon from '../../../Icons/ShipmentIcon.jsx' +import InvoiceIcon from '../../../Icons/InvoiceIcon.jsx' +import StockEventIcon from '../../../Icons/StockEventIcon.jsx' import { getModelByName } from '../../../../database/ObjectModels.js' const log = loglevel.getLogger('PurchaseOrderInfo') @@ -53,7 +55,9 @@ const PurchaseOrderInfo = () => { { info: true, notes: true, - auditLogs: true + auditLogs: true, + invoices: true, + stockEvents: true } ) @@ -141,6 +145,8 @@ const PurchaseOrderInfo = () => { { key: 'info', label: 'Purchase Order Information' }, { key: 'orderItems', label: 'Order Items' }, { key: 'shipments', label: 'Shipments' }, + { key: 'invoices', label: 'Invoices' }, + { key: 'stockEvents', label: 'Stock Events' }, { key: 'notes', label: 'Notes' }, { key: 'auditLogs', label: 'Audit Logs' } ]} @@ -256,6 +262,48 @@ const PurchaseOrderInfo = () => { ref={shipmentsTableRef} /> + } + active={collapseState.invoices} + onToggle={(expanded) => + updateCollapseState('invoices', expanded) + } + collapseKey='invoices' + > + {objectFormState.loading ? ( + + ) : ( + + )} + + } + active={collapseState.stockEvents} + onToggle={(expanded) => + updateCollapseState('stockEvents', expanded) + } + collapseKey='stockEvents' + > + {objectFormState.loading ? ( + + ) : ( + + )} + )}