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 {
|
||||
$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([
|
||||
EditAction::make('edit')
|
||||
->iconButton()
|
||||
@@ -83,6 +85,7 @@ class ClientGroupListEditor extends Component implements HasActions, HasSchemas,
|
||||
->required()
|
||||
->maxLength(255),
|
||||
Select::make('client_groups')
|
||||
->label('League')
|
||||
->searchable()
|
||||
->options(function (): array {
|
||||
$res = CompetitionGroup::with('country')->get();
|
||||
|
||||
Reference in new issue
Block a user