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() {
|
$("select[id^='field-contact_id']").each(function() {
|
||||||
var select = $(this);
|
var select = $(this);
|
||||||
// Clear previous options
|
// Clear previous options
|
||||||
|
|
||||||
|
var existingValue = select.val();
|
||||||
select.html('');
|
select.html('');
|
||||||
// Add a default 'Select' option
|
// Add a default 'Select' option
|
||||||
select.append(
|
select.append(
|
||||||
|
|
@ -347,6 +349,11 @@
|
||||||
var option = $("<option></option>")
|
var option = $("<option></option>")
|
||||||
.attr("value", itm.value)
|
.attr("value", itm.value)
|
||||||
.text(itm.display);
|
.text(itm.display);
|
||||||
|
if (existingValue && String(existingValue) === String(itm.value)) {
|
||||||
|
option.prop('selected', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// If doctor options have extra attributes
|
// If doctor options have extra attributes
|
||||||
if (itm.contact && itm.contact.msl_code) {
|
if (itm.contact && itm.contact.msl_code) {
|
||||||
option.attr("msl_code", itm.contact.msl_code);
|
option.attr("msl_code", itm.contact.msl_code);
|
||||||
|
|
@ -386,6 +393,10 @@
|
||||||
enforceUniqueDoctorSelections();
|
enforceUniqueDoctorSelections();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (existingValue) {
|
||||||
|
select.trigger('change');
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure unique selection is enforced after initial render
|
// Ensure unique selection is enforced after initial render
|
||||||
enforceUniqueDoctorSelections();
|
enforceUniqueDoctorSelections();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue