@extends('layouts.head_office_app') @section('title', 'Head office Settings') @section('sub-header')
Details Timeline Intelligence Coming Soon Matches History Coming Soon
@endsection @section('content') @if (isset($new_contact)) @php $formated_custom_data = $new_contact->get_formated_contact(); @endphp
Edit Contact

{{ $new_contact->name }}

Personal

@if (isset($new_contact->date_of_birth))

{{ Carbon\Carbon::parse($new_contact->date_of_birth)->format('Y-m-d') }}

@endif @if (isset($new_contact->nhs_no))

{{ $new_contact->nhs_no }}

@endif @if (isset($new_contact->ethnicity))

{{ $new_contact->ethnicity }}

@endif @if (isset($new_contact->sexual_orientation))

{{ $new_contact->sexual_orientation }}

@endif @if (isset($new_contact->marital_status))

@if (isset($new_contact->marital_status) && $new_contact->marital_status != '') @if ($new_contact->marital_status == 'single') Single @elseif ($new_contact->marital_status == 'married') Married @elseif ($new_contact->marital_status == 'separated') Separated @elseif ($new_contact->marital_status == 'divorced') Divorced @endif @endif

@endif @if (isset($new_contact->gender))

@if (isset($new_contact->gender) && $new_contact->gender != '') @if ($new_contact->gender == 'male') Male @elseif ($new_contact->gender == 'female') Female @elseif ($new_contact->gender == 'other') Other @endif @endif

@endif @if (isset($new_contact->pronoun))

{{ $new_contact->pronoun }}

@endif @if (isset($new_contact->religion))

{{ $new_contact->religion }}

@endif @if (isset($new_contact->passport_no))

{{ $new_contact->passport_no }}

@endif @if (isset($new_contact->driver_license_no))

{{ $new_contact->driver_license_no }}

@endif @if (isset($new_contact->profession))

{{ $new_contact->profession }}

@endif @if (isset($new_contact->registration_no))

{{ $new_contact->registration_no }}

@endif @if (isset($new_contact->other))

{{ $new_contact->other }}

@endif @foreach ($formated_custom_data as $personal_data) @if (isset($personal_data['value']) && !empty($personal_data['value']) && $personal_data['sub_type'] == 'Personal')

{{ $personal_data['value'] }}

@endif @endforeach

Contact Info

@if (isset($new_contact->work_emails) && json_decode($new_contact->work_emails, true) != null && count(json_decode($new_contact->work_emails, true)) > 0)
@foreach (json_decode($new_contact->work_emails, true) as $work_email)

{{ $work_email }}

@endforeach
@endif @if (isset($new_contact->personal_emails) && json_decode($new_contact->personal_emails, true) != null && count(json_decode($new_contact->personal_emails, true)) > 0)
@foreach (json_decode($new_contact->personal_emails, true) as $personal_email)

{{ $personal_email }}

@endforeach
@endif @if (isset($new_contact->work_mobiles) && json_decode($new_contact->work_mobiles, true) != null && count(json_decode($new_contact->work_mobiles, true)) > 0)
@foreach (json_decode($new_contact->work_mobiles, true) as $work_mobile)
@endforeach
@endif @if (isset($new_contact->personal_mobiles) && json_decode($new_contact->personal_mobiles, true) != null && count(json_decode($new_contact->personal_mobiles, true)) > 0)
@foreach (json_decode($new_contact->personal_mobiles, true) as $personal_mobile)
@endforeach
@endif @if (isset($new_contact->home_telephones) && json_decode($new_contact->home_telephones, true) != null && count(json_decode($new_contact->home_telephones, true)) > 0)
@foreach (json_decode($new_contact->home_telephones, true) as $home_telephone)
@endforeach
@endif @if (isset($new_contact->work_telephones) && json_decode($new_contact->work_telephones, true) != null && count(json_decode($new_contact->work_telephones, true)) > 0)
@foreach (json_decode($new_contact->work_telephones, true) as $work_telephone)
@endforeach
@endif @if (isset($new_contact->facebook)) @endif @if (isset($new_contact->instagram)) @endif @if (isset($new_contact->twitter)) @endif @if (isset($new_contact->other_link)) @endif @foreach ($formated_custom_data as $personal_data) @if (isset($personal_data['value']) && !empty($personal_data['value']) && $personal_data['sub_type'] == 'Contact Details')

{{ $personal_data['value'] }}

@endif @endforeach @foreach ($formated_custom_data as $personal_data) @if (isset($personal_data['value']) && !empty($personal_data['value']) && $personal_data['sub_type'] == 'Address')

{{ $personal_data['value'] }}

@endif @endforeach

Address

@if (isset($contact_to_addresses) && count($contact_to_addresses) > 0) @foreach ($contact_to_addresses as $contact_to_address) @endforeach @endif

Associations

@if (isset($new_contacts_relations) && count($new_contacts_relations) > 0) @foreach ($new_contacts_relations as $index => $new_contacts_relation) @endforeach @endif

Group

@if (isset($contact_to_groups) && count($contact_to_groups) > 0) @foreach ($contact_to_groups as $contact_to_group) @endforeach @endif
@php $svgs = [ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ]; @endphp @php $getSvg = function ($index, $color = 'white', $width = 24, $height = 24) use ($svgs) { if (!isset($svgs[$index])) { return null; } $svg = $svgs[$index]; $svg = preg_replace('/(?Tags

@if (isset($tag_to_contacts) && count($tag_to_contacts) > 0)
@foreach ($tag_to_contacts as $tag_to_contact) @endforeach
@endif

Assign To

@if (isset($user_to_contacts) && count($user_to_contacts) > 0)
@foreach ($user_to_contacts as $user_to_contact)
{{ implode('',array_map(function ($word) {return !empty($word) ? strtoupper($word[0]) : ''; }, array_filter(explode(' ', $user_to_contact->head_office_user->user->name ?? '')))) }}
@endforeach
@endif
@if (!empty($new_contacts)) @foreach ($new_contacts as $contact) @if ($new_contact->id != $contact->id) @endif @endforeach @endif
@php $comments = $new_contact_comments; @endphp @foreach ($comments as $key => $comment) @include('head_office.contacts.view_comments', compact('comment')) @endforeach
@include('head_office.contacts.contact_comments', [ 'comment' => null, 'parent' => null, 'remove_backdrop' => true, ])
@endif @endsection @section('scripts') @if (Session::has('success')) @elseif(Session::has('error')) @endif @endsection