wip
This commit is contained in:
25
resources/js/vendor/nova/js/additional.js
vendored
25
resources/js/vendor/nova/js/additional.js
vendored
@@ -3,6 +3,31 @@ function csrf_token()
|
||||
return document.querySelector('meta[name="csrf-token"]')?.getAttribute('content');
|
||||
}
|
||||
|
||||
async function fetchLoanRemaining(containerID, passport_serie, passport_id) {
|
||||
if (! passport_serie || ! passport_id || ! account_number) {
|
||||
Nova.error('Maglumat ýetmezçiligi bar');
|
||||
return;
|
||||
}
|
||||
|
||||
let cardHistoryDetailContainer = document.getElementById(containerID);
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append('passport_serie', passport_serie);
|
||||
formData.append('passport_id', passport_id);
|
||||
formData.append('account_number', account_number);
|
||||
|
||||
Nova.$progress.start()
|
||||
|
||||
Nova.request().post('/api/fetch-loan-remaining', formData).then(response => {
|
||||
let result = response.data;
|
||||
console.log(result)
|
||||
})
|
||||
.catch(error => console.log('error', error))
|
||||
.finally(() => {
|
||||
Nova.$progress.done()
|
||||
});
|
||||
}
|
||||
|
||||
async function fetchLoanHistory(containerID, passport_serie, passport_id) {
|
||||
if (! passport_serie || ! passport_id) {
|
||||
Nova.error('Maglumat ýetmezçiligi bar');
|
||||
|
||||
Reference in New Issue
Block a user