test production
This commit is contained in:
@@ -29,11 +29,6 @@ class FetchLoanRemainingController extends Controller
|
|||||||
account_number: $request->account_number,
|
account_number: $request->account_number,
|
||||||
);
|
);
|
||||||
|
|
||||||
info([
|
|
||||||
'response' => $response,
|
|
||||||
'type' => gettype($response),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return response()->json($response);
|
return response()->json($response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
resources/js/vendor/nova/js/additional.js
vendored
7
resources/js/vendor/nova/js/additional.js
vendored
@@ -3,6 +3,11 @@ function csrf_token()
|
|||||||
return document.querySelector('meta[name="csrf-token"]')?.getAttribute('content');
|
return document.querySelector('meta[name="csrf-token"]')?.getAttribute('content');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function safeParse(data)
|
||||||
|
{
|
||||||
|
return (typeof data === 'string') ? JSON.parse(data) : data;
|
||||||
|
}
|
||||||
|
|
||||||
async function fetchLoanRemaining(containerID, passport_serie, passport_id, account_number) {
|
async function fetchLoanRemaining(containerID, passport_serie, passport_id, account_number) {
|
||||||
if (! passport_serie || ! passport_id || ! account_number) {
|
if (! passport_serie || ! passport_id || ! account_number) {
|
||||||
Nova.error('Maglumat ýetmezçiligi bar');
|
Nova.error('Maglumat ýetmezçiligi bar');
|
||||||
@@ -19,7 +24,7 @@ async function fetchLoanRemaining(containerID, passport_serie, passport_id, acco
|
|||||||
Nova.$progress.start()
|
Nova.$progress.start()
|
||||||
|
|
||||||
Nova.request().post('/api/fetch-loan-remaining', formData).then(response => {
|
Nova.request().post('/api/fetch-loan-remaining', formData).then(response => {
|
||||||
let result = response.data;
|
let result = safeParse(result.data);
|
||||||
console.log(result)
|
console.log(result)
|
||||||
|
|
||||||
if (result.errCode != 0) {
|
if (result.errCode != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user