*/ public array $bindings = [ ServiceUnitRepository::class => EloquentServiceUnitRepository::class, ServiceRepository::class => EloquentServiceRepository::class, WorkTypeRepository::class => EloquentWorkTypeRepository::class, CatalogQueries::class => EloquentCatalogQueries::class, ProductRepository::class => EloquentProductRepository::class, PriceListQueries::class => EloquentPriceListQueries::class, VatRateRepository::class => EloquentVatRateRepository::class, WorkflowTemplateRepository::class => EloquentWorkflowTemplateRepository::class, WorkflowTemplateQueries::class => EloquentWorkflowTemplateQueries::class, ]; public function boot(): void { $presentationPath = dirname(__DIR__, 2).'/Presentation'; Livewire::addNamespace('catalog', viewPath: $presentationPath.'/Livewire'); if (! $this->app->routesAreCached()) { $this->loadRoutesFrom($presentationPath.'/Routes/web.php'); } // Catalog data (pohjatiedot) and the price list are managed by admins and management. Gate::define('catalog.manage', fn (User $user): bool => in_array($user->role, [Role::Admin, Role::Management], true)); // The read-only price list: consumer product prices for everyone but // subcontractors; other prices also need the `money.prices` ability. Gate::define('catalog.view-prices', fn (User $user): bool => $user->role !== Role::Subcontractor); } }