diff --git a/app/Modules/SberPaymentOrder/Nova/Resources/Item/NovaSberPaymentOrderItemAuth.php b/app/Modules/SberPaymentOrder/Nova/Resources/Item/NovaSberPaymentOrderItemAuth.php index 7af0122..034a777 100644 --- a/app/Modules/SberPaymentOrder/Nova/Resources/Item/NovaSberPaymentOrderItemAuth.php +++ b/app/Modules/SberPaymentOrder/Nova/Resources/Item/NovaSberPaymentOrderItemAuth.php @@ -40,7 +40,7 @@ trait NovaSberPaymentOrderItemAuth /** Delete button */ public function authorizedToDelete(Request $request) { - return false; + return auth()->user()->isMe(); } /** Force delete */ diff --git a/app/Nova/Actions/Sber/SyncWithSystem.php b/app/Nova/Actions/Sber/SyncWithSystem.php index 82b2b4f..15685ac 100644 --- a/app/Nova/Actions/Sber/SyncWithSystem.php +++ b/app/Nova/Actions/Sber/SyncWithSystem.php @@ -58,11 +58,11 @@ class SyncWithSystem extends Action pay_purpose: $sberPaymentOrder->created_at->translatedFormat('F').' '.$sberPaymentOrder->created_at->format('Y') ); - info($systemResponse); + $success = $systemResponse['errCode'] == 0; return Action::modal('modal-response', [ - 'title' => 'SYSTEM API', - 'html' => "<>", + 'html' => $success ? "Success" : "Fail", + 'title' => $success ? "Success" : "Fail", ]); }