Relocate warranty, measuringtools, network, printers, usb, notifications, computers, and slides into plugins/<name>/frontend/. Each plugin's views are pulled from wherever they lived (own dir, plus the shared views/settings/, views/reports/, views/print/ dirs, and top-level views) into the plugin's frontend/views/, and its route file becomes the self-contained routes.js. Handled the messy cases: - computers: name mismatch (its views live in views/pcs/) - moved by following the route file's own imports, so the dir name did not matter. Its OS/access- protocol/PC-type settings views move with it (only computers.js routed them). - network: NetworkHub's sibling sub-views (NetworkDevicesList, SubnetsBrowse, not directly routed) moved too so its `./` imports resolve. - printers: the qrLogo helper is SHARED with core AssetLabel, so it stays in views/print/ and PrinterQR imports it via @/views/print/qrLogo. - slides: route file is toplevel-only (TVDashboard); SlideManager stays core (core.js routes /settings/slides). frontend/src/views/ now holds only core views; frontend/src/router/routes/ holds only core.js. All 13 plugins are self-contained under plugins/<name>/frontend/. Verified live: Network (hub + moved sub-views), Computers (name mismatch), GE-Enforce (helper), printedparts all render from their staged frontends. Build + 58 vitest + naming green.
58 lines
1.5 KiB
JavaScript
58 lines
1.5 KiB
JavaScript
/**
|
|
* Printers plugin routes
|
|
*/
|
|
export default [
|
|
{
|
|
path: 'printers',
|
|
name: 'printers',
|
|
component: () => import('./views/PrintersList.vue'),
|
|
meta: { plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'printers/new',
|
|
name: 'printer-new',
|
|
component: () => import('./views/PrinterForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'printers/:id',
|
|
name: 'printer-detail',
|
|
component: () => import('./views/PrinterDetail.vue'),
|
|
meta: { plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'printers/:id/edit',
|
|
name: 'printer-edit',
|
|
component: () => import('./views/PrinterForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'printers' }
|
|
},
|
|
// printer-specific settings
|
|
{
|
|
path: 'settings/modelsupplies',
|
|
name: 'model-supplies',
|
|
component: () => import('./views/ModelSuppliesList.vue'),
|
|
meta: { requiresAuth: true, plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'settings/printerdrivers',
|
|
name: 'printer-drivers',
|
|
component: () => import('./views/PrinterDriversList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'printers' }
|
|
}
|
|
]
|
|
|
|
export const toplevel = [
|
|
{
|
|
path: '/print/printer-qr',
|
|
name: 'print-printer-qr-batch',
|
|
component: () => import('./views/PrinterQRBatch.vue'),
|
|
meta: { plugin: 'printers' }
|
|
},
|
|
{
|
|
path: '/print/printer-qr/:id',
|
|
name: 'print-printer-qr-single',
|
|
component: () => import('./views/PrinterQRSingle.vue'),
|
|
meta: { plugin: 'printers' }
|
|
}
|
|
]
|