43 lines
1.0 KiB
PHP
Executable File
43 lines
1.0 KiB
PHP
Executable File
<?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 GestioneRiscaldamento extends Ordinarie
|
|
{
|
|
protected static ?string $navigationLabel = 'Riscaldamento';
|
|
|
|
protected static ?string $title = 'Gestione riscaldamento';
|
|
|
|
protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-fire';
|
|
|
|
protected static UnitEnum|string|null $navigationGroup = 'Contabilità';
|
|
|
|
protected static ?int $navigationSort = 11;
|
|
|
|
protected static ?string $slug = 'contabilita/gestione-riscaldamento';
|
|
|
|
public bool $netgesconWorkflowMode = true;
|
|
public bool $onlyRiscaldamentoMode = 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');
|
|
}
|
|
}
|