diff --git a/resources/views/form/rapport-titans/1781584303-cf62bee0-3c63-4070-9781-113989593655.blade.php b/resources/views/form/rapport-titans/1781584303-cf62bee0-3c63-4070-9781-113989593655.blade.php index 250f2f79..facaa13d 100644 --- a/resources/views/form/rapport-titans/1781584303-cf62bee0-3c63-4070-9781-113989593655.blade.php +++ b/resources/views/form/rapport-titans/1781584303-cf62bee0-3c63-4070-9781-113989593655.blade.php @@ -38,6 +38,25 @@
Submitted By: {{$form->user_info->name}}
@endif + @php + $taggedDoctorCount = 0; + + foreach ($questions as $question) { + if ($question->code == 'contact_id') { + foreach ($question->options as $option) { + if ( + isset($option->contact->synchrobreathe_tagged) && + $option->contact->synchrobreathe_tagged == 'yes' + ) { + $taggedDoctorCount++; + } + } + } + } + + $isTaggingComplete = ($taggedDoctorCount == 20); + @endphp + @if($isTaggingComplete)
@@ -75,31 +94,23 @@ @case('dropdown') - @break + @break @case('checkbox') @foreach($question->options as $option)
@@ -145,6 +156,7 @@
@endif
+ @endif @@ -179,6 +191,19 @@ @include('layouts.shared/footer-script') +@if(!$isTaggingComplete) + +@endif +@if(!$isTaggingComplete) + +@endif + + + + + + + diff --git a/resources/views/form/rapport-titans/1783592761-385f2d70-3f73-4a98-bda4-76264d8b3332-history.blade.php b/resources/views/form/rapport-titans/1783592761-385f2d70-3f73-4a98-bda4-76264d8b3332-history.blade.php new file mode 100644 index 00000000..6ee76b52 --- /dev/null +++ b/resources/views/form/rapport-titans/1783592761-385f2d70-3f73-4a98-bda4-76264d8b3332-history.blade.php @@ -0,0 +1,106 @@ + + + + @include('layouts.shared/title-meta', ['title' => "History"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + + +
+
+ + ` +
+
+

{{$formname}}

+
+ +
+ + @if(session()->has('message')) +
+ {{ session()->get('message') }} +
+ @endif + @if(session()->has('error')) +
+ {{ session()->get('error') }} +
+ @endif +
+
+
+
+
+
+
+ + + + + @foreach($questions as $code => $question) + @if($question->type == 'hidden') + @continue; + @endif + + @endforeach + + + + + @foreach($submissions as $submission) + + + @foreach($questions as $code => $question) + @if($question->type == 'hidden') + @continue; + @endif + @if($question->type == 'file') + + + @elseif($question->type == 'radiometrix' && isset($submission->formdata->{$code}) && is_object($submission->formdata->{$code})) + + + @elseif(count((array)$question->options) > 0 && 1==2 ) + + @else + + @endif + @endforeach + + + @endforeach + +
Submission Date{{$question->label}}Action
{{date("d M Y", strtotime($submission->updatedAt))}} Download + {{ collect((array)$submission->formdata->{$code})->map(function($val, $key){ return "$key: $val"; })->implode(', ') }} + {{ $question->options->{ $submission->formdata->{$code} } }}{{ isset($submission->formdata->{$code}) ? is_array($submission->formdata->{$code})? implode(', ', $submission->formdata->{$code}) :$submission->formdata->{$code} : $code }} + @if($question->can_edit == 'yes' || sizeof($submission->workflow_approvals) == 0 ) + @if($submission->workflow == 'yes' && $submission->workflow_status == 'approved' ) +

Approved

+ @else + {{-- Edit --}} + @if(isset($form->allow_delete_by_user) && $form->allow_delete_by_user == 'yes') + Delete + @endif + @endif + @endif +
+
+ +
+
+ +
+
+
+
+ +
+ +
+ + @include('layouts.shared/footer-script') + + \ No newline at end of file diff --git a/resources/views/form/rapport-titans/1783592761-385f2d70-3f73-4a98-bda4-76264d8b3332.blade.php b/resources/views/form/rapport-titans/1783592761-385f2d70-3f73-4a98-bda4-76264d8b3332.blade.php new file mode 100644 index 00000000..57626c41 --- /dev/null +++ b/resources/views/form/rapport-titans/1783592761-385f2d70-3f73-4a98-bda4-76264d8b3332.blade.php @@ -0,0 +1,614 @@ + + + + + + + + + @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 + + @php + $submissions = Formhelper::getMultiformData( $form->partition, $form_id, $form->user_id); + $submissions = $submissions->data->submissions; + + + @endphp + @if(count($submissions)===0 || $id) +
+ + @csrf + @if($id) + + @endif + @if(isset($form->manager_can_submit) && $form->manager_can_submit == true) +
+ + + +
+ @endif + @foreach($questions as $question) + @if( !in_array($question->code, + ["record_date","select_rxber_type"] ) ) + @continue; + @endif +
+ + @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 + @endswitch +
+ @endforeach + @for($i = 0; $i < 20; $i++) +
+ + @foreach($questions as $question) + @if( in_array($question->code, + ["record_date","select_rxber_type"] ) ) + @continue; + @endif +
+ + @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('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 +
+ @endfor +
+ +
+ @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != + 'yes' ) ) +
+ {{-- @if(!$id) + + @endif --}} + +
+ @endif +
+ @elseif(!$id) +

You have submitted 20 doctors

+ @endif +
+
+ + + + +
+
+ +
+ +
+ + + @include('layouts.shared/footer-script') + + + + + + + + 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 index 26c08fd3..483b47ba 100644 --- 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 @@ -1,4 +1,5 @@ + @include('layouts.shared/title-meta', ['title' => "Form"]) @@ -12,60 +13,54 @@ @php -$history = Formhelper::getMultiformData( - $form->partition, - $form_id, - $form->user_id -); +$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){ +foreach($history->data->submissions as $sub){ - $formdata = $sub->formdata ?? null; + $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 ?? ''), - ]; + 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 ?? ''), +'submission' => $sub, + +];}} + +@endphp{{--
{{ print_r($history->data->submissions[0], true) }}
--}} -@endphp -{{--
-{{ print_r($history->data->submissions[0], true) }}
-
--}}
@@ -74,199 +69,211 @@ if(isset($history->data->submissions) && is_iterable($history->data->submissions
- @if(Session::has('error'))
{{Session::get('error')}}
-
@endif - @if(session('success'))
{{ session('success') }} + @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}}
-
@endif -
-

{{$form->title}}

-
-
+ @endforeach +
- - -
-
-
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 -
+
+ + + + @if(isset($id) && $id) + + @endif + @csrf +
+
+ +
+
+ +
+
+ @foreach($questions as $question) +
+ + @switch($question->type) + @case('hidden') + @break - @endswitch + @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
- @endforeach - @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) ) -
- + @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) + + + + + + + + + + -
History
+ -
-
DateDoctor NameStatusAction
{{ $row['date'] }}{{ $row['doctor'] }}{{ ucfirst($row['status']) }} + + @if(strtolower($row['status']) == 'approved') + + + Download + + + @elseif(strtolower($row['status']) == 'rejected') + + + @endif - - - - -
-
- - @csrf -
-
- -
-
- {{-- --}} - -
-
-
- -
-
- @if(count($historyData)) -
+
+ @endforeach - - - - - - - - + - - {{--
-                                {{ print_r($historyData, true) }}
-                                
--}} +
DateDoctor NameStatusAction
+
- @foreach($historyData as $row) + @endif +
- +
+
+ - {{ $row['date'] }} + - {{ $row['doctor'] }} - - {{ ucfirst($row['status']) }} - - - - @if(strtolower($row['status']) == 'approved') - - - Download - - - @endif - - - - - - @endforeach - - - - -
- - @endif -
- -
-
- - - - -
-
- +
- + - + + + + + @include('layouts.shared/footer-script') + + + + + \ No newline at end of file diff --git a/resources/views/form/rapport-titans/preview-1782118020-9c6160bf-f07c-465e-9ea1-e8ff0c0b89dd.blade.php b/resources/views/form/rapport-titans/preview-1782118020-9c6160bf-f07c-465e-9ea1-e8ff0c0b89dd.blade.php index 6c158b10..5336a5b5 100644 --- a/resources/views/form/rapport-titans/preview-1782118020-9c6160bf-f07c-465e-9ea1-e8ff0c0b89dd.blade.php +++ b/resources/views/form/rapport-titans/preview-1782118020-9c6160bf-f07c-465e-9ea1-e8ff0c0b89dd.blade.php @@ -1,4 +1,5 @@ + @include('layouts.shared/title-meta', ['title' => "Form"]) @@ -16,187 +17,237 @@
- @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 -
+ @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 - @if(isset($form->user_info)) -
-
Submitted By: {{$form->user_info->name}}
-
- @endif - - @php - /* echo "
";
-                            print_r($submitted_formdata);
-                            echo "
"; */ - $skuData = []; +
+ @endif + @if(isset($form->user_info)) +
+
Submitted By: {{$form->user_info->name}}
+ @if(isset($form->is_approval) && $form->is_approval == 'yes') + @if(isset($submitted_formdata->genareted_image[0])) - foreach($questions as $q){ - if($q->code === 'sku'){ - foreach($q->options as $opt){ - $skuData[$opt->value] = $opt->submitted_value ?? 0; - } + @php + $imageUrl = asset('storage/personalized/'.$submitted_formdata->form_id.'/'.$submitted_formdata->genareted_image[0]); + @endphp + +
+ + +
+ +
+ + + + + {{-- --}} + + + + + + + + +
+ + @endif + @endif +
+ @endif + + @php + /* echo "
";
+                        print_r($submitted_formdata);
+                        echo "
"; */ + $skuData = []; + + foreach($questions as $q){ + if($q->code === 'sku'){ + foreach($q->options as $opt){ + $skuData[$opt->value] = $opt->submitted_value ?? 0; } } + } - @endphp + @endphp + + +
+ + + @csrf + @if($id) + + @endif + @if(isset($form->manager_can_submit) && $form->manager_can_submit == true) +
+ + + +
+ @endif - - - - - @csrf - @if($id) - - @endif - @if(isset($form->manager_can_submit) && $form->manager_can_submit == true) + @if(!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 + @endif
- - + @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') + - -
- @endif - - - @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 - @endif -
- - @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('checkbox') + + + @endforeach + + @elseif($question->code=='contact_id_2') + @foreach ($question->options as $option) + + + + @endforeach + + @else + @foreach ($question->options as $option) + + @endforeach + @endif + + @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) -
- value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked':''}}> - +
{{$option->display}}
+
+
@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 --}} +
+ @break --}} - @case('multitextbox') -
- @foreach($question->options as $option) -
{{ $option->display }}
-
- -
- @endforeach + @case('multitextbox') +
+ @foreach($question->options as $option) +
{{ $option->display }}
+
+
- @break - @endswitch -
- @endforeach - @if(!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes' ) ) -
- + @endforeach +
+@break + @endswitch
- @endif - + @endforeach + @endif + @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