farmcontrol-ui/src/routes/InventoryRoutes.jsx
Tom Butcher f4635d9188
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
Refactor finance and inventory components to enhance modal handling and state management
- Integrated useEffect hooks in InvoiceInfo, PaymentInfo, and other components to utilize ActionsContext for managing modal states.
- Removed unused modal states and related code to streamline component logic.
- Added setCurrentObject prop to various components for improved object handling during state changes.
- Enhanced overall code maintainability and readability by consolidating modal logic and reducing redundancy.
2026-08-01 18:25:47 +01:00

93 lines
2.3 KiB
JavaScript

import { lazy } from 'react'
import { Route } from 'react-router-dom'
const FilamentStocks = lazy(
() => import('../components/Dashboard/Inventory/FilamentStocks.jsx')
)
const PartStocks = lazy(
() => import('../components/Dashboard/Inventory/PartStocks.jsx')
)
const ProductStocks = lazy(
() => import('../components/Dashboard/Inventory/ProductStocks.jsx')
)
const StockEvents = lazy(
() => import('../components/Dashboard/Inventory/StockEvents.jsx')
)
const StockAudits = lazy(
() => import('../components/Dashboard/Inventory/StockAudits.jsx')
)
const PurchaseOrders = lazy(
() => import('../components/Dashboard/Inventory/PurchaseOrders.jsx')
)
const OrderItems = lazy(
() => import('../components/Dashboard/Inventory/OrderItems.jsx')
)
const Shipments = lazy(
() => import('../components/Dashboard/Inventory/Shipments.jsx')
)
const InventoryOverview = lazy(
() => import('../components/Dashboard/Inventory/InventoryOverview.jsx')
)
const StockLocations = lazy(
() => import('../components/Dashboard/Inventory/StockLocations.jsx')
)
const StockTransfers = lazy(
() => import('../components/Dashboard/Inventory/StockTransfers.jsx')
)
const InventoryRoutes = [
<Route
key='overview'
path='inventory/overview'
element={<InventoryOverview />}
/>,
<Route
key='filamentstocks'
path='inventory/filamentstocks'
element={<FilamentStocks />}
/>,
<Route
key='partstocks'
path='inventory/partstocks'
element={<PartStocks />}
/>,
<Route
key='productstocks'
path='inventory/productstocks'
element={<ProductStocks />}
/>,
<Route
key='stocklocations'
path='inventory/stocklocations'
element={<StockLocations />}
/>,
<Route
key='stocktransfers'
path='inventory/stocktransfers'
element={<StockTransfers />}
/>,
<Route
key='stockevents'
path='inventory/stockevents'
element={<StockEvents />}
/>,
<Route
key='stockaudits'
path='inventory/stockaudits'
element={<StockAudits />}
/>,
<Route
key='purchaseorders'
path='inventory/purchaseorders'
element={<PurchaseOrders />}
/>,
<Route
key='orderitems'
path='inventory/orderitems'
element={<OrderItems />}
/>,
<Route key='shipments' path='inventory/shipments' element={<Shipments />} />
]
export default InventoryRoutes