This commit is contained in:
salam committed 2026-10-31 20:53:36 +01:00
1 parent ca102d3e51
commit 121a16bd79
4 files changed
+8 -6

No files matched your search

+5 -4
View File
@@ -103,7 +103,7 @@ class PlayerProps extends Page implements HasForms
$this->sliderValue(),
$this->selectSeason(),
$this->dateSplitter(),
View::make('components.form-lockout'),
View::make('components.calculation-spinner'),
])
->extraAttributes([
'wire:loading.class' => 'opacity-60 pointer-events-none transition-opacity',
@@ -325,11 +325,11 @@ class PlayerProps extends Page implements HasForms
$set('mid', null);
$set('tid', null);
$this->dispatch('clear-all');
$this->setSeason($state);
$this->setSeasonMode($state);
});
}
public function setSeason(string $country_id)
public function setSeasonMode(string $country_id)
{
$this->season_mode = SofaScoreCategory::where('id', $country_id)->value('season_mode');
$this->dispatch('season_mode-update', season_mode: $this->season_mode);
@@ -410,7 +410,8 @@ class PlayerProps extends Page implements HasForms
})
->afterStateUpdated(function (callable $set, $state) {
$set('ss_player_id', null);
$this->dispatch('season_selected-update', season_selected: $state);
// cat all values in array to strings
$this->dispatch('season_selected-update', season_selected: array_map('strval', $state));
});
}
+1
View File
@@ -235,6 +235,7 @@ class PlayerPropsDrop extends Widget
public function setSeasonSelected(array $season_selected)
{
$this->season_selected = $season_selected;
if ($this->player_on_field_counter >= 10) {
$this->calculateAspg();
}
+2 -2
View File
@@ -6,6 +6,7 @@ use App\Models\StatistikoDetail;
use App\Models\StatistikoEvent;
use App\Models\StatistikoPlayer;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Log;
trait PlayerQuery
{
@@ -21,10 +22,9 @@ trait PlayerQuery
case 'season':
if (! $this->season_selected) {
$this->season_selected = $this->getCurrentSeason();
// dd($this->liga_id, $this->season_selected);
}
// Log::debug('season_selected', [$this->liga_id, $this->season_selected]);
Log::debug('season_selected', $this->season_selected);
$matches_ids = match ($part) {
1 => StatistikoEvent::where('league_id', $this->liga_id)