DONE: optimize loading page on employee, append the online payment under same batch
This commit is contained in:
@@ -132,9 +132,14 @@ class PembiayaanOnlineController extends Controller
|
||||
return redirect()->back()->with('error', $msg);
|
||||
}
|
||||
|
||||
$batchNo = $res->json()['batch']['batch_no'] ?? '';
|
||||
return redirect()->route('pembiayaan.online.pc')
|
||||
->with('message', 'Batch dihantar ke Operasi' . ($batchNo ? ': ' . $batchNo : '.'));
|
||||
$payload = $res->json();
|
||||
$batchNo = is_array($payload) ? ($payload['batch']['batch_no'] ?? '') : '';
|
||||
$appended = is_array($payload) && !empty($payload['appended']);
|
||||
$message = $appended
|
||||
? ('Rekod ditambah ke batch' . ($batchNo ? ' ' . $batchNo : '') . '.')
|
||||
: ('Batch dihantar ke Operasi' . ($batchNo ? ': ' . $batchNo : '.'));
|
||||
|
||||
return redirect()->route('pembiayaan.online.pc')->with('message', $message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user