wip season_mode

This commit is contained in:
salam committed 2026-10-31 19:57:29 +01:00
1 parent 6de4e50847
commit ca102d3e51
6 files changed
+41 -38

No files matched your search

+12 -3
View File
@@ -7,6 +7,7 @@ use App\Actions\LoadStatisticFixturesLeaguesOptions;
use App\Actions\LoadStatisticFixturesMatchOptions;
use App\Filament\Widgets\PlayerPropsDrop;
use App\Filament\Widgets\PlayerPropsTable;
use App\Models\SofaScoreCategory;
use App\Models\SofaScoreRosa;
use App\Models\SsLineupMemory;
use App\Models\StatisticFixtures;
@@ -66,6 +67,8 @@ class PlayerProps extends Page implements HasForms
public string $activeLineUp = '3313';
public string $season_mode = '';
public array $players = [];
public array $clientLineUps = [];
@@ -322,10 +325,16 @@ class PlayerProps extends Page implements HasForms
$set('mid', null);
$set('tid', null);
$this->dispatch('clear-all');
$this->dispatch('season_mode-update', $state);
$this->setSeason($state);
});
}
public function setSeason(string $country_id)
{
$this->season_mode = SofaScoreCategory::where('id', $country_id)->value('season_mode');
$this->dispatch('season_mode-update', season_mode: $this->season_mode);
}
/**
* SECOND LINE
*/
@@ -392,8 +401,8 @@ class PlayerProps extends Page implements HasForms
return new HtmlString('Splits data in 2 Parts<br/><span class="text-blue-500">A) Seasons selected, value is % from slider</span><br/><span class="text-green-500">B) Contains rest from DB, value is 100 - slider value</span>');
}
}))
->options(function (Get $get) {
if ($get('season_mode') == 'halfyear') {
->options(function () {
if ($this->season_mode == 'halfyear') {
return ['26/27' => '26/27', '25/26' => '25/26', '24/25' => '24/25'];
} else {
return ['2026' => '2026', '2025' => '2025', '2024' => '2024'];