From 7ea5eaf1f536d2c82377034b0a492ce17c9a1f7c Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Mon, 2 Mar 2026 00:53:43 +0000 Subject: [PATCH] Add export functionality with OData, Excel, and CSV options; introduce new icons and components for export buttons. --- assets/icons/csvicon.svg | 12 +++ assets/icons/excelicon.svg | 14 ++++ assets/icons/exporticon.svg | 9 +++ assets/icons/odataicon.svg | 7 ++ src/components/Dashboard/Finance/Invoices.jsx | 2 + src/components/Dashboard/Finance/Payments.jsx | 2 + .../Dashboard/Inventory/FilamentStocks.jsx | 2 + .../Dashboard/Inventory/OrderItems.jsx | 2 + .../Dashboard/Inventory/PartStocks.jsx | 2 + .../Dashboard/Inventory/PurchaseOrders.jsx | 2 + .../Dashboard/Inventory/Shipments.jsx | 2 + .../Dashboard/Inventory/StockAudits.jsx | 2 + .../Dashboard/Inventory/StockEvents.jsx | 2 + .../Dashboard/Management/AuditLogs.jsx | 2 + .../Dashboard/Management/CourierServices.jsx | 2 + .../Dashboard/Management/Couriers.jsx | 2 + .../Dashboard/Management/DocumentJobs.jsx | 2 + .../Dashboard/Management/DocumentPrinters.jsx | 2 + .../Dashboard/Management/DocumentSizes.jsx | 2 + .../Management/DocumentTemplates.jsx | 2 + .../Dashboard/Management/Filaments.jsx | 2 + src/components/Dashboard/Management/Files.jsx | 2 + src/components/Dashboard/Management/Hosts.jsx | 2 + .../Dashboard/Management/NoteTypes.jsx | 2 + src/components/Dashboard/Management/Parts.jsx | 2 + .../Dashboard/Management/Products.jsx | 2 + .../Dashboard/Management/TaxRates.jsx | 2 + .../Dashboard/Management/TaxRecords.jsx | 2 + src/components/Dashboard/Management/Users.jsx | 2 + .../Management/Users/SetAppPassword.jsx | 73 +++++++++++++++++ .../Dashboard/Management/Users/UserInfo.jsx | 21 ++++- .../Dashboard/Management/Vendors.jsx | 2 + .../Dashboard/Production/GCodeFiles.jsx | 2 + src/components/Dashboard/Production/Jobs.jsx | 2 + .../Dashboard/Production/Printers.jsx | 2 + .../Dashboard/Production/SubJobs.jsx | 2 + src/components/Dashboard/Sales/Clients.jsx | 2 + .../Dashboard/Sales/SalesOrders.jsx | 2 + .../Dashboard/common/ExportListButton.jsx | 78 +++++++++++++++++++ src/components/Dashboard/common/ODataURL.jsx | 45 +++++++++++ src/components/Icons/CsvIcon.jsx | 6 ++ src/components/Icons/ExcelIcon.jsx | 6 ++ src/components/Icons/ExportIcon.jsx | 6 ++ src/components/Icons/ODataIcon.jsx | 6 ++ src/database/models/User.js | 8 ++ 45 files changed, 354 insertions(+), 1 deletion(-) create mode 100644 assets/icons/csvicon.svg create mode 100644 assets/icons/excelicon.svg create mode 100644 assets/icons/exporticon.svg create mode 100644 assets/icons/odataicon.svg create mode 100644 src/components/Dashboard/Management/Users/SetAppPassword.jsx create mode 100644 src/components/Dashboard/common/ExportListButton.jsx create mode 100644 src/components/Dashboard/common/ODataURL.jsx create mode 100644 src/components/Icons/CsvIcon.jsx create mode 100644 src/components/Icons/ExcelIcon.jsx create mode 100644 src/components/Icons/ExportIcon.jsx create mode 100644 src/components/Icons/ODataIcon.jsx diff --git a/assets/icons/csvicon.svg b/assets/icons/csvicon.svg new file mode 100644 index 0000000..269627f --- /dev/null +++ b/assets/icons/csvicon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/assets/icons/excelicon.svg b/assets/icons/excelicon.svg new file mode 100644 index 0000000..3151c4d --- /dev/null +++ b/assets/icons/excelicon.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/assets/icons/exporticon.svg b/assets/icons/exporticon.svg new file mode 100644 index 0000000..c3d4ca0 --- /dev/null +++ b/assets/icons/exporticon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/assets/icons/odataicon.svg b/assets/icons/odataicon.svg new file mode 100644 index 0000000..75cceba --- /dev/null +++ b/assets/icons/odataicon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/components/Dashboard/Finance/Invoices.jsx b/src/components/Dashboard/Finance/Invoices.jsx index 5f59c6e..43dba5a 100644 --- a/src/components/Dashboard/Finance/Invoices.jsx +++ b/src/components/Dashboard/Finance/Invoices.jsx @@ -9,6 +9,7 @@ import GridIcon from '../../Icons/GridIcon' import ListIcon from '../../Icons/ListIcon' import useViewMode from '../hooks/useViewMode' import ColumnViewButton from '../common/ColumnViewButton' +import ExportListButton from '../common/ExportListButton' const Invoices = () => { const [newInvoiceOpen, setNewInvoiceOpen] = useState(false) @@ -56,6 +57,7 @@ const Invoices = () => { visibleState={columnVisibility} updateVisibleState={setColumnVisibility} /> + + { const [newTaxRateOpen, setNewTaxRateOpen] = useState(false) @@ -55,6 +56,7 @@ const TaxRates = () => { collapseState={columnVisibility} updateCollapseState={setColumnVisibility} /> +