@extends('Supervisor.sidebar') @section('content')

Customer Details


@php $latest = $customer->records->first(); $status = $latest ? $latest->renewal_status : 'no_record'; $statusColor = $latest ? $latest->status_color : 'secondary'; $statusLabel = $latest ? $latest->status_label : 'No Record'; @endphp

{{ $customer->name }}

{{ $customer->is_corporate ? 'Corporate' : 'Individual' }} {{ $statusLabel }}
@if($customer->phone2) @endif @if($customer->address)
{{ $customer->address }}
@endif @if($customer->is_corporate)
{{ $customer->contact_person_name ?? 'N/A' }}
{{ $customer->contact_person_designation ?? 'N/A' }}
@else
{{ $customer->age ?? 'N/A' }}
{{ $customer->nic ?? 'N/A' }}
@endif
{{ ucfirst($customer->status) }}
@if($latest)

Current Medical Status

{{ $statusLabel }}
{{ $latest->checkup_date->format('M d, Y') }}
{{ $latest->renewal_date->format('M d, Y') }}
{{ $latest->recurring_value }} {{ $latest->unit_label }}
{{ $latest->testing_details }}
@if($latest->abnormality_report)
{{ $latest->abnormality_report }}
@endif @if($latest->notes)
{{ $latest->notes }}
@endif
@endif

Record History

@if($customer->records->isEmpty())

No medical records found

@else
@foreach($customer->records as $record)
Checkup: {{ $record->checkup_date->format('M d, Y') }} {{ $record->is_latest ? 'Current' : 'Past' }}
Renewal: {{ $record->renewal_date->format('M d, Y') }} {{ $record->recurring_value }} {{ $record->unit_label }}
{{ $record->testing_details }}
@if($record->abnormality_report)
Abnormality: {{ $record->abnormality_report }}
@endif
@endforeach
@endif
@endsection