Team 2 (Lung Care Programme) Add Doctor Code Fix
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m46s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m46s
Details
This commit is contained in:
parent
c16d4e2d3e
commit
c3308b2885
|
|
@ -347,7 +347,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateDoctorMeta($select) {
|
/*function updateDoctorMeta($select) {
|
||||||
const selectedOption = $select.find(':selected');
|
const selectedOption = $select.find(':selected');
|
||||||
const selectId = $select.attr('id');
|
const selectId = $select.attr('id');
|
||||||
let suffix = '';
|
let suffix = '';
|
||||||
|
|
@ -358,8 +358,20 @@
|
||||||
|
|
||||||
$('#field-msl_code' + suffix).val(selectedOption.attr('msl_code') || '');
|
$('#field-msl_code' + suffix).val(selectedOption.attr('msl_code') || '');
|
||||||
$('#field-speciality' + suffix).val(selectedOption.attr('speciality') || '');
|
$('#field-speciality' + suffix).val(selectedOption.attr('speciality') || '');
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
function updateDoctorMeta($select) {
|
||||||
|
const selectedOption = $select.find(':selected');
|
||||||
|
const $wrapper = $select.closest('.doctor-wrapper');
|
||||||
|
|
||||||
|
$wrapper.find('input[id^="field-msl_code"]').val(selectedOption.attr('msl_code') || '');
|
||||||
|
$wrapper.find('input[id^="field-speciality"]').val(selectedOption.attr('speciality') || '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* function preventDuplicateDoctors() {
|
/* function preventDuplicateDoctors() {
|
||||||
const selectedValues = [];
|
const selectedValues = [];
|
||||||
|
|
||||||
|
|
@ -655,6 +667,13 @@
|
||||||
$('#doctor-group-wrapper').append(empty_doctor);
|
$('#doctor-group-wrapper').append(empty_doctor);
|
||||||
|
|
||||||
const $newDoctorSelect = $('#field-contact_id-' + doctor_count);
|
const $newDoctorSelect = $('#field-contact_id-' + doctor_count);
|
||||||
|
|
||||||
|
$newDoctorSelect.find('option').prop('selected', false).prop('disabled', false).each(function() {
|
||||||
|
$(this).text($(this).text().replace(' (Already Added)', ''));
|
||||||
|
});
|
||||||
|
$newDoctorSelect.val('');
|
||||||
|
|
||||||
|
|
||||||
initializeSelect2($newDoctorSelect);
|
initializeSelect2($newDoctorSelect);
|
||||||
$('#field-msl_code-' + doctor_count + ', #field-speciality-' + doctor_count).attr('readonly', true);
|
$('#field-msl_code-' + doctor_count + ', #field-speciality-' + doctor_count).attr('readonly', true);
|
||||||
initializeExecutionSelects();
|
initializeExecutionSelects();
|
||||||
|
|
@ -674,7 +693,7 @@
|
||||||
});
|
});
|
||||||
$wrapper.remove();
|
$wrapper.remove();
|
||||||
preventDuplicateDoctors();
|
preventDuplicateDoctors();
|
||||||
if ($('.doctor-wrapper').length < 10) $('#adddoctor-btn').show();
|
if ($('.doctor-wrapper').length < 5) $('#adddoctor-btn').show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#report-form').on('submit', function (event) {
|
$('#report-form').on('submit', function (event) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue