From 5aeaba216c1b26c686871e0af8e0d66b38674286 Mon Sep 17 00:00:00 2001 From: alkadoHs Date: Wed, 14 Feb 2024 14:26:55 +0300 Subject: [PATCH] diable options to receiver & sender --- app/Filament/Resources/BranchTransferResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Filament/Resources/BranchTransferResource.php b/app/Filament/Resources/BranchTransferResource.php index 1be179a..e0c26e5 100644 --- a/app/Filament/Resources/BranchTransferResource.php +++ b/app/Filament/Resources/BranchTransferResource.php @@ -92,7 +92,7 @@ public static function table(Table $table): Table ]) ->disableOptionWhen( //disable pending users found to from branch and approved or rejected users found to to branch - fn ($record) => $record->from_branch_id == auth()->user()->branch_id && $record->status != 'pending' + fn (BranchTransfer $record) => ($record->from_branch_id == auth()->user()->branch_id && $record->status != 'pending') || ($record->to_branch_id == auth()->user()->branch_id && $record->status != 'pending') // } $value == 'pending' || (($value == 'rejected' || $value == 'approved') && auth()->user()->role != 'vendor')