This commit is contained in:
salam committed 2026-11-01 17:51:07 +01:00
1 parent 8d09ee514b
commit dbde9d6518
3 files changed
+6 -14

No files matched your search

+1 -1
View File
@@ -414,7 +414,7 @@ class PlayerProps extends Page implements HasForms
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'];
return [2026 => 2026, 2025 => 2025, 2024 => 2024];
}
})
->afterStateUpdated(function (callable $set, $state) {
-5
View File
@@ -4,7 +4,6 @@ namespace App\Traits\PlayerProps;
use App\Models\StatisticFixtures;
use App\Models\StatistikoDetail;
use Illuminate\Support\Facades\Log;
trait PlayerAspg
{
@@ -63,14 +62,10 @@ trait PlayerAspg
$collection_2 = $this->loadPartsPlayer(2, $players);
// dd($collection_1, $collection_2);
$filtered_part_1 = $this->filterPlayer($collection_1);
$filtered_part_2 = $this->filterPlayer($collection_2);
// Log::debug('calculationVariables', [$filtered_part_1, $filtered_part_2]);
$this->mergeData($filtered_part_1, $filtered_part_2);
$this->dispatch('update-players', players: $this->players);
+5 -8
View File
@@ -5,9 +5,6 @@ namespace App\Traits\PlayerProps;
use App\Models\StatistikoDetail;
use App\Models\StatistikoPlayer;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Log;
// use Illuminate\Support\Facades\Log;
trait PlayerQuery
{
@@ -27,6 +24,7 @@ trait PlayerQuery
$arr = [];
$res = $this->getPlayers($part, $player_ids);
foreach ($res as $val) {
$ss_player_id = (int) $val->ss_player_id;
$activeteam_id = (int) $val->activeteam_id;
@@ -69,6 +67,8 @@ trait PlayerQuery
}
}
// Log::debug('loadPartsPlayer '.$part, $arr);
return $arr;
}
@@ -179,18 +179,15 @@ trait PlayerQuery
{
switch ($this->season_or_date) {
case 'season':
if (! $this->season_selected) {
$this->season_selected = $this->getCurrentSeason();
}
if ($this->season_mode == 'halftime') {
$this->season_selected = array_map('strval', $this->season_selected);
} else {
if ($this->season_mode == 'fullyear') {
$this->season_selected = array_map('intval', $this->season_selected);
}
// Log::debug('season_selected',[$this->season_selected]);
return match ($part) {
1 => StatistikoPlayer::with('details')
->whereIn('ss_player_id', $player_ids)