From a98e4649e3801e215430af2c148f76b6c192681f Mon Sep 17 00:00:00 2001 From: Constantin Graf Date: Mon, 29 Apr 2024 18:56:57 +0200 Subject: [PATCH] Fixed bug in filament OrganizationResource --- app/Filament/Resources/OrganizationResource.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/OrganizationResource.php b/app/Filament/Resources/OrganizationResource.php index 131e74c1..303518c9 100644 --- a/app/Filament/Resources/OrganizationResource.php +++ b/app/Filament/Resources/OrganizationResource.php @@ -51,7 +51,15 @@ class OrganizationResource extends Resource ->required(), Forms\Components\Select::make('currency') ->label('Currency') - ->options(ISOCurrencyProvider::getInstance()->getAvailableCurrencies()) + ->options(function (): array { + $currencies = ISOCurrencyProvider::getInstance()->getAvailableCurrencies(); + $select = []; + foreach ($currencies as $currency) { + $select[$currency->getCurrencyCode()] = $currency->getName().' ('.$currency->getCurrencyCode().')'; + } + + return $select; + }) ->searchable(), Forms\Components\TextInput::make('billable_rate') ->label('Billable rate (in Cents)')