From 1192d56027837e6c3ee8c35be692b76891812ba3 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sun, 9 Aug 2026 23:08:01 +0100 Subject: [PATCH] Add showEndingDivider prop to ObjectTableViewButton for enhanced layout control - Updated ObjectTableViewButton component to accept a showEndingDivider prop, allowing for conditional rendering of a divider in the layout. - Modified multiple dashboard components (Invoices, Payments, TaxRecords, etc.) to utilize the new prop, improving visual separation in the UI. - Ensured consistent application of the new prop across various components for a cohesive user experience. --- src/components/Dashboard/Finance/Invoices.jsx | 1 + src/components/Dashboard/Finance/Payments.jsx | 1 + .../Dashboard/Finance/TaxRecords.jsx | 1 + .../Dashboard/Inventory/FilamentStocks.jsx | 1 + .../Dashboard/Inventory/OrderItems.jsx | 1 + .../Dashboard/Inventory/PartStocks.jsx | 1 + .../Dashboard/Inventory/ProductStocks.jsx | 1 + .../Dashboard/Inventory/PurchaseOrders.jsx | 1 + .../Dashboard/Inventory/Shipments.jsx | 1 + .../Dashboard/Inventory/StockAudits.jsx | 1 + .../Dashboard/Inventory/StockEvents.jsx | 1 + .../Dashboard/Inventory/StockLocations.jsx | 1 + .../Dashboard/Inventory/StockTransfers.jsx | 1 + .../Dashboard/Management/AppPasswords.jsx | 1 + .../Dashboard/Management/CourierServices.jsx | 1 + .../Dashboard/Management/Couriers.jsx | 1 + .../Dashboard/Management/DocumentJobs.jsx | 1 + .../Dashboard/Management/DocumentPrinters.jsx | 1 + .../Dashboard/Management/DocumentSizes.jsx | 1 + .../Management/DocumentTemplates.jsx | 1 + .../Dashboard/Management/FilamentSkus.jsx | 1 + .../Dashboard/Management/Filaments.jsx | 1 + src/components/Dashboard/Management/Files.jsx | 1 + src/components/Dashboard/Management/Hosts.jsx | 1 + .../Dashboard/Management/Materials.jsx | 1 + .../Dashboard/Management/NoteTypes.jsx | 1 + .../Dashboard/Management/PartSkus.jsx | 1 + src/components/Dashboard/Management/Parts.jsx | 1 + .../Management/ProductCategories.jsx | 1 + .../Dashboard/Management/ProductSkus.jsx | 1 + .../Dashboard/Management/Products.jsx | 1 + .../Dashboard/Management/TaxRates.jsx | 1 + .../Dashboard/Management/Vendors.jsx | 1 + .../Dashboard/Production/FilamentProfiles.jsx | 1 + .../Dashboard/Production/GCodeFiles.jsx | 1 + src/components/Dashboard/Production/Jobs.jsx | 4 +- .../Dashboard/Production/PrinterProfiles.jsx | 1 + .../Dashboard/Production/Printers.jsx | 1 + .../Dashboard/Production/SubJobs.jsx | 1 + src/components/Dashboard/Sales/Clients.jsx | 1 + src/components/Dashboard/Sales/Listings.jsx | 1 + .../Dashboard/Sales/Marketplaces.jsx | 1 + .../Dashboard/Sales/SalesOrders.jsx | 1 + .../common/ObjectTableViewButton.jsx | 39 ++++++++++++++----- 44 files changed, 73 insertions(+), 12 deletions(-) diff --git a/src/components/Dashboard/Finance/Invoices.jsx b/src/components/Dashboard/Finance/Invoices.jsx index 5c4feb0..d16a855 100644 --- a/src/components/Dashboard/Finance/Invoices.jsx +++ b/src/components/Dashboard/Finance/Invoices.jsx @@ -80,6 +80,7 @@ const Invoices = () => { diff --git a/src/components/Dashboard/Finance/Payments.jsx b/src/components/Dashboard/Finance/Payments.jsx index 7d37958..960570b 100644 --- a/src/components/Dashboard/Finance/Payments.jsx +++ b/src/components/Dashboard/Finance/Payments.jsx @@ -80,6 +80,7 @@ const Payments = () => { diff --git a/src/components/Dashboard/Finance/TaxRecords.jsx b/src/components/Dashboard/Finance/TaxRecords.jsx index 9895bde..ea9c9f8 100644 --- a/src/components/Dashboard/Finance/TaxRecords.jsx +++ b/src/components/Dashboard/Finance/TaxRecords.jsx @@ -80,6 +80,7 @@ const TaxRecords = () => { diff --git a/src/components/Dashboard/Inventory/FilamentStocks.jsx b/src/components/Dashboard/Inventory/FilamentStocks.jsx index a6b8979..0dc55bd 100644 --- a/src/components/Dashboard/Inventory/FilamentStocks.jsx +++ b/src/components/Dashboard/Inventory/FilamentStocks.jsx @@ -85,6 +85,7 @@ const FilamentStocks = () => { diff --git a/src/components/Dashboard/Inventory/OrderItems.jsx b/src/components/Dashboard/Inventory/OrderItems.jsx index 6db3551..b1738e6 100644 --- a/src/components/Dashboard/Inventory/OrderItems.jsx +++ b/src/components/Dashboard/Inventory/OrderItems.jsx @@ -80,6 +80,7 @@ const OrderItems = () => { diff --git a/src/components/Dashboard/Inventory/PartStocks.jsx b/src/components/Dashboard/Inventory/PartStocks.jsx index 88dda98..1af83f2 100644 --- a/src/components/Dashboard/Inventory/PartStocks.jsx +++ b/src/components/Dashboard/Inventory/PartStocks.jsx @@ -85,6 +85,7 @@ const PartStocks = () => { diff --git a/src/components/Dashboard/Inventory/ProductStocks.jsx b/src/components/Dashboard/Inventory/ProductStocks.jsx index db5731a..9a943ee 100644 --- a/src/components/Dashboard/Inventory/ProductStocks.jsx +++ b/src/components/Dashboard/Inventory/ProductStocks.jsx @@ -86,6 +86,7 @@ const ProductStocks = () => { diff --git a/src/components/Dashboard/Inventory/PurchaseOrders.jsx b/src/components/Dashboard/Inventory/PurchaseOrders.jsx index 84b8c51..f1e6882 100644 --- a/src/components/Dashboard/Inventory/PurchaseOrders.jsx +++ b/src/components/Dashboard/Inventory/PurchaseOrders.jsx @@ -80,6 +80,7 @@ const PurchaseOrders = () => { diff --git a/src/components/Dashboard/Inventory/Shipments.jsx b/src/components/Dashboard/Inventory/Shipments.jsx index fb48b71..1119f0f 100644 --- a/src/components/Dashboard/Inventory/Shipments.jsx +++ b/src/components/Dashboard/Inventory/Shipments.jsx @@ -80,6 +80,7 @@ const Shipments = () => { diff --git a/src/components/Dashboard/Inventory/StockAudits.jsx b/src/components/Dashboard/Inventory/StockAudits.jsx index fe1fef8..8b95235 100644 --- a/src/components/Dashboard/Inventory/StockAudits.jsx +++ b/src/components/Dashboard/Inventory/StockAudits.jsx @@ -85,6 +85,7 @@ const StockAudits = () => { diff --git a/src/components/Dashboard/Inventory/StockEvents.jsx b/src/components/Dashboard/Inventory/StockEvents.jsx index eee995c..6b5f289 100644 --- a/src/components/Dashboard/Inventory/StockEvents.jsx +++ b/src/components/Dashboard/Inventory/StockEvents.jsx @@ -68,6 +68,7 @@ const StockEvents = () => { diff --git a/src/components/Dashboard/Inventory/StockLocations.jsx b/src/components/Dashboard/Inventory/StockLocations.jsx index cf6b7aa..302f80d 100644 --- a/src/components/Dashboard/Inventory/StockLocations.jsx +++ b/src/components/Dashboard/Inventory/StockLocations.jsx @@ -83,6 +83,7 @@ const StockLocations = () => { diff --git a/src/components/Dashboard/Inventory/StockTransfers.jsx b/src/components/Dashboard/Inventory/StockTransfers.jsx index 3a71640..fac2d5e 100644 --- a/src/components/Dashboard/Inventory/StockTransfers.jsx +++ b/src/components/Dashboard/Inventory/StockTransfers.jsx @@ -83,6 +83,7 @@ const StockTransfers = () => { diff --git a/src/components/Dashboard/Management/AppPasswords.jsx b/src/components/Dashboard/Management/AppPasswords.jsx index fe200ed..3ba8046 100644 --- a/src/components/Dashboard/Management/AppPasswords.jsx +++ b/src/components/Dashboard/Management/AppPasswords.jsx @@ -79,6 +79,7 @@ const AppPasswords = () => { diff --git a/src/components/Dashboard/Management/CourierServices.jsx b/src/components/Dashboard/Management/CourierServices.jsx index bd4b9e6..3702562 100644 --- a/src/components/Dashboard/Management/CourierServices.jsx +++ b/src/components/Dashboard/Management/CourierServices.jsx @@ -80,6 +80,7 @@ const CourierServices = () => { diff --git a/src/components/Dashboard/Management/Couriers.jsx b/src/components/Dashboard/Management/Couriers.jsx index b26a050..6ffc7d7 100644 --- a/src/components/Dashboard/Management/Couriers.jsx +++ b/src/components/Dashboard/Management/Couriers.jsx @@ -79,6 +79,7 @@ const Couriers = () => { diff --git a/src/components/Dashboard/Management/DocumentJobs.jsx b/src/components/Dashboard/Management/DocumentJobs.jsx index 40a4ddd..b497d6b 100644 --- a/src/components/Dashboard/Management/DocumentJobs.jsx +++ b/src/components/Dashboard/Management/DocumentJobs.jsx @@ -80,6 +80,7 @@ const DocumentJobs = () => { diff --git a/src/components/Dashboard/Management/DocumentPrinters.jsx b/src/components/Dashboard/Management/DocumentPrinters.jsx index e759c50..04d1edc 100644 --- a/src/components/Dashboard/Management/DocumentPrinters.jsx +++ b/src/components/Dashboard/Management/DocumentPrinters.jsx @@ -79,6 +79,7 @@ const DocumentPrinters = () => { diff --git a/src/components/Dashboard/Management/DocumentSizes.jsx b/src/components/Dashboard/Management/DocumentSizes.jsx index 8a81945..e718630 100644 --- a/src/components/Dashboard/Management/DocumentSizes.jsx +++ b/src/components/Dashboard/Management/DocumentSizes.jsx @@ -78,6 +78,7 @@ const DocumentSizes = () => { diff --git a/src/components/Dashboard/Management/DocumentTemplates.jsx b/src/components/Dashboard/Management/DocumentTemplates.jsx index 1d57f12..d189123 100644 --- a/src/components/Dashboard/Management/DocumentTemplates.jsx +++ b/src/components/Dashboard/Management/DocumentTemplates.jsx @@ -80,6 +80,7 @@ const DocumentTemplates = () => { diff --git a/src/components/Dashboard/Management/FilamentSkus.jsx b/src/components/Dashboard/Management/FilamentSkus.jsx index c7090f9..359b609 100644 --- a/src/components/Dashboard/Management/FilamentSkus.jsx +++ b/src/components/Dashboard/Management/FilamentSkus.jsx @@ -83,6 +83,7 @@ const FilamentSkus = () => { diff --git a/src/components/Dashboard/Management/Filaments.jsx b/src/components/Dashboard/Management/Filaments.jsx index 2825cd3..1099516 100644 --- a/src/components/Dashboard/Management/Filaments.jsx +++ b/src/components/Dashboard/Management/Filaments.jsx @@ -85,6 +85,7 @@ const Filaments = () => { diff --git a/src/components/Dashboard/Management/Files.jsx b/src/components/Dashboard/Management/Files.jsx index 0e07edf..1a5b76e 100644 --- a/src/components/Dashboard/Management/Files.jsx +++ b/src/components/Dashboard/Management/Files.jsx @@ -68,6 +68,7 @@ const Files = () => { diff --git a/src/components/Dashboard/Management/Hosts.jsx b/src/components/Dashboard/Management/Hosts.jsx index 2416a36..15c58e2 100644 --- a/src/components/Dashboard/Management/Hosts.jsx +++ b/src/components/Dashboard/Management/Hosts.jsx @@ -84,6 +84,7 @@ const Hosts = () => { diff --git a/src/components/Dashboard/Management/Materials.jsx b/src/components/Dashboard/Management/Materials.jsx index e9c93e4..2cb2a5f 100644 --- a/src/components/Dashboard/Management/Materials.jsx +++ b/src/components/Dashboard/Management/Materials.jsx @@ -82,6 +82,7 @@ const Materials = () => { diff --git a/src/components/Dashboard/Management/NoteTypes.jsx b/src/components/Dashboard/Management/NoteTypes.jsx index 184e997..134122c 100644 --- a/src/components/Dashboard/Management/NoteTypes.jsx +++ b/src/components/Dashboard/Management/NoteTypes.jsx @@ -80,6 +80,7 @@ const NoteTypes = () => { diff --git a/src/components/Dashboard/Management/PartSkus.jsx b/src/components/Dashboard/Management/PartSkus.jsx index 236313b..1d7624e 100644 --- a/src/components/Dashboard/Management/PartSkus.jsx +++ b/src/components/Dashboard/Management/PartSkus.jsx @@ -82,6 +82,7 @@ const PartSkus = () => { diff --git a/src/components/Dashboard/Management/Parts.jsx b/src/components/Dashboard/Management/Parts.jsx index 7d4bb03..e041f02 100644 --- a/src/components/Dashboard/Management/Parts.jsx +++ b/src/components/Dashboard/Management/Parts.jsx @@ -84,6 +84,7 @@ const Parts = (filter) => { diff --git a/src/components/Dashboard/Management/ProductCategories.jsx b/src/components/Dashboard/Management/ProductCategories.jsx index da952c1..ca5e4b9 100644 --- a/src/components/Dashboard/Management/ProductCategories.jsx +++ b/src/components/Dashboard/Management/ProductCategories.jsx @@ -82,6 +82,7 @@ const ProductCategories = () => { diff --git a/src/components/Dashboard/Management/ProductSkus.jsx b/src/components/Dashboard/Management/ProductSkus.jsx index d316f76..67a5d32 100644 --- a/src/components/Dashboard/Management/ProductSkus.jsx +++ b/src/components/Dashboard/Management/ProductSkus.jsx @@ -83,6 +83,7 @@ const ProductSkus = () => { diff --git a/src/components/Dashboard/Management/Products.jsx b/src/components/Dashboard/Management/Products.jsx index b0c4d24..efc17884 100644 --- a/src/components/Dashboard/Management/Products.jsx +++ b/src/components/Dashboard/Management/Products.jsx @@ -356,6 +356,7 @@ const Products = () => { diff --git a/src/components/Dashboard/Management/TaxRates.jsx b/src/components/Dashboard/Management/TaxRates.jsx index 4ad0a88..a8f3865 100644 --- a/src/components/Dashboard/Management/TaxRates.jsx +++ b/src/components/Dashboard/Management/TaxRates.jsx @@ -79,6 +79,7 @@ const TaxRates = () => { diff --git a/src/components/Dashboard/Management/Vendors.jsx b/src/components/Dashboard/Management/Vendors.jsx index 7378927..a63622b 100644 --- a/src/components/Dashboard/Management/Vendors.jsx +++ b/src/components/Dashboard/Management/Vendors.jsx @@ -79,6 +79,7 @@ const Vendors = () => { diff --git a/src/components/Dashboard/Production/FilamentProfiles.jsx b/src/components/Dashboard/Production/FilamentProfiles.jsx index 2b93e04..7e01576 100644 --- a/src/components/Dashboard/Production/FilamentProfiles.jsx +++ b/src/components/Dashboard/Production/FilamentProfiles.jsx @@ -76,6 +76,7 @@ const FilamentProfiles = () => { diff --git a/src/components/Dashboard/Production/GCodeFiles.jsx b/src/components/Dashboard/Production/GCodeFiles.jsx index 5549bb4..7abca91 100644 --- a/src/components/Dashboard/Production/GCodeFiles.jsx +++ b/src/components/Dashboard/Production/GCodeFiles.jsx @@ -82,6 +82,7 @@ const GCodeFiles = () => { diff --git a/src/components/Dashboard/Production/Jobs.jsx b/src/components/Dashboard/Production/Jobs.jsx index cd3d98d..b85fbd2 100644 --- a/src/components/Dashboard/Production/Jobs.jsx +++ b/src/components/Dashboard/Production/Jobs.jsx @@ -26,8 +26,7 @@ const Jobs = () => { const [showFilterSidebar, setShowFilterSidebar] = useFilterSidebarVisibility('Jobs') - const [showSortSidebar, setShowSortSidebar] = - useSortSidebarVisibility('Jobs') + const [showSortSidebar, setShowSortSidebar] = useSortSidebarVisibility('Jobs') const actionItems = { items: [ @@ -85,6 +84,7 @@ const Jobs = () => { diff --git a/src/components/Dashboard/Production/PrinterProfiles.jsx b/src/components/Dashboard/Production/PrinterProfiles.jsx index 79fbde6..1cb9496 100644 --- a/src/components/Dashboard/Production/PrinterProfiles.jsx +++ b/src/components/Dashboard/Production/PrinterProfiles.jsx @@ -75,6 +75,7 @@ const PrinterProfiles = () => { diff --git a/src/components/Dashboard/Production/Printers.jsx b/src/components/Dashboard/Production/Printers.jsx index 815d5b3..cd00c85 100644 --- a/src/components/Dashboard/Production/Printers.jsx +++ b/src/components/Dashboard/Production/Printers.jsx @@ -85,6 +85,7 @@ const Printers = () => { diff --git a/src/components/Dashboard/Production/SubJobs.jsx b/src/components/Dashboard/Production/SubJobs.jsx index 712eb4c..094c610 100644 --- a/src/components/Dashboard/Production/SubJobs.jsx +++ b/src/components/Dashboard/Production/SubJobs.jsx @@ -70,6 +70,7 @@ const SubJobs = () => { diff --git a/src/components/Dashboard/Sales/Clients.jsx b/src/components/Dashboard/Sales/Clients.jsx index bbedf0f..719c392 100644 --- a/src/components/Dashboard/Sales/Clients.jsx +++ b/src/components/Dashboard/Sales/Clients.jsx @@ -79,6 +79,7 @@ const Clients = () => { diff --git a/src/components/Dashboard/Sales/Listings.jsx b/src/components/Dashboard/Sales/Listings.jsx index 817a4fd..a7682f9 100644 --- a/src/components/Dashboard/Sales/Listings.jsx +++ b/src/components/Dashboard/Sales/Listings.jsx @@ -80,6 +80,7 @@ const Listings = () => { diff --git a/src/components/Dashboard/Sales/Marketplaces.jsx b/src/components/Dashboard/Sales/Marketplaces.jsx index 409deb0..b2b248f 100644 --- a/src/components/Dashboard/Sales/Marketplaces.jsx +++ b/src/components/Dashboard/Sales/Marketplaces.jsx @@ -80,6 +80,7 @@ const Marketplaces = () => { diff --git a/src/components/Dashboard/Sales/SalesOrders.jsx b/src/components/Dashboard/Sales/SalesOrders.jsx index 1402033..c17e467 100644 --- a/src/components/Dashboard/Sales/SalesOrders.jsx +++ b/src/components/Dashboard/Sales/SalesOrders.jsx @@ -80,6 +80,7 @@ const SalesOrders = () => { diff --git a/src/components/Dashboard/common/ObjectTableViewButton.jsx b/src/components/Dashboard/common/ObjectTableViewButton.jsx index ebf72e7..ae1c295 100644 --- a/src/components/Dashboard/common/ObjectTableViewButton.jsx +++ b/src/components/Dashboard/common/ObjectTableViewButton.jsx @@ -1,20 +1,39 @@ import PropTypes from 'prop-types' -import { Button } from 'antd' +import { Button, Divider, Flex } from 'antd' import GridIcon from '../../Icons/GridIcon' import ListIcon from '../../Icons/ListIcon' -const ObjectTableViewButton = ({ viewMode, setViewMode, ...buttonProps }) => ( -