@extends('layouts.head_office_app') @section('title', 'Bespoke Form Template') @section('sub-header') {{-- --}} @endsection @section('content')
@include('layouts.error')
Back
@csrf
{{-- --}} @if (isset($form))
@if(isset($form->created_by->user))
@if (isset($form->created_by->user->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $form->created_by->user->name))) }}
@endif
Created by {{ $form->created_by->user->name }} on {{ $form->created_at->format('d/m/Y') }} at {{ $form->created_at->format('h:i A') }}
@elseif (!isset($form->created_by) && $form->submitable_to_nhs_lfpse == true )
@if (isset($head_office->logo)) png_img @endif
Created by {{ $head_office->company_name }} on {{ $form->created_at->format('d/m/Y') }} at {{ $form->created_at->format('h:i A') }}
@endif @if (isset($form->modified_by))
@if (isset($form->modified_by->user->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $form->modified_by->user->name))) }}
@endif
Last modified by {{ $form->modified_by->user->name }} on {{ $form->updated_at->format('d/m/Y') }} at {{ $form->updated_at->format('h:i A') }}
@endif
@endif

General

{{--
--}}
This text helps the person filling out the form understand its purpose. This will be displayed to the responder
Once this date is reached, the form will expire, and user will no longer be able to submit entries
expiry_state != 'never_expire' ? '' : 'disabled' }} value='{{ isset($form) ? $form->expiry_time : null }}'>
expiry_state == 'expiry_time' ? '' : 'checked' }}> {{-- --}}
Forms saved in the timeline or linked to a case will be highlighted with this color to make them easy to spot
color_code) value="{{ $form->color_code }}" @endif id="color_code" name="color_code">

Type

The form will be displayed under this category when being completed on site
@isset($form) @livewire('category-manager', ['form_id' => $form->id]) @else @livewire('category-manager', ['form_id' => null]) @endisset {{-- --}}
is_external_link ? '' : 'checked' }} @endif id="is_external_link" name="is_external_link" {{ !isset($form) ? 'checked' : '' }}>
@if(!empty($url) && !empty($form->external_link))
company_name) }}'>
@endif
{{-- This will generate a QR code for this form, which site users can access and print. Submissions made using this QR code will be linked to the site account. If submissions are set to be saved in the timeline,they wil be automatically recorded there. --}}
generate_qr_code) checked @endif>
@if(isset($form) && $form->generate_qr_code) @endif
add_to_case_manager ? 'checked' : '' }} @endif name="add_to_case_manager">
hide_in_company_timeline ? 'checked' : '' }} @endif name="hide_in_company_timeline">

Display in timeline

show_in_site_timeline_site == 1) checked @endif> show_in_site_timeline_site == 0) checked @endif>
show_in_site_timeline_company == 1) checked @endif> show_in_site_timeline_company == 0) checked @endif>
show_in_contact_timeline_company == 1) checked @endif> show_in_contact_timeline_company == 0) checked @endif>
@if (isset($form)) @php $record = $form; $data_objects = []; if ($record->form_json) { $questionsJson = json_decode($record->form_json, true); if (isset($questionsJson['pages']) && count($questionsJson['pages']) > 0) { foreach ($questionsJson['pages'] as $pageIndex => $page) { if ($page['items'] && count($page['items']) > 0) { foreach ($page['items'] as $itemIndex => $item) { if ( isset( $item['label'], $item['input'], $item['input']['type'], $item['input']['is_display_case'], ) ) { $type = $item['input']['type']; $is_display_case = $item['input']['is_display_case']; $is_display_summary = isset($item['input']['is_display_summary']) ? $item['input']['is_display_summary'] : false; $data_objects[] = [ 'label' => $item['label'], 'is_display_case' => $is_display_case, 'is_display_summary' => $is_display_summary, 'pageIndex' => $pageIndex, 'itemIndex' => $itemIndex, 'pageName' => $page['name'], ]; } } } } } } @endphp @php $is_display_case_data_objects = array_filter($data_objects, function ($data) { return $data['is_display_case']; }); $is_display_summary_data_objects = array_filter($data_objects, function ( $data, ) { return $data['is_display_summary']; }); @endphp

