Team 2 (Lung Care Programming) Five Code
Specific Folder FTP Upload / ftp-deploy (push) Successful in 44s Details

This commit is contained in:
zeeshan 2026-11-16 13:38:12 +05:30
parent 94e343eaac
commit befa90e61d
1 changed files with 11 additions and 3 deletions

View File

@ -500,18 +500,26 @@
if (hierarcies.length > 0) { if (hierarcies.length > 0) {
$("#pageloader").fadeIn(); $("#pageloader").fadeIn();
let fetchedContacts = []; let fetchedContacts = [];
Promise.all( Promise.all(
hierarcies.map(hierarchy => { hierarcies.map(hierarchy => {
let tmUserId = $('#field-user_id option[hierarchy="' + hierarchy + '"]').val() || '';
return $.ajax({ return $.ajax({
type: "GET", type: "GET",
url: '/form/getdoctorlist?partition={{$form->partition}}&hierarchy=' + hierarchy, url: '/form/getdoctorlist?partition={{$form->partition}}&hierarchy=' + hierarchy,
processData: false, processData: false,
contentType: false contentType: false
}).then(data => { }).then(data => {
if (Array.isArray(data)) { /* if (Array.isArray(data)) {
fetchedContacts = fetchedContacts.concat(data); fetchedContacts = fetchedContacts.concat(data);
} } */
if (Array.isArray(data)) {
data.forEach(d => {
d.tm_user_id = tmUserId;
d.tm_hierarchy_id = hierarchy;
});
fetchedContacts = fetchedContacts.concat(data);
}
}).catch(function(err) { }).catch(function(err) {
console.log("Error fetching doctors for hierarchy " + hierarchy, err); console.log("Error fetching doctors for hierarchy " + hierarchy, err);
}); });