37 lines
911 B
PHP
37 lines
911 B
PHP
<?php
|
|
|
|
namespace App\Filament\Pages\Gescon;
|
|
|
|
use App\Models\User;
|
|
use BackedEnum;
|
|
use Filament\Pages\Page;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use UnitEnum;
|
|
|
|
class Anagrafica extends Page
|
|
{
|
|
protected static ?string $navigationLabel = 'Anagrafica';
|
|
|
|
protected static ?string $title = 'Anagrafica';
|
|
|
|
protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-identification';
|
|
|
|
protected static UnitEnum|string|null $navigationGroup = 'GESCON';
|
|
|
|
protected static ?int $navigationSort = 10;
|
|
|
|
protected static ?string $slug = 'gescon/anagrafica';
|
|
|
|
protected string $view = 'filament.pages.gescon.section';
|
|
|
|
public string $sectionKey = 'anagrafica';
|
|
|
|
public static function canAccess(): bool
|
|
{
|
|
$user = Auth::user();
|
|
|
|
return $user instanceof User
|
|
&& $user->hasAnyRole(['super-admin', 'admin', 'amministratore', 'collaboratore']);
|
|
}
|
|
}
|