diff --git a/app/Filament/Clusters/Grapper/GrapperCluster.php b/app/Filament/Clusters/Grapper/GrapperCluster.php index 071ac452..a77d2b07 100644 --- a/app/Filament/Clusters/Grapper/GrapperCluster.php +++ b/app/Filament/Clusters/Grapper/GrapperCluster.php @@ -9,5 +9,5 @@ class GrapperCluster extends Cluster { protected static string|BackedEnum|null $navigationIcon = 'phosphor-rss'; - protected static ?int $navigationSort = 3; + protected static ?int $navigationSort = 5; } diff --git a/app/Filament/Pages/EventMapper.php b/app/Filament/Pages/EventMapper.php index b3f5805b..2ed6b7c0 100644 --- a/app/Filament/Pages/EventMapper.php +++ b/app/Filament/Pages/EventMapper.php @@ -26,7 +26,7 @@ class EventMapper extends Page protected ?string $heading = ''; - protected static ?int $navigationSort = 3; // Smaller number = higher up + protected static ?int $navigationSort = 4; // Smaller number = higher up // protected static ?int $navigationSort = 100; @@ -36,7 +36,7 @@ class EventMapper extends Page ActionGroup::make([ Action::make('bet365') ->extraAttributes(['x-on:click' => 'toggle']) - ->visible(fn(): bool => auth()->user()->provider_id != 2) + ->visible(fn (): bool => auth()->user()->provider_id != 2) ->action(function ($livewire) { User::where('id', auth()->user()->id)->update(['provider_id' => 2]); @@ -49,8 +49,8 @@ class EventMapper extends Page Action::make('magloo_nigeria') ->label('MAGLOO NIGERIA') ->extraAttributes(['x-on:click' => 'toggle']) - ->visible(fn(): bool => in_array(auth()->user()->provider_id, [2, 4])) - ->hidden(fn(): bool => ! in_array(auth()->user()->bookmaker_id, [10, 16])) + ->visible(fn (): bool => in_array(auth()->user()->provider_id, [2, 4])) + ->hidden(fn (): bool => ! in_array(auth()->user()->bookmaker_id, [10, 16])) ->action(function ($livewire) { User::where('id', auth()->user()->id)->update(['provider_id' => 3]); $livewire->dispatch('refresh'); @@ -63,8 +63,8 @@ class EventMapper extends Page Action::make('magloo_kenia') ->label('MAGLOO KENIA') ->extraAttributes(['x-on:click' => 'toggle']) - ->visible(fn(): bool => in_array(auth()->user()->provider_id, [2, 3])) - ->hidden(fn(): bool => ! in_array(auth()->user()->bookmaker_id, [10, 16])) + ->visible(fn (): bool => in_array(auth()->user()->provider_id, [2, 3])) + ->hidden(fn (): bool => ! in_array(auth()->user()->bookmaker_id, [10, 16])) ->action(function ($livewire) { User::where('id', auth()->user()->id)->update(['provider_id' => 4]); $livewire->dispatch('refresh'); @@ -77,8 +77,8 @@ class EventMapper extends Page Action::make('logifuture_nigeria') ->label('LOGIFUTURE NIGERA') ->extraAttributes(['x-on:click' => 'toggle']) - ->visible(fn(): bool => auth()->user()->provider_id == 6) - ->hidden(fn(): bool => ! in_array(auth()->user()->bookmaker_id, [35, 36])) + ->visible(fn (): bool => auth()->user()->provider_id == 6) + ->hidden(fn (): bool => ! in_array(auth()->user()->bookmaker_id, [35, 36])) ->action(function ($livewire) { User::where('id', auth()->user()->id)->update(['provider_id' => 5]); @@ -92,8 +92,8 @@ class EventMapper extends Page Action::make('logifuture_colombia') ->label('LOGIFUTURE COLOMBIA') ->extraAttributes(['x-on:click' => 'toggle']) - ->visible(fn(): bool => auth()->user()->provider_id == 5) - ->hidden(fn(): bool => ! in_array(auth()->user()->bookmaker_id, [35, 36])) + ->visible(fn (): bool => auth()->user()->provider_id == 5) + ->hidden(fn (): bool => ! in_array(auth()->user()->bookmaker_id, [35, 36])) ->action(function ($livewire) { User::where('id', auth()->user()->id)->update(['provider_id' => 6]); @@ -107,7 +107,7 @@ class EventMapper extends Page ]) ->label('Swop Bookmaker') ->icon('phosphor-dots-three-vertical') - ->visible(fn(): bool => auth()->user()->hasRole('mapper_source_betsapi')) + ->visible(fn (): bool => auth()->user()->hasRole('mapper_source_betsapi')) ->color('primary') ->button(), ]; diff --git a/app/Filament/Pages/PlayerProps.php b/app/Filament/Pages/PlayerProps.php new file mode 100644 index 00000000..21d293b0 --- /dev/null +++ b/app/Filament/Pages/PlayerProps.php @@ -0,0 +1,283 @@ +form->fill(); + + $this->activeBoxes = $this->boxNames(); + $this->lineUpMap = $this->linUpMap(); + $this->lineUpOptinos = $this->lineUpOptinos(); + $this->lineup = $this->lineUpMap[$this->lineupActive]; + + for ($i = 1; $i <= 35; $i++) { + $this->boxes[$i] = []; + if (isset($this->activeBoxes[$i])) { + $this->beschriftung[$i] = $this->activeBoxes[$i]; + } else { + $this->beschriftung[$i] = ''; + } + } + } + + public function getWidgetData(): array + { + return [ + 'beschriftung' => $this->beschriftung, + 'lineup' => $this->lineup, + 'boxes' => $this->boxes, + ]; + } + + public function form(Schema $schema): Schema + { + return $schema + ->columns(4) + ->components([ + Select::make('cid') + ->live() + ->preload() + ->searchable(false) + ->prefixIconColor(fn (Get $get): string => $get('cid') ? 'success' : 'danger') + ->prefixIcon('phosphor-globe-fill') + ->hiddenLabel() + ->options(fn () => LoadSofaScoreCategory::load()) + ->placeholder('Country') + ->afterStateUpdated(function (callable $set, $state) { + $set('lid', null); + $set('mid', null); + $set('tid', null); + }), + Select::make('lid') + ->live() + ->preload() + ->prefixIconColor(fn (Get $get): string => $get('lid') ? 'success' : 'danger') + ->prefixIcon('phosphor-trophy-fill') + ->hiddenLabel() + ->options(fn (Get $get) => LoadStatisticFixturesLeaguesOptions::load($get('cid'))) + ->placeholder('League') + ->afterStateUpdated(function (callable $set) { + $set('mid', null); + $set('tid', null); + }), + Select::make('mid') + ->live() + ->hiddenLabel() + ->prefixIconColor(fn (Get $get): string => $get('mid') ? 'success' : 'danger') + ->prefixIcon('phosphor-calendar-check-fill') + ->options(function (Get $get) { + return LoadStatisticFixturesMatchOptions::load($get('lid')); + }) + ->afterStateUpdated(function (callable $set) { + $set('tid', null); + }) + ->placeholder('Events'), + + Select::make('tid') + ->live() + ->hiddenLabel() + ->prefixIconColor(fn (Get $get): string => $get('tid') ? 'success' : 'danger') + ->prefixIcon('phosphor-users-three-fill') + ->options(function (Get $get) { + if ($get('mid')) { + $res = StatisticFixtures::where('id', $get('mid'))->first(); + + $arr = []; + if ($res) { + $arr[$res->home_id] = SofaScoreRosa::query()->where('ss_team_id', $res->home_id)->value('ss_team_name'); + $arr[$res->away_id] = SofaScoreRosa::query()->where('ss_team_id', $res->away_id)->value('ss_team_name'); + } + + return $arr; + } + }) + ->placeholder('Team')->afterStateUpdated(function ($state) { + // Speichert das ausgewählte Team direkt in der Session + // session(['player_props_filter_team' => $state]); + + // Widget informieren + $this->dispatch('refreshFilters', team_id: $state); + }), + ])->statePath('filterData'); + } + + protected function getFooterWidgets(): array + { + return [ + PlayerPropsTable::class, + PlayerPropsDrop::class, + ]; + } + + public function getFooterWidgetsColumns(): int|array + { + return 5; + } + + private function boxNames(): array + { + return [2 => 'DR', 4 => 'MR', 6 => 'LW', 9 => 'DC', 10 => 'DM', 11 => 'MC', 12 => 'AM', 15 => 'SW', 16 => 'DC', 17 => 'DM', 18 => 'MC', 19 => 'AM', 20 => 'SM', 21 => 'ST', 23 => 'DC', 24 => 'DM', 25 => 'MC', 26 => 'AM', 30 => 'DL', 32 => 'ML', 34 => 'RW']; + } + + private function lineUpOptinos(): array + { + return [ + '3313' => '3313', + '3331' => '3331', + '3331-' => '3331-', + '3331+' => '3331+', + '3412-' => '3412-', + '3412+' => '3412+', + '3421-' => '3421-', + '3421+' => '3421+', + '343-' => '343-', + '343+' => '343+', + '3511' => '3511', + '3511-' => '3511-', + '3511+' => '3511+', + '352' => '352', + '352-' => '352-', + '352+' => '352+', + '4132' => '4132', + '4213-' => '4213-', + '4213+' => '4213+', + '4222' => '4222', + '4231' => '4231', + '424' => '424', + '4312' => '4312', + '4312-' => '4312-', + '4312+' => '4312+', + '4321' => '4321', + '4321-' => '4321-', + '4321+' => '4321+', + '433' => '433', + '433-' => '433-', + '433+' => '433+', + '4411-' => '4411-', + '4411+' => '4411+', + '442' => '442', + '442-' => '442-', + '442+' => '442+', + '451' => '451', + '451-' => '451-', + '451+' => '451+', + '523-' => '523-', + '523+' => '523+', + '5311' => '5311', + '5311-' => '5311-', + '5311+' => '5311+', + '532' => '532', + '532-' => '532-', + '532+' => '532+', + '541-' => '541-', + '541+' => '541+', + ]; + } + + private function linUpMap(): array + { + return [ + '3313' => [9, 16, 23, 11, 18, 25, 19, 6, 34, 21], + '3331' => [9, 16, 23, 17, 11, 25, 12, 19, 26, 21], + '3331-' => [9, 16, 23, 10, 18, 24, 12, 19, 26, 21], + '3331+' => [9, 16, 23, 11, 18, 25, 12, 19, 26, 21], + '3412-' => [9, 16, 23, 4, 10, 24, 32, 19, 20, 21], + '3412+' => [9, 16, 23, 4, 11, 25, 32, 19, 20, 21], + '3421-' => [9, 16, 23, 4, 10, 24, 32, 12, 26, 21], + '3421+' => [9, 16, 23, 4, 11, 25, 32, 12, 26, 21], + '343-' => [9, 16, 23, 4, 10, 24, 32, 6, 34, 21], + '343+' => [9, 16, 23, 4, 11, 25, 32, 6, 34, 21], + '3511' => [9, 16, 23, 4, 11, 17, 25, 32, 19, 21], + '3511-' => [9, 16, 23, 4, 10, 18, 24, 32, 19, 21], + '3511+' => [9, 16, 23, 4, 11, 18, 25, 32, 19, 21], + '352' => [9, 16, 23, 4, 11, 17, 25, 32, 20, 21], + '352-' => [9, 16, 23, 4, 10, 18, 24, 32, 20, 21], + '352+' => [9, 16, 23, 4, 11, 18, 25, 32, 20, 21], + '4132' => [2, 9, 23, 30, 17, 12, 19, 26, 20, 21], + '4213-' => [2, 9, 23, 30, 10, 24, 19, 6, 34, 21], + '4213+' => [2, 9, 23, 30, 11, 25, 19, 6, 34, 21], + '4222' => [2, 9, 23, 30, 10, 24, 12, 26, 20, 21], + '4231' => [2, 9, 23, 30, 10, 24, 12, 19, 26, 21], + '424' => [2, 9, 23, 30, 10, 24, 6, 34, 20, 21], + '4312' => [2, 9, 23, 30, 17, 11, 25, 19, 20, 21], + '4312-' => [2, 9, 23, 30, 10, 18, 24, 19, 20, 21], + '4312+' => [2, 9, 23, 30, 11, 18, 25, 19, 20, 21], + '4321' => [2, 9, 23, 30, 17, 11, 25, 12, 26, 21], + '4321-' => [2, 9, 23, 30, 10, 18, 24, 12, 26, 21], + '4321+' => [2, 9, 23, 30, 11, 18, 25, 12, 26, 21], + '433' => [2, 9, 23, 30, 17, 11, 25, 6, 34, 21], + '433-' => [2, 9, 23, 30, 10, 18, 24, 6, 34, 21], + '433+' => [2, 9, 23, 30, 11, 18, 25, 6, 34, 21], + '4411-' => [2, 9, 23, 30, 4, 10, 24, 32, 19, 21], + '4411+' => [2, 9, 23, 30, 4, 11, 25, 32, 19, 21], + '442' => [2, 9, 23, 30, 4, 17, 18, 32, 20, 21], + '442-' => [2, 9, 23, 30, 4, 10, 24, 32, 20, 21], + '442+' => [2, 9, 23, 30, 4, 11, 25, 32, 20, 21], + '451' => [2, 9, 23, 30, 4, 17, 11, 25, 32, 21], + '451-' => [2, 9, 23, 30, 4, 10, 18, 24, 32, 21], + '451+' => [2, 9, 23, 30, 4, 11, 18, 25, 32, 21], + '523-' => [2, 9, 16, 23, 30, 10, 24, 6, 34, 21], + '523+' => [2, 9, 16, 23, 30, 11, 25, 6, 34, 21], + '5311' => [2, 9, 16, 23, 30, 17, 11, 25, 19, 21], + '5311-' => [2, 9, 16, 23, 30, 10, 18, 24, 19, 21], + '5311+' => [2, 9, 16, 23, 30, 11, 18, 25, 19, 21], + '532' => [2, 9, 16, 23, 30, 17, 11, 25, 20, 21], + '532-' => [2, 9, 16, 23, 30, 10, 18, 24, 20, 21], + '532+' => [2, 9, 16, 23, 30, 11, 18, 25, 20, 21], + '541-' => [2, 9, 16, 23, 30, 4, 10, 24, 32, 21], + '541+' => [2, 9, 16, 23, 30, 4, 11, 25, 32, 21], + ]; + } +} diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index 0af81863..d9dc653b 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -23,8 +23,8 @@ use Filament\Schemas\Components\Grid; use Filament\Schemas\Components\Utilities\Get; use Filament\Schemas\Components\Utilities\Set; use Filament\Schemas\Schema; -use Filament\Support\Enums\SlideOverPosition; -use Filament\Support\Enums\Width; +// use Filament\Support\Enums\SlideOverPosition; +// use Filament\Support\Enums\Width; use Filament\Support\RawJs; use Illuminate\Contracts\Support\Htmlable; use Illuminate\Contracts\View\View; @@ -42,6 +42,8 @@ class Statistic extends BaseDashboard protected static ?string $title = 'Statistiko'; + protected static ?int $navigationSort = 1; + protected int|string|array $columnSpan = [ 'md' => 2, 'xl' => 3, @@ -79,29 +81,29 @@ class Statistic extends BaseDashboard return ''; } - protected function getHeaderActions(): array - { - return [ - Action::make('esc') - ->label('Reset') - ->icon('phosphor-x-circle') - ->color('gray') - ->keyBindings(['esc']) - ->action('resetFilters'), - Action::make('openDispatcherBoard') - ->modalHeading('') - ->label('Calculate') - ->icon('icon-player') - ->color(fn (): string => $this->filters['team_id'] ? 'primary' : 'gray') - ->disabled(fn (): string => $this->filters['team_id'] ? false : true) - ->slideOver() - ->slideOverPosition(SlideOverPosition::Start) - ->modalWidth(Width::Screen) - ->modalSubmitAction(false) - ->modalCancelAction(false) - ->modalContent(fn (): View => view('livewire.board-dispatcher-modal-wrapper', ['filters' => $this->filters])), - ]; - } + // protected function getHeaderActions(): array + // { + // return [ + // Action::make('esc') + // ->label('Reset') + // ->icon('phosphor-x-circle') + // ->color('gray') + // ->keyBindings(['esc']) + // ->action('resetFilters'), + // Action::make('openDispatcherBoard') + // ->modalHeading('') + // ->label('Calculate') + // ->icon('icon-player') + // ->color(fn (): string => $this->filters['team_id'] ? 'primary' : 'gray') + // ->disabled(fn (): string => $this->filters['team_id'] ? false : true) + // ->slideOver() + // ->slideOverPosition(SlideOverPosition::Start) + // ->modalWidth(Width::Screen) + // ->modalSubmitAction(false) + // ->modalCancelAction(false) + // ->modalContent(fn (): View => view('livewire.board-dispatcher-modal-wrapper', ['filters' => $this->filters])), + // ]; + // } public function filtersForm(Schema $schema): Schema { @@ -460,6 +462,13 @@ class Statistic extends BaseDashboard ->color('gray') ->action(fn (Set $set) => $set('end_date', null)) ), + Action::make('esc') + ->hiddenLabel() + ->tooltip('Clear all (esc)') + ->icon('phosphor-x-circle') + ->color('gray') + ->keyBindings(['esc']) + ->action('resetFilters'), ]); } diff --git a/app/Filament/Resources/Events/EventResource.php b/app/Filament/Resources/Events/EventResource.php index f0a8d4f6..990fc714 100644 --- a/app/Filament/Resources/Events/EventResource.php +++ b/app/Filament/Resources/Events/EventResource.php @@ -21,6 +21,8 @@ class EventResource extends Resource protected static string|\BackedEnum|null $navigationIcon = 'phosphor-monitor'; + protected static ?int $navigationSort = 3; + protected static ?string $navigationLabel = 'Monitor'; protected static ?string $modelLabel = 'Monitor'; diff --git a/app/Filament/Widgets/PlayerPropsDrop.php b/app/Filament/Widgets/PlayerPropsDrop.php new file mode 100644 index 00000000..92f6e611 --- /dev/null +++ b/app/Filament/Widgets/PlayerPropsDrop.php @@ -0,0 +1,16 @@ +team_name = SofaScoreRosa::where('ss_team_id', $team_id)->value('ss_team_name'); + $this->sourceRecords = PlayerCalculator::load($team_id); + $this->resetTable(); + } + } + + public function getHeadingTable(): HtmlString + { + return new HtmlString('
+
Gls
+
Fls
+
Ofs
+
Snt
+
Tsh
+
Crd
+
Foot
+
Evt
+
Min Ø
+
'); + } + + public function table(Table $table): Table + { + return $table + ->headerActions([ + Action::make('esc') + ->hiddenLabel() + ->tooltip('Clear all (esc)') + ->icon('phosphor-x-circle') + ->color('gray') + ->keyBindings(['esc']) + ->action(fn () => $this->resetFilters()), + Action::make('lineups') + ->tooltip('Lineups explanation') + ->color('success') + ->hiddenLabel() + ->icon('phosphor-question-mark') + ->slideOver() + ->slideOverPosition(SlideOverPosition::Start) + ->modalWidth(Width::ExtraLarge) + ->modalSubmitAction(false) + ->modalCancelAction(false) + ->modalContent(fn () => view('filament.modals.position-abbreviation')), + Action::make('reset') + ->hiddenLabel() + ->tooltip('Remove all') + ->icon('phosphor-arrows-clockwise') + ->action(fn () => $this->clearResultTable()), + Action::make('calculate') + ->tooltip('Calculate') + ->hiddenLabel() + ->icon('phosphor-calculator') + ->action(fn () => $this->calculateAspg()), + Action::make('copy_results') + ->tooltip('Copy results for pasting into a spread sheet') + ->hiddenLabel() + ->icon('phosphor-copy') + ->action(fn () => $this->copyResult()), + Action::make('copy_development') + ->tooltip('Copy calculation variables') + ->hiddenLabel() + ->hidden(fn () => ! in_array(Auth::user()->id, [1, 2])) + ->color('warning') + ->icon('phosphor-copy') + ->action(fn () => $this->copyDevelopment()), + ]) + ->heading($this->team_name) + ->query(User::query()->whereRaw('1 = 0')) // Verhindert DB-Abfragen + ->striped() + ->defaultSort('name') + ->emptyStateHeading('No team selected') + ->columns([ + ViewColumn::make('drag_card') + ->label(fn () => $this->getHeadingTable()) + ->view('filament.tables.columns.drag-card'), + ])->extraAttributes([ + 'id' => 'playerdragtable', + ]) + ->filters([ + SelectFilter::make('area') + ->columnSpanFull() + ->native(false) + ->options([ + 'attack' => 'Attack', + 'midfield' => 'Midfield', + 'defence' => 'Defence', + 'goalkeeper' => 'Goalkeeper', + ])->modifyFormFieldUsing(fn (Select $component) => $component->allowHtml()) + ->query(function ($query) { + return $query; + })->indicateUsing(function (array $data): array { + // WICHTIG: Ein leeres Array sorgt dafür, dass kein Indicator-Badge erzeugt wird + return []; + }), + ], layout: FiltersLayout::AboveContent) + ->deferFilters(false) + ->records(function () { + $collection = collect($this->sourceRecords); + $selectedPosition = $this->tableFilters['area']['value'] ?? null; + if (! empty($selectedPosition)) { + $collection = $collection->where('area', $selectedPosition); + } + + return $collection; + }); + } +} diff --git a/app/Filament/Widgets/StatsMedianAverage.php b/app/Filament/Widgets/StatsMedianAverage.php index 00f8e11e..a7ad9367 100644 --- a/app/Filament/Widgets/StatsMedianAverage.php +++ b/app/Filament/Widgets/StatsMedianAverage.php @@ -240,7 +240,6 @@ class StatsMedianAverage extends StatsOverviewWidget return $boxes; } - // TEAMPLATE BOX 1 protected function template_box1(float $expectations_home, float $expectations_away): HtmlString @@ -338,7 +337,7 @@ class StatsMedianAverage extends StatsOverviewWidget } } else { // odd (add 1 because array starts with 0) - $m = ceil($size / 2); + $m = (int) ceil($size / 2); // dd($m, $arr); // dd('UNGERADE', $m, $arr, $arr[$m]); if (isset($arr[$m])) { diff --git a/app/Livewire/PlayerCalculator.php b/app/Livewire/PlayerCalculator.php index 682f1fb4..c1423565 100644 --- a/app/Livewire/PlayerCalculator.php +++ b/app/Livewire/PlayerCalculator.php @@ -4,24 +4,12 @@ namespace App\Livewire; use App\Filament\Pages\Selections\LoadPositions; use App\Models\SofaScorePlayerPerSeason; -use Filament\Widgets\Concerns\InteractsWithPageFilters; use Livewire\Component; class PlayerCalculator extends Component { - use InteractsWithPageFilters; - - public $players = []; - - public function mount(array $filters) + public static function load(int $team_id) { - $this->players = self::load($filters); - } - - public static function load(array $filters) - { - $team_id = (int) $filters['team_id']; - $positions_map = LoadPositions::load(); $player = SofaScorePlayerPerSeason::with('details')->where('season', '=', 'total')->where('ss_team_id', '=', $team_id)->get(); @@ -33,6 +21,7 @@ class PlayerCalculator extends Component $tmp['name'] = $val->details->player_name; $tmp['pos_ori'] = $val->details->position; $tmp['pos'] = ''; + $tmp['active'] = 0; $tmp['foot'] = $val->details->preferred_foot; $tmp['tot_evt'] = $val->total_events; $tmp['tot_min'] = $val->total_min; diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index 92114ade..fe2e436d 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -3,6 +3,7 @@ namespace App\Providers\Filament; use App\Filament\Exports\BetfairExporter; +use App\Filament\Pages\PlayerProps; use App\Filament\Pages\Statistic; use App\Http\Middleware\RecordUserActivity; use Awcodes\LightSwitch\Enums\Alignment; @@ -50,7 +51,7 @@ class AdminPanelProvider extends PanelProvider ->columnMapping(false) ->exporter(BetfairExporter::class) ->label('Download Betfair') - ->visible(fn (): bool => auth()->user()->hasRole('download_betfair')) + ->visible(fn (): bool => Auth::user()->hasRole('download_betfair')) ->fileName(fn (Export $export): string => 'betfair-odds-'.date('d.m.Y-H.i')."-{$export->getKey()}") ->modifyQueryUsing(fn (Builder $query) => $query->whereHas('odds_3ways_bf') ->whereHas('odds_totals_bf') @@ -97,6 +98,7 @@ class AdminPanelProvider extends PanelProvider ]) ->pages([ Statistic::class, + PlayerProps::class, ]) ->widgets([]) ->middleware([ diff --git a/composer.lock b/composer.lock index 8284a0fd..a5c5016b 100644 --- a/composer.lock +++ b/composer.lock @@ -4932,16 +4932,16 @@ }, { "name": "nesbot/carbon", - "version": "3.13.2", + "version": "3.14.0", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon.git", - "reference": "a1c54919f5fff9800cd03c32bd01defd5a4061cb" + "reference": "0023eaa2c9110e47446dd512a263c69c40cd41f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/a1c54919f5fff9800cd03c32bd01defd5a4061cb", - "reference": "a1c54919f5fff9800cd03c32bd01defd5a4061cb", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/0023eaa2c9110e47446dd512a263c69c40cd41f2", + "reference": "0023eaa2c9110e47446dd512a263c69c40cd41f2", "shasum": "" }, "require": { @@ -5033,7 +5033,7 @@ "type": "tidelift" } ], - "time": "2026-08-08T11:40:35+00:00" + "time": "2026-09-12T20:45:19+00:00" }, { "name": "nette/php-generator", @@ -12180,11 +12180,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.2.13", + "version": "2.2.14", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9ba9ac76ee9c5cf5b56d58eb5deec6315b7a0260", - "reference": "9ba9ac76ee9c5cf5b56d58eb5deec6315b7a0260", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9c672e7a8e791dfc3d30e55f683e73fc0b63a3ac", + "reference": "9c672e7a8e791dfc3d30e55f683e73fc0b63a3ac", "shasum": "" }, "require": { @@ -12240,7 +12240,7 @@ "type": "github" } ], - "time": "2026-09-03T20:38:19+00:00" + "time": "2026-09-12T21:39:33+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/public/images/soccerfield-af3.jpg b/public/images/soccerfield-af3.jpg new file mode 100644 index 00000000..573ed9cd Binary files /dev/null and b/public/images/soccerfield-af3.jpg differ diff --git a/resources/css/filament/admin/theme.css b/resources/css/filament/admin/theme.css index cd6bedb6..daa2eed7 100644 --- a/resources/css/filament/admin/theme.css +++ b/resources/css/filament/admin/theme.css @@ -280,4 +280,21 @@ less padding in table background-size: contain; background-repeat: no-repeat; background-position: center; +} + +#playerdragtable .fi-ta-content-ctn { + max-height: 800px !important; + overflow-y: auto !important; + overflow-x: visible; + scrollbar-width: none; + -webkit-scrollbar: hidden; + -ms-overflow-style: none; +} + +/* Fixiert den Tabellenkopf sauber im Scroll-Kontext */ +#playerdragtable .fi-ta-header-ctn { + position: sticky !important; + top: 0 !important; + z-index: 20 !important; + background-color: var(--fi-background-color, #ffffff) !important; } \ No newline at end of file diff --git a/resources/views/filament/pages/player-props.blade.php b/resources/views/filament/pages/player-props.blade.php new file mode 100644 index 00000000..6d969da6 --- /dev/null +++ b/resources/views/filament/pages/player-props.blade.php @@ -0,0 +1,3 @@ + + {{ $this->form }} + diff --git a/resources/views/livewire/player-props-drop.blade.php b/resources/views/livewire/player-props-drop.blade.php new file mode 100644 index 00000000..7db83d4f --- /dev/null +++ b/resources/views/livewire/player-props-drop.blade.php @@ -0,0 +1,68 @@ +
+ @foreach ($beschriftung as $boxNumber => $benennung) + @if ($benennung) + @if (in_array($boxNumber, $lineup)) +
+ +
+
+
+ {{ $benennung }} +
+ + @if ($boxes[$boxNumber]) + + @endif +
+ + + @if ($boxes[$boxNumber]) +
+ {{ $boxes[$boxNumber]['name'] }} +
+ @endif +
+ @else + + @endif + @else +
+ @endif + @endforeach +