Переглянути джерело

Merge pull request #37 from bogusbd/small-fixes

smaill fixes
3.x
Andrew Wallo 1 рік тому
джерело
коміт
ec56e8ece6
Аккаунт користувача з таким Email не знайдено

+ 2
- 2
app/Filament/Company/Resources/Banking/AccountResource.php Переглянути файл

@@ -60,7 +60,7 @@ class AccountResource extends Resource
60 60
                                     ->options(AccountType::class)
61 61
                                     ->localizeLabel()
62 62
                                     ->searchable()
63
-                                    ->default('checking')
63
+                                    ->default(AccountType::DEFAULT)
64 64
                                     ->live()
65 65
                                     ->required(),
66 66
                                 Forms\Components\TextInput::make('name')
@@ -81,7 +81,7 @@ class AccountResource extends Resource
81 81
                                     ->localizeLabel('Default')
82 82
                                     ->onLabel(translate('Yes'))
83 83
                                     ->offLabel(translate('No'))
84
-                                    ->hidden(static fn (Forms\Get $get) => $get('type') === 'credit_card'),
84
+                                    ->hidden(static fn (Forms\Get $get) => $get('type') === AccountType::CreditCard->value),
85 85
                             ])->columns(),
86 86
                         Forms\Components\Section::make('Currency & Balance')
87 87
                             ->schema([

+ 1
- 1
app/Filament/Company/Resources/Banking/AccountResource/Pages/CreateAccount.php Переглянути файл

@@ -23,7 +23,7 @@ class CreateAccount extends CreateRecord
23 23
 
24 24
     protected function mutateFormDataBeforeCreate(array $data): array
25 25
     {
26
-        $data['enabled'] = (bool) $data['enabled'];
26
+        $data['enabled'] = (bool) ($data['enabled'] ?? false);
27 27
 
28 28
         return $data;
29 29
     }

Завантаження…
Відмінити
Зберегти