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 currentSelect = $(this);
|
||||||
var currentVal = currentSelect.val() ? String(currentSelect.val()) : "";
|
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)
|
// Disable values selected in OTHER selects (keep current selection enabled)
|
||||||
selectedValues.forEach(function (v) {
|
selectedValues.forEach(function (v) {
|
||||||
|
|
@ -283,7 +283,23 @@ $alreadySubmittedDoctors = array_values(array_unique($alreadySubmittedDoctors));
|
||||||
.find("option[value=\"" + v.replace(/"/g, '\\"') + "\"]")
|
.find("option[value=\"" + v.replace(/"/g, '\\"') + "\"]")
|
||||||
.prop("disabled", true);
|
.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
|
// Refresh select2 UI if present
|
||||||
if (currentSelect.data("select2")) {
|
if (currentSelect.data("select2")) {
|
||||||
|
|
@ -314,15 +330,14 @@ $alreadySubmittedDoctors = array_values(array_unique($alreadySubmittedDoctors));
|
||||||
var itmVal = String(itm.value);
|
var itmVal = String(itm.value);
|
||||||
var itmText = itm.display;
|
var itmText = itm.display;
|
||||||
|
|
||||||
// चेक करा: डॉक्टरचे नाव किंवा व्हॅल्यू आधीच सबमिट झाली आहे का?
|
|
||||||
var isAlreadySubmitted = submittedDoctors.includes(itmVal) || submittedDoctors.includes(itmText);
|
var isAlreadySubmitted = submittedDoctors.includes(itmVal) || submittedDoctors.includes(itmText);
|
||||||
|
|
||||||
// जर Edit मोडमध्ये हाच डॉक्टर आधी सिलेक्ट केलेला असेल, तर त्याला Allow करा
|
|
||||||
var isCurrentSelected = (existingVal !== '' && (existingVal === itmVal || existingVal === itmText));
|
var isCurrentSelected = (existingVal !== '' && (existingVal === itmVal || existingVal === itmText));
|
||||||
|
|
||||||
var displayText = itmText;
|
var displayText = itmText;
|
||||||
var isDisabled = false;
|
var isDisabled = false;
|
||||||
|
|
||||||
|
|
||||||
if (isAlreadySubmitted && !isCurrentSelected) {
|
if (isAlreadySubmitted && !isCurrentSelected) {
|
||||||
displayText += " - Already Added";
|
displayText += " - Already Added";
|
||||||
isDisabled = true;
|
isDisabled = true;
|
||||||
|
|
@ -332,8 +347,9 @@ $alreadySubmittedDoctors = array_values(array_unique($alreadySubmittedDoctors));
|
||||||
|
|
||||||
|
|
||||||
var option = $("<option></option>")
|
var option = $("<option></option>")
|
||||||
.attr("value", itm.value)
|
.attr("value", itm.value)
|
||||||
.text(itm.display);
|
.text(displayText)
|
||||||
|
.prop("disabled", isDisabled);
|
||||||
// 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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue