diff --git a/app/Livewire/ClientGroupListEditor.php b/app/Livewire/ClientGroupListEditor.php index 638e59ca..ecc245a6 100644 --- a/app/Livewire/ClientGroupListEditor.php +++ b/app/Livewire/ClientGroupListEditor.php @@ -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();