FIX_ENROLL_LIST : RV
This commit is contained in:
parent
666468ee73
commit
2cf9201337
@ -269,8 +269,12 @@
|
|||||||
var client_id = $('#clients').val();
|
var client_id = $('#clients').val();
|
||||||
var branch_id = $('#branch_id').val();
|
var branch_id = $('#branch_id').val();
|
||||||
if (client_id == '0' || branch_id == '0') {
|
if (client_id == '0' || branch_id == '0') {
|
||||||
alert('Please select values in both dropdowns.');
|
Swal.fire({
|
||||||
return;
|
title: "warning!",
|
||||||
|
text: 'Please select the Client and Client Branch.',
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -280,7 +284,15 @@
|
|||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"X-Requested-With": "XMLHttpRequest"
|
"X-Requested-With": "XMLHttpRequest"
|
||||||
},
|
},
|
||||||
|
beforeSend: function() {
|
||||||
|
$('.loader').fadeIn();
|
||||||
|
$('.loader-mask').fadeIn();
|
||||||
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
|
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
|
|
||||||
var data = JSON.parse(response);
|
var data = JSON.parse(response);
|
||||||
console.log(data);
|
console.log(data);
|
||||||
var table = $('#tickets-table').DataTable();
|
var table = $('#tickets-table').DataTable();
|
||||||
@ -340,7 +352,10 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
console.error('Error fetching data from API:', error);
|
console.error(xhr.responseText);
|
||||||
|
console.error(status, error);
|
||||||
|
$('.loader').fadeOut();
|
||||||
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -534,7 +549,12 @@
|
|||||||
console.log('client_branch_id', client_branch_id);
|
console.log('client_branch_id', client_branch_id);
|
||||||
|
|
||||||
if(client_id == 0 && client_branch_id == 0){
|
if(client_id == 0 && client_branch_id == 0){
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
title: "warning!",
|
||||||
|
text: 'Please select the Client and Client Branch.',
|
||||||
|
icon: "warning"
|
||||||
|
});
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user