Titans - Ciphaler Form changes and Molecule Identification form (first change for Unique Doctor)
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m57s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m57s
Details
This commit is contained in:
parent
aa81e6e90f
commit
1e33ce82bf
|
|
@ -339,7 +339,12 @@
|
|||
<div class="col-md-12 mt-3">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h5 class="mb-0">{{ ucwords($categoryLabel) }}</h5>
|
||||
{{-- <h5 class="mb-0">{{ ucwords($categoryLabel) }}</h5> --}}
|
||||
<h5 class="mb-0">
|
||||
{{ $categoryLabel == 'nac + acebrophylline'
|
||||
? 'NAC + Acebrophylline'
|
||||
: ucwords($categoryLabel) }}
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div class="table-responsive">
|
||||
|
|
@ -539,7 +544,7 @@ select option:disabled {
|
|||
});
|
||||
}
|
||||
|
||||
function updateDoctorDropdowns($tbody) {
|
||||
/* function updateDoctorDropdowns($tbody) {
|
||||
let selectedDoctors = [];
|
||||
|
||||
$tbody.find('.doctor-select').each(function() {
|
||||
|
|
@ -574,7 +579,47 @@ select option:disabled {
|
|||
});
|
||||
});
|
||||
}
|
||||
*/
|
||||
function updateDoctorDropdowns() {
|
||||
|
||||
let selectedDoctors = [];
|
||||
|
||||
$('.doctor-select').each(function() {
|
||||
let value = $(this).val();
|
||||
|
||||
if (value) {
|
||||
selectedDoctors.push(value);
|
||||
}
|
||||
});
|
||||
|
||||
$('.doctor-select').each(function() {
|
||||
|
||||
let currentDropdown = $(this);
|
||||
let currentValue = currentDropdown.val();
|
||||
|
||||
currentDropdown.find('option').each(function() {
|
||||
|
||||
let option = $(this);
|
||||
let originalText = option.data('original-text') || option.text();
|
||||
|
||||
option.data('original-text', originalText);
|
||||
option.text(originalText);
|
||||
option.prop('disabled', false);
|
||||
|
||||
let optionValue = option.val();
|
||||
|
||||
if (
|
||||
optionValue &&
|
||||
optionValue !== currentValue &&
|
||||
selectedDoctors.includes(optionValue)
|
||||
) {
|
||||
option.prop('disabled', true);
|
||||
option.text(originalText + ' (Already Added)');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
function updateOtherMoleculeDropdowns($tbody) {
|
||||
let sectionMolecule = $tbody.data('molecule-use');
|
||||
|
||||
|
|
@ -663,8 +708,11 @@ select option:disabled {
|
|||
return fd;
|
||||
}
|
||||
|
||||
$(document).on('change', '.doctor-select', function() {
|
||||
/*$(document).on('change', '.doctor-select', function() {
|
||||
updateDoctorDropdowns($(this).closest('.doctor-table-body'));
|
||||
});*/
|
||||
$(document).on('change', '.doctor-select', function() {
|
||||
updateDoctorDropdowns();
|
||||
});
|
||||
|
||||
$('.doctor-select').select2({
|
||||
|
|
@ -675,12 +723,18 @@ select option:disabled {
|
|||
|
||||
prefillAllDoctorTables();
|
||||
|
||||
$('.doctor-table-body').each(function() {
|
||||
/* $('.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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue