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.
142 lines
4.8 KiB
JavaScript
142 lines
4.8 KiB
JavaScript
import { lazy } from 'react'
|
|
import { Route } from 'react-router-dom'
|
|
|
|
const Filaments = lazy(
|
|
() => import('../components/Dashboard/Management/Filaments')
|
|
)
|
|
const FilamentSkus = lazy(
|
|
() => import('../components/Dashboard/Management/FilamentSkus.jsx')
|
|
)
|
|
const Parts = lazy(() => import('../components/Dashboard/Management/Parts.jsx'))
|
|
const PartSkus = lazy(
|
|
() => import('../components/Dashboard/Management/PartSkus.jsx')
|
|
)
|
|
const Products = lazy(
|
|
() => import('../components/Dashboard/Management/Products.jsx')
|
|
)
|
|
const ProductCategories = lazy(
|
|
() => import('../components/Dashboard/Management/ProductCategories.jsx')
|
|
)
|
|
const ProductSkus = lazy(
|
|
() => import('../components/Dashboard/Management/ProductSkus.jsx')
|
|
)
|
|
const Vendors = lazy(() => import('../components/Dashboard/Management/Vendors'))
|
|
const Materials = lazy(
|
|
() => import('../components/Dashboard/Management/Materials')
|
|
)
|
|
const Couriers = lazy(
|
|
() => import('../components/Dashboard/Management/Couriers')
|
|
)
|
|
const CourierServices = lazy(
|
|
() => import('../components/Dashboard/Management/CourierServices')
|
|
)
|
|
const Settings = lazy(
|
|
() => import('../components/Dashboard/Management/Settings')
|
|
)
|
|
const AuditLogs = lazy(
|
|
() => import('../components/Dashboard/Management/AuditLogs.jsx')
|
|
)
|
|
const NoteTypes = lazy(
|
|
() => import('../components/Dashboard/Management/NoteTypes.jsx')
|
|
)
|
|
const NoteInfo = lazy(
|
|
() => import('../components/Dashboard/Management/Notes/NoteInfo.jsx')
|
|
)
|
|
const Users = lazy(() => import('../components/Dashboard/Management/Users.jsx'))
|
|
const AppPasswords = lazy(
|
|
() => import('../components/Dashboard/Management/AppPasswords.jsx')
|
|
)
|
|
const Hosts = lazy(() => import('../components/Dashboard/Management/Hosts.jsx'))
|
|
const DocumentSizes = lazy(
|
|
() => import('../components/Dashboard/Management/DocumentSizes.jsx')
|
|
)
|
|
const DocumentTemplates = lazy(
|
|
() => import('../components/Dashboard/Management/DocumentTemplates.jsx')
|
|
)
|
|
const DocumentPrinters = lazy(
|
|
() => import('../components/Dashboard/Management/DocumentPrinters.jsx')
|
|
)
|
|
const DocumentJobs = lazy(
|
|
() => import('../components/Dashboard/Management/DocumentJobs.jsx')
|
|
)
|
|
const DocumentTemplateDesign = lazy(
|
|
() =>
|
|
import('../components/Dashboard/Management/DocumentTemplates/DocumentTemplateDesign.jsx')
|
|
)
|
|
const Files = lazy(() => import('../components/Dashboard/Management/Files.jsx'))
|
|
const TaxRates = lazy(
|
|
() => import('../components/Dashboard/Management/TaxRates.jsx')
|
|
)
|
|
const About = lazy(() => import('../components/Dashboard/Management/About.jsx'))
|
|
|
|
const ManagementRoutes = [
|
|
<Route key='filaments' path='management/filaments' element={<Filaments />} />,
|
|
<Route
|
|
key='filamentskus'
|
|
path='management/filamentskus'
|
|
element={<FilamentSkus />}
|
|
/>,
|
|
<Route key='parts' path='management/parts' element={<Parts />} />,
|
|
<Route key='partskus' path='management/partskus' element={<PartSkus />} />,
|
|
<Route key='products' path='management/products' element={<Products />} />,
|
|
<Route
|
|
key='productcategories'
|
|
path='management/productcategories'
|
|
element={<ProductCategories />}
|
|
/>,
|
|
<Route
|
|
key='productskus'
|
|
path='management/productskus'
|
|
element={<ProductSkus />}
|
|
/>,
|
|
<Route key='vendors' path='management/vendors' element={<Vendors />} />,
|
|
<Route key='hosts' path='management/hosts' element={<Hosts />} />,
|
|
<Route key='users' path='management/users' element={<Users />} />,
|
|
<Route key='files' path='management/files' element={<Files />} />,
|
|
<Route key='materials' path='management/materials' element={<Materials />} />,
|
|
<Route key='couriers' path='management/couriers' element={<Couriers />} />,
|
|
<Route
|
|
key='courierServices'
|
|
path='management/courierServices'
|
|
element={<CourierServices />}
|
|
/>,
|
|
<Route key='notetypes' path='management/notetypes' element={<NoteTypes />} />,
|
|
<Route key='note-info' path='management/notes/info' element={<NoteInfo />} />,
|
|
<Route
|
|
key='documentsizes'
|
|
path='management/documentsizes'
|
|
element={<DocumentSizes />}
|
|
/>,
|
|
<Route
|
|
key='documenttemplates'
|
|
path='management/documenttemplates'
|
|
element={<DocumentTemplates />}
|
|
/>,
|
|
<Route
|
|
key='documentprinters'
|
|
path='management/documentprinters'
|
|
element={<DocumentPrinters />}
|
|
/>,
|
|
<Route
|
|
key='documentjobs'
|
|
path='management/documentjobs'
|
|
element={<DocumentJobs />}
|
|
/>,
|
|
<Route
|
|
key='documenttemplates-design'
|
|
path='management/documenttemplates/design'
|
|
element={<DocumentTemplateDesign />}
|
|
/>,
|
|
<Route
|
|
key='apppasswords'
|
|
path='management/apppasswords'
|
|
element={<AppPasswords />}
|
|
/>,
|
|
<Route key='settings' path='management/settings' element={<Settings />} />,
|
|
<Route key='about' path='management/about' element={<About />} />,
|
|
<Route key='auditlogs' path='management/auditlogs' element={<AuditLogs />} />,
|
|
<Route key='taxrates' path='management/taxrates' element={<TaxRates />} />
|
|
]
|
|
|
|
export default ManagementRoutes
|