Site Timeline

If the form is an internal Form and has been set to be displayed in the site account timeline, select which fields in the account timeline, select which fields from the form will appear as a summary when the form is submitted
@if (count($is_display_summary_data_objects) > 0) @foreach ($is_display_summary_data_objects as $data) @endforeach
Page Question Actions
{{ $data['pageName'] }} {{ $data['label'] }}
@else

No fields assigned

@endif
@endif

Limit by

Control how many times the form can be submitted. You can set limits based on total submissions, submissions per site, or submissions per individual user
active_limit_by_amount ? 'checked' : '' }}>

No of submissions

amount_total_max_res ? 'checked' : '' }}>
{{--

Limit by User

--}}
limit_to_one_user ? 'checked' : '' }}> {{-- --}}
{{--

Limit by Location

--}}
limit_to_one_location ? 'checked' : '' }}> {{-- --}}
active_limit_by_period ? 'checked' : '' }}>

By period

limit_by_period_max_state != 'off' ? 'checked' : '' }}>
limit_by_period_min_state != 'off' ? 'checked' : '' }}>

Allow form to be printed

allow_print_by_site_team == true ? 'checked' : '' }}>
allow_print_by_company_user == true ? 'checked' : '' }}>

Reporting from Site

Allow Responder to access the form immediately after signing into the site account, without requiring to login as a user. Note that responder details won't be automatically captured upon form submission. A QR code can also be generated for easy access on a mobile device is_quick_report == true ? 'checked' : '' }}>
This will generate a QR code for this form, which site users can access and print. Submissions made using this QR code will be linked to the site account. If submissions are set to be saved in the timeline,they wil be automatically recorded there.
is_qr_code == true ? 'checked' : '' }}>
show_submission_loc == true ? 'checked' : '' }}>
Determine if a form can be edited after submission and specify the time for edits. Forms can only be edited by the responder if saved to the timeline.
allow_editing_state != 'disable' ? 'checked' : '' }}>
{{-- @dd($form) --}} @php $allow_editing_checked = false; $limit_by_checked = false; if (isset($form)) { $allow_editing_checked = $form->allow_editing_state == 'always' || $form->allow_editing_time == null; $limit_by_checked = $form->allow_editing_time !== null; if ($limit_by_checked) { $allow_editing_checked = false; } } @endphp
Allow responders to submit updates to a form, enabling them to provide additional information. Updates are only possible for submissions saved to the timeline allow_responder_update == 1 ? 'checked' : '' }}>
allow_delete_submission == 1 ? 'checked' : '' }}>
{{-- Conditional Limit Section --}}
Forms started in the site account can be saved as drafts. Users can later complete and submit these forms from their user accounts while off-site
allow_drafts_off_site == 1 ? 'checked' : '' }}>
You can schedule forms for completion, and site users will be notified to complete them
schedule_state != 'optional' ? 'checked' : '' }}>
@if (isset($form) && $form->schedule_state == 'optional') {{--

Please activate the schedule

--}} @endif {{-- schedule_state == 'optional' ? 'readonly' : '' }} value='{{ isset($form) ? $form->schedule_time : null }}'> --}}
{{-- --}} {{--
schedule_state == 'day' ? 'checked' : '' }} --}} {{--
--}} {{--
schedule_state == 'date' ? 'checked' : '' }} {{--
--}}
@if (isset($form))
@livewire('day-scheduler', ['form_id' => $form->id])
@foreach ($form->calenderEvent as $event) @endforeach
Date Times Repeat
{{ \Carbon\Carbon::parse($event->start_date)->isoFormat('Do MMM YYYY') }} {{ json_encode($event->times) }} {{ $event->repeat_state == 'off' ? 'No' : $event->repeat_state }}
@livewire('calender', ['form_id' => $form->id])
@else

Please save the form to edit schedule

