All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
- 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.
68 lines
1.9 KiB
JavaScript
68 lines
1.9 KiB
JavaScript
import { lazy } from 'react'
|
|
import { Route } from 'react-router-dom'
|
|
|
|
const ProductionOverview = lazy(
|
|
() => import('../components/Dashboard/Production/ProductionOverview')
|
|
)
|
|
const Printers = lazy(
|
|
() => import('../components/Dashboard/Production/Printers')
|
|
)
|
|
const ControlPrinter = lazy(
|
|
() => import('../components/Dashboard/Production/Printers/ControlPrinter.jsx')
|
|
)
|
|
const PrinterProfiles = lazy(
|
|
() => import('../components/Dashboard/Production/PrinterProfiles.jsx')
|
|
)
|
|
const FilamentProfiles = lazy(
|
|
() => import('../components/Dashboard/Production/FilamentProfiles.jsx')
|
|
)
|
|
const Jobs = lazy(() => import('../components/Dashboard/Production/Jobs.jsx'))
|
|
const SubJobs = lazy(
|
|
() => import('../components/Dashboard/Production/SubJobs.jsx')
|
|
)
|
|
const GCodeFiles = lazy(
|
|
() => import('../components/Dashboard/Production/GCodeFiles')
|
|
)
|
|
const GCodeFilePreview = lazy(
|
|
() =>
|
|
import('../components/Dashboard/Production/GCodeFiles/GCodeFilePreview.jsx')
|
|
)
|
|
|
|
const ProductionRoutes = [
|
|
<Route
|
|
key='production-overview'
|
|
path='production/overview'
|
|
element={<ProductionOverview />}
|
|
/>,
|
|
<Route key='printers' path='production/printers' element={<Printers />} />,
|
|
<Route
|
|
key='printers-control'
|
|
path='production/printers/control'
|
|
element={<ControlPrinter />}
|
|
/>,
|
|
<Route
|
|
key='printerprofiles'
|
|
path='production/printerprofiles'
|
|
element={<PrinterProfiles />}
|
|
/>,
|
|
<Route
|
|
key='filamentprofiles'
|
|
path='production/filamentprofiles'
|
|
element={<FilamentProfiles />}
|
|
/>,
|
|
<Route key='jobs' path='production/jobs' element={<Jobs />} />,
|
|
<Route key='subjobs' path='production/subjobs' element={<SubJobs />} />,
|
|
<Route
|
|
key='gcodefiles'
|
|
path='production/gcodefiles'
|
|
element={<GCodeFiles />}
|
|
/>,
|
|
<Route
|
|
key='gcodefiles-preview'
|
|
path='production/gcodefiles/preview'
|
|
element={<GCodeFilePreview />}
|
|
/>
|
|
]
|
|
|
|
export default ProductionRoutes
|