Team 2 (Purview Doctor Tagging) Fetch Selected Doctors
Specific Folder FTP Upload / ftp-deploy (push) Successful in 39s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 39s
Details
This commit is contained in:
parent
e8bebdc6ac
commit
805f357c80
|
|
@ -335,6 +335,8 @@
|
|||
$("select[id^='field-contact_id']").each(function() {
|
||||
var select = $(this);
|
||||
// Clear previous options
|
||||
|
||||
var existingValue = select.val();
|
||||
select.html('');
|
||||
// Add a default 'Select' option
|
||||
select.append(
|
||||
|
|
@ -347,6 +349,11 @@
|
|||
var option = $("<option></option>")
|
||||
.attr("value", itm.value)
|
||||
.text(itm.display);
|
||||
if (existingValue && String(existingValue) === String(itm.value)) {
|
||||
option.prop('selected', true);
|
||||
}
|
||||
|
||||
|
||||
// If doctor options have extra attributes
|
||||
if (itm.contact && itm.contact.msl_code) {
|
||||
option.attr("msl_code", itm.contact.msl_code);
|
||||
|
|
@ -386,6 +393,10 @@
|
|||
enforceUniqueDoctorSelections();
|
||||
});
|
||||
|
||||
if (existingValue) {
|
||||
select.trigger('change');
|
||||
}
|
||||
|
||||
// Ensure unique selection is enforced after initial render
|
||||
enforceUniqueDoctorSelections();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue