From c181a865e6019871a5b0ef2a113c4c9e66204929 Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 6 Feb 2026 10:37:31 +0100 Subject: [PATCH] wip --- app/Livewire/ClientGroupListEditor.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/Livewire/ClientGroupListEditor.php b/app/Livewire/ClientGroupListEditor.php index 275d446d..638e59ca 100644 --- a/app/Livewire/ClientGroupListEditor.php +++ b/app/Livewire/ClientGroupListEditor.php @@ -2,7 +2,6 @@ namespace App\Livewire; -use App\Actions\LoadCountryGroups; use App\Models\ClientGroupList; use App\Models\CompetitionGroup; use Filament\Actions\Concerns\InteractsWithActions; @@ -85,7 +84,17 @@ class ClientGroupListEditor extends Component implements HasActions, HasSchemas, ->maxLength(255), Select::make('client_groups') ->searchable() - ->options(fn () => LoadCountryGroups::load()), + ->options(function (): array { + $res = CompetitionGroup::with('country')->get(); + $arr = []; + foreach ($res as $value) { + $arr[$value->id] = $value->country?->name.' '.$value->name; + } + asort($arr, SORT_STRING); + + return $arr; + + }), ]), ]); }