From 1212b40ea7a9b8d6ccbd1402e104159ed8199fe8 Mon Sep 17 00:00:00 2001 From: zeeshan Date: Wed, 16 Sep 2026 17:17:12 +0530 Subject: [PATCH] Demo (3 Forms Speciality Change) --- ...0b23-c3b5-4b9c-a2dd-681c5787a16c.blade.php | 18 +- ...ef51-3671-4205-9650-fa171e1516e4.blade.php | 20 +- ...0a2b-56a9-471f-94f7-03309bb8f1ec.blade.php | 681 ++++++++++++++++++ 3 files changed, 700 insertions(+), 19 deletions(-) create mode 100644 resources/views/form/rapport-demo/1785569298-6e800a2b-56a9-471f-94f7-03309bb8f1ec.blade.php diff --git a/resources/views/form/rapport-demo/1706001346-9b6b0b23-c3b5-4b9c-a2dd-681c5787a16c.blade.php b/resources/views/form/rapport-demo/1706001346-9b6b0b23-c3b5-4b9c-a2dd-681c5787a16c.blade.php index 56cfb5c2..58db1b5e 100644 --- a/resources/views/form/rapport-demo/1706001346-9b6b0b23-c3b5-4b9c-a2dd-681c5787a16c.blade.php +++ b/resources/views/form/rapport-demo/1706001346-9b6b0b23-c3b5-4b9c-a2dd-681c5787a16c.blade.php @@ -83,15 +83,15 @@ diff --git a/resources/views/form/rapport-demo/1772642221-f77aef51-3671-4205-9650-fa171e1516e4.blade.php b/resources/views/form/rapport-demo/1772642221-f77aef51-3671-4205-9650-fa171e1516e4.blade.php index 6d2305a9..b95f82f2 100644 --- a/resources/views/form/rapport-demo/1772642221-f77aef51-3671-4205-9650-fa171e1516e4.blade.php +++ b/resources/views/form/rapport-demo/1772642221-f77aef51-3671-4205-9650-fa171e1516e4.blade.php @@ -208,20 +208,20 @@ @foreach ($question->options as $option) @if($question->code=='contact_id') - @php $spec = $option->contact->speciality ?? ''; @endphp - @if (in_array($spec, ['CONSULTING PHYSICIAN', 'CARDIOLOGIST', 'GENERAL PHYSICIAN', 'ORTHOPEDIC', 'CHEST PHYSICIAN', 'DERMATOLOGIST','COSMETOLOGIST','ENT','ANESTHESIOLOGIST','SURGEON','CARDIOLOGIST','GP NON MBBS'])) + + - @endif + @else @endif @@ -309,20 +309,20 @@ @foreach ($question->options as $option) @if($question->code=='contact_id') - @php $spec = $option->contact->speciality ?? ''; @endphp - @if (in_array($spec, ['CONSULTING PHYSICIAN', 'CARDIOLOGIST', 'GENERAL PHYSICIAN', 'ORTHOPEDIC', 'CHEST PHYSICIAN', 'DERMATOLOGIST','COSMETOLOGIST','ENT','ANESTHESIOLOGIST','SURGEON','CARDIOLOGIST','GP NON MBBS'])) + + - @endif + @else @endif diff --git a/resources/views/form/rapport-demo/1785569298-6e800a2b-56a9-471f-94f7-03309bb8f1ec.blade.php b/resources/views/form/rapport-demo/1785569298-6e800a2b-56a9-471f-94f7-03309bb8f1ec.blade.php new file mode 100644 index 00000000..559ed3f0 --- /dev/null +++ b/resources/views/form/rapport-demo/1785569298-6e800a2b-56a9-471f-94f7-03309bb8f1ec.blade.php @@ -0,0 +1,681 @@ + + + + + @include('layouts.shared/title-meta', ['title' => "Form"]) + @include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? '']) + + + +
+ processing... +
+@php +$brandData = [ + +['brand'=>'Osteri', 'slug'=>'osteri_units','pseudoId'=>'osteri_pts','pseudoId2'=>'osteri_value'], +['brand'=>'Denmab', 'slug'=>'brand_2_units','pseudoId'=>'brand_2_pts','pseudoId2'=>'brand_2_value'] + + + +]; + +@endphp + +@php + $submissions = Formhelper::getMultiformData($form->partition, $form_id, $form->user_id); + // $submission = null; + // if(isset($submissions->data->submissions) && count($submissions->data->submissions) > 0) { + // $submission = $submissions->data->submissions[0]; + // $formdata = $submission->formdata ?? (object)[]; + // } else { + // $formdata = []; + // } + + $formdata = null; + +if (!empty($submissions->data->submissions)) { + foreach ($submissions->data->submissions as $submission) { + if ($submission->id == $id) { + $formdata = $submission->formdata ?? null; + break; + } + } +} + + + + +@endphp + + + +
+
+
+
+
+
+ + @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('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($brandData as $brand) + + + + + + + + + + @endforeach + +
BrandPOB UnitsUnit ValuePOB Value
{{ $brand['brand'] }} + + + + + +
+
+ + +
+ @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