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