wip generate positions in PP

This commit is contained in:
salam committed 2026-10-09 22:47:37 +02:00
1 parent 01b62be635
commit 8ae58d2e2a
7 files changed
+261 -60

No files matched your search

+8 -9
View File
@@ -20,7 +20,6 @@ use Filament\Schemas\Components\Utilities\Get;
use Filament\Schemas\Components\Utilities\Set;
use Filament\Schemas\Schema;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Livewire\Attributes\On;
class PlayerProps extends Page implements HasForms
@@ -36,7 +35,7 @@ class PlayerProps extends Page implements HasForms
->group(static::getNavigationGroup())
->icon(static::getNavigationIcon())
->activeIcon(static::getActiveNavigationIcon())
->isActiveWhen(fn() => request()->routeIs(static::getRouteName()))
->isActiveWhen(fn () => request()->routeIs(static::getRouteName()))
->sort(static::getNavigationSort())
->url(static::getUrl(), shouldOpenInNewTab: true), // 👈 Forces target="_blank"
];
@@ -87,10 +86,10 @@ class PlayerProps extends Page implements HasForms
->live()
->preload()
->searchable(false)
->prefixIconColor(fn(Get $get): string => $get('cid') ? 'success' : 'danger')
->prefixIconColor(fn (Get $get): string => $get('cid') ? 'success' : 'danger')
->prefixIcon('phosphor-globe-fill')
->hiddenLabel()
->options(fn() => LoadSofaScoreCategory::load())
->options(fn () => LoadSofaScoreCategory::load())
->placeholder('Country')
->afterStateUpdated(function (callable $set, $state) {
$set('lid', null);
@@ -101,10 +100,10 @@ class PlayerProps extends Page implements HasForms
Select::make('lid')
->live()
->preload()
->prefixIconColor(fn(Get $get): string => $get('lid') ? 'success' : 'danger')
->prefixIconColor(fn (Get $get): string => $get('lid') ? 'success' : 'danger')
->prefixIcon('phosphor-trophy-fill')
->hiddenLabel()
->options(fn(Get $get) => LoadStatisticFixturesLeaguesOptions::load($get('cid')))
->options(fn (Get $get) => LoadStatisticFixturesLeaguesOptions::load($get('cid')))
->placeholder('League')
->afterStateUpdated(function (callable $set) {
$set('mid', null);
@@ -114,7 +113,7 @@ class PlayerProps extends Page implements HasForms
Select::make('mid')
->live()
->hiddenLabel()
->prefixIconColor(fn(Get $get): string => $get('mid') ? 'success' : 'danger')
->prefixIconColor(fn (Get $get): string => $get('mid') ? 'success' : 'danger')
->prefixIcon('phosphor-calendar-check-fill')
->options(function (Get $get) {
return LoadStatisticFixturesMatchOptions::load($get('lid'));
@@ -132,7 +131,7 @@ class PlayerProps extends Page implements HasForms
Select::make('tid')
->live()
->hiddenLabel()
->prefixIconColor(fn(Get $get): string => $get('tid') ? 'success' : 'danger')
->prefixIconColor(fn (Get $get): string => $get('tid') ? 'success' : 'danger')
->prefixIcon('icon-player')
->options(function (Get $get) {
if ($get('mid')) {
@@ -171,7 +170,7 @@ class PlayerProps extends Page implements HasForms
$arr = [];
foreach ($res as $key => $value) {
if ($this->players && in_array($key, $this->clientLineUps)) {
$arr[$key] = $value . '<span class="text-blue-600"> has lineup</span>';
$arr[$key] = $value.'<span class="text-blue-600"> has lineup</span>';
} else {
$arr[$key] = $value;
}