wip season_mode
This commit is contained in:
1 parent
6de4e50847
commit
ca102d3e51
6 files changed
+41
-38
No files matched your search
@@ -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'];
|
||||
|
||||
@@ -98,7 +98,7 @@ class LoadEventsQueryTP
|
||||
/**
|
||||
* STATTISTIC DATA
|
||||
*/
|
||||
Log::debug('result', [$similar_past_matches, $league_id, $team_id]);
|
||||
// Log::debug('result', [$similar_past_matches, $league_id, $team_id]);
|
||||
|
||||
return StatistikoEvent::with('home')->with('away')
|
||||
->where(function ($query) use ($league_id, $similar_past_matches) {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
use App\Filament\Widgets\PlayerProps\BoxNames;
|
||||
use App\Models\SofaScoreCategory;
|
||||
use App\Traits\PlayerProps\BestLineUp;
|
||||
use App\Traits\PlayerProps\ClearBoxes;
|
||||
use App\Traits\PlayerProps\CopyData;
|
||||
@@ -41,42 +40,28 @@ class PlayerPropsDrop extends Widget
|
||||
|
||||
protected string $view = 'livewire.player-props-drop';
|
||||
|
||||
public string $activeLineUp;
|
||||
|
||||
public string $team_name = '';
|
||||
|
||||
public string $season_or_date = 'season';
|
||||
|
||||
public string $date_spliter = '';
|
||||
|
||||
public string $season_mode;
|
||||
|
||||
public float $x_value = 3;
|
||||
|
||||
public float $y_value = 180;
|
||||
|
||||
public float $asp_team;
|
||||
|
||||
public int $count_player;
|
||||
|
||||
public int $home_id;
|
||||
|
||||
public int $away_id;
|
||||
|
||||
public string $team_home_away;
|
||||
|
||||
public float $asp_team;
|
||||
|
||||
public array $activeBoxes;
|
||||
|
||||
public array $beschriftung;
|
||||
|
||||
public array $lineup;
|
||||
|
||||
public array $lineUpMap;
|
||||
|
||||
public string $activeLineUp;
|
||||
|
||||
public array $boxes;
|
||||
|
||||
public string $team_name = '';
|
||||
|
||||
public string $season_or_date = 'season';
|
||||
|
||||
public string $season_mode = '';
|
||||
|
||||
public string $date_spliter = '';
|
||||
|
||||
public array $season_selected;
|
||||
|
||||
public int $team_id = 0;
|
||||
|
||||
public int $liga_id = 0;
|
||||
@@ -87,10 +72,24 @@ class PlayerPropsDrop extends Widget
|
||||
|
||||
public int $player_on_field_counter;
|
||||
|
||||
public string $team_home_away;
|
||||
|
||||
public array $activeBoxes;
|
||||
|
||||
public array $beschriftung;
|
||||
|
||||
public array $lineup;
|
||||
|
||||
public array $lineUpMap;
|
||||
|
||||
public array $season_selected;
|
||||
|
||||
public array $calculationVariables;
|
||||
|
||||
public array $players;
|
||||
|
||||
public array $boxes;
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$this->activeBoxes = BoxNames::load();
|
||||
@@ -227,10 +226,8 @@ class PlayerPropsDrop extends Widget
|
||||
}
|
||||
|
||||
#[On('season_mode-update')]
|
||||
public function setSeason(string $country_id)
|
||||
public function setSeason(string $season_mode)
|
||||
{
|
||||
$season_mode = SofaScoreCategory::where('id', $country_id)->value('season_mode');
|
||||
|
||||
$this->season_mode = $season_mode;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user