@if (isset($all_linked_contacts) && count($all_linked_contacts) > 0) @foreach ($all_linked_contacts as $contact) @php if ($contact == null) { continue; } $totalMatches = $contact->get_all_matching_contacts() ? $contact->get_all_matching_contacts()->count() : 0; $current_address = null; @endphp @if ($contact->contact_type == 'person')

Person

@if ($contact->contact_to_cases_contact->where('case_id', $case->id)->where('is_reported', '1')->isNotEmpty()) Reporter @endif
@isset($contact->contacts_to_addresses) @foreach ($contact->contacts_to_addresses as $each) @php $current_address = $each->new_contact_address ->where('address_tag', 'current_address') ->where('id', $each->address_id) ->first(); if ($current_address) { break; } @endphp @endforeach @endisset
{{ $contact->name }} {{ $contact->middle_name }} {{ $contact->surname }}
@php $profession = null; if($contact->user_id){ $user = \App\Models\User::find($contact->user_id); if(isset($user) && $user->getHeadOfficeUser()){ $profession = $user->getHeadOfficeUser()->user_job()->job_details->job ?? $contact->profession; }else{ $profession = $contact->profession; } }else{ $profession = $contact->profession; } @endphp
@isset($contact->date_of_birth) ● {{ \Carbon\Carbon::parse($contact->date_of_birth)->format('Y-m-d') }} @endisset @if($profession) ● {{ $profession }} @endif @isset($contact->registration_no) ● {{ $contact->registration_no }} @endisset @isset($current_address) ● {{ $current_address->address }} @endisset @isset($contact->gender) ● {{ $contact->gender }} @endisset
{{-- Involvemenet tags --}} @if (isset($contact->contactsInvolvementTags) && $contact->contactsInvolvementTags->isNotEmpty())
Involvemenets
@livewire('intelligence-involvement-tags', ['contact_id' => $contact->id, 'form_id' => $case->link_case_with_form->form_id ?? null]) {{-- @foreach ($contact->contactsInvolvementTags as $each) @if (isset($each->tag)) {{$each->tag->name ?? 'N/A'}} @endif @endforeach --}}
@php $personInvComment = optional( $comments ->where('card_id', $contact->id) ->where('case_id', $case->id) ->where('type', 'person_inv') ->first(), )->comment; @endphp
@endif {{-- @isset($case->location->location_tag) --}} Contact Tags
@livewire('intelligence-contact-tags', ['contact_id' => $contact->id])
{{-- @endisset --}}
{{ $totalMatches }} possible matches
@endif @endforeach @endif