FIX_LIVE_LEAD_CONTACT_PERSON_NAME : RV

This commit is contained in:
VENKATESHWARAN 2025-09-24 11:50:23 +05:30
parent 2a8a71d029
commit e4a9844be8

View File

@ -882,6 +882,7 @@ if (isset($selected_lead_type)) {
if (data.salse_person_id) {
selecSalsePerson(data.salse_person_id);
}
} catch (error) {
console.error('Error in dynamicLeadsDataForEdit function:', error);
$('.loader').fadeOut();
@ -1147,6 +1148,22 @@ if (isset($selected_lead_type)) {
dateFormat: "d-m-Y"
});
});
setTimeout(function () {
let selectedOption = $('#contact_person_summary option').filter(function () {
return $(this).text().trim() === (data.contact_person_name || '').trim();
});
if (selectedOption.length) {
selectedOption.prop('selected', true);
console.log("Selected option:", selectedOption.text().trim(), "Value:", selectedOption.val());
} else {
console.log("No match found for:", data.contact_person_name);
}
$('#contact_person_summary').trigger('change');
}, 2000);
});
});
}