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) {
$("#pageloader").fadeIn();
let fetchedContacts = [];
Promise.all(
hierarcies.map(hierarchy => {
let tmUserId = $('#field-user_id option[hierarchy="' + hierarchy + '"]').val() || '';
return $.ajax({
type: "GET",
url: '/form/getdoctorlist?partition={{$form->partition}}&hierarchy=' + hierarchy,
processData: false,
contentType: false
}).then(data => {
if (Array.isArray(data)) {
/* if (Array.isArray(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) {
console.log("Error fetching doctors for hierarchy " + hierarchy, err);
});