{{ $customer->full_name ?? $customer->registered_company_name }}

{{-- Basic Information Section --}}

apartment {{ optional($customer->kuaClient)->name ?? 'N/A' }}

widgets {{ optional($customer->kuaProduct)->product_name ?? 'N/A' }}

tag {{ ucfirst($customer->customer_type) }} Customer

@if($customer->customer_type == 'individual')

phone {{ $customer->phone_number ?? 'Not Provided' }}

email {{ $customer->email ?? 'Not Provided' }}

@endif

event Created: {{ \Carbon\Carbon::parse($customer->created_at)->format('d M, Y') }}

badge {{ $customer->tin ?? 'Not Provided' }}

{{-- Tab-like structure to separate details --}}
{{-- Personal Details Tab --}} @if($customer->customer_type == 'individual')

Personal Information

TIN Number: {{ $customer->tin ?? 'Not Provided' }}
National ID Type: {{ $customer->kuaNationalIdType->title ?? 'Not Provided' }}
National ID Number: {{ $customer->national_id_number ?? 'Not Provided' }}
Gender: {{ ucfirst($customer->gender ?? 'Not Provided') }}
Age Group: {{ $customer->age_group ?? 'Not Provided' }}
Occupation: {{ $customer->occupation ?? 'Not Provided' }}

Contact Information

Physical Address: {{ $customer->physical_address ?? 'Not Provided' }}
Geolocation: {{ $customer->geolocation ?? 'Not Provided' }}
@endif {{-- Business Details Tab --}} @if($customer->customer_type == 'business')

Company Information

Registered Company Name: {{ $customer->registered_company_name ?? 'Not Provided' }}
Trading Name: {{ $customer->trading_name ?? 'Not Provided' }}
Business Registration Number: {{ $customer->business_registration_number ?? 'Not Provided' }}
Business Type: {{ $businessType->title ?? 'Not Provided' }}
Business Segment: {{ $businessSegment->title ?? 'Not Provided' }}
Industry Sector: {{ $industrySector->name ?? 'Not Provided' }}

Business Details

Number of Employees: {{ $customer->number_of_employees ?? 'Not Provided' }}
Monthly Revenue: {{ $customer->monthly_revenue ?? 'Not Provided' }}
Business Age: {{ $customer->business_age ?? 'Not Provided' }}
Part of Group: {{ $customer->part_of_group == 1 ? 'Yes' : 'No' }}
Multiple Branches: {{ $customer->multiple_branches == 1 ? 'Yes' : 'No' }}
Number of Outlets: {{ $customer->number_of_outlets ?? 'Not Provided' }}
Regions: {{ $region->region_name ?? 'Not Provided' }}

Business Address

Registered Address: {{ $customer->registered_address ?? 'Not Provided' }}
Business Geolocation: {{ $customer->business_geolocation ?? 'Not Provided' }}
@endif {{-- Additional Info Tab --}}

Customer Documents


@if($customer->certificate_incorporation)
Certificate of Incorporation: @php $certificateUrl = $customer->kuaCustomerDocuments->firstWhere('type', 'certificate_incorporation'); $certificateUrl = $certificateUrl ? $certificateUrl->getKuaDocumentUrlAttribute() : null; $certificateUrl = $certificateUrl ?: asset('storage/' . $customer->certificate_incorporation); @endphp visibility
@endif @if($customer->business_license)
Business License: @php $businessLicenseUrl = $customer->kuaCustomerDocuments->firstWhere('type', 'business_license'); $businessLicenseUrl = $businessLicenseUrl ? $businessLicenseUrl->getKuaDocumentUrlAttribute() : null; $businessLicenseUrl = $businessLicenseUrl ?: asset('storage/' . $customer->business_license); @endphp visibility
@endif @if($customer->company_profile)
Company Profile: @php $companyProfileUrl = $customer->kuaCustomerDocuments->firstWhere('type', 'company_profile'); $companyProfileUrl = $companyProfileUrl ? $companyProfileUrl->getKuaDocumentUrlAttribute() : null; $companyProfileUrl = $companyProfileUrl ?: asset('storage/' . $customer->company_profile); @endphp visibility
@endif @if($customer->id_document)
ID Document: @php $idDocumentUrl = $customer->kuaCustomerDocuments->firstWhere('type', 'id_document'); $idDocumentUrl = $idDocumentUrl ? $idDocumentUrl->getKuaDocumentUrlAttribute() : null; $idDocumentUrl = $idDocumentUrl ?: asset('storage/' . $customer->id_document); @endphp visibility
@endif
@if(!$customer->certificate_incorporation && !$customer->business_license && !$customer->company_profile && !$customer->id_document)

No documents uploaded for this customer.

@endif
@foreach($customer->kuaCustomerContact as $contact)
Customer Full Name: {{ $contact->full_name ?? 'Not Provided' }}
Position: {{ $contact->position ?? 'Not Provided' }}
Phone Number: {{ $contact->phone_number ?? 'Not Provided' }}
Email: {{ $contact->email ?? 'Not Provided' }}
Is Primary Contact: {{ $contact->is_primary ? 'Yes' : 'No' }}
@if($contact->id_document)
ID Document: @php $idDocumentUrl = $contact->kuaCustomerContactDocuments->firstWhere('type', 'id_document'); $idDocumentUrl = $idDocumentUrl ? $idDocumentUrl->getKuaDocumentUrlAttribute() : null; $idDocumentUrl = $idDocumentUrl ?: asset('storage/' . $customer->id_document); @endphp visibility
@endif
@endforeach