wip pp filter
This commit is contained in:
1 parent
fc1e1b2832
commit
55f31acf2a
23 files changed
+1127
-329
No files matched your search
@@ -90,18 +90,17 @@ class PlayerProps extends Page implements HasForms
|
||||
$this->selectMatch(),
|
||||
$this->selectTeam(),
|
||||
$this->selectLineup(),
|
||||
// $this->radioSeasonOrDate(),
|
||||
// $this->datePickerStartDate(),
|
||||
// $this->datePickerEndDate(),
|
||||
$this->radioSeasonOrDate(),
|
||||
$this->datePickerStartDate(),
|
||||
$this->datePickerEndDate(),
|
||||
])->statePath('filterData');
|
||||
}
|
||||
|
||||
#[On('team-update')]
|
||||
public function syncData(?int $team_id)
|
||||
public function syncData()
|
||||
{
|
||||
if ($team_id) {
|
||||
$this->team_id = $team_id;
|
||||
$this->clientLineUps = SsLineupMemory::where('team_id', $team_id)->where('client_id', Auth::user()->client_id)->pluck('lineup')->toArray();
|
||||
if ($this->team_id) {
|
||||
$this->clientLineUps = SsLineupMemory::where('team_id', $this->team_id)->where('client_id', Auth::user()->client_id)->pluck('lineup')->toArray();
|
||||
} else {
|
||||
$this->players = [];
|
||||
$this->dispatch('clear-all');
|
||||
@@ -302,6 +301,7 @@ class PlayerProps extends Page implements HasForms
|
||||
$set('mid', null);
|
||||
$set('tid', null);
|
||||
$this->dispatch('clear-all');
|
||||
$this->dispatch('season_mode-update', $state);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -317,9 +317,11 @@ class PlayerProps extends Page implements HasForms
|
||||
->default('season')
|
||||
->hiddenLabel()
|
||||
->options([
|
||||
'season' => 'Season',
|
||||
'season' => 'Active Season',
|
||||
'date' => 'Date',
|
||||
]);
|
||||
])->afterStateUpdated(function ($state) {
|
||||
$this->dispatch('season_or_date-update', season_or_date: $state);
|
||||
});
|
||||
}
|
||||
|
||||
private function datePickerStartDate(): DatePicker
|
||||
@@ -332,12 +334,15 @@ class PlayerProps extends Page implements HasForms
|
||||
->prefixIconColor(fn (Get $get): string => $get('start_date') ? 'success' : 'primary')
|
||||
->prefixIcon('phosphor-calendar')
|
||||
->prefix('Start')
|
||||
->closeOnDateSelection()
|
||||
->suffixAction(
|
||||
Action::make('clear_start')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn (Set $set) => $set('start_date', null))
|
||||
);
|
||||
)->afterStateUpdated(function ($state) {
|
||||
$this->dispatch('start_date-update', start_date: $state);
|
||||
});
|
||||
}
|
||||
|
||||
private function datePickerEndDate(): DatePicker
|
||||
@@ -350,11 +355,14 @@ class PlayerProps extends Page implements HasForms
|
||||
->prefixIconColor(fn (Get $get): string => $get('end_date') ? 'success' : 'primary')
|
||||
->prefixIcon('phosphor-calendar')
|
||||
->prefix('End')
|
||||
->closeOnDateSelection()
|
||||
->suffixAction(
|
||||
Action::make('clear_end')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn (Set $set) => $set('end_date', null))
|
||||
);
|
||||
)->afterStateUpdated(function ($state) {
|
||||
$this->dispatch('end_date-update', end_date: $state);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user