@php $selectedHeadOffice = $user->selected_head_office; if (isset($location)) { $selectedHeadOffice = $location->head_office(); } @endphp {{ optional($selectedHeadOffice)->company_name ?? 'QI Tech' }}

Hi {{ $user->first_name }}

What kind of user are you?

@foreach ($jobs as $job) @if (($job->headoffice_id == $selectedHeadOffice->id || is_null($job->headoffice_id)) && !$job->is_activated) @php $assignedCategories = explode(',', $job->category_ids); $override = \App\Models\UserTypeOverrides::where('user_type_id', $job->id) ->where('head_office_id', $selectedHeadOffice->id) ->first(); @endphp
{{ $job->job }}

{{ $override->job_description ?? $job->job_description }}

@php $filteredSubtypes = $job->subtypes->filter(function ($subtype) use ( $selectedHeadOffice, ) { return $subtype->headoffice_id == $selectedHeadOffice->id || is_null($subtype->headoffice_id); }); @endphp @if ($filteredSubtypes->count())
Subtypes
@foreach ($filteredSubtypes as $subtype) @endforeach @endif @if ($job->jobRegulatoryBodies->count())
Regulatory Body
@foreach ($job->jobRegulatoryBodies as $regulatoryBody)
@endforeach
@endif @if ($job->relatedJobs->isNotEmpty())
I am also
@foreach ($job->relatedJobs as $relatedJob)
@endforeach
@endif
@endif @endforeach
@if (!is_null($headOfficeUser) && $headOfficeUser->user_job() != null) Cancel @endif
{{-- @dd($headOfficeUser->user_job()); --}}