@extends('layouts.admin') @section('breadcrumb') @endsection @section('content')
{{ trim($user->first_name . ' ' . $user->last_name) }}
@if($user->unique_id) {{ tr('user_id') }}: {{ $user->unique_id }} @endif
{{ strtoupper($user->user_type == USER_TYPE_BUSINESS ? tr('business') : tr('individual')) }}
@if($user->email) {{ $user->email }} @endif @if($user->mobile && $user->mobile_country_code) +{{ $user->mobile_country_code }} {{ $user->mobile }} @endif {{ tr('email') }}: {{ $user->email_verified_at ? tr('verified') : tr('not_verified') }} {{ tr('status') }}: {{ $user->status ? tr('active') : tr('inactive') }} @if($user->id_verification) {{ tr('id_verification') }}: {{ id_verification_status_formatted($user->id_verification) }} @endif @if($user->onboarding_step) {{ tr('onboarding') }}: {{ onboarding_formatted($user->onboarding_step, $user->user_type) }} @endif

@php $fields = [ tr('first_name') => $user->first_name, tr('last_name') => $user->last_name, tr('gender') => $user->gender ? gender_formatted($user->gender) : null, tr('dob') => $user->dob ? common_date($user->dob, auth('admin')->user()->timezone, 'd M Y') : null, tr('browser_id') => $user->browser_id, tr('timezone') => $user->timezone, tr('service_type') => $user->service_type ? service_type_formatted($user->service_type) : null, tr('email_verified_at') => $user->email_verified_at ? common_date($user->email_verified_at, auth('admin')->user()->timezone, 'd M Y h:i A') : null, tr('created_at') => $user->created_at ? common_date($user->created_at, auth('admin')->user()->timezone, 'd M Y h:i A') : null, tr('updated_at') => $user->updated_at ? common_date($user->updated_at, auth('admin')->user()->timezone, 'd M Y h:i A') : null, ]; if($user->user_type == USER_TYPE_INDIVIDUAL){ $fields = array_merge($fields, [ tr('address_line_1') => $user->userInformation?->address_1 ?? '', tr('address_line_2') => $user->userInformation?->address_2 ?? '', tr('city') => $user->userInformation?->city ?? '', tr('state') => get_state_name($user->userInformation?->state, $user->userInformation?->country ?? null) ?? '', tr('country') => get_country($user->userInformation?->country) ?? '', tr('postal_code') => $user->userInformation?->postal_code ?? '', tr('purpose_of_transactions') => $user->userInformation?->purpose_of_transactions ?? '', tr('id_type') => \App\Models\Lookup::findValuebyKey($user->userInformation?->id_type,LOOKUP_TYPE_ID_TYPE) ?? '', tr('id_number') => $user->userInformation?->id_number ?? '', tr('profession') => \App\Models\Lookup::findValuebyKey($user->userInformation?->profession,LOOKUP_TYPE_PROFESSION) ?? '', tr('source_of_income') => \App\Models\Lookup::findValuebyKey($user->userInformation?->source_of_income,LOOKUP_TYPE_SOURCE_OF_INCOME) ?? '', ]); } elseif($user->user_type == USER_TYPE_BUSINESS){ $fields = array_merge($fields, [ tr('legal_name') => $user->userInformation?->legal_name ?? '', tr('business_name') => $user->userInformation?->business_name ?? '', tr('formation_date') => $user->userInformation?->formation_date ? common_date($user->userInformation->formation_date, auth('admin')->user()->timezone, 'd M Y') : '', tr('tax_id') => $user->userInformation?->tax_id ?? '', tr('website') => $user->userInformation?->website ?? '', tr('type_of_business') => $user->userInformation?->type_of_business ? App\Models\Lookup::findValuebyKey($user->userInformation->type_of_business,LOOKUP_TYPE_BUSINESS_TYPE) : '', tr('address_line_1') => $user->userInformation?->address_1 ?? '', tr('address_line_2') => $user->userInformation?->address_2 ?? '', tr('city') => $user->userInformation?->city ?? '', tr('state') => $user->userInformation?->state ? get_state_name( $user->userInformation?->state, $user->userInformation?->country ?? null ) : '', tr('country') => get_country($user->userInformation?->country) ?? '', tr('postal_code') => $user->userInformation?->postal_code ?? '', tr('purpose_of_transactions') => $user->userInformation?->purpose_of_transactions ?? '', ]); } @endphp @foreach($fields as $label => $value) @if(filled($value))
{{ $label }}
{{ $value }}
@endif @endforeach
@php $businessPersons = $user->userInformation?->business_persons ?? []; if (is_string($businessPersons)) { $decoded = json_decode($businessPersons, true); $businessPersons = json_last_error() === JSON_ERROR_NONE ? $decoded : []; } $businessPersons = is_array($businessPersons) ? $businessPersons : []; @endphp @if($user->user_type == USER_TYPE_BUSINESS && count($businessPersons))
{{ tr('business_persons') }}
@foreach($businessPersons as $index => $person) @php $person = is_array($person) ? $person : []; $firstName = $person['first_name'] ?? '-'; $lastName = $person['last_name'] ?? '-'; $email = $person['email'] ?? '-'; $mobile = !empty($person['mobile']) ? '+' . ($person['mobile_country_code'] ?? '') . ' ' . $person['mobile'] : '-'; $dob = !empty($person['dob']) ? common_date($person['dob'], auth('admin')->user()->timezone, 'd M Y') : '-'; $profession = !empty($person['profession']) ? (\App\Models\Lookup::findValuebyKey($person['profession'], LOOKUP_TYPE_PROFESSION) ?: '-') : '-'; $idType = !empty($person['id_type']) ? (\App\Models\Lookup::findValuebyKey($person['id_type'], LOOKUP_TYPE_ID_TYPE) ?: '-') : '-'; $idNumber = $person['id_number'] ?? '-'; $address1 = $person['address_1'] ?? '-'; $address2 = $person['address_2'] ?? '-'; $city = $person['city'] ?? '-'; $country = !empty($person['country']) ? (get_country($person['country']) ?: '-') : '-'; $state = (!empty($person['state']) && !empty($person['country'])) ? (get_state_name($person['state'], $person['country']) ?: '-') : '-'; $postalCode = $person['postal_code'] ?? '-'; $fields = [ tr('first_name') => $firstName, tr('last_name') => $lastName, tr('email') => $email, tr('mobile') => $mobile, tr('dob') => $dob, tr('profession') => $profession, tr('id_type') => $idType, tr('id_number') => $idNumber, tr('address_line_1') => $address1, tr('address_line_2') => $address2, tr('city') => $city, tr('state') => $state, tr('country') => $country, tr('postal_code') => $postalCode, ]; @endphp
{{ tr('person') }} {{ $index + 1 }}
@foreach($fields as $label => $value)
{{ $label }}
{{ filled($value) ? $value : '-' }}
@endforeach
@endforeach
@endif
{{ tr('virtual_accounts') }}
@if ($virtualAccounts->isNotEmpty()) @foreach ($virtualAccounts as $key => $virtual_account) @endforeach @else @endif
{{ tr('created_at') }} {{ tr('country') }} {{ tr('currency') }} {{ tr('account_number') }} {{ tr('account_holder_name') }} {{ tr('account_bank_name') }} {{ tr('balance') }} {{ tr('status') }}
{{ common_date($virtual_account->created_at, auth('admin')->user()->timezone ?: DEFAULT_TIMEZONE, 'd M Y h:i:s A') }} {{ get_country($virtual_account->country) ?: tr('na') }} {{ $virtual_account->currency ?: tr('na') }} {{ $virtual_account->account_number ?: tr('na') }} {{ $virtual_account->account_holder_name ?: tr('na') }} {{ $virtual_account->account_bank_name ?: tr('na') }} {{ formatted_amount($virtual_account->balance , $virtual_account->currency) ?: tr('na') }} {{ $virtual_account->status ? tr('active') : tr('deactivated') }}
{{ tr('no_record_found') }}
@include('components.wallets')
{{ tr('business_details') }} @if(filled($user->userInformation?->unique_id)) - {{ $user->userInformation->unique_id }} @endif
@php $info = $user->userInformation; $type_of_business = $info?->type_of_business ? App\Models\Lookup::findValuebyKey($info?->type_of_business , LOOKUP_TYPE_BUSINESS_TYPE ) : '' ; $fields = [ 'Legal Name' => $info?->legal_name, 'Business Name' => $info?->business_name, 'Tax ID' => $info?->tax_id, 'Website' => $info?->website, 'Type of Business' => $type_of_business , 'Purpose of Transactions' => $info?->purpose_of_transactions, 'Address Line 1' => $info?->address_1, 'Address Line 2' => $info?->address_2, 'City' => $info?->city, 'State' => get_state_name($info?->state, $info?->country) , 'Country' => get_country($info?->country), 'Postal Code' => $info?->postal_code, ]; @endphp @if(collect($fields)->filter(fn ($v) => filled($v))->isEmpty())
{{ tr('no_business_information_available') }}
@else
@foreach($fields as $label => $value) @if(filled($value))
{{ $label }}
{{ $value }}
@endif @endforeach
@endif
@if ($user->userDocuments && count($user->userDocuments) > 0) @php $documentIconMap = [ 'document_country' => 'ri-earth-line', 'document_name' => 'ri-file-text-line', 'document_type' => 'ri-file-2-line', 'document_file' => 'ri-attachment-line', 'document_back_file' => 'ri-attachment-line', ]; $allowedFields = ['document_country', 'document_name', 'document_type', 'document_file','document_back_file']; @endphp
{{ tr('documents') }}
@if ($user->onboarding_step == ONBOARDING_STEP_THREE_COMPLETED && !in_array($user->id_verification, [IDENTITY_VERIFICATION_COMPLETED, IDENTITY_VERIFICATION_FAILED]))
@csrf
@csrf
@endif
@foreach ($user->userDocuments as $document)
@foreach ($allowedFields as $key) @php $value = $document->{$key} ?? null; @endphp @if (!empty($value))
{{ tr($key) }}
@if ($key === 'document_file') {!! filePreview($value) !!} @elseif ($key === 'document_back_file') {!! filePreview($value) !!} @elseif ($key === 'document_country') {{ get_country($value) }} @elseif ($key === 'document_type') {{ \App\Models\Lookup::findValuebyKey($value) }} @elseif ($key === 'document_name') {{ document_type_formatted($value) }} @else {{ $value }} @endif
@endif @endforeach
@endforeach
@else
{{ tr('documents') }}
{{ tr('no_documents_available') }}
@endif
{{ tr('user_services') }}
@if($user->userServices && count($user->userServices) > 0)
@foreach ($user->userServices as $service)
{{ tr('service_type') }}
{{ strtoupper($service->service_type) }}
{{ tr('external_reference_id') }}
{{ $service->external_reference_id ?? '-' }}
{{ tr('status') }}
{{ $service->external_status }}
{{ tr('active') }}
{{ $service->is_active ? tr('yes') : tr('no') }}
{{ tr('created_at') }}
{{ optional($service->created_at)->format('d M Y') }}

                                                {{ json_encode($service->external_data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
                                                
@endforeach
@else

{{ tr('no_services_available') }}

@endif
@endsection