43 lines
1003 B
PHP
43 lines
1003 B
PHP
<?php
|
|
|
|
namespace App\Filament\Pages\Contabilita;
|
|
|
|
use App\Filament\Pages\Gescon\Ordinarie;
|
|
use App\Models\User;
|
|
use BackedEnum;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use UnitEnum;
|
|
|
|
class GestioneOrdinaria extends Ordinarie
|
|
{
|
|
protected static ?string $navigationLabel = 'Gestione ordinaria';
|
|
|
|
protected static ?string $title = 'Gestione ordinaria';
|
|
|
|
protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-banknotes';
|
|
|
|
protected static UnitEnum|string|null $navigationGroup = 'Contabilità';
|
|
|
|
protected static ?int $navigationSort = 10;
|
|
|
|
protected static ?string $slug = 'contabilita/gestione-ordinaria';
|
|
|
|
public bool $netgesconWorkflowMode = true;
|
|
|
|
public static function canAccess(): bool
|
|
{
|
|
$user = Auth::user();
|
|
|
|
if (! $user instanceof User) {
|
|
return false;
|
|
}
|
|
|
|
if ($user->hasAnyRole(['super-admin', 'admin'])) {
|
|
return true;
|
|
}
|
|
|
|
return $user->can('contabilita.gestioni');
|
|
}
|
|
|
|
}
|