Skip to content

Commit

Permalink
category always visible in transaction module
Browse files Browse the repository at this point in the history
  • Loading branch information
Shipu committed Aug 13, 2023
1 parent 1173fba commit 152828b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/Filament/Resources/TransactionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,7 @@ public static function form(Form $form): Form
})
->searchable()
->preload()
->visible(function (Get $get, ?Model $record): bool {
if(!blank($record)) {
return !blank($record->category_id);
}
->visible(function (Get $get): bool {
return in_array($get('type'), [TransactionTypeEnum::DEPOSIT->value, TransactionTypeEnum::WITHDRAW->value]);
}),
Select::make('from_wallet_id')
Expand Down

0 comments on commit 152828b

Please sign in to comment.