@endif
{{--

Please select internal type to edit these settings

--}}
{{--
--}}
{{--

Please add stages to your form

@csrf
@foreach ($form->stages as $stage) @endforeach
Stage Name Arrange Question in Groups Action
@foreach ($stage->groups as $group)

{{ substr($group->group_name, 0, 50) }} Create Questions

@endforeach
Stage Groups Delete Stage
--}}
@if (isset($form) && $form->name != 'Near Miss')

Case Settings


@include('head_office.be_spoke_forms.new_form_template',['form' => $form ?? ''])
Case Status
{{-- --}} @foreach($statuses as $status) @if ($status->form_id == $form->id) @if($status->status == 'In Progress') @else @endif @endif @endforeach
StatusActiveActions
New
{{-- --}}
Final Approval
{{-- --}}
Complete {{-- Complete --}} This will close the case and mark it as Complete
{{-- --}}
New Update Set when a closed case is updated by a site; the case reopens with this status
In Progress
{{ $status->status }}
{{-- --}} @if($status->status != 'In Progress') @endif
{{-- --}}
Manage cases efficiently by organising them into stages and tasks. Task are automatically created and assigned to case investigators when a case is generated, providing a clear and structured workflow
@if (isset($form)) @foreach ($form->default_stages()->orderBy('label')->get() as $counter => $stage)
{{ $stage->name }}
@php $data = json_decode( $stage->stage_rules, true, ); $startedData = isset($data['started']) && !empty($data['started']) ? $data['started'] : null; $completedData = isset($data['completed']) && !empty($data['completed']) ? $data['completed'] : null; $matchingRecords = []; if (isset($startedData)) { foreach ($startedData as $singleRule) { if ( $singleRule['condition_type'] == 1 ) { if (isset($completedData)) { $filteredArray = array_filter( $completedData, function ($item) { return isset( $item[ 'condition_type' ], ) && $item[ 'condition_type' ] == 1; }, ); } $unique_profiles = []; if ( isset($filteredArray) && !empty($filteredArray) ) { foreach ( $filteredArray as $item ) { $unique_profiles = array_merge( $unique_profiles, array_diff( $singleRule[ 'user_profiles' ], $item[ 'user_profiles' ], ), ); } $unique_profiles = array_unique( $unique_profiles, ); } else { $unique_profiles = $singleRule[ 'user_profiles' ]; } // Retrieve matching records for condition type 1 $matchedProfiles = $form->form_owner ->head_office_user_profiles() ->whereIn( 'id', $unique_profiles, ) ->get(); foreach ( $matchedProfiles as $profile ) { foreach ( $profile->user_profile_assign as $assign ) { if (isset($assign->head_office_user->user)) { $matchingRecords[] = [ 'condition_type' => $singleRule['condition_type'], 'data' => $assign->head_office_user->user, ]; } } } } elseif ( $singleRule['condition_type'] == 2 ) { if (isset($completedData)) { $filteredArrayUsers = array_filter( $completedData, function ($item) { return isset( $item[ 'condition_type' ], ) && $item[ 'condition_type' ] == 2; }, ); } $unique_users = []; if ( isset( $filteredArrayUsers, ) && !empty($filteredArrayUsers) ) { foreach ( $filteredArrayUsers as $item ) { $unique_users = array_merge( $unique_users, array_diff( $singleRule[ 'users' ], $item['users'], ), ); } $unique_users = array_unique( $unique_users, ); } else { $unique_users = $singleRule['users']; } // Retrieve matching users for condition type 2 $matchedUsers = $form ->usersToDisplay() ->whereIn( 'id', $unique_users, ); foreach ( $matchedUsers as $user ) { $matchingRecords[] = [ 'condition_type' => $singleRule[ 'condition_type' ], 'data' => $user, ]; } } elseif ( $singleRule['condition_type'] == 3 && $singleRule[ 'email_user_type' ] == 2 ) { // Retrieve matching records for condition type 3 and email_user_type 2 $matchedProfiles = $form->form_owner ->head_office_user_profiles() ->whereIn( 'id', $singleRule[ 'user_profiles' ], ) ->get(); foreach ( $matchedProfiles as $profile ) { foreach ( $profile->user_profile_assign as $assign ) { foreach ( $assign->head_office_user->get() as $user ) { $matchingRecords[] = [ 'condition_type' => $singleRule[ 'condition_type' ], 'data' => $user->user, ]; } } } } elseif ( $singleRule['condition_type'] == 3 && $singleRule[ 'email_user_type' ] == 1 ) { // Retrieve matching users for condition type 3 and email_user_type 1 $matchedUsers = $form ->usersToDisplay() ->whereIn( 'id', $singleRule['users'], ); foreach ( $matchedUsers as $user ) { $matchingRecords[] = [ 'condition_type' => $singleRule[ 'condition_type' ], 'data' => $user, ]; } } } } @endphp @if (!empty($matchingRecords)) @php $count = 0; @endphp @foreach ($matchingRecords as $record) @if ($count < 2) @php $ho_u_new = $head_office->users ->where( 'user_id', $record['data']->id, ) ->first()->user; @endphp
@if (isset($record['data']->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $record['data']->name))) }}
@endif @if (isset($user)) @include( 'head_office.user_card_component', [ 'user' => $ho_u_new, ] ) @endif
@php $count++; @endphp @endif @endforeach @if (count($matchingRecords) > 2) @endif @endif
@if (!$stage->default_tasks()->count())
{{--
No Task found
--}} @else @foreach ($stage->default_tasks()->orderBy('label')->get() as $key => $task)
@php $tasksUsers = isset($task->type_ids) ? json_decode($task->type_ids) : null; @endphp @if (isset($tasksUsers) && !empty($tasksUsers))
@php $count = 0; @endphp @foreach ($tasksUsers as $task_user) @php $task_selected_user = App\Models\User::find($task_user) @endphp @if ($count < 2 && isset($task_selected_user) )
@if (isset($task_selected_user->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $task_selected_user->name))) }}
@endif
@php $count++; @endphp @endif @endforeach @if (count($tasksUsers) > 2) @endif
@endif

