@extends('layouts.app') @section('title', 'Customer 360 - ' . $customer->full_name_en) @section('content')
{{ strtoupper(substr($customer->first_name, 0, 1)) }}

{{ $customer->full_name_en }}

@if($customer->is_vip) VIP CUSTOMER @endif {{ $customer->status }}
Code: {{ $customer->customer_code }} Mobile: {{ $customer->contact ? $customer->contact->primary_mobile : 'N/A' }} Nationality: {{ $customer->nationality }} Type: {{ $customer->customer_type }}
Edit Profile + Application
@if($customer->flags->count() > 0)
Active Profile Flags: {{ implode(', ', $customer->flags->pluck('flag_type')->toArray()) }}
@endif

Customer Overview Details

Full English Name: {{ $customer->full_name_en }}

Gender: {{ ucfirst($customer->gender) }}

Date of Birth: {{ $customer->dob ? $customer->dob->format('d M Y') : 'N/A' }}

Nationality: {{ $customer->nationality }}

Primary Mobile: {{ $customer->contact ? $customer->contact->primary_mobile : 'N/A' }}

Email: {{ $customer->contact ? $customer->contact->email : 'N/A' }}

Current Active Identity Records

@forelse($customer->identityRecords as $idRec)
{{ str_replace('_', ' ', $idRec->document_type) }} {{ $idRec->document_number }}
Expiry: {{ $idRec->expiry_date ? $idRec->expiry_date->format('d M Y') : 'N/A' }}
@empty

No identity document records registered yet.

@endforelse

Multiple Passport & Visa Historical Ledger

@foreach($customer->identityRecords as $rec)
{{ $rec->document_type }} {{ $rec->is_current ? 'CURRENT ACTIVE' : 'HISTORICAL / PREVIOUS' }}
{{ $rec->document_number }}
Issue: {{ $rec->issue_date ? $rec->issue_date->format('d M Y') : 'N/A' }}
Expiry: {{ $rec->expiry_date ? $rec->expiry_date->format('d M Y') : 'N/A' }}
@endforeach

Secure Customer Document Vault

@forelse($customer->documents as $doc) @empty @endforelse
DocumentDatesVersionReviewActions
{{ $doc->document_name }}{{ $doc->document_number??'No number' }} · {{ $doc->documentType?->name_en }}{{ optional($doc->issue_date)->format('d M Y')?:'No issue date' }}Expires {{ optional($doc->expiry_date)->format('d M Y')?:'never' }}v{{ $doc->version }} · {{ $doc->is_current?'Current':'Historical' }}{{ str($doc->verification_status)->replace('_',' ')->title() }}
@if($doc->attachment_path)PreviewDownload@endifHistory@if($doc->verification_status==='pending_verification')
@csrf
@endif
No documents stored in vault yet.

Family and dependents

Linked sponsor, spouse, child and dependent profiles.

Manage families

Applications

Current and historical service work.

+ Application
@forelse($customer->applications as $app)@empty@endforelse
ApplicationServiceAssignedStatusDue
{{ $app->application_number }}{{ $app->service?->name_en }}{{ $app->assignedUser?->name??'Unassigned' }}{{ str($app->status)->replace('_',' ')->title() }}{{ optional($app->due_at)->format('d M Y H:i') }}
No applications

Invoices, payments and balances

Live financial ledger.

@forelse($customer->invoices as $invoice)@empty@endforelse
InvoiceTotalPaidBalanceStatus
{{ $invoice->invoice_number }}AED {{ number_format((float)$invoice->total_amount,2) }}AED {{ number_format((float)$invoice->payments->sum('amount'),2) }}AED {{ number_format((float)$invoice->balance_due,2) }}{{ str($invoice->status)->title() }}
No invoices

Communication history

System, email, SMS and WhatsApp activity.

@forelse($customer->communications as $message)
{{ str($message->channel)->title() }} · {{ $message->subject?:'Message' }}{{ str($message->status)->replace('_',' ')->title() }}
@empty
No communications
@endforelse

Renewal opportunities

Document and service renewal pipeline.

Audit history

Profile and document events.

@forelse($activity as $event)
{{ str($event->action)->replace('.',' ')->title() }}{{ $event->user?->name??'System' }}
@empty
No audit events
@endforelse

Staff Internal Notes

@forelse($customer->notes as $note)
{{ $note->title }} {{ $note->created_at->diffForHumans() }} by {{ $note->user->name }}

{{ $note->note }}

@empty

No staff internal notes recorded for this customer.

@endforelse

Upload Document to Vault

@csrf

Add Internal Staff Note

@csrf
@endsection