@extends('layouts.app') @php $editing = isset($customer); $contact = $editing ? $customer->contact : null; $address = $editing ? $customer->address : null; $identity = fn (string $type) => $editing ? $customer->identityRecords->where('document_type', $type)->where('is_current', true)->first() : null; $passport = $identity('passport'); $eid = $identity('emirates_id'); $uid = $identity('uid'); $visa = $identity('residence_visa'); @endphp @section('title', $editing ? 'Edit Customer' : 'New Customer') @section('content')

Customer master

{{ $editing ? 'Edit '.$customer->full_name_en : 'Create customer profile' }}

Identity, contact, visa, corporate link, ownership and duplicate controls in one record.

Cancel
@csrf @if($editing) @method('PUT') @endif @if($errors->any())
Review the highlighted information.
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif

1. Basic identity

Names and personal profile information.

2. Contact and address

UAE phone normalization runs before duplicate checks.

Possible matches found

3. Passport and Emirates ID

Changed identity numbers create a new current record and retain the previous record.

4. Visa and sponsor

Residency data is reusable by service form auto-fill.

5. Corporate and operational ownership

Optional company linkage, assignment, tags and private notes.

@if($editing)@endif
All identity changes and operator actions are audited.
@endsection