This commit is contained in:
salam committed 2026-02-06 10:37:31 +01:00
1 parent 40f40db63c
commit c181a865e6
1 file changed
+11 -2
+11 -2
View File
@@ -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;
}),
]),
]);
}