{{ $task->title }}

@if (!empty($task->description))

Description:

{!! $task->description !!}

@endif
@if ($loop->last)
@endif @include( 'head_office.be_spoke_forms.default_case_stage_task', ['stage' => $stage, 'task' => $task] ) @endforeach @endif @include( 'head_office.be_spoke_forms.default_case_stage_task', ['stage' => $stage, 'task' => null] )
@endforeach @endif
{{--

Shared Case Approved Email

--}}

Submission can be securly shared externally, with the option to redact data from forms. Case handlers can communicate directly and securely with the recipient of the shared case details, Access can be revoked either after a srt duration or manually Add New

Share Case

is_allow_non_approved_emails) checked @endif name="is_allow_non_approved_emails" id="is_allow_non_approved_emails"> if selected, case handlers can manually enter an email address to share the case. Otherwise, case can only be shared with the email addresses listed below
@if (isset($form)) @foreach ($form->shared_case_approved_emails as $shared_case_approved_email) @include('head_office.be_spoke_forms.share_case_approved_email', [ 'shared_case_approved_email' => $shared_case_approved_email, ]) @endforeach @endif
Emails Description Actions
{{ $shared_case_approved_email->email }} {{ $shared_case_approved_email->description }}
Allow user to share case log

Default Tasks Add New Task

@if (isset($form)) @foreach ($form->defaultTasks as $task) @endforeach @endif
Task Title Task Description Assign Type Assign To Start Date Deadline Duration Deadline Users Overdue Type Overdue Users Files Action
{{ $task->title }} {{ $task->description }} @if (!$task->type) Users @elseif($task->type == 1) Profiles @else Leave Unassigned @endif {{ $task->profiles ? $task->profiles : 'Leave Unassigned' }} {{ $task->dead_line_start_from }} {{ $task->dead_line_duration }} {{ $task->dead_line_unit }} {{ $task->dead_line }} {{ $task->task_over_due_duration }} {{ $task->task_over_due_unit }} {{ $task->over_due }} @if (count($task->documents)) @endif
@include( 'head_office.be_spoke_forms.default_task', ['task' => $task] )
Upload documents, files, or templates to be displayed when a case is generated. These resources will support case handlers in efficiently managing the case. New Document

