@extends('layouts.head_office_app') @section('title', 'Head office Settings') @section('content')
{{$contact->name}} Contact
@include('layouts.error')
{{$contact->gender}}
DOB: @if($contact->date_of_birth) {{Carbon\Carbon::parse($contact->date_of_birth)->format(config('app.dateFormat'))}} @endif
@if($contact->nhs_number) NHS Number: {{$contact->nhs_number}}@elseif($contact->registration_no) Registration Number: {{$contact->registration_no}} @endif
Profession: {{$contact->profession}}
@if($contact->company)
Company: {{$contact->company}}
@endif @if($contact->website)
Website: {{$contact->website}}
@endif @if($contact->practice_name)
Practice Name: {{$contact->practice_name}}
@endif
Email Address: @if($contact->emails) @foreach ($contact->emails as $email) {{$email}}, @endforeach @endif
Telephone No: @if($contact->telephones) @foreach ($contact->telephones as $telephone) {{$telephone}}, @endforeach @endif

Addresses (ADD New)
@if($contact->contact_address) @foreach ($contact->contact_address()->orderBy('id','desc')->get() as $address)
{{$address->address->address}} @if($loop->iteration == 1) Current @else Past @endif
@endforeach @endif
Incidents (ADD New)
@foreach ($contact->contact_cases as $case)
Date: {{$case->case->created_at->format(config('app.dateFormat'))}} (@if($case->case->status == 'open') {{$case->case->status}} @else {{$case->case->status}} @endif) | {{$case->type}} | Delete
@endforeach
Relations (ADD New)
@foreach ($contact->contact_connections as $contact_connection) @if($contact_connection)
{{$contact_connection->connected_with->name}} | {{$contact_connection->relation_type}} | Edit | Delete
@include('head_office.edit_relation',['contact_connection' => $contact_connection]) @endif @endforeach
Notes
{{$contact->note}}
@include('head_office.edit_relation',['contact_connection' => null]) @section('scripts') @endsection @endsection @section('styles') @endsection