Merge branch 'main' of http://192.168.1.200:3000/Stratawiz/Rapport-Laravel
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m47s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m47s
Details
This commit is contained in:
commit
51b921673e
|
|
@ -109,17 +109,10 @@
|
|||
$(function () {
|
||||
var doctorFormId = '1790230856-a5ff58a6-d509-4ac0-9b18-6d366a74965e';
|
||||
var chemistFormId = '1790230856-704c97b6-61f7-4eda-901a-2cb4ff6f293d';
|
||||
var dateInput = document.getElementById('field-record_date');
|
||||
var today = new Date();
|
||||
var month = String(today.getMonth() + 1).padStart(2, '0');
|
||||
var day = String(today.getDate()).padStart(2, '0');
|
||||
dateInput.min = '2026-09-01';
|
||||
dateInput.max = today.getFullYear() + '-' + month + '-' + day;
|
||||
var surveyContacts = [];
|
||||
var submittedIdentities = [];
|
||||
var contactsReady = false;
|
||||
// Dev only: open every section. Set to false to lock later sections until the previous step is complete.
|
||||
var unlockAllSections = true;
|
||||
var unlockAllSections = false;
|
||||
var savedAnswers = @json($savedAnswers);
|
||||
var photoFields = ['visiting_card', 'rx_pad', 'doctor_board', 'chemist_board'];
|
||||
|
||||
|
|
@ -499,6 +492,7 @@ $(function () {
|
|||
}
|
||||
showSavedPhoto(field, savedAnswers[code]);
|
||||
});
|
||||
syncStatusFields(root);
|
||||
}
|
||||
|
||||
function selectSavedOption(select, label) {
|
||||
|
|
@ -549,8 +543,17 @@ $(function () {
|
|||
});
|
||||
}
|
||||
|
||||
function syncStatusFields(root) {
|
||||
$(root || '#report-form').find('select.status-source').each(function () {
|
||||
$(this).siblings('input.status-value').val(this.value === 'Yes' ? '1' : '0');
|
||||
});
|
||||
}
|
||||
|
||||
$('#field-doctor_name').on('input', lockDoctorPrefix);
|
||||
$('#doctor-fields').on('change', '.product-choice', syncProductUnits);
|
||||
$('#doctor-fields').on('change', '.product-choice', function () {
|
||||
syncProductUnits();
|
||||
syncStatusFields(this.parentNode);
|
||||
});
|
||||
$('#chemist-fields').on('input', '.stockist-other-name', function () {
|
||||
$(this).closest('.stockist-block').find('.stockist-name').val(this.value);
|
||||
});
|
||||
|
|
@ -561,6 +564,9 @@ $(function () {
|
|||
$('#chemist-fields').on('change', '.service-choice', syncServiceFields);
|
||||
|
||||
$('#field-degree, #field-specialty').on('change', syncOtherFields);
|
||||
$('#report-form').on('change', 'select.status-source', function () {
|
||||
syncStatusFields(this.parentNode);
|
||||
});
|
||||
|
||||
function fail(text) {
|
||||
Swal.fire({ icon: 'error', title: 'Please check the form', text: text });
|
||||
|
|
@ -663,8 +669,8 @@ $(function () {
|
|||
event.preventDefault();
|
||||
var type = $('#field-visit_type').val();
|
||||
var recordDate = $('#field-record_date').val();
|
||||
if (!recordDate || recordDate < dateInput.min || recordDate > dateInput.max) {
|
||||
fail('Date must be from 1 Sep 2026 through today.');
|
||||
if (!recordDate) {
|
||||
fail('Date is required.');
|
||||
return;
|
||||
}
|
||||
if (type === 'doctor') {
|
||||
|
|
@ -817,6 +823,7 @@ $(function () {
|
|||
return !this.files || !this.files.length;
|
||||
});
|
||||
emptyFiles.prop('disabled', true);
|
||||
syncStatusFields(activeRoot());
|
||||
$('#pageloader').css('display', 'flex').hide().fadeIn();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ $services = ['BP Monitoring' => 'chemist_bp_monitoring','Weighing Machine' => 'c
|
|||
<div class="mb-2"><label class="form-label">Chemist Address <span class="text-danger">*</span></label><input type="text" class="form-control" id="field-chemist_location" name="chemist_location" data-gate required></div>
|
||||
<div class="mb-2"><label class="form-label">Chemist Pincode <span class="text-danger">*</span></label><input type="text" class="form-control" id="field-chemist_pincode" name="chemist_pincode" inputmode="numeric" maxlength="6" data-gate required></div>
|
||||
<div class="mb-2"><label class="form-label">Chemist Type <span class="text-danger">*</span></label><select class="form-control" name="chemist_type" data-gate required><option value="">-- Select --</option>@foreach($chemistTypes as $item)<option value="{{$item}}">{{$item}}</option>@endforeach</select></div>
|
||||
<div class="mb-2"><label class="form-label" for="field-chemist_manager_joint_visit">Manager (EBM) Joint Visit Status <span class="text-danger">*</span></label><select class="form-control" id="field-chemist_manager_joint_visit" name="manager_joint_visit" data-gate required><option value="">-- Select --</option><option value="Yes">Yes</option><option value="No">No</option></select></div>
|
||||
<div class="mb-2"><label class="form-label" for="field-chemist_manager_joint_visit">Manager (EBM) Joint Visit Status <span class="text-danger">*</span></label><select class="form-control status-source" id="field-chemist_manager_joint_visit" name="manager_joint_visit" data-gate required><option value="">-- Select --</option><option value="Yes">Yes</option><option value="No">No</option></select><input type="hidden" name="manager_joint_visit_status" class="status-value" value="0"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ $products = ['Asthalin Inhaler' => 'asthalin_inhaler','Asthalin Rotacap' => 'ast
|
|||
<div class="mb-2"><label class="form-label">Doctor Type <span class="text-danger">*</span></label><select class="form-control" id="field-doctor_type" name="doctor_type" data-gate required><option value="">-- Select --</option>@foreach($doctorTypes as $item)<option value="{{$item}}">{{$item}}</option>@endforeach</select></div>
|
||||
<div class="mb-2"><label class="form-label">No. of Total Patients Seen in a Day <span class="text-danger">*</span></label><select class="form-control" name="total_patients" data-gate required><option value="">-- Select --</option>@foreach($bands as $item)<option value="{{$item}}">{{$item}}</option>@endforeach</select></div>
|
||||
<div class="mb-2"><label class="form-label">No. of Respiratory Patients Seen in a Day <span class="text-danger">*</span></label><select class="form-control" name="respiratory_patients" data-gate required><option value="">-- Select --</option>@foreach($bands as $item)<option value="{{$item}}">{{$item}}</option>@endforeach</select></div>
|
||||
<div class="mb-2"><label class="form-label" for="field-doctor_manager_joint_visit">Manager (EBM) Joint Visit Status <span class="text-danger">*</span></label><select class="form-control" id="field-doctor_manager_joint_visit" name="manager_joint_visit" data-gate required><option value="">-- Select --</option><option value="Yes">Yes</option><option value="No">No</option></select></div>
|
||||
<div class="mb-2"><label class="form-label" for="field-doctor_manager_joint_visit">Manager (EBM) Joint Visit Status <span class="text-danger">*</span></label><select class="form-control status-source" id="field-doctor_manager_joint_visit" name="manager_joint_visit" data-gate required><option value="">-- Select --</option><option value="Yes">Yes</option><option value="No">No</option></select><input type="hidden" name="manager_joint_visit_status" class="status-value" value="0"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -40,7 +40,8 @@ $products = ['Asthalin Inhaler' => 'asthalin_inhaler','Asthalin Rotacap' => 'ast
|
|||
@foreach($products as $label => $code)
|
||||
<div class="mb-2 product-row">
|
||||
<label class="form-label">{{$label}} <span class="text-danger">*</span></label>
|
||||
<select class="form-control product-choice" name="{{$code}}" data-gate required><option value="">-- Select --</option><option value="Yes">Yes</option><option value="No">No</option></select>
|
||||
<select class="form-control product-choice status-source" name="{{$code}}" data-gate required><option value="">-- Select --</option><option value="Yes">Yes</option><option value="No">No</option></select>
|
||||
<input type="hidden" name="{{$code}}_status" class="status-value" value="0">
|
||||
<div class="mt-2 product-units" style="display:none">
|
||||
<label class="form-label">No. of Units in a Month <span class="text-danger">*</span></label>
|
||||
<input type="number" min="0" step="1" class="form-control" name="{{$code}}_units" disabled>
|
||||
|
|
|
|||
Loading…
Reference in New Issue