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.
61 lines
1.7 KiB
JavaScript
61 lines
1.7 KiB
JavaScript
/**
|
|
* Computers plugin routes
|
|
*/
|
|
export default [
|
|
{
|
|
path: 'reports/pc-relationships',
|
|
name: 'report-pc-relationships',
|
|
component: () => import('./views/PCRelationshipsReport.vue'),
|
|
meta: { plugin: 'computers' }
|
|
},
|
|
{
|
|
path: 'settings/pctypemapping',
|
|
name: 'pctype-mapping-settings',
|
|
component: () => import('./views/PCTypeMappingSettings.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'computers' }
|
|
},
|
|
{
|
|
path: 'pcs',
|
|
name: 'pcs',
|
|
component: () => import('./views/PCsList.vue'),
|
|
meta: { plugin: 'computers' }
|
|
},
|
|
{
|
|
path: 'pcs/new',
|
|
name: 'pc-new',
|
|
component: () => import('./views/PCForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'computers' }
|
|
},
|
|
{
|
|
path: 'pcs/:id',
|
|
name: 'pc-detail',
|
|
component: () => import('./views/PCDetail.vue'),
|
|
meta: { plugin: 'computers' }
|
|
},
|
|
{
|
|
path: 'pcs/:id/edit',
|
|
name: 'pc-edit',
|
|
component: () => import('./views/PCForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'computers' }
|
|
},
|
|
// Computer-specific settings
|
|
{
|
|
path: 'settings/pctypes',
|
|
name: 'pctypes',
|
|
component: () => import('./views/PCTypesList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'computers' }
|
|
},
|
|
{
|
|
path: 'settings/operatingsystems',
|
|
name: 'operatingsystems',
|
|
component: () => import('./views/OperatingSystemsList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'computers' }
|
|
},
|
|
{
|
|
path: 'settings/accessprotocols',
|
|
name: 'access-protocols',
|
|
component: () => import('./views/AccessProtocolsList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'computers' }
|
|
}
|
|
]
|