Documents & Templates

@if (isset($form) && !count($form->defaultDocuments))

There are no uploaded documents

@else @if (isset($form)) @foreach ($form->defaultDocuments as $key => $document) @include( 'head_office.case_manager.notes.create_documents', ['document' => $document] ) @endforeach @endif @endif
Name Status Description Files Info
{{ $document->title }}
{{ $document->active == true ? 'Live' : 'Not Live' }}
{{ $document->description }}
@if (isset($document->uploadedByUser->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $document->uploadedByUser->name))) }}
@endif
Created by {{ $document->uploadedByUser->name }} on {{ $document->created_at->format('d/m/Y') }} at {{ $document->created_at->format('h:i A') }}
@if (isset($document->updatedByUser))
@if (isset($document->updatedByUser->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $document->updatedByUser->name))) }}
@endif
Last modified by {{ $document->updatedByUser->name }} on {{ $document->updated_at->format('d/m/Y') }} at {{ $document->updated_at->format('h:i A') }}
@endif
{{--

When case closed

--}} @if(isset($form) && isset($auto_close_settings))
@csrf
Automatic Closure
Automation will assign priority values to responses, generating a case priority value. When specific criteria are met, the case will close automatically
is_do_not_tags) checked @endif id="show_tag_selections" name="is_do_not_tags">

If certain tags, do not autoclose case

is_do_not_site) checked @endif id="enable_sites_involved" name="is_do_not_site">
is_do_not_contacts) checked @endif type="checkbox" value="1" id="enable_contacts_involved" name="is_do_not_contacts">
is_do_not_case) checked @endif type="checkbox" value="1" id="enable_case_tags" name="is_do_not_case">
{{--
is_case_close_priority) checked @endif id="is_case_close_priority" name="is_case_close_priority">

Close Case based on case priority value

--}} {{--
--}} {{--
--}}
{{-- Action Details --}} {{-- @if($form) {{-- Reason select --}} {{--
--}} {{-- Reason text --}} {{--
--}} {{-- Feedback section --}} {{--
Provide Feedback
{{-- Reporter feedback --}} {{--
is_external_link == 1) style="display:none;" @endif>
is_feedback_reporter) checked @endif>
--}} {{-- --}} {{--
is_feedback_site) checked @endif>
--}} {{-- --}} {{--
{{-- --}} {{-- @if(!$form->is_external_link == 0)
site_form_submitted_from) checked @endif>
@endif --}} {{-- --}} {{--
site_selected_form) checked @endif>
--}} {{-- --}} {{--
other_site) checked @endif>
--}} {{--
other_users) checked @endif>
{{-- --}} {{-- --}} {{-- --}} {{--
--}} {{--
Forms
@foreach($form->default_stages->flatMap->default_tasks as $form_task)

{{ $form_task->title }}

{{ $form_task->is_mandatory == 1 ? 'Mandatory' : 'Optional' }}
@endforeach
--}} {{--
Tasks
@foreach($form->default_stages->flatMap->default_tasks as $form_task) @php $task_statuses = json_decode($auto_close_settings->backend_form_status ?? '{}', true); $current_status = $task_statuses[$form_task->id] ?? 'to_do'; @endphp

{{ $form_task->title }}

{{ $form_task->is_mandatory == 1 ? 'Mandatory' : 'Optional' }}
@endforeach
--}} {{--
--}} {{-- @endif --}}
Form-Based Rules
Any form questions that assign priority values based on specific conditions are displayed here

Autoclose if:

{{-- --}} @php $autoCloseConditions = $form->get_form_conditions('auto_close_case'); $hasAutoClose = count($autoCloseConditions) > 0; @endphp @foreach ($autoCloseConditions as $conditionData) @php $condition = $conditionData['condition']; @endphp {{-- --}} @endforeach @if (!$hasAutoClose) @endif
Page Field Option
{{ $conditionData['page']['name'] }} {{ $conditionData['item']['label'] }} {{ !empty($condition['if_value']) ? implode(',',(array) $condition['if_value']) : '[]' }}
No autoclose rules configured

Do not autoclose if:

{{-- --}} @php $donotAutoCloseConditions = $form->get_form_conditions('donot_auto_close_case'); $hasDonotAutoClose = count($donotAutoCloseConditions) > 0; @endphp @foreach ($donotAutoCloseConditions as $conditionData) @php $condition = $conditionData['condition']; @endphp {{-- --}} @endforeach @if (!$hasDonotAutoClose) @endif
Page Field Option
{{ $conditionData['page']['name'] }} {{ $conditionData['item']['label'] }} {{ !empty($condition['if_value']) ? implode(',',(array) $condition['if_value']) : '[]' }}
No donot autoclose rules configured
@endif
@isset($form)
@csrf

Final Approval

requires_final_approval) checked @endif id="case_must_review" name="case_must_review">
When a case is marked as closed by the case handler, its closure requires approval from another case investigator

