Fixed: multiple requests are sent to admincustomer in case admin double clicks on the add new customer

This commit is contained in:
vishalsingh.qlo325
2025-06-04 10:59:44 +05:30
parent 5da60bb913
commit e2c69b091a

View File

@@ -885,9 +885,11 @@
});
}
let customerSearchAjax = '';
function searchCustomers()
{
$.ajax({
abortRunningAjax(customerSearchAjax);Add commentMore actions
customerSearchAjax = $.ajax({
type:"POST",
url : "{$link->getAdminLink('AdminCustomers')}",
async: true,
@@ -927,6 +929,12 @@
});
}
function abortRunningAjax(ajaxVar) {
if (ajaxVar) {
ajaxVar.abort();
}
}
function setupCustomer(idCustomer)
{
//$('#carts').show();// by webkul