core.js still routed plugin-owned pages directly. Extracted all 11 into the owning plugin's route file + moved their views into plugins/<name>/frontend/: - computers: reports/pc-relationships, settings/pctypemapping - printers: reports/toner, settings/printertypes, settings/zabbix (toner/supply monitoring) - machines: settings/machinetypes - network: settings/networktypes - warranty: settings/dellwarranty - slides: settings/slides (its route file gains a default export; it was toplevel-only) - employees: NEW plugin frontend (employees/:sso + settings/employeedirectory) - employees had no route file before; its pages lived only in core.js. core.js now holds only core routes; all 14 bundled plugins are self-contained under plugins/<name>/frontend/. Verified live: the extracted Machine Types settings page renders in the settings rail from the machines plugin frontend. Build + 58 vitest + naming green.
24 lines
580 B
JavaScript
24 lines
580 B
JavaScript
/**
|
|
* Warranty plugin routes
|
|
*/
|
|
export default [
|
|
{
|
|
path: 'settings/dellwarranty',
|
|
name: 'dell-warranty-settings',
|
|
component: () => import('./views/DellWarrantySettings.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'warranty' }
|
|
},
|
|
{
|
|
path: 'warranties',
|
|
name: 'warranties',
|
|
component: () => import('./views/WarrantiesList.vue'),
|
|
meta: { plugin: 'warranty' }
|
|
},
|
|
{
|
|
path: 'reports/warranty',
|
|
name: 'warranty-report',
|
|
component: () => import('./views/WarrantyReport.vue'),
|
|
meta: { plugin: 'warranty' }
|
|
}
|
|
]
|