Final Approvers

@php $case_approvers = $form->get_case_approvers(); @endphp @if (isset($case_approvers) && count($case_approvers) > 0)
@foreach ($case_approvers as $app) @if (isset($app['user']))
{{ isset($app['user']->first_name, $app['user']->surname) ? strtoupper($app['user']->first_name[0]) . strtoupper($app['user']->surname[0]) : '' }}
@endif @endforeach
@else

No final approvers have been assigned

@endif {{--
@foreach ($form->form_settings as $sets) @php $location_ids = isset($sets->location_id) ? json_decode($sets->location_id,true) : null; @endphp @if (isset($location_ids)) @foreach ($location_ids as $view) @php $ho_loc = $head_office ->locations() ->find($view); @endphp @isset($ho_loc)
@if ($ho_loc->location->logo) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $ho_loc->location->trading_name))) .implode('',array_map(function ($word) {return strtoupper($word[1]);}, explode(' ', $ho_loc->location->trading_name))) }}
@endif
@endisset @endforeach @endif @endforeach
--}} {{-- @if (!empty($form_json)) @foreach ($form_json['pages'] as $page_index => $page) @foreach ($page['items'] as $item_index => $item) @foreach ($item['input']['conditions'] as $condition_index => $condition) @if ($condition['action_type'] == 'auto_close_case' || $condition['action_type'] == 'donot_auto_close_case') @endif @endforeach @endforeach @endforeach @endif --}} {{--

Logic

--}} @if (!empty($form_json) && isset($form_json['pages']))
Form-Based Rules
Any form questions with specific conditions related to final approval are dispalyed here
@foreach ($form_json['pages'] as $page_index => $page) @foreach ($page['items'] as $item_index => $item) @if (isset($item['input'])) @foreach ($item['input']['conditions'] as $condition_index => $condition) @if ($condition['action_type'] == 'auto_close_case' || $condition['action_type'] == 'donot_auto_close_case') @endif @endforeach @endif @endforeach @endforeach
Page Question Rule Condition Actions
{{ $page['name'] }} {{ $item['label'] }} {{ $condition['action_type'] == 'auto_close_case' ? 'Auto Close Case Immediately Regardless of Priority Value' : 'Do Not Auto Close Case Regardless of Priority Value' }} {{ !empty($condition['if_value']) ? implode(',',(array) $condition['if_value']) : '' }}
@else

There are no form based rules

@endif
@endisset

Involvements Add New Involvement

