diff --git a/resources/views/form/rapport-arise/1779187275-848fd8f3-6ea2-4521-9d85-85ec424fa8d5-history.blade.php b/resources/views/form/rapport-arise/1779187275-848fd8f3-6ea2-4521-9d85-85ec424fa8d5-history.blade.php
new file mode 100644
index 00000000..f065fd29
--- /dev/null
+++ b/resources/views/form/rapport-arise/1779187275-848fd8f3-6ea2-4521-9d85-85ec424fa8d5-history.blade.php
@@ -0,0 +1,188 @@
+
+
+
+ @include('layouts.shared/title-meta', ['title' => "History"])
+ @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
+
+
+
+
+
+
+
+
+
+ @if(session()->has('message'))
+
+ {{ session()->get('message') }}
+
+ @endif
+ @if(session()->has('error'))
+
+ {{ session()->get('error') }}
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+ | Submission Date |
+ @foreach($questions as $code => $question)
+ @if($question->type == 'hidden')
+ @continue;
+ @endif
+ {{$question->label}} |
+ @endforeach
+ Action |
+
+
+
+ @foreach($submissions as $submission)
+
+ | {{date("d M Y", strtotime($submission->updatedAt))}} |
+ @foreach($questions as $code => $question)
+ @if($question->type == 'hidden')
+ @continue;
+ @endif
+ @if($question->type == 'file')
+ Download |
+
+ @elseif($question->type == 'radiometrix' && isset($submission->formdata->{$code}) && is_object($submission->formdata->{$code}))
+
+ {{ collect((array)$submission->formdata->{$code})->map(function($val, $key){ return "$key: $val"; })->implode(', ') }}
+ |
+
+ @elseif(count((array)$question->options) > 0 && 1==2 )
+ {{ $question->options->{ $submission->formdata->{$code} } }} |
+ @else
+ {{ isset($submission->formdata->{$code}) ? is_array($submission->formdata->{$code})? implode(', ', $submission->formdata->{$code}) :$submission->formdata->{$code} : $code }} |
+ @endif
+ @endforeach
+
+
+ @if($question->can_edit == 'yes' || sizeof($submission->workflow_approvals) == 0 )
+
+ @if($submission->workflow == 'yes' && $submission->workflow_status == 'approved')
+
+ Approved
+
+ @else
+
+ {{-- EDIT BUTTON COMMENTED --}}
+ {{--
+
+ Edit
+
+ --}}
+
+ @if(true)
+
+
+
+
+
+ @endif
+
+ @endif
+
+ @endif
+
+ |
+
+ @endforeach
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @include('layouts.shared/footer-script')
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/views/form/rapport-arise/1779187275-848fd8f3-6ea2-4521-9d85-85ec424fa8d5.blade.php b/resources/views/form/rapport-arise/1779187275-848fd8f3-6ea2-4521-9d85-85ec424fa8d5.blade.php
index a39d65ad..11656756 100644
--- a/resources/views/form/rapport-arise/1779187275-848fd8f3-6ea2-4521-9d85-85ec424fa8d5.blade.php
+++ b/resources/views/form/rapport-arise/1779187275-848fd8f3-6ea2-4521-9d85-85ec424fa8d5.blade.php
@@ -58,6 +58,21 @@
@endif
@foreach($questions as $question)
+ @php
+
+ $hideFields = [
+ 'date',
+ 'contact_id',
+ 'converted'
+ ];
+
+ @endphp
+
+ @if(in_array($question->code, $hideFields))
+
+ @continue
+
+ @endif
@switch($question->type)
@@ -97,8 +112,12 @@
// Decode the first option's value to use as heading labels
$headings =
count($question->options) > 0
- ? json_decode($question->options[0]->value)
+ ? json_decode($question->options[0]->value, true)
: [];
+
+ if(!is_array($headings)){
+ $headings = [];
+ }
@endphp
{{-- Matrix Wrapper with Horizontal Scroll on Small Screens --}}
@@ -116,7 +135,14 @@
{{-- Table Rows --}}
@foreach ($question->options as $option)
- @php $nn = json_decode($option->value); @endphp
+ @php
+ $nn = json_decode($option->value, true);
+
+ // fallback if invalid json
+ if(!is_array($nn)){
+ $nn = [];
+ }
+ @endphp
@@ -181,10 +207,173 @@
@endforeach
@if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) )
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Doctor Name |
+ Speciality |
+ Number of Rx |
+ MSL Code |
+ Action |
+
+
+
+
+
+
+
+ |
+ No Doctors Found
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
@endif
+
+
+
@@ -230,14 +419,98 @@