42 lines
1.1 KiB
PHP
Executable File
42 lines
1.1 KiB
PHP
Executable File
<?php
|
|
namespace App\Filament\Pages\Supporto;
|
|
|
|
use App\Models\User;
|
|
use BackedEnum;
|
|
use Filament\Pages\Page;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use UnitEnum;
|
|
|
|
class TicketMobileHelp extends Page
|
|
{
|
|
protected static ?string $title = 'Help Ticket Mobile';
|
|
|
|
protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-question-mark-circle';
|
|
|
|
protected static UnitEnum|string|null $navigationGroup = 'Supporto';
|
|
|
|
protected static ?string $slug = 'supporto/ticket-mobile-help';
|
|
|
|
protected static bool $shouldRegisterNavigation = false;
|
|
|
|
protected string $view = 'filament.pages.supporto.ticket-mobile-help';
|
|
|
|
public static function canAccess(): bool
|
|
{
|
|
$user = Auth::user();
|
|
|
|
return $user instanceof User
|
|
&& $user->hasAnyRole(['super-admin', 'admin', 'amministratore', 'collaboratore']);
|
|
}
|
|
|
|
public function getBackUrl(): string
|
|
{
|
|
return TicketMobile::getUrl(panel: 'admin-filament');
|
|
}
|
|
|
|
public function getGestioneUrl(): string
|
|
{
|
|
return TicketGestione::getUrl(panel: 'admin-filament');
|
|
}
|
|
}
|