From 30c32397a83d4601a31719c01665806c8129df5a Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 22 May 2026 06:22:47 +0200 Subject: [PATCH] wip player select statistk --- app/Filament/Pages/Statistic.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index 42aac0e2..df4b23ef 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -68,6 +68,9 @@ class Statistic extends BaseDashboard return Element::query()->whereIn('id', $arr)->orderBy('name')->pluck('name', 'id'); } }) + ->afterStateUpdated(function (callable $set) { + $set('tm_player_id', null); + }) ->preload() ->searchable() ->live() @@ -101,7 +104,7 @@ class Statistic extends BaseDashboard ->preload() ->searchable() ->options(function (Get $get) { - return StatistikoDetail::where('id_squadra_tm', $get('txodds_id'))->pluck('name', 'tm_player_id'); + return StatistikoDetail::where('txodds_id', $get('team_id'))->pluck('name', 'tm_player_id'); }) ->live(), Select::make('team_position')