wip chn pong id

This commit is contained in:
salam committed 2026-10-08 13:23:23 +02:00
1 parent 8092b5c419
commit 29018914d1
3 files changed
+7 -2

No files matched your search

+1
View File
@@ -624,6 +624,7 @@ class Statistic extends BaseDashboard
->hidden(fn (Get $get) => $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
->prefixIcon('phosphor-calendar-star')
->options(function (Get $get) {
// dd($get('seasonmode'));
if ($get('seasonmode') == 'halfyear') {
return ['26/27' => '26/27', '25/26' => '25/26', '24/25' => '24/25'];
} else {
@@ -6,6 +6,7 @@ use App\Filament\Pages\Selections\Helper\GetSeason;
use App\Models\SofaScoreRosa;
use App\Models\StatistikoEvent;
use App\Models\StatistikoPlayer;
use Illuminate\Support\Facades\Log;
class LoadEventsQuery
{
@@ -94,6 +95,8 @@ class LoadEventsQuery
* STATTISTIC DATA
*/
// dd($team_id, $home_id, $away_id);
Log::debug('res', [$team_id, $league_id, $season]);
$res = StatistikoEvent::where(function ($query) use ($league_id, $similar_past_matches) {
switch ($similar_past_matches) {
case 'none':
@@ -530,11 +530,12 @@ class LoadPerformance
}
}
// dd($result);
$return = [];
foreach ($matches as $matchid) {
if (isset($result[$matchid])) {
if (! $result[$matchid]['all']['ply']) {
$result[$matchid]['all']['ply'] = 1;
}
$return['all'][] = round($result[$matchid]['all']['rating'] / $result[$matchid]['all']['ply'], 1);
if ($result[$matchid]['def']['sum_min']) {
$return['def'][] = round($result[$matchid]['def']['rating'] / $result[$matchid]['def']['ply'], 1);