Team 4 (Montair LC Kid ABM Conversion)
Specific Folder FTP Upload / ftp-deploy (push) Successful in 32s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 32s
Details
This commit is contained in:
parent
855a07e6cf
commit
77b3301134
|
|
@ -274,7 +274,7 @@ $alreadySubmittedDoctors = array_values(array_unique($alreadySubmittedDoctors));
|
|||
var currentSelect = $(this);
|
||||
var currentVal = currentSelect.val() ? String(currentSelect.val()) : "";
|
||||
|
||||
currentSelect.find("option").prop("disabled", false);
|
||||
/* currentSelect.find("option").prop("disabled", false);
|
||||
|
||||
// Disable values selected in OTHER selects (keep current selection enabled)
|
||||
selectedValues.forEach(function (v) {
|
||||
|
|
@ -283,7 +283,23 @@ $alreadySubmittedDoctors = array_values(array_unique($alreadySubmittedDoctors));
|
|||
.find("option[value=\"" + v.replace(/"/g, '\\"') + "\"]")
|
||||
.prop("disabled", true);
|
||||
}
|
||||
});
|
||||
}); */
|
||||
|
||||
currentSelect.find("option").each(function () {
|
||||
var opt = $(this);
|
||||
var optVal = String(opt.val() || '');
|
||||
var optText = opt.text();
|
||||
|
||||
|
||||
if (optText.indexOf("Already Added") !== -1) {
|
||||
opt.prop("disabled", true); // Already Added
|
||||
} else if (optVal && selectedValues.includes(optVal) && optVal !== currentVal) {
|
||||
opt.prop("disabled", true);
|
||||
} else {
|
||||
opt.prop("disabled", false);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Refresh select2 UI if present
|
||||
if (currentSelect.data("select2")) {
|
||||
|
|
@ -314,15 +330,14 @@ $alreadySubmittedDoctors = array_values(array_unique($alreadySubmittedDoctors));
|
|||
var itmVal = String(itm.value);
|
||||
var itmText = itm.display;
|
||||
|
||||
// चेक करा: डॉक्टरचे नाव किंवा व्हॅल्यू आधीच सबमिट झाली आहे का?
|
||||
|
||||
var isAlreadySubmitted = submittedDoctors.includes(itmVal) || submittedDoctors.includes(itmText);
|
||||
|
||||
// जर Edit मोडमध्ये हाच डॉक्टर आधी सिलेक्ट केलेला असेल, तर त्याला Allow करा
|
||||
var isCurrentSelected = (existingVal !== '' && (existingVal === itmVal || existingVal === itmText));
|
||||
|
||||
var displayText = itmText;
|
||||
var isDisabled = false;
|
||||
|
||||
|
||||
if (isAlreadySubmitted && !isCurrentSelected) {
|
||||
displayText += " - Already Added";
|
||||
isDisabled = true;
|
||||
|
|
@ -332,8 +347,9 @@ $alreadySubmittedDoctors = array_values(array_unique($alreadySubmittedDoctors));
|
|||
|
||||
|
||||
var option = $("<option></option>")
|
||||
.attr("value", itm.value)
|
||||
.text(itm.display);
|
||||
.attr("value", itm.value)
|
||||
.text(displayText)
|
||||
.prop("disabled", isDisabled);
|
||||
// If doctor options have extra attributes
|
||||
if (itm.contact && itm.contact.msl_code) {
|
||||
option.attr("msl_code", itm.contact.msl_code);
|
||||
|
|
|
|||
Loading…
Reference in New Issue