wip
This commit is contained in:
1 parent
f7a8fb396e
commit
1b15e16359
2 files changed
+14
-17
No files matched your search
@@ -81,14 +81,14 @@ class PlayerProps extends Page implements HasForms
|
||||
$this->form->fill();
|
||||
}
|
||||
|
||||
// public static function canAccess(): bool
|
||||
// {
|
||||
// // false blockiert den Zugriff für JEDEN (die Seite ist effektiv deaktiviert)
|
||||
// // return false;
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
// false blockiert den Zugriff für JEDEN (die Seite ist effektiv deaktiviert)
|
||||
// return false;
|
||||
|
||||
// // Alternativ an Bedingungen knüpfen:
|
||||
// return auth()->user()->hasRole('super_admin');
|
||||
// }
|
||||
// Alternativ an Bedingungen knüpfen:
|
||||
return auth()->user()->hasRole('super_admin');
|
||||
}
|
||||
|
||||
public function getWidgetData(): array
|
||||
{
|
||||
@@ -330,21 +330,18 @@ class PlayerProps extends Page implements HasForms
|
||||
->options(fn () => LoadSofaScoreCategory::load())
|
||||
->placeholder('Country')
|
||||
->afterStateUpdated(function (callable $set, $state) {
|
||||
$this->dispatch('clear-all');
|
||||
|
||||
$set('lid', null);
|
||||
$set('mid', 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
|
||||
*/
|
||||
|
||||
@@ -231,7 +231,7 @@ class PlayerPropsDrop extends Widget
|
||||
}
|
||||
|
||||
#[On('season_mode-update')]
|
||||
public function setSeason(string|int $season_mode)
|
||||
public function setSeason(string $season_mode)
|
||||
{
|
||||
$this->season_mode = $season_mode;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user