wip
This commit is contained in:
1 parent
4e460fba49
commit
02fb8801a5
1 file changed
+9
-1
@@ -17,8 +17,10 @@ use Filament\Forms\Contracts\HasForms;
|
||||
use Filament\Navigation\NavigationItem;
|
||||
use Filament\Pages\Page;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Schemas\Components\Utilities\Set;
|
||||
use Filament\Schemas\Schema;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Livewire\Attributes\On;
|
||||
|
||||
class PlayerProps extends Page implements HasForms
|
||||
@@ -145,9 +147,15 @@ class PlayerProps extends Page implements HasForms
|
||||
return $arr;
|
||||
}
|
||||
})
|
||||
->placeholder('Team')->afterStateUpdated(function ($state) {
|
||||
->placeholder('Team')
|
||||
->afterStateUpdated(function ($state, Set $set) {
|
||||
if ($state) {
|
||||
$this->dispatch('team-update', team_id: $state);
|
||||
$tmp = SsLineupMemory::where('client_id', Auth::user()->client_id)->where('team_id', $state)->orderBy('created_at', 'desc')->first();
|
||||
if ($tmp) {
|
||||
$set('lineup', $tmp->lineup);
|
||||
$this->dispatch('lineup-update', activeLineUp: $tmp->lineup);
|
||||
}
|
||||
}
|
||||
}),
|
||||
Select::make('lineup')
|
||||
|
||||
Reference in new issue
Block a user