OwlCyberSecurity - MANAGER
Edit File: TicketResource.php
<?php namespace App\Filament\Resources; use App\Filament\Resources\TicketResource\Pages; use App\Models\Department; use App\Models\Ticket; use Filament\Resources\Resource; use Filament\Tables\Actions\ViewAction; use Filament\Tables\Columns\Layout\Stack; use Filament\Tables\Columns\ViewColumn; use Filament\Tables\Table; use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\TextColumn; class TicketResource extends Resource { protected static ?string $model = Department::class; protected static ?string $navigationIcon = 'heroicon-o-ticket'; protected static ?string $modelLabel = 'تیکت'; protected static ?string $pluralModelLabel = ' لیست تیکت های باز'; protected static ?string $slug = 'tickets'; protected static ?string $navigationGroup = 'مدیریت کاربران'; protected static ?int $navigationSort = 4; public static function table(Table $table): Table { return $table ->contentGrid([ 'md' => 2, 'xl' => 3, ]) ->columns([ Stack::make([ IconColumn::make('english_name')->color('primary')->extraAttributes(['class' => 'ticket-icon-size mb-2'])->icons([ 'heroicon-o-x-circle', 'heroicon-o-receipt-percent' => 'FactorTickets', 'heroicon-o-shopping-bag' => 'PurchaseTickets', 'heroicon-o-truck' => 'LogisticTickets', 'heroicon-o-currency-dollar' => 'InvoiceTickets', 'heroicon-o-briefcase' => 'PublicTickets', 'heroicon-o-server' => 'TechnicalTickets', 'heroicon-o-user' => 'ManagerTickets', 'heroicon-o-building-office' => 'TehranOfficeTickets', ]), TextColumn::make('name')->extraAttributes(['class' => 'font-bold mb-2',]), ViewColumn::make('count')->view('filament.tables.columns.count-ticket-open')->extraAttributes(['class' => 'font-bold mb-2']), TextColumn::make('description')->extraAttributes(['class' => 'text-grey-desc']), ]) ]) ->filters([ // ]) ->actions([ ViewAction::make()->color('primary'), ]) ->bulkActions([]); } public static function getPages(): array { return [ 'index' => Pages\ListTickets::route('/'), 'view' => Pages\TicketsList::route('/view-list/{record}'), 'ticket-show' => Pages\TicketShow::route('/show/{id}'), ]; } public static function canCreate(): bool { return false; } public static function canViewAny(): bool { return auth()->user()->can('tickets::view'); } }