Phase 1, item 3: the hierarchy customer jobs, tasks and time entries will refer to. - New Catalog module: service unit > optional service > work type. Names are unique per level (case-insensitive); items are never deleted, only deactivated, and foreign keys restrict deletes. - Pohjatiedot page (/catalog, admins and management): add, rename, reorder with move up/down buttons (keyboard-friendly, focus kept and announced) and an "in use" checkbox per row. Work types can move to another service of the same unit. - A migration inserts the starting catalog from the specification when the tables are empty, so every installation has it. - CatalogQueries gives other modules the active service units and the work types of chosen units plus the shared ones. - Spec and CLAUDE.md updated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
30 lines
1.2 KiB
PHP
30 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::middleware(['web', 'auth', 'can:catalog.manage'])
|
|
->prefix('catalog')
|
|
->name('catalog.')
|
|
->group(function () {
|
|
Route::livewire('/', 'catalog::index')->name('index');
|
|
|
|
Route::livewire('/service-units/create', 'catalog::service-unit-form')->name('service-units.create');
|
|
Route::livewire('/service-units/{serviceUnit}/edit', 'catalog::service-unit-form')
|
|
->whereNumber('serviceUnit')
|
|
->name('service-units.edit');
|
|
|
|
Route::livewire('/service-units/{serviceUnit}/services/create', 'catalog::service-form')
|
|
->whereNumber('serviceUnit')
|
|
->name('services.create');
|
|
Route::livewire('/services/{service}/edit', 'catalog::service-form')
|
|
->whereNumber('service')
|
|
->name('services.edit');
|
|
|
|
Route::livewire('/service-units/{serviceUnit}/work-types/create', 'catalog::work-type-form')
|
|
->whereNumber('serviceUnit')
|
|
->name('work-types.create');
|
|
Route::livewire('/work-types/{workType}/edit', 'catalog::work-type-form')
|
|
->whereNumber('workType')
|
|
->name('work-types.edit');
|
|
});
|