Compare commits

..

No commits in common. "d6aef8e354e8e392054bee47b406b3fb10e80db3" and "3aaf334f9531c90eca7b56ae017db2e914923461" have entirely different histories.

2 changed files with 36 additions and 25 deletions

View File

@ -168,7 +168,7 @@
</div>
@if($question->code == 'phone_no_staff')
<h5 class="text-center">
<h5>
Enter No. of Units per Respule for the Brand Order Received
</h5>
@endif
@ -224,27 +224,14 @@
$(this).val($(this).val().replace(/[^a-zA-Z\s]/g, ''));
});
/* $('#field-phone_no_staff').on('input', function () {
$('#field-phone_no_staff').on('input', function () {
this.value = this.value.replace(/\D/g, '').slice(0, 10);
// First digit must be 6,7,8,9
if (this.value.length > 0 && !/^[6-9]/.test(this.value)) {
this.value = '';
}
}); */
$('#field-phone_no_staff').on('input', function () {
// Allow only digits and max 10 digits
this.value = this.value.replace(/\D/g, '').slice(0, 10);
// First digit must be 6, 7, 8, or 9
if (this.value.length > 0 && !/^[6-9]/.test(this.value)) {
alert("Phone number must start with 6, 7, 8, or 9.");
this.value = '';
$(this).focus();
}
});
$('#field-budecort_respule, #field-duolin_respule, #field-levolin_respule, #field-input_given_count, #field-hyperneb_respule, #field-budesal_respule').on('input', function () {
this.value = this.value.replace(/[^0-9]/g, '');
});
@ -304,12 +291,6 @@
}
});
/* $('#field-input_name,#field-input_given_count').on('change',function(){
$('#report-form input.dynamic-hidden').remove();
$('#report-form').append('<input type="hidden" class="dynamic-hidden" name="'+ $('#field-input_name').val() +'" value="1">')
}) */
$('#field-user_id').change(function(){
let hierarchy = $('option:selected', this).attr('hierarchy');
$('#field-hierarchy_id').val(hierarchy)
@ -335,7 +316,7 @@
$('#report-form').on('submit', function(event){
event.preventDefault();
let mobile = $('#field-phone_no_staff').val().trim();
$('#report-form').append('<input type="hidden" name="'+ $('#field-input_name').val() +'_pob_units" value="'+ $("#field-input_given_count").val() +'">')
if (!/^[6-9]\d{9}$/.test(mobile)) {
Swal.fire({
icon: 'error',

View File

@ -36,11 +36,41 @@
@if(isset($form->user_info))
<div class="col-12">
<h6>Submitted By: {{$form->user_info->name}}</h6>
@if(isset($form->is_approval) && $form->is_approval == 'yes')
@if(isset($submitted_formdata->genareted_image[0]))
@php
$imageUrl = asset('storage/personalized/'.$submitted_formdata->form_id.'/'.$submitted_formdata->genareted_image[0]);
@endphp
<div class="col-12 mb-3">
<label class="form-label">
<strong>Generated Invitation Preview</strong>
</label>
<div class="mt-2">
<img src="{{ $imageUrl }}"
class="img-fluid img-thumbnail"
style="max-width:100%;">
</div>
{{-- <div class="mt-3">
<a href="{{ $imageUrl }}"
download="{{ $submitted_formdata->genareted_image[0] }}"
class="btn btn-success">
<i class="mdi mdi-download"></i> Download Invitation
</a>
</div> --}}
</div>
@endif
@endif
</div>
@endif
@php
/* echo "<pre>";
/* echo "<pre>";
print_r($submitted_formdata);
echo "</pre>"; */
$skuData = [];
@ -77,7 +107,7 @@
</div>
@endif
@if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
@foreach($questions as $question)
@if (in_array($question->code, ['execution_date','executed_as_per_plan' ,'revised_start_time','patient_screened','patients_diagnosed','rxn_of_montair_lc_adult','rxn_of_montair_lc_kid_tab','rxn_of_montair_lc_kid_syrup','rxn_of_furamist','rxn_of_furamist_az','total_rxns']))
@continue
@ -177,7 +207,7 @@
@endswitch
</div>
@endforeach
@if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
{{-- @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) ) --}}
<div class="text-center d-grid mt-3">
<button class="btn btn-primary" type="submit" id="submit-btn"> Submit </button>
</div>