@foreach ($case->case_handlers->where('is_hidden', false) as $case_handler)
@include('head_office.user_card_component', [ 'user' => $case_handler->case_head_office_user->user, ])
{{ $case_handler->case_head_office_user->user->name }}
{{ $case_handler->case_head_office_user->position }}
Case Handler
@if ($case->isArchived == false)
@endif
@endforeach @php $logged_u = Auth::guard('web')->user()->selected_head_office_user; $uniqueHeadOfficeUsers = collect($case->stages) ->flatMap(fn($stage) => $stage->tasks) ->flatMap(fn($task) => $task->assigned) ->pluck('head_office_user') ->filter() ->unique('id') ->values(); $case_interested_party = $case->case_interested_parties ->firstWhere('tag', 'final_clouser_approval'); @endphp {{-- =============== other Users ============== --}}
@foreach ($uniqueHeadOfficeUsers as $uniqueUser)
@include('head_office.user_card_component', ['user' => $uniqueUser->user])
{{ $uniqueUser->user->name }}
{{ $uniqueUser->position }}
Task Handler
@endforeach @if ($case_interested_party)
{{ $case_interested_party->case_head_office_user->user->name }}
{{ $case_interested_party->case_head_office_user->position }}
Final Approver
@endif @foreach ($case->case_interested_parties as $case_interested_party) @if (!$case_interested_party->tag)
{{ $case_interested_party->case_head_office_user->user->name }}
{{ $case_interested_party->case_head_office_user->position }}
@if ($case->status == 'open')
{{--
Investigator
--}}
@endif
@include('head_office.case_manager.notes.add_interested_party', [ 'interested_party' => $case_interested_party, ]) @endif @endforeach

Case viewable by