diff --git a/app/Filament/Clusters/StaticData/Resources/SofaScoreCategories/SofaScoreCategoryResource.php b/app/Filament/Clusters/StaticData/Resources/SofaScoreCategories/SofaScoreCategoryResource.php index a77166e2..995fd632 100644 --- a/app/Filament/Clusters/StaticData/Resources/SofaScoreCategories/SofaScoreCategoryResource.php +++ b/app/Filament/Clusters/StaticData/Resources/SofaScoreCategories/SofaScoreCategoryResource.php @@ -2,8 +2,6 @@ namespace App\Filament\Clusters\StaticData\Resources\SofaScoreCategories; -use App\Filament\Clusters\StaticData\Resources\SofaScoreCategories\Pages\CreateSofaScoreCategory; -use App\Filament\Clusters\StaticData\Resources\SofaScoreCategories\Pages\EditSofaScoreCategory; use App\Filament\Clusters\StaticData\Resources\SofaScoreCategories\Pages\ListSofaScoreCategories; use App\Filament\Clusters\StaticData\Resources\SofaScoreCategories\Schemas\SofaScoreCategoryForm; use App\Filament\Clusters\StaticData\Resources\SofaScoreCategories\Tables\SofaScoreCategoriesTable; @@ -23,11 +21,12 @@ class SofaScoreCategoryResource extends Resource protected static ?int $navigationSort = 13; protected static string|UnitEnum|null $navigationGroup = 'Statistiko'; - protected static ?string $recordTitleAttribute = 'SS Countries'; - protected static ?string $navigationLabel = 'SS Countries'; + protected static ?string $recordTitleAttribute = 'Countries'; - protected static ?string $modelLabel = 'SS Countries'; + protected static ?string $navigationLabel = 'Countries'; + + protected static ?string $modelLabel = 'Countries'; public static function form(Schema $schema): Schema { diff --git a/app/Filament/Clusters/StaticData/Resources/StatistikoConfigs/StatistikoConfigResource.php b/app/Filament/Clusters/StaticData/Resources/StatistikoConfigs/StatistikoConfigResource.php index 808b4971..91c065fc 100644 --- a/app/Filament/Clusters/StaticData/Resources/StatistikoConfigs/StatistikoConfigResource.php +++ b/app/Filament/Clusters/StaticData/Resources/StatistikoConfigs/StatistikoConfigResource.php @@ -20,9 +20,9 @@ class StatistikoConfigResource extends Resource protected static ?string $cluster = StaticDataCluster::class; - protected static ?string $navigationLabel = 'Configurations'; + protected static ?string $navigationLabel = 'Aspettativa'; - protected static ?string $modelLabel = 'Configurations'; + protected static ?string $modelLabel = 'Aspettativa'; protected static ?int $navigationSort = 15; @@ -42,6 +42,7 @@ class StatistikoConfigResource extends Resource 'index' => ListStatistikoConfigs::route('/'), ]; } + public static function getNavigationBadge(): ?string { return parent::getEloquentQuery()->count(); diff --git a/app/Filament/Clusters/StaticData/Resources/StatistikoConfigs/Tables/StatistikoConfigsTable.php b/app/Filament/Clusters/StaticData/Resources/StatistikoConfigs/Tables/StatistikoConfigsTable.php index a8393f0b..a8b1c6f5 100644 --- a/app/Filament/Clusters/StaticData/Resources/StatistikoConfigs/Tables/StatistikoConfigsTable.php +++ b/app/Filament/Clusters/StaticData/Resources/StatistikoConfigs/Tables/StatistikoConfigsTable.php @@ -14,7 +14,7 @@ class StatistikoConfigsTable { return $table ->columns([ - TextColumn::make('group')->formatStateUsing(fn(string $state): string => match ($state) { + TextColumn::make('group')->formatStateUsing(fn (string $state): string => match ($state) { 'gls' => 'Goals', 'crn' => 'Corner', 'fls' => 'Fouls', @@ -22,20 +22,28 @@ class StatistikoConfigsTable 'crd' => 'Cards', 'snt' => 'Shots On Target', 'tsh' => 'Total Shots', + 'all' => 'Method B', }), TextColumn::make('team')->badge() - ->color(fn(string $state): string => match ($state) { + ->color(fn (string $state): string => match ($state) { 'home' => 'info', 'away' => 'warning', }), TextColumn::make('varname') - ->formatStateUsing(fn(string $state): string => strtoupper($state)), + ->formatStateUsing(fn (string $state): string => strtoupper($state)), TextInputColumn::make('value') ->prefix('xx.x') ->type('number') ->rules(['required', 'decimal:0.1,10']), ]) ->filters([ + SelectFilter::make('type') + ->label('Calculation') + ->default('B') + ->options([ + 'A' => 'Type A', + 'B' => 'Type B', + ]), SelectFilter::make('group') ->options([ 'gls' => 'Goals', @@ -50,7 +58,7 @@ class StatistikoConfigsTable ->options([ 'home' => 'Home', 'away' => 'Away', - ]) + ]), ], layout: FiltersLayout::AboveContent) ->deferFilters(false); } diff --git a/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/StatistikoDetailResource.php b/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/StatistikoDetailResource.php index 5528cdd9..2c653368 100644 --- a/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/StatistikoDetailResource.php +++ b/app/Filament/Clusters/StaticData/Resources/StatistikoDetails/StatistikoDetailResource.php @@ -16,6 +16,10 @@ class StatistikoDetailResource extends Resource { protected static ?string $model = StatistikoDetail::class; + protected static bool $shouldSkipAuthorization = true; + + protected static bool $shouldRegisterNavigation = true; + protected static ?string $navigationLabel = 'Details'; protected static ?string $modelLabel = 'Details'; diff --git a/app/Filament/Widgets/Boxes/Helper/ExpectationCalculation.php b/app/Filament/Widgets/Boxes/Helper/ExpectationCalculation.php index 93a402d7..9659ae2a 100644 --- a/app/Filament/Widgets/Boxes/Helper/ExpectationCalculation.php +++ b/app/Filament/Widgets/Boxes/Helper/ExpectationCalculation.php @@ -44,6 +44,7 @@ class ExpectationCalculation } } $asp_result = []; + foreach ($summen2 as $bettype => $value) { $asp_result[$bettype]['home'] = round($value['home']['sum'] / $value['home']['cnt'], 1); $asp_result[$bettype]['away'] = round($value['away']['sum'] / $value['away']['cnt'], 1); diff --git a/app/Filament/Widgets/Charts/LoadEvents/LoadEventsQuery.php b/app/Filament/Widgets/Charts/LoadEvents/LoadEventsQuery.php index 8472bf36..67899144 100644 --- a/app/Filament/Widgets/Charts/LoadEvents/LoadEventsQuery.php +++ b/app/Filament/Widgets/Charts/LoadEvents/LoadEventsQuery.php @@ -95,7 +95,7 @@ class LoadEventsQuery * STATTISTIC DATA */ // dd($team_id, $home_id, $away_id); - Log::debug('res', [$team_id, $league_id, $season]); + // Log::debug('res', [$team_id, $league_id, $season]); $res = StatistikoEvent::where(function ($query) use ($league_id, $similar_past_matches) { switch ($similar_past_matches) { diff --git a/app/Policies/SofaScoreCategoryPolicy.php b/app/Policies/SofaScoreCategoryPolicy.php index 947f0b5e..c7f29e31 100644 --- a/app/Policies/SofaScoreCategoryPolicy.php +++ b/app/Policies/SofaScoreCategoryPolicy.php @@ -1,66 +1,70 @@ can('ViewAny:SofaScoreCategory'); } - /** - * Determine whether the user can view the model. - */ - public function view(User $user, SofaScoreCategory $sofaScoreCategory): bool + public function view(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool { - return false; + return $authUser->can('View:SofaScoreCategory'); } - /** - * Determine whether the user can create models. - */ - public function create(User $user): bool + public function create(AuthUser $authUser): bool { - return false; + return $authUser->can('Create:SofaScoreCategory'); } - /** - * Determine whether the user can update the model. - */ - public function update(User $user, SofaScoreCategory $sofaScoreCategory): bool + public function update(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool { - return false; + return $authUser->can('Update:SofaScoreCategory'); } - /** - * Determine whether the user can delete the model. - */ - public function delete(User $user, SofaScoreCategory $sofaScoreCategory): bool + public function delete(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool { - return false; + return $authUser->can('Delete:SofaScoreCategory'); } - /** - * Determine whether the user can restore the model. - */ - public function restore(User $user, SofaScoreCategory $sofaScoreCategory): bool + public function restore(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool { - return false; + return $authUser->can('Restore:SofaScoreCategory'); } - /** - * Determine whether the user can permanently delete the model. - */ - public function forceDelete(User $user, SofaScoreCategory $sofaScoreCategory): bool + public function forceDelete(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool { - return false; + return $authUser->can('ForceDelete:SofaScoreCategory'); } -} + + public function forceDeleteAny(AuthUser $authUser): bool + { + return $authUser->can('ForceDeleteAny:SofaScoreCategory'); + } + + public function restoreAny(AuthUser $authUser): bool + { + return $authUser->can('RestoreAny:SofaScoreCategory'); + } + + public function replicate(AuthUser $authUser, SofaScoreCategory $sofaScoreCategory): bool + { + return $authUser->can('Replicate:SofaScoreCategory'); + } + + public function reorder(AuthUser $authUser): bool + { + return $authUser->can('Reorder:SofaScoreCategory'); + } + +} \ No newline at end of file diff --git a/app/Policies/SofaScoreRosaPolicy.php b/app/Policies/SofaScoreRosaPolicy.php index 3e9b17db..1315e272 100644 --- a/app/Policies/SofaScoreRosaPolicy.php +++ b/app/Policies/SofaScoreRosaPolicy.php @@ -1,20 +1,23 @@ can('ViewAny:SofaScoreRosa'); } - public function view(AuthUser $authUser): bool + public function view(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool { return $authUser->can('View:SofaScoreRosa'); } @@ -24,22 +27,22 @@ class SofaScoreRosaPolicy return $authUser->can('Create:SofaScoreRosa'); } - public function update(AuthUser $authUser): bool + public function update(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool { return $authUser->can('Update:SofaScoreRosa'); } - public function delete(AuthUser $authUser): bool + public function delete(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool { return $authUser->can('Delete:SofaScoreRosa'); } - public function restore(AuthUser $authUser): bool + public function restore(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool { return $authUser->can('Restore:SofaScoreRosa'); } - public function forceDelete(AuthUser $authUser): bool + public function forceDelete(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool { return $authUser->can('ForceDelete:SofaScoreRosa'); } @@ -54,7 +57,7 @@ class SofaScoreRosaPolicy return $authUser->can('RestoreAny:SofaScoreRosa'); } - public function replicate(AuthUser $authUser): bool + public function replicate(AuthUser $authUser, SofaScoreRosa $sofaScoreRosa): bool { return $authUser->can('Replicate:SofaScoreRosa'); } @@ -63,4 +66,5 @@ class SofaScoreRosaPolicy { return $authUser->can('Reorder:SofaScoreRosa'); } -} + +} \ No newline at end of file diff --git a/app/Policies/SofaScoreTaskPolicy.php b/app/Policies/SofaScoreTaskPolicy.php index 4d6ad538..5356dba2 100644 --- a/app/Policies/SofaScoreTaskPolicy.php +++ b/app/Policies/SofaScoreTaskPolicy.php @@ -1,20 +1,23 @@ can('ViewAny:SofaScoreTask'); } - public function view(AuthUser $authUser): bool + public function view(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool { return $authUser->can('View:SofaScoreTask'); } @@ -24,22 +27,22 @@ class SofaScoreTaskPolicy return $authUser->can('Create:SofaScoreTask'); } - public function update(AuthUser $authUser): bool + public function update(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool { return $authUser->can('Update:SofaScoreTask'); } - public function delete(AuthUser $authUser): bool + public function delete(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool { return $authUser->can('Delete:SofaScoreTask'); } - public function restore(AuthUser $authUser): bool + public function restore(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool { return $authUser->can('Restore:SofaScoreTask'); } - public function forceDelete(AuthUser $authUser): bool + public function forceDelete(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool { return $authUser->can('ForceDelete:SofaScoreTask'); } @@ -54,7 +57,7 @@ class SofaScoreTaskPolicy return $authUser->can('RestoreAny:SofaScoreTask'); } - public function replicate(AuthUser $authUser): bool + public function replicate(AuthUser $authUser, SofaScoreTask $sofaScoreTask): bool { return $authUser->can('Replicate:SofaScoreTask'); } @@ -63,4 +66,5 @@ class SofaScoreTaskPolicy { return $authUser->can('Reorder:SofaScoreTask'); } -} + +} \ No newline at end of file diff --git a/app/Policies/SofaScoreTournamentPolicy.php b/app/Policies/SofaScoreTournamentPolicy.php index 2e766bdd..088e6126 100644 --- a/app/Policies/SofaScoreTournamentPolicy.php +++ b/app/Policies/SofaScoreTournamentPolicy.php @@ -1,20 +1,23 @@ can('ViewAny:SofaScoreTournament'); } - public function view(AuthUser $authUser): bool + public function view(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool { return $authUser->can('View:SofaScoreTournament'); } @@ -24,22 +27,22 @@ class SofaScoreTournamentPolicy return $authUser->can('Create:SofaScoreTournament'); } - public function update(AuthUser $authUser): bool + public function update(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool { return $authUser->can('Update:SofaScoreTournament'); } - public function delete(AuthUser $authUser): bool + public function delete(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool { return $authUser->can('Delete:SofaScoreTournament'); } - public function restore(AuthUser $authUser): bool + public function restore(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool { return $authUser->can('Restore:SofaScoreTournament'); } - public function forceDelete(AuthUser $authUser): bool + public function forceDelete(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool { return $authUser->can('ForceDelete:SofaScoreTournament'); } @@ -54,7 +57,7 @@ class SofaScoreTournamentPolicy return $authUser->can('RestoreAny:SofaScoreTournament'); } - public function replicate(AuthUser $authUser): bool + public function replicate(AuthUser $authUser, SofaScoreTournament $sofaScoreTournament): bool { return $authUser->can('Replicate:SofaScoreTournament'); } @@ -63,4 +66,5 @@ class SofaScoreTournamentPolicy { return $authUser->can('Reorder:SofaScoreTournament'); } -} + +} \ No newline at end of file diff --git a/app/Policies/StatisticFixturesPolicy.php b/app/Policies/StatisticFixturesPolicy.php index 5ec75005..8bdaf819 100644 --- a/app/Policies/StatisticFixturesPolicy.php +++ b/app/Policies/StatisticFixturesPolicy.php @@ -1,21 +1,23 @@ can('ViewAny:StatisticFixtures'); } - public function view(AuthUser $authUser): bool + public function view(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool { return $authUser->can('View:StatisticFixtures'); } @@ -25,22 +27,22 @@ class StatisticFixturesPolicy return $authUser->can('Create:StatisticFixtures'); } - public function update(AuthUser $authUser): bool + public function update(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool { return $authUser->can('Update:StatisticFixtures'); } - public function delete(AuthUser $authUser): bool + public function delete(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool { return $authUser->can('Delete:StatisticFixtures'); } - public function restore(AuthUser $authUser): bool + public function restore(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool { return $authUser->can('Restore:StatisticFixtures'); } - public function forceDelete(AuthUser $authUser): bool + public function forceDelete(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool { return $authUser->can('ForceDelete:StatisticFixtures'); } @@ -55,7 +57,7 @@ class StatisticFixturesPolicy return $authUser->can('RestoreAny:StatisticFixtures'); } - public function replicate(AuthUser $authUser): bool + public function replicate(AuthUser $authUser, StatisticFixtures $statisticFixtures): bool { return $authUser->can('Replicate:StatisticFixtures'); } @@ -64,4 +66,5 @@ class StatisticFixturesPolicy { return $authUser->can('Reorder:StatisticFixtures'); } -} + +} \ No newline at end of file diff --git a/app/Policies/StatistikoConfigPolicy.php b/app/Policies/StatistikoConfigPolicy.php index 3b8d2141..e1bcf98e 100644 --- a/app/Policies/StatistikoConfigPolicy.php +++ b/app/Policies/StatistikoConfigPolicy.php @@ -1,66 +1,70 @@ can('ViewAny:StatistikoConfig'); } - /** - * Determine whether the user can view the model. - */ - public function view(User $user, StatistikoConfig $statistikoConfig): bool + public function view(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool { - return false; + return $authUser->can('View:StatistikoConfig'); } - /** - * Determine whether the user can create models. - */ - public function create(User $user): bool + public function create(AuthUser $authUser): bool { - return false; + return $authUser->can('Create:StatistikoConfig'); } - /** - * Determine whether the user can update the model. - */ - public function update(User $user, StatistikoConfig $statistikoConfig): bool + public function update(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool { - return false; + return $authUser->can('Update:StatistikoConfig'); } - /** - * Determine whether the user can delete the model. - */ - public function delete(User $user, StatistikoConfig $statistikoConfig): bool + public function delete(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool { - return false; + return $authUser->can('Delete:StatistikoConfig'); } - /** - * Determine whether the user can restore the model. - */ - public function restore(User $user, StatistikoConfig $statistikoConfig): bool + public function restore(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool { - return false; + return $authUser->can('Restore:StatistikoConfig'); } - /** - * Determine whether the user can permanently delete the model. - */ - public function forceDelete(User $user, StatistikoConfig $statistikoConfig): bool + public function forceDelete(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool { - return false; + return $authUser->can('ForceDelete:StatistikoConfig'); } -} + + public function forceDeleteAny(AuthUser $authUser): bool + { + return $authUser->can('ForceDeleteAny:StatistikoConfig'); + } + + public function restoreAny(AuthUser $authUser): bool + { + return $authUser->can('RestoreAny:StatistikoConfig'); + } + + public function replicate(AuthUser $authUser, StatistikoConfig $statistikoConfig): bool + { + return $authUser->can('Replicate:StatistikoConfig'); + } + + public function reorder(AuthUser $authUser): bool + { + return $authUser->can('Reorder:StatistikoConfig'); + } + +} \ No newline at end of file diff --git a/app/Policies/StatistikoDetailPolicy.php b/app/Policies/StatistikoDetailPolicy.php index 1794537a..e8a02c3a 100644 --- a/app/Policies/StatistikoDetailPolicy.php +++ b/app/Policies/StatistikoDetailPolicy.php @@ -1,21 +1,23 @@ can('ViewAny:StatistikoDetail'); } - public function view(AuthUser $authUser): bool + public function view(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool { return $authUser->can('View:StatistikoDetail'); } @@ -25,22 +27,22 @@ class StatistikoDetailPolicy return $authUser->can('Create:StatistikoDetail'); } - public function update(AuthUser $authUser): bool + public function update(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool { return $authUser->can('Update:StatistikoDetail'); } - public function delete(AuthUser $authUser): bool + public function delete(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool { return $authUser->can('Delete:StatistikoDetail'); } - public function restore(AuthUser $authUser): bool + public function restore(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool { return $authUser->can('Restore:StatistikoDetail'); } - public function forceDelete(AuthUser $authUser): bool + public function forceDelete(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool { return $authUser->can('ForceDelete:StatistikoDetail'); } @@ -55,7 +57,7 @@ class StatistikoDetailPolicy return $authUser->can('RestoreAny:StatistikoDetail'); } - public function replicate(AuthUser $authUser): bool + public function replicate(AuthUser $authUser, StatistikoDetail $statistikoDetail): bool { return $authUser->can('Replicate:StatistikoDetail'); } @@ -64,4 +66,5 @@ class StatistikoDetailPolicy { return $authUser->can('Reorder:StatistikoDetail'); } -} + +} \ No newline at end of file diff --git a/app/Policies/StatistikoEventPolicy.php b/app/Policies/StatistikoEventPolicy.php index b9293c2f..bf5aa758 100644 --- a/app/Policies/StatistikoEventPolicy.php +++ b/app/Policies/StatistikoEventPolicy.php @@ -1,21 +1,23 @@ can('ViewAny:StatistikoEvent'); } - public function view(AuthUser $authUser): bool + public function view(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool { return $authUser->can('View:StatistikoEvent'); } @@ -25,22 +27,22 @@ class StatistikoEventPolicy return $authUser->can('Create:StatistikoEvent'); } - public function update(AuthUser $authUser): bool + public function update(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool { return $authUser->can('Update:StatistikoEvent'); } - public function delete(AuthUser $authUser): bool + public function delete(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool { return $authUser->can('Delete:StatistikoEvent'); } - public function restore(AuthUser $authUser): bool + public function restore(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool { return $authUser->can('Restore:StatistikoEvent'); } - public function forceDelete(AuthUser $authUser): bool + public function forceDelete(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool { return $authUser->can('ForceDelete:StatistikoEvent'); } @@ -55,7 +57,7 @@ class StatistikoEventPolicy return $authUser->can('RestoreAny:StatistikoEvent'); } - public function replicate(AuthUser $authUser): bool + public function replicate(AuthUser $authUser, StatistikoEvent $statistikoEvent): bool { return $authUser->can('Replicate:StatistikoEvent'); } @@ -64,4 +66,5 @@ class StatistikoEventPolicy { return $authUser->can('Reorder:StatistikoEvent'); } -} + +} \ No newline at end of file diff --git a/app/Policies/StatistikoImportPolicy.php b/app/Policies/StatistikoImportPolicy.php index f0b7030f..e71aec65 100644 --- a/app/Policies/StatistikoImportPolicy.php +++ b/app/Policies/StatistikoImportPolicy.php @@ -1,21 +1,23 @@ can('ViewAny:StatistikoImport'); } - public function view(AuthUser $authUser): bool + public function view(AuthUser $authUser, StatistikoImport $statistikoImport): bool { return $authUser->can('View:StatistikoImport'); } @@ -25,22 +27,22 @@ class StatistikoImportPolicy return $authUser->can('Create:StatistikoImport'); } - public function update(AuthUser $authUser): bool + public function update(AuthUser $authUser, StatistikoImport $statistikoImport): bool { return $authUser->can('Update:StatistikoImport'); } - public function delete(AuthUser $authUser): bool + public function delete(AuthUser $authUser, StatistikoImport $statistikoImport): bool { return $authUser->can('Delete:StatistikoImport'); } - public function restore(AuthUser $authUser): bool + public function restore(AuthUser $authUser, StatistikoImport $statistikoImport): bool { return $authUser->can('Restore:StatistikoImport'); } - public function forceDelete(AuthUser $authUser): bool + public function forceDelete(AuthUser $authUser, StatistikoImport $statistikoImport): bool { return $authUser->can('ForceDelete:StatistikoImport'); } @@ -55,7 +57,7 @@ class StatistikoImportPolicy return $authUser->can('RestoreAny:StatistikoImport'); } - public function replicate(AuthUser $authUser): bool + public function replicate(AuthUser $authUser, StatistikoImport $statistikoImport): bool { return $authUser->can('Replicate:StatistikoImport'); } @@ -64,4 +66,5 @@ class StatistikoImportPolicy { return $authUser->can('Reorder:StatistikoImport'); } -} + +} \ No newline at end of file diff --git a/app/Policies/StatistikoPlayerPolicy.php b/app/Policies/StatistikoPlayerPolicy.php index c282f619..0f9835a5 100644 --- a/app/Policies/StatistikoPlayerPolicy.php +++ b/app/Policies/StatistikoPlayerPolicy.php @@ -1,21 +1,23 @@ can('ViewAny:StatistikoPlayer'); } - public function view(AuthUser $authUser): bool + public function view(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool { return $authUser->can('View:StatistikoPlayer'); } @@ -25,22 +27,22 @@ class StatistikoPlayerPolicy return $authUser->can('Create:StatistikoPlayer'); } - public function update(AuthUser $authUser): bool + public function update(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool { return $authUser->can('Update:StatistikoPlayer'); } - public function delete(AuthUser $authUser): bool + public function delete(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool { return $authUser->can('Delete:StatistikoPlayer'); } - public function restore(AuthUser $authUser): bool + public function restore(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool { return $authUser->can('Restore:StatistikoPlayer'); } - public function forceDelete(AuthUser $authUser): bool + public function forceDelete(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool { return $authUser->can('ForceDelete:StatistikoPlayer'); } @@ -55,7 +57,7 @@ class StatistikoPlayerPolicy return $authUser->can('RestoreAny:StatistikoPlayer'); } - public function replicate(AuthUser $authUser): bool + public function replicate(AuthUser $authUser, StatistikoPlayer $statistikoPlayer): bool { return $authUser->can('Replicate:StatistikoPlayer'); } @@ -64,4 +66,5 @@ class StatistikoPlayerPolicy { return $authUser->can('Reorder:StatistikoPlayer'); } -} + +} \ No newline at end of file diff --git a/database/migrations/2026_08_14_112941_create_statistiko_configs_table.php b/database/migrations/2026_08_14_112941_create_statistiko_configs_table.php index b0af1817..727b348b 100644 --- a/database/migrations/2026_08_14_112941_create_statistiko_configs_table.php +++ b/database/migrations/2026_08_14_112941_create_statistiko_configs_table.php @@ -13,6 +13,7 @@ return new class extends Migration { Schema::create('statistiko_configs', function (Blueprint $table) { $table->id(); + $table->string('type'); $table->string('group'); $table->string('team'); $table->string('varname');