This commit is contained in:
salam committed 2026-08-11 11:02:22 +02:00
1 parent 10baadb780
commit 874f6f75c8
7 files changed
+85 -132

No files matched your search

-20
View File
@@ -1,20 +0,0 @@
<?php
namespace App\Actions\Selections;
use App\Models\SofaScorePlayerPosition;
class LoadPosition
{
public static function load()
{
$res = SofaScorePlayerPosition::get();
$arr = [];
foreach ($res as $val) {
$arr[$val->ss_code] = $val->season;
}
return $arr;
}
}
@@ -1,27 +0,0 @@
<?php
namespace App\Actions\Selections;
use App\Models\StatistikoEvent;
class LoadStatisticTypes
{
public static function load()
{
$arr = [
'gls' => '<div class="flex gap-2"><svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="#000000" viewBox="0 0 256 256"><path d="M96,72a8,8,0,0,1,8-8A104.11,104.11,0,0,1,208,168a8,8,0,0,1-16,0,88.1,88.1,0,0,0-88-88A8,8,0,0,1,96,72ZM240,192H80V32a8,8,0,0,0-16,0V64H32a8,8,0,0,0,0,16H64V200a8,8,0,0,0,8,8H240a8,8,0,0,0,0-16Z"></path></svg><span>Goals</span></div>',
'crn' => '<div class="flex gap-2"><x-phosphor-angle /><span>Corner</span></div>',
];
// 'crn' => '<div class="flex gap-2"><x-phosphor-soccer-angle class="w-5 h-5 /><span>Corner</span></div>',
// 'fls' => 'Fouls Commited',
// 'ofs' => 'Offside',
// 'crd' => 'Cards',
// 'snt' => 'Shots On Target',
// 'tsh' => 'Total Shots',
// ])
return $arr;
}
}
@@ -1,6 +1,6 @@
<?php
namespace App\Actions\Selections;
namespace App\Filament\Pages\Selections;
use App\Models\StatistikoEvent;
use App\Models\SofaScorePlayerPosition;
@@ -73,11 +73,11 @@ class LoadPlayer
$infostring .= ' - ' . round($minues_played / $events_played) . 'min';
if ($events_played < $colorlevel) {
$arr[$position][$val->ss_player_id] = '<span class="text-red-600 dark:text-red-500"><b>' . $val->details->player_name . '</b><br>' . $infostring . '</span>';
$arr[$position][$val->ss_player_id] = '<span class="text-red-600 dark:text-red-500 cursor-pointer"><b>' . $val->details->player_name . '</b><br>' . $infostring . '</span>';
} else if ($events_played < $colorlevel * 2) {
$arr[$position][$val->ss_player_id] = '<span class="text-blue-600 dark:text-blue-500"><b>' . $val->details->player_name . '</b><br>' . $infostring . '</span>';
$arr[$position][$val->ss_player_id] = '<span class="text-blue-600 dark:text-blue-500 cursor-pointer"><b>' . $val->details->player_name . '</b><br>' . $infostring . '</span>';
} else {
$arr[$position][$val->ss_player_id] = '<span class="text-green-600 dark:text-green-500"><b>' . $val->details->player_name . '</b><br>' . $infostring . '</span>';
$arr[$position][$val->ss_player_id] = '<span class="text-green-600 dark:text-green-500 cursor-pointer"><b>' . $val->details->player_name . '</b><br>' . $infostring . '</span>';
}
}
return $arr;
@@ -1,6 +1,6 @@
<?php
namespace App\Actions\Selections;
namespace App\Filament\Pages\Selections;
use App\Models\StatistikoEvent;
+15 -14
View File
@@ -2,28 +2,28 @@
namespace App\Filament\Pages;
use BackedEnum;
use Filament\Support\RawJs;
use Filament\Actions\Action;
use Filament\Schemas\Schema;
use App\Actions\LoadStatisticFixturesLeaguesOptions;
use App\Actions\LoadStatisticFixturesMatchOptions;
use App\Filament\Pages\Selections\LoadPlayer;
use App\Filament\Pages\Selections\LoadSeasons;
use App\Models\SofaScoreRosa;
use App\Models\StatisticFixtures;
use Illuminate\Support\HtmlString;
use BackedEnum;
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
use Filament\Actions\Action;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Radio;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Slider;
use Filament\Schemas\Components\Grid;
use App\Actions\Selections\LoadPlayer;
use App\Actions\Selections\LoadSeasons;
use Filament\Forms\Components\DatePicker;
use Filament\Pages\Dashboard as BaseDashboard;
use Illuminate\Contracts\Support\Htmlable;
use Filament\Pages\Dashboard\Concerns\HasFiltersForm;
use Filament\Schemas\Components\Grid;
use Filament\Schemas\Components\Utilities\Get;
use Filament\Schemas\Components\Utilities\Set;
use App\Actions\LoadStatisticFixturesMatchOptions;
use App\Actions\LoadStatisticFixturesLeaguesOptions;
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
use Filament\Pages\Dashboard\Concerns\HasFiltersForm;
use Filament\Schemas\Schema;
use Filament\Support\RawJs;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Support\HtmlString;
class Statistic extends BaseDashboard
{
@@ -237,6 +237,7 @@ class Statistic extends BaseDashboard
->color('success')
->tooltip(fn() => $this->tooltip_player_info())
)
->extraAttributes(fn() => ['id' => 'player_selector'])
->options(function (Get $get) {
return LoadPlayer::load($get);
}),