Merge branch 'main' of http://192.168.1.200:3000/Stratawiz/Rapport-Laravel
Specific Folder FTP Upload / ftp-deploy (push) Successful in 34s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 34s
Details
This commit is contained in:
commit
a57e836b77
|
|
@ -105,6 +105,13 @@
|
||||||
$otherMolecule = trim((string) $otherMolecule);
|
$otherMolecule = trim((string) $otherMolecule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$otherMoleculeRxSupport = $formdata->other_molecule_rx_support ?? '';
|
||||||
|
if (is_array($otherMoleculeRxSupport) || $otherMoleculeRxSupport instanceof \Traversable) {
|
||||||
|
$otherMoleculeRxSupport = trim((string)(array_values((array)$otherMoleculeRxSupport)[0] ?? ''));
|
||||||
|
} else {
|
||||||
|
$otherMoleculeRxSupport = trim((string)$otherMoleculeRxSupport);
|
||||||
|
}
|
||||||
|
|
||||||
$recordDate = $formdata->record_date ?? '';
|
$recordDate = $formdata->record_date ?? '';
|
||||||
if (is_array($recordDate) || $recordDate instanceof \Traversable) {
|
if (is_array($recordDate) || $recordDate instanceof \Traversable) {
|
||||||
$recordDate = trim((string) (array_values((array) $recordDate)[0] ?? ''));
|
$recordDate = trim((string) (array_values((array) $recordDate)[0] ?? ''));
|
||||||
|
|
@ -123,6 +130,7 @@
|
||||||
'doctor_name' => $doctorNameById[$doctorId] ?? $rawDoctorId,
|
'doctor_name' => $doctorNameById[$doctorId] ?? $rawDoctorId,
|
||||||
'rx_support' => $rxSupport,
|
'rx_support' => $rxSupport,
|
||||||
'other_molecule_use' => $otherMolecule,
|
'other_molecule_use' => $otherMolecule,
|
||||||
|
'other_molecule_rx_support' => $otherMoleculeRxSupport ?? '',
|
||||||
'record_date' => $recordDate,
|
'record_date' => $recordDate,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -193,6 +201,7 @@
|
||||||
'rx_support',
|
'rx_support',
|
||||||
'other_molecule_use',
|
'other_molecule_use',
|
||||||
'molecule_use',
|
'molecule_use',
|
||||||
|
'other_molecule_rx_support',
|
||||||
];
|
];
|
||||||
|
|
||||||
@endphp
|
@endphp
|
||||||
|
|
@ -351,10 +360,13 @@
|
||||||
<table class="table table-bordered mb-0">
|
<table class="table table-bordered mb-0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Doctor Name</th>
|
<th>Doctor Name</th>
|
||||||
<th>Rxn/Week Support</th>
|
<th>Rxn/Week Support</th>
|
||||||
<th>Other Molecule Use</th>
|
<th>Other Molecule Use</th>
|
||||||
</tr>
|
<th class="other-rx-header" style="display:none;">
|
||||||
|
Other Molecule Rxn/Week Support
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody
|
<tbody
|
||||||
class="doctor-table-body"
|
class="doctor-table-body"
|
||||||
|
|
@ -375,6 +387,7 @@
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
<select class="form-control rx-support-select" required>
|
<select class="form-control rx-support-select" required>
|
||||||
<option value="">-- Select --</option>
|
<option value="">-- Select --</option>
|
||||||
<option value="1-3 Rxn/Week">1-3 Rxn/Week</option>
|
<option value="1-3 Rxn/Week">1-3 Rxn/Week</option>
|
||||||
|
|
@ -383,6 +396,7 @@
|
||||||
<option value=">11 Rxn/Week">>11 Rxn/Week</option>
|
<option value=">11 Rxn/Week">>11 Rxn/Week</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<select class="form-control other-molecule-select" required>
|
<select class="form-control other-molecule-select" required>
|
||||||
<option value="">-- Select --</option>
|
<option value="">-- Select --</option>
|
||||||
|
|
@ -392,6 +406,15 @@
|
||||||
<option value="No">No</option>
|
<option value="No">No</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="other-molecule-rx-cell" style="display:none;">
|
||||||
|
<select class="form-control other-molecule-rx-support">
|
||||||
|
<option value="">-- Select --</option>
|
||||||
|
<option value="1-3 Rxn/Week">1-3 Rxn/Week</option>
|
||||||
|
<option value="4-7 Rxn/Week">4-7 Rxn/Week</option>
|
||||||
|
<option value="8-11 Rxn/Week">8-11 Rxn/Week</option>
|
||||||
|
<option value=">11 Rxn/Week">>11 Rxn/Week</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@php $globalRowIndex++; @endphp
|
@php $globalRowIndex++; @endphp
|
||||||
@endfor
|
@endfor
|
||||||
|
|
@ -469,6 +492,17 @@ select option:disabled {
|
||||||
var categoryDoctorSubmissions = {!! json_encode($categoryDoctorSubmissions) !!};
|
var categoryDoctorSubmissions = {!! json_encode($categoryDoctorSubmissions) !!};
|
||||||
|
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
|
$(document).on(
|
||||||
|
'change',
|
||||||
|
'.other-molecule-select',
|
||||||
|
function(){
|
||||||
|
|
||||||
|
toggleOtherMoleculeRxSupport(
|
||||||
|
$(this).closest('tr')
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
function getDoctorRows() {
|
function getDoctorRows() {
|
||||||
let rows = [];
|
let rows = [];
|
||||||
|
|
||||||
|
|
@ -534,6 +568,9 @@ select option:disabled {
|
||||||
.val(submission.rx_support || '');
|
.val(submission.rx_support || '');
|
||||||
$row.find('.other-molecule-select')
|
$row.find('.other-molecule-select')
|
||||||
.val(submission.other_molecule_use || '');
|
.val(submission.other_molecule_use || '');
|
||||||
|
$row.find('.other-molecule-rx-support')
|
||||||
|
.val(submission.other_molecule_rx_support || '');
|
||||||
|
toggleOtherMoleculeRxSupport($row);
|
||||||
setSubmissionId($row, submission.submission_id);
|
setSubmissionId($row, submission.submission_id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -543,6 +580,42 @@ select option:disabled {
|
||||||
prefillDoctorTableSection($(this), $(this).data('category'));
|
prefillDoctorTableSection($(this), $(this).data('category'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function checkOtherRxHeader(){
|
||||||
|
|
||||||
|
let visible = false;
|
||||||
|
|
||||||
|
$('.other-molecule-rx-cell').each(function(){
|
||||||
|
|
||||||
|
if($(this).is(':visible')){
|
||||||
|
visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
if(visible){
|
||||||
|
$('.other-rx-header').show();
|
||||||
|
}else{
|
||||||
|
$('.other-rx-header').hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
function toggleOtherMoleculeRxSupport($row){
|
||||||
|
|
||||||
|
let value = $row.find('.other-molecule-select').val();
|
||||||
|
|
||||||
|
if(
|
||||||
|
value &&
|
||||||
|
value !== 'No'
|
||||||
|
){
|
||||||
|
$row.find('.other-molecule-rx-cell').show();
|
||||||
|
$('.other-rx-header').show();
|
||||||
|
}else{
|
||||||
|
$row.find('.other-molecule-rx-cell').hide();
|
||||||
|
$row.find('.other-molecule-rx-support').val('');
|
||||||
|
}
|
||||||
|
|
||||||
|
checkOtherRxHeader();
|
||||||
|
}
|
||||||
|
|
||||||
/* function updateDoctorDropdowns($tbody) {
|
/* function updateDoctorDropdowns($tbody) {
|
||||||
let selectedDoctors = [];
|
let selectedDoctors = [];
|
||||||
|
|
@ -645,7 +718,7 @@ select option:disabled {
|
||||||
function buildSubmitFormData() {
|
function buildSubmitFormData() {
|
||||||
let fd = new FormData();
|
let fd = new FormData();
|
||||||
let form = $('#report-form')[0];
|
let form = $('#report-form')[0];
|
||||||
let rowFieldClasses = ['doctor-select', 'rx-support-select', 'other-molecule-select'];
|
let rowFieldClasses = ['doctor-select', 'rx-support-select', 'other-molecule-select', 'other-molecule-rx-support'];
|
||||||
|
|
||||||
Array.from(form.elements).forEach(function(el) {
|
Array.from(form.elements).forEach(function(el) {
|
||||||
if (!el.name || el.disabled) {
|
if (!el.name || el.disabled) {
|
||||||
|
|
@ -697,6 +770,7 @@ select option:disabled {
|
||||||
fd.append('contact_id[]', $row.find('.doctor-select').val());
|
fd.append('contact_id[]', $row.find('.doctor-select').val());
|
||||||
fd.append('rx_support[]', $row.find('.rx-support-select').val());
|
fd.append('rx_support[]', $row.find('.rx-support-select').val());
|
||||||
fd.append('other_molecule_use[]', $row.find('.other-molecule-select').val());
|
fd.append('other_molecule_use[]', $row.find('.other-molecule-select').val());
|
||||||
|
fd.append('other_molecule_rx_support[]', $row.find('.other-molecule-rx-support').val());
|
||||||
fd.append('molecule_use[]', item.moleculeUse);
|
fd.append('molecule_use[]', item.moleculeUse);
|
||||||
|
|
||||||
let submissionId = $row.attr('data-submission-id');
|
let submissionId = $row.attr('data-submission-id');
|
||||||
|
|
@ -746,6 +820,7 @@ select option:disabled {
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
|
||||||
$("#pageloader").fadeOut();
|
$("#pageloader").fadeOut();
|
||||||
if (data.status == 'success') {
|
if (data.status == 'success') {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue