This commit is contained in:
salam committed 2026-11-01 18:15:10 +01:00
1 parent f7a8fb396e
commit 1b15e16359
2 files changed
+14 -17

No files matched your search

+13 -16
View File
@@ -81,14 +81,14 @@ class PlayerProps extends Page implements HasForms
$this->form->fill(); $this->form->fill();
} }
// public static function canAccess(): bool public static function canAccess(): bool
// { {
// // false blockiert den Zugriff für JEDEN (die Seite ist effektiv deaktiviert) // false blockiert den Zugriff für JEDEN (die Seite ist effektiv deaktiviert)
// // return false; // return false;
// // Alternativ an Bedingungen knüpfen: // Alternativ an Bedingungen knüpfen:
// return auth()->user()->hasRole('super_admin'); return auth()->user()->hasRole('super_admin');
// } }
public function getWidgetData(): array public function getWidgetData(): array
{ {
@@ -330,21 +330,18 @@ class PlayerProps extends Page implements HasForms
->options(fn () => LoadSofaScoreCategory::load()) ->options(fn () => LoadSofaScoreCategory::load())
->placeholder('Country') ->placeholder('Country')
->afterStateUpdated(function (callable $set, $state) { ->afterStateUpdated(function (callable $set, $state) {
$this->dispatch('clear-all');
$set('lid', null); $set('lid', null);
$set('mid', null); $set('mid', null);
$set('tid', null); $set('tid', null);
$this->dispatch('clear-all');
$this->setSeasonMode($state); $this->season_mode = SofaScoreCategory::where('id', $state)->value('season_mode');
$this->dispatch('season_mode-update', season_mode: $this->season_mode);
}); });
} }
public function setSeasonMode(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 * SECOND LINE
*/ */
+1 -1
View File
@@ -231,7 +231,7 @@ class PlayerPropsDrop extends Widget
} }
#[On('season_mode-update')] #[On('season_mode-update')]
public function setSeason(string|int $season_mode) public function setSeason(string $season_mode)
{ {
$this->season_mode = $season_mode; $this->season_mode = $season_mode;
} }