diff --git a/resources/views/form/rapport-pulmocare/1782369496-6603002f-f5ab-4352-86fc-b1b384cc2b60.blade.php b/resources/views/form/rapport-pulmocare/1782369496-6603002f-f5ab-4352-86fc-b1b384cc2b60.blade.php new file mode 100644 index 00000000..c549c7c5 --- /dev/null +++ b/resources/views/form/rapport-pulmocare/1782369496-6603002f-f5ab-4352-86fc-b1b384cc2b60.blade.php @@ -0,0 +1,432 @@ + + + + @include('layouts.shared/title-meta', ['title' => "Form"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + +
+ processing... +
+ +
+
+
+
+
+
+ + @if(Session::has('error'))
{{Session::get('error')}}
+
@endif + @if(session('success'))
{{ session('success') }} +
+
@endif +
+

{{$form->title}}

+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) ) +
+ @if($form->link_type == 'form') + View History + @else + Back + @endif +
+ @endif + @if(isset($form->user_info)) +
+
Submitted By: {{$form->user_info->name}}
+
+ @endif +
+ + @csrf + @if($id) + + @endif + @if(isset($form->manager_can_submit) && $form->manager_can_submit == true) +
+ + + +
+ @endif + + @foreach($questions as $question) +
+ + @switch($question->type) + @case('hidden') + + @break + @case('text') + @case('email') + @case('tel') + @case('date') + required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:''}}"> + @break + @case('number') + required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:0}}"> + @break + @case('textarea') + + @break + @case('dropdown') + + @break + @case('radio') + @foreach($question->options as $option) +
+ + +
+ @endforeach + @break + @case('radiometrix') + @php + // Decode the first option's value to use as heading labels + $headings = + count($question->options) > 0 + ? json_decode($question->options[0]->value) + : []; + @endphp + + {{-- Matrix Wrapper with Horizontal Scroll on Small Screens --}} +
+
+ {{-- Table Headers --}} +
+
+ {{-- Placeholder for row labels --}} + @foreach ($headings as $head) +
{{ $head }} +
+ @endforeach +
+ + {{-- Table Rows --}} + @foreach ($question->options as $option) + @php $nn = json_decode($option->value); @endphp +
+
+ {{ $option->display }} +
+ + @foreach ($nn as $value) +
+ display) && $option->display != $option->display ? 'checked' : '' }}> + +
+ @endforeach +
+ @endforeach +
+
+ @break + @case('checkbox') + @foreach($question->options as $option) +
+ value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked':''}}> + +
+ @endforeach + @break + @case('file') + @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) ) + required == 'yes'?'required':'' }}> + @elseif(isset($question->value)) + + @endif + + @break + @case('multitextbox') +
+ @foreach($question->options as $option) +
{{$option->display}}
+
+ +
+ @endforeach +
+ @break + @endswitch +
+ @endforeach + @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) ) +
+ +
+ @endif +
+ +
+
+ + + + +
+
+ +
+ +
+ + +@include('layouts.shared/footer-script') + + + + + \ No newline at end of file diff --git a/resources/views/form/rapport-pulmocare/1782389252-e11e0cc2-5c8a-4952-9678-129b145e265a.blade.php b/resources/views/form/rapport-pulmocare/1782389252-e11e0cc2-5c8a-4952-9678-129b145e265a.blade.php new file mode 100644 index 00000000..5e43a2a5 --- /dev/null +++ b/resources/views/form/rapport-pulmocare/1782389252-e11e0cc2-5c8a-4952-9678-129b145e265a.blade.php @@ -0,0 +1,396 @@ + + + + @include('layouts.shared/title-meta', ['title' => "Form"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + +
+ processing... +
+ +
+
+
+
+
+
+ + @if(Session::has('error'))
{{Session::get('error')}}
+
@endif + @if(session('success'))
{{ session('success') }} +
+
@endif +
+

{{$form->title}}

+
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) ) +
+ @if($form->link_type == 'form') + View History + @else + Back + @endif +
+ @endif + @if(isset($form->user_info)) +
+
Submitted By: {{$form->user_info->name}}
+
+ @endif +
+ + @csrf + @if($id) + + @endif + @if(isset($form->manager_can_submit) && $form->manager_can_submit == true) +
+ + + +
+ @endif + + @foreach($questions as $question) +
+ + @switch($question->type) + @case('hidden') + + @break + @case('text') + @case('email') + @case('tel') + required == 'yes'?'required':'' }} + {{ in_array($question->code, ['speciality','msl_code']) ? 'readonly' : '' }} + value="{{isset($question->value)?$question->value:''}}"> + @break + @case('date') + required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:''}}"> + @break + @case('time') + required == 'yes' ? 'required' : ''}} + value="{{ isset($question->value) ? $question->value : '' }}" + step="60"> + @break + @case('number') + required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:0}}"> + @break + @case('textarea') + + @break + @case('dropdown') + + @break + @case('radio') + @foreach($question->options as $option) +
+ + +
+ @endforeach + @break + @case('radiometrix') + @php + // Decode the first option's value to use as heading labels + $headings = + count($question->options) > 0 + ? json_decode($question->options[0]->value) + : []; + @endphp + + {{-- Matrix Wrapper with Horizontal Scroll on Small Screens --}} +
+
+ {{-- Table Headers --}} +
+
+ {{-- Placeholder for row labels --}} + @foreach ($headings as $head) +
{{ $head }} +
+ @endforeach +
+ + {{-- Table Rows --}} + @foreach ($question->options as $option) + @php $nn = json_decode($option->value); @endphp +
+
+ {{ $option->display }} +
+ + @foreach ($nn as $value) +
+ display) && $option->display != $option->display ? 'checked' : '' }}> + +
+ @endforeach +
+ @endforeach +
+
+ @break + @case('checkbox') + @foreach($question->options as $option) +
+ value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked':''}}> + +
+ @endforeach + @break + @case('file') + @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) ) + required == 'yes'?'required':'' }}> @elseif(isset($question->value)) + + @endif + + @break + @case('multitextbox') +
+ @foreach($question->options as $option) +
{{$option->display}}
+
+ +
+ @endforeach +
+ @break + + + @endswitch +
+ @endforeach + @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) ) +
+ +
+ @endif +
+ +
+
+ + + + +
+
+ +
+ +
+ + +@include('layouts.shared/footer-script') + + + + + \ No newline at end of file diff --git a/resources/views/form/rapport-team4/1781090899-2cedf382-9fbb-45ac-896b-94de9104a11b.blade.php b/resources/views/form/rapport-team4/1781090899-2cedf382-9fbb-45ac-896b-94de9104a11b.blade.php index a82d905e..79190679 100644 --- a/resources/views/form/rapport-team4/1781090899-2cedf382-9fbb-45ac-896b-94de9104a11b.blade.php +++ b/resources/views/form/rapport-team4/1781090899-2cedf382-9fbb-45ac-896b-94de9104a11b.blade.php @@ -590,6 +590,14 @@ select option:disabled { prefillDoctorTableSection($(this), $(this).data('category')); }); } + function refreshAllDropdownRules(){ + updateDoctorDropdowns(); + updateOtherMoleculeOptions(); + + $('.doctor-row').each(function(){ + toggleOtherMoleculeRxSupport($(this)); + }); + } function checkOtherRxHeader(){ let visible = false; @@ -991,7 +999,7 @@ function updateOtherMoleculeOptions() { }); } - function updateOtherMoleculeDropdowns($tbody) { + /* function updateOtherMoleculeDropdowns($tbody) { let sectionMolecule = $tbody.data('molecule-use'); $tbody.find('.other-molecule-select').each(function() { @@ -1011,7 +1019,7 @@ function updateOtherMoleculeOptions() { } }); }); - } + }*/ function buildSubmitFormData() { let fd = new FormData(); @@ -1101,21 +1109,51 @@ function updateOtherMoleculeOptions() { }); prefillAllDoctorTables(); + refreshAllDropdownRules(); - /* $('.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(); + let isValid = true; + let errorMsg = ''; + + $('.doctor-row').each(function(index){ + + let doctor = $(this).find('.doctor-select').val(); + let rx = $(this).find('.rx-support-select').val(); + let other = $(this).find('.other-molecule-select').val(); + let otherRx = $(this).find('.other-molecule-rx-support').val(); + + if(!doctor || !rx || !other){ + isValid = false; + errorMsg = 'Please fill all Doctor, Rxn/Week Support and Other Molecule Use fields.'; + return false; + } + + if(other !== 'No' && !otherRx){ + isValid = false; + errorMsg = 'Please fill Other Molecule Rxn/Week Support.'; + return false; + } + + }); + + if(!isValid){ + Swal.fire({ + icon: 'warning', + title: 'Validation Error', + text: errorMsg + }); + return; + } $("#pageloader").fadeIn(); $.ajax({ diff --git a/resources/views/form/rapport-titans/personalization-1782118020-9c6160bf-f07c-465e-9ea1-e8ff0c0b89dd.blade.php b/resources/views/form/rapport-titans/personalization-1782118020-9c6160bf-f07c-465e-9ea1-e8ff0c0b89dd.blade.php new file mode 100644 index 00000000..26c08fd3 --- /dev/null +++ b/resources/views/form/rapport-titans/personalization-1782118020-9c6160bf-f07c-465e-9ea1-e8ff0c0b89dd.blade.php @@ -0,0 +1,496 @@ + + + + @include('layouts.shared/title-meta', ['title' => "Form"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + + + +
+ processing... +
+@php + +$history = Formhelper::getMultiformData( + $form->partition, + $form_id, + $form->user_id +); + +$historyData = []; + +if(isset($history->data->submissions) && is_iterable($history->data->submissions)){ + + foreach($history->data->submissions as $sub){ + + $formdata = $sub->formdata ?? null; + + if(!$formdata){ + continue; + } + + // Doctor Name + $doctorName = ''; + + if(!empty($formdata->doctor_name)){ + if(is_array($formdata->doctor_name) || $formdata->doctor_name instanceof \Traversable){ + $doctorName = trim((string)(array_values((array)$formdata->doctor_name)[0] ?? '')); + }else{ + $doctorName = trim((string)$formdata->doctor_name); + } + } + + // Date + $recordDate = ''; + + if(!empty($formdata->record_date)){ + if(is_array($formdata->record_date) || $formdata->record_date instanceof \Traversable){ + $recordDate = trim((string)(array_values((array)$formdata->record_date)[0] ?? '')); + }else{ + $recordDate = trim((string)$formdata->record_date); + } + } + + $historyData[] = [ + 'submission_id' => $sub->id, + 'date' => $recordDate, + 'doctor' => $doctorName, + 'status' => ucfirst($sub->workflow_status ?? ''), + ]; + } +} + + +@endphp +{{--
+{{ print_r($history->data->submissions[0], true) }}
+
--}} + +
+
+
+
+
+
+ + @if(Session::has('error'))
{{Session::get('error')}}
+
@endif + @if(session('success'))
{{ session('success') }} +
+
@endif +
+

{{$form->title}}

+
+
+ + + +
+
+
Select any one of the templates
+ @foreach($personalizations as $pers) +
+
+ {{$pers->title}} +
+ @endforeach +
+ +
+
+ + + @csrf +
+
+ +
+
+ +
+
+ @foreach($questions as $question) +
+ + @switch($question->type) + @case('hidden') + + @break + @case('text') + @case('email') + @case('tel') + @case('date') + + @break + @case('number') + + @break + @case('textarea') + + @break + @case('dropdown') + + @break + @case('checkbox') + @foreach($question->options as $option) +
+ value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked':''}}> + +
+ @endforeach + @break + @case('file') + +

500MB Max File size

+ @break + @case('multitextbox') +
+ @foreach($question->options as $option) +
{{$option->display}}
+
+ +
+ @endforeach +
+ @break + @endswitch +
+ @endforeach + @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) ) +
+ +
+ @endif +
+
+ +
+
+
+ + @csrf +
+
+ +
+
+ {{-- --}} + +
+
+
+ +
+
+ @if(count($historyData)) + +
+ +
History
+ +
+ + + + + + + + + + + + + {{--
+                                {{ print_r($historyData, true) }}
+                                
--}} + + @foreach($historyData as $row) + + + + + + + + + + + + + + @endforeach + + + +
DateDoctor NameStatusAction
{{ $row['date'] }}{{ $row['doctor'] }}{{ ucfirst($row['status']) }} + + @if(strtolower($row['status']) == 'approved') + + + Download + + + @endif + +
+
+ + @endif +
+ +
+
+ + + + +
+
+ +
+ +
+ + +@include('layouts.shared/footer-script') + + + + + + + \ No newline at end of file