COPD: Changes in Voltido RCPA form
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m45s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m45s
Details
This commit is contained in:
parent
a089d47b8b
commit
43d812217d
|
|
@ -0,0 +1,131 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
@include('layouts.shared/title-meta', ['title' => "History"])
|
||||||
|
@include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="loading">
|
||||||
|
<div class="account-pages">
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<!-- start page title -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-8 p-2">
|
||||||
|
<h4 class="page-title">{{$formname}}</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-4 p-2">
|
||||||
|
<a href="/form/show" class="float-end pt-1">New Submission</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- end page title -->
|
||||||
|
@if(session()->has('message'))
|
||||||
|
<div class="alert alert-success">
|
||||||
|
{{ session()->get('message') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@if(session()->has('error'))
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
{{ session()->get('error') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 p-0">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="responsive-table-plugin">
|
||||||
|
<div class="table-rep-plugin">
|
||||||
|
<div class="table-responsive" data-pattern="priority-columns">
|
||||||
|
<table id="tech-companies-1" class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th data-priority="1">Submission Date</th>
|
||||||
|
@foreach($questions as $code => $question)
|
||||||
|
@if($question->type == 'hidden')
|
||||||
|
@continue;
|
||||||
|
@endif
|
||||||
|
@if($question->type == 'multitextbox')
|
||||||
|
@foreach($question->options as $k => $v)
|
||||||
|
<th data-priority="1">{{ is_object($v) ? ($v->display ?? $v->label ?? $k) : $v }} ({{$question->label}})</th>
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
<th data-priority="1">{{$question->label}}</th>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
<th data-priority="1">Action</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($submissions as $submission)
|
||||||
|
<tr>
|
||||||
|
<th>{{date("d M Y", strtotime($submission->updatedAt))}}</th>
|
||||||
|
@foreach($questions as $code => $question)
|
||||||
|
@if($question->type == 'hidden')
|
||||||
|
@continue;
|
||||||
|
@endif
|
||||||
|
@if($question->type == 'file')
|
||||||
|
<td><a target="_blank" href="{{ isset($submission->formdata->{$code}) ? is_array($submission->formdata->{$code})? implode(', ', $submission->formdata->{$code}) :(is_string($submission->formdata->{$code}) ? $submission->formdata->{$code} : '' ) : $code }}" download="{{ isset($submission->formdata->{$code}) ? is_array($submission->formdata->{$code})? implode(', ', $submission->formdata->{$code}) : (is_string($submission->formdata->{$code}) ? $submission->formdata->{$code} : '' ) : $code }}" class="btn btn-dark btn-xs"><i class="mdi mdi-cloud-download me-1"></i> Download</a></td>
|
||||||
|
|
||||||
|
@elseif($question->type == 'radiometrix' && isset($submission->formdata->{$code}) && is_object($submission->formdata->{$code}))
|
||||||
|
<td>
|
||||||
|
{{ collect((array)$submission->formdata->{$code})->map(function($val, $key){ return "$key: $val"; })->implode(', ') }}
|
||||||
|
</td>
|
||||||
|
|
||||||
|
@elseif($question->type == 'multitextbox')
|
||||||
|
@foreach($question->options as $k => $v)
|
||||||
|
@php
|
||||||
|
$optKey = is_object($v) ? ($v->value ?? $k) : $k;
|
||||||
|
$optVal = '';
|
||||||
|
if (isset($submission->formdata->{$optKey})) {
|
||||||
|
$raw = $submission->formdata->{$optKey};
|
||||||
|
$optVal = is_array($raw) ? implode(', ', $raw) : (is_object($raw) ? json_encode($raw) : $raw);
|
||||||
|
} elseif (isset($submission->formdata->{$code}) && (is_object($submission->formdata->{$code}) || is_array($submission->formdata->{$code}))) {
|
||||||
|
$box = (array) $submission->formdata->{$code};
|
||||||
|
if (array_key_exists($optKey, $box)) {
|
||||||
|
$raw = $box[$optKey];
|
||||||
|
$optVal = is_array($raw) ? implode(', ', $raw) : (is_object($raw) ? json_encode($raw) : $raw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@endphp
|
||||||
|
<td>{{ $optVal }}</td>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
@elseif(count((array)$question->options) > 0 && 1==2 )
|
||||||
|
<td>{{ $question->options->{ $submission->formdata->{$code} } }}</td>
|
||||||
|
@else
|
||||||
|
<td>{{ isset($submission->formdata->{$code}) ? is_array($submission->formdata->{$code})? implode(', ', $submission->formdata->{$code}) : (is_object($submission->formdata->{$code}) ? collect((array)$submission->formdata->{$code})->map(function($val, $key){ return "$key: $val"; })->implode(', ') : $submission->formdata->{$code}) : '' }}</td>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
<th>
|
||||||
|
@if($question->can_edit == 'yes' || sizeof($submission->workflow_approvals) == 0 )
|
||||||
|
@if($submission->workflow == 'yes' && $submission->workflow_status == 'approved' )
|
||||||
|
<p>Approved</p>
|
||||||
|
@else
|
||||||
|
{{-- <a href="/form/show?form_id={{$submission->formdata->form_id}}&id={{$submission->id}}" class="btn btn-primary btn-xs">Edit</button> --}}
|
||||||
|
@if(isset($form->allow_delete_by_user) && $form->allow_delete_by_user == 'yes')
|
||||||
|
<a href="/form/delete?form_id={{$submission->formdata->form_id}}&id={{$submission->id}}" onclick="return confirm('Are you sure you want to delete this submission? This is not recoverable!');" class="btn btn-danger btn-xs mt-1">Delete</button>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div> <!-- end .table-responsive -->
|
||||||
|
|
||||||
|
</div> <!-- end .table-rep-plugin-->
|
||||||
|
</div> <!-- end .responsive-table-plugin-->
|
||||||
|
|
||||||
|
</div> <!-- end card body-->
|
||||||
|
</div> <!-- end card -->
|
||||||
|
</div><!-- end col-->
|
||||||
|
</div>
|
||||||
|
<!-- end row-->
|
||||||
|
</div> <!-- container -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- end page -->
|
||||||
|
@include('layouts.shared/footer-script')
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -304,8 +304,8 @@
|
||||||
</form>
|
</form>
|
||||||
@elseif(!$id)
|
@elseif(!$id)
|
||||||
<h4>
|
<h4>
|
||||||
You have already submitted <strong>{{ count($submissions) }}</strong> doctor(s).
|
You have already submitted Voltido RCPA data for <strong>{{ count($submissions) }}</strong> Doctor(s).
|
||||||
Go to View History to edit if required.
|
|
||||||
</h4>
|
</h4>
|
||||||
@endif
|
@endif
|
||||||
</div> <!-- end card-body -->
|
</div> <!-- end card-body -->
|
||||||
|
|
@ -704,6 +704,8 @@ preventDuplicateDoctors(filteredSubmittedDoctors);
|
||||||
|
|
||||||
|
|
||||||
var doctor_count = 0
|
var doctor_count = 0
|
||||||
|
let uniqueDoctorId = 0;
|
||||||
|
|
||||||
let numberOfSubmission=0;
|
let numberOfSubmission=0;
|
||||||
console.log("Number of Submission : ",numberOfSubmission);
|
console.log("Number of Submission : ",numberOfSubmission);
|
||||||
$('#adddoctor-btn').click(function() {
|
$('#adddoctor-btn').click(function() {
|
||||||
|
|
@ -719,13 +721,21 @@ preventDuplicateDoctors(filteredSubmittedDoctors);
|
||||||
|
|
||||||
console.log("Doctor Name : ",doctorName);
|
console.log("Doctor Name : ",doctorName);
|
||||||
doctor_count++;
|
doctor_count++;
|
||||||
numberOfSubmission=numberOfSubmission+1;
|
uniqueDoctorId++;
|
||||||
|
numberOfSubmission++;
|
||||||
console.log("Number of Submission : ",numberOfSubmission);
|
console.log("Number of Submission : ",numberOfSubmission);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*<button type="button" class="btn btn-danger btn-remove float-end" style="margin-top:-25px; margin-right:-25px"><i class="mdi mdi-close"></i></button> ye Remove Button <div class="doctor-wrapper"> ke nich tha...but abhi ke liye remove option nikal diya h */
|
||||||
|
|
||||||
let empty_doctor = `
|
let empty_doctor = `
|
||||||
|
|
||||||
<div class="doctor-wrapper">
|
<div class="doctor-wrapper">
|
||||||
<button type="button" class="btn btn-danger btn-remove float-end" style="margin-top:-25px; margin-right:-25px"><i class="mdi mdi-close"></i></button>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="doctor-title mb-3 text-primary">
|
<h4 class="doctor-title mb-3 text-primary">
|
||||||
Doctor ${doctor_count + 1}
|
Doctor ${doctor_count + 1}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
@ -739,7 +749,7 @@ preventDuplicateDoctors(filteredSubmittedDoctors);
|
||||||
|
|
||||||
<div class="col-md-12 mb-2">
|
<div class="col-md-12 mb-2">
|
||||||
<label
|
<label
|
||||||
for="field-{{$question->code}}-${doctor_count}"
|
for="field-{{$question->code}}-${uniqueDoctorId}"
|
||||||
class="form-label @if($question->code=='contact_id') doctor-name-label @endif">
|
class="form-label @if($question->code=='contact_id') doctor-name-label @endif">
|
||||||
|
|
||||||
{{$question->question}}
|
{{$question->question}}
|
||||||
|
|
@ -753,20 +763,20 @@ preventDuplicateDoctors(filteredSubmittedDoctors);
|
||||||
|
|
||||||
@switch($question->type)
|
@switch($question->type)
|
||||||
@case('hidden')
|
@case('hidden')
|
||||||
<input type="{{$question->type}}" id="field-{{$question->code}}-${doctor_count}" name="{{$question->code}}[${doctor_count}]" value="{{isset($question->value)?$question->value:''}}">
|
<input type="{{$question->type}}" id="field-{{$question->code}}-${uniqueDoctorId}" name="{{$question->code}}[${uniqueDoctorId}]" value="{{isset($question->value)?$question->value:''}}">
|
||||||
@break
|
@break
|
||||||
@case('text')
|
@case('text')
|
||||||
@case('file')
|
@case('file')
|
||||||
@case('email')
|
@case('email')
|
||||||
@case('tel')
|
@case('tel')
|
||||||
@case('date')
|
@case('date')
|
||||||
<input type="{{$question->type}}" id="field-{{$question->code}}-${doctor_count}" name="{{$question->code}}[${doctor_count}]" class="form-control" {{$question->required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:''}}">
|
<input type="{{$question->type}}" id="field-{{$question->code}}-${uniqueDoctorId}" name="{{$question->code}}[${uniqueDoctorId}]" class="form-control" {{$question->required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:''}}">
|
||||||
@break
|
@break
|
||||||
@case('number')
|
@case('number')
|
||||||
<input type="{{$question->type}}" min="0" max="9999999999" step="1" id="field-{{$question->code}}-${doctor_count}" name="{{$question->code}}[${doctor_count}]" class="form-control" {{$question->required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:0}}">
|
<input type="{{$question->type}}" min="0" max="9999999999" step="1" id="field-{{$question->code}}-${uniqueDoctorId}" name="{{$question->code}}[${uniqueDoctorId}]" class="form-control" {{$question->required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:0}}">
|
||||||
@break
|
@break
|
||||||
@case('dropdown')
|
@case('dropdown')
|
||||||
<select class="form-control" id="field-{{$question->code}}-${doctor_count}" name="{{$question->code}}[${doctor_count}]" {{$question->required == 'yes'?'required':'' }}>
|
<select class="form-control" id="field-{{$question->code}}-${uniqueDoctorId}" name="{{$question->code}}[${uniqueDoctorId}]" {{$question->required == 'yes'?'required':'' }}>
|
||||||
@if($question->code=='contact_id')
|
@if($question->code=='contact_id')
|
||||||
${doctorName}
|
${doctorName}
|
||||||
@else
|
@else
|
||||||
|
|
@ -791,7 +801,7 @@ preventDuplicateDoctors(filteredSubmittedDoctors);
|
||||||
|
|
||||||
$('#doctor-group-wrapper').append(empty_doctor)
|
$('#doctor-group-wrapper').append(empty_doctor)
|
||||||
updateDoctorLabels();
|
updateDoctorLabels();
|
||||||
$('#field-contact_id-'+doctor_count).select2({
|
$('#field-contact_id-'+uniqueDoctorId).select2({
|
||||||
|
|
||||||
width: '100%',
|
width: '100%',
|
||||||
placeholder: '-- Select Doctor --'
|
placeholder: '-- Select Doctor --'
|
||||||
|
|
@ -807,12 +817,9 @@ preventDuplicateDoctors(filteredSubmittedDoctors);
|
||||||
|
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
$('#field-legacy_code-'+doctor_count).attr('readonly',true);
|
$('#field-legacy_code-' + uniqueDoctorId).prop('readonly', true);
|
||||||
$('#field-speciality-'+doctor_count).attr('readonly',true);
|
$('#field-speciality-' + uniqueDoctorId).prop('readonly', true);
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
|
||||||
}, 500);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -837,7 +844,6 @@ if ($('.doctor-wrapper').length < MAX_DOCTORS) {
|
||||||
$(this).closest('.doctor-wrapper').find('select').select2('destroy');
|
$(this).closest('.doctor-wrapper').find('select').select2('destroy');
|
||||||
$(this).closest('.doctor-wrapper').remove();
|
$(this).closest('.doctor-wrapper').remove();
|
||||||
numberOfSubmission--;
|
numberOfSubmission--;
|
||||||
doctor_count--;
|
|
||||||
preventDuplicateDoctors();
|
preventDuplicateDoctors();
|
||||||
updateDoctorLabels();
|
updateDoctorLabels();
|
||||||
console.log("New Number of Submission : ",numberOfSubmission);
|
console.log("New Number of Submission : ",numberOfSubmission);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue