Custom Groups fix
This commit is contained in:
1 parent
0f075ea884
commit
a46a200495
1 file changed
+4
-1
@@ -40,9 +40,11 @@ class ClientGroupListEditor extends Component implements HasActions, HasSchemas,
|
|||||||
->formatStateUsing(function (string $state): string {
|
->formatStateUsing(function (string $state): string {
|
||||||
$res = CompetitionGroup::with('country')->where('id', $state)->first();
|
$res = CompetitionGroup::with('country')->where('id', $state)->first();
|
||||||
|
|
||||||
return $res->country->name.' '.$res->name;
|
return $res->country?->name.' '.$res->name;
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
|
->emptyStateHeading('No Custom Groups')
|
||||||
|
->emptyStateDescription('Create a group add one league and save, then you can add more league to this group.')
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make('edit')
|
EditAction::make('edit')
|
||||||
->iconButton()
|
->iconButton()
|
||||||
@@ -83,6 +85,7 @@ class ClientGroupListEditor extends Component implements HasActions, HasSchemas,
|
|||||||
->required()
|
->required()
|
||||||
->maxLength(255),
|
->maxLength(255),
|
||||||
Select::make('client_groups')
|
Select::make('client_groups')
|
||||||
|
->label('League')
|
||||||
->searchable()
|
->searchable()
|
||||||
->options(function (): array {
|
->options(function (): array {
|
||||||
$res = CompetitionGroup::with('country')->get();
|
$res = CompetitionGroup::with('country')->get();
|
||||||
|
|||||||
Reference in new issue
Block a user