Compare commits

...

2 Commits

Author SHA1 Message Date
c0dd8f269a wip 2025-09-09 15:35:26 +05:00
b3ed503742 wip 2025-09-09 15:34:55 +05:00
2 changed files with 14 additions and 4 deletions

View File

@@ -40,7 +40,7 @@ trait NovaSberPaymentOrderItemAuth
/** Delete button */ /** Delete button */
public function authorizedToDelete(Request $request) public function authorizedToDelete(Request $request)
{ {
return false; return auth()->user()->isMe();
} }
/** Force delete */ /** Force delete */

View File

@@ -58,11 +58,21 @@ class SyncWithSystem extends Action
pay_purpose: $sberPaymentOrder->created_at->translatedFormat('F').' '.$sberPaymentOrder->created_at->format('Y') pay_purpose: $sberPaymentOrder->created_at->translatedFormat('F').' '.$sberPaymentOrder->created_at->format('Y')
); );
info($systemResponse); $success = $systemResponse['errCode'] == 0;
if ($success) {
$orderItem->update([
'synced_with_system' => true,
]);
} else {
$orderItem->update([
'synced_with_system' => false,
]);
}
return Action::modal('modal-response', [ return Action::modal('modal-response', [
'title' => 'SYSTEM API', 'html' => $success ? "Success" : "Fail",
'html' => "<>", 'title' => $success ? "Success" : "Fail",
]); ]);
} }