{{-- --}} @isset($form) @foreach ($form->formCards as $card) {{-- --}} @include( 'head_office.be_spoke_forms.form_card', [ 'card' => $card, 'form_cards' => $form->formCards, ] ) @endforeach @endisset
#TypeName Connected with Action
{{ $loop->iteration }} {{$card->default_card->type}} {{ $card->name }} @foreach ($card->group() as $connected_card) @if ($connected_card->from_card && $connected_card->form_card_id != $card->id) {{ $connected_card->from_card->name }}, @endif @endforeach

Case Investigators
This displays user who can be assigned and manage this case type Add New

@if (isset($ho_user->user_profile_assign->profile->is_manage_team) && $ho_user->user_profile_assign->profile->is_manage_team) @endif @isset($form) @foreach ($form->form_settings->where('be_spoke_form_id', $form->id)->where('is_active', 1) as $setting) @if (isset($ho_user->user_profile_assign->profile->is_manage_team) && $ho_user->user_profile_assign->profile->is_manage_team) @endif {{-- @include( 'head_office.be_spoke_forms.form_card', [ 'card' => $card, 'form_cards' => $form->formCards, ] ) --}} @endforeach @endisset
Locations Case Priority Values
@if (isset($setting->head_office_user->user->logo)) png_img @else
{{ implode('',array_map(function ($word) {return strtoupper($word[0]);}, explode(' ', $setting->head_office_user->user->name))) }}
@endif @if (isset($setting->head_office_user->user)) @include( 'head_office.user_card_component', [ 'user' => $setting->head_office_user->user, ] ) @endif

{{ $setting->head_office_user->user->name }}

@php // Convert the locations into arrays for easy comparison $allLocations = $head_office->locations->pluck('id')->toArray(); $settingLocations = isset($setting->location_id) ? json_decode($setting->location_id,true) : null; $allExist = !array_diff($allLocations, $settingLocations); @endphp @if ($allExist)

All

@elseif(isset($settingLocations[0]))

{{ optional($head_office->locations->where('id', $settingLocations[0])->first()?->location)->trading_name ?? 'N/A' }}

{{count($settingLocations)}}
@endif {{-- Case Handler @php $jsoData = isset( $setting->user_can_view, ) ? json_decode( $setting->user_can_view, true, ) : null; @endphp @if ($jsoData !== null && ((isset($jsoData[3]) && in_array(3, $jsoData[3])) || isset($jsoData[1]))) Can view case @endif @if ($form->head_office_user_form_review_setting($setting->head_office_user->id, $form->id)) Can review case @endif @if (count($setting->head_office_user->stage_task_assigns()) != 0) stage task assigned @endif --}}
{{$setting->min_prority}} - {{$setting->max_prority}}

Case Summary

Field from the form can be selected to appear in the case summary, offering and overview of the case within the case manager
@if (isset($is_display_case_data_objects) && is_iterable($is_display_case_data_objects)) @foreach ($is_display_case_data_objects as $data) @endforeach
Page Question Actions
{{ $data['pageName'] }} {{ $data['label'] }}
@else

No fields have been assigned to display in the case summary in the Case Manager

@endif
@livewire('tag-manager', ['bespoke_form_id' => $form->id])
@livewire('case-tags-component', ['tagable_id' => $form->id, 'tagable_type' => 'form'])
@endif
@include('head_office.be_spoke_forms.default_task', ['task' => null]) @include('head_office.be_spoke_forms.default_document', ['document' => null]) @include('head_office.be_spoke_forms.default_links', ['document' => null]) @include('head_office.be_spoke_forms.share_case_approved_email', [ 'shared_case_approved_email' => null, ]) @if (isset($form) && isset($form->formCards)) @include('head_office.be_spoke_forms.form_card', [ 'card' => null, 'form_cards' => $form->formCards, ]) @endif
{{-- --}} @endsection @section('styles') @endsection @section('scripts') @if (isset($form) && isset($form->external_link)) @endif @if (isset($form)) @php $assingedLocations = isset($form->auto_close_settings) ? json_decode($form->auto_close_settings->other_sites_selected) : []; @endphp @endif @include('head_office.be_spoke_forms.script') {{-- script to show Submission in Loc Acc modal --}} @endsection