Team4 - Molecule Identification form Changes (25/06/2026)
Specific Folder FTP Upload / ftp-deploy (push) Successful in 35s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 35s
Details
This commit is contained in:
parent
dd1015dd8a
commit
9c06ea0892
|
|
@ -590,6 +590,14 @@ select option:disabled {
|
|||
prefillDoctorTableSection($(this), $(this).data('category'));
|
||||
});
|
||||
}
|
||||
function refreshAllDropdownRules(){
|
||||
updateDoctorDropdowns();
|
||||
updateOtherMoleculeOptions();
|
||||
|
||||
$('.doctor-row').each(function(){
|
||||
toggleOtherMoleculeRxSupport($(this));
|
||||
});
|
||||
}
|
||||
function checkOtherRxHeader(){
|
||||
|
||||
let visible = false;
|
||||
|
|
@ -991,7 +999,7 @@ function updateOtherMoleculeOptions() {
|
|||
});
|
||||
|
||||
}
|
||||
function updateOtherMoleculeDropdowns($tbody) {
|
||||
/* function updateOtherMoleculeDropdowns($tbody) {
|
||||
let sectionMolecule = $tbody.data('molecule-use');
|
||||
|
||||
$tbody.find('.other-molecule-select').each(function() {
|
||||
|
|
@ -1011,7 +1019,7 @@ function updateOtherMoleculeOptions() {
|
|||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}*/
|
||||
|
||||
function buildSubmitFormData() {
|
||||
let fd = new FormData();
|
||||
|
|
@ -1101,21 +1109,51 @@ function updateOtherMoleculeOptions() {
|
|||
});
|
||||
|
||||
prefillAllDoctorTables();
|
||||
refreshAllDropdownRules();
|
||||
|
||||
/* $('.doctor-table-body').each(function() {
|
||||
let $tbody = $(this);
|
||||
updateOtherMoleculeDropdowns($tbody);
|
||||
updateDoctorDropdowns($tbody);
|
||||
}); */
|
||||
/*
|
||||
$('.doctor-table-body').each(function() {
|
||||
let $tbody = $(this);
|
||||
updateOtherMoleculeDropdowns($tbody);
|
||||
});
|
||||
*/
|
||||
|
||||
updateDoctorDropdowns();
|
||||
|
||||
$('#report-form').on('submit', function(event) {
|
||||
event.preventDefault();
|
||||
let isValid = true;
|
||||
let errorMsg = '';
|
||||
|
||||
$('.doctor-row').each(function(index){
|
||||
|
||||
let doctor = $(this).find('.doctor-select').val();
|
||||
let rx = $(this).find('.rx-support-select').val();
|
||||
let other = $(this).find('.other-molecule-select').val();
|
||||
let otherRx = $(this).find('.other-molecule-rx-support').val();
|
||||
|
||||
if(!doctor || !rx || !other){
|
||||
isValid = false;
|
||||
errorMsg = 'Please fill all Doctor, Rxn/Week Support and Other Molecule Use fields.';
|
||||
return false;
|
||||
}
|
||||
|
||||
if(other !== 'No' && !otherRx){
|
||||
isValid = false;
|
||||
errorMsg = 'Please fill Other Molecule Rxn/Week Support.';
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if(!isValid){
|
||||
Swal.fire({
|
||||
icon: 'warning',
|
||||
title: 'Validation Error',
|
||||
text: errorMsg
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
$("#pageloader").fadeIn();
|
||||
$.ajax({
|
||||
|
|
|
|||
Loading…
Reference in New Issue