@php $profile = $user->profile ?: new \App\Models\KUserProfile(); $countryId = old('country_id', $profile->country_id ?? ''); $dial = $selectedCountry ? app(\App\Services\KuserProfileService::class)->dialCode($selectedCountry) : ''; $hasPhoto = $profile && $profile->profile_photo_path; $photoOptional = true; $personalOpen = $errors->hasAny([ 'date_of_birth', 'gender', 'state_id', 'district_id', 'address_1', 'address_2', 'street_address', 'city', 'island', 'postal_code', 'profile_atoll_id', 'profile_island_id', 'use_personal_address_as_delivery', 'profile_photo', ]); $mustSetPassword = empty($warehouseCustomerEdit) && app(\App\Services\KuserProfileService::class)->needsLoginPassword($user); $activeCountryCode = strtoupper((string) optional($selectedCountry)->country_code); $phoneCodes = $phoneCodes ?? []; $phoneDialSelected = (string) old('phone_country_code', $profile->country_code ?: $dial); $additionalDialSelected = (string) old('additional_country_code', $profile->additional_country_code ?? ''); $whatsappDialSelected = (string) old('whatsapp_country_code', $profile->whatsapp_country_code ?: ($profile->country_code ?: $dial)); $preferredDialIso = [ '+1' => 'US', '+7' => 'RU', '+33' => 'FR', '+39' => 'IT', '+44' => 'GB', '+47' => 'NO', '+61' => 'AU', '+64' => 'NZ', '+212' => 'MA', '+262' => 'RE', '+500' => 'FK', ]; $resolvePhoneIso = function (string $selected) use ($phoneCodes, $activeCountryCode, $preferredDialIso) { if ($selected === '') { return ''; } foreach ($phoneCodes as $phoneCode) { if ($selected === $phoneCode['code']) { return $phoneCode['code']; } } if ($activeCountryCode !== '') { foreach ($phoneCodes as $phoneCode) { if ($phoneCode['code'] === $activeCountryCode && $phoneCode['dial'] === $selected) { return $phoneCode['code']; } } } $preferred = $preferredDialIso[$selected] ?? ''; if ($preferred !== '') { foreach ($phoneCodes as $phoneCode) { if ($phoneCode['code'] === $preferred && $phoneCode['dial'] === $selected) { return $phoneCode['code']; } } } foreach ($phoneCodes as $phoneCode) { if ($phoneCode['dial'] === $selected) { return $phoneCode['code']; } } return ''; }; $phoneIsoSelected = $resolvePhoneIso($phoneDialSelected); $additionalIsoSelected = $resolvePhoneIso($additionalDialSelected); $whatsappIsoSelected = $resolvePhoneIso($whatsappDialSelected); if (!isset($profileRoutes)) { $profileRoutes = [ 'update' => route('kuser.profile.update'), 'photo' => route('kuser.profile.photo'), 'states' => route('kuser.profile.states'), 'districts' => route('kuser.profile.districts'), ]; } @endphp
@if(!empty($warehouseCustomerEdit))

Customer profile

Fill in the same details the customer would add. The registered email stays as the login.

@elseif($profileComplete)

Your Profile

Your profile is complete. Saving takes you to Virtual Address.

@else

Complete Your Profile

Profile completion is required to unlock the application.

@endif
Profile completion 0%
@if(!empty($warehouseCustomerEdit))
Customer ID{{ $user->customer_id ?: 'Pending' }} Email{{ $user->email }}
@endif
@if(empty($warehouseCustomerEdit))
Customer ID {{ $user->customer_id ?: 'Pending' }}
Email {{ $user->email }}
@endif {{ $profileComplete ? 'Complete' : 'Incomplete' }}
@if (session('success')) @endif @if (session('info')) @endif @if (session('error')) @endif
@csrf

Customer Information

@error('first_name')
{{ $message }}
@enderror
@error('middle_name')
{{ $message }}
@enderror
@error('last_name')
{{ $message }}
@enderror

Contact Information

@error('phone')
{{ $message }}
@enderror
@error('additional_phone')
{{ $message }}
@enderror
@error('whatsapp_number')
{{ $message }}
@enderror
whatsapp_same_as_phone ?? false) ? 'checked' : '' }}>

Nationality & Identity Verification

This information is collected solely for customs and border clearance purposes

@error('country_id')
{{ $message }}
@enderror

Add at least one identity document number.

@foreach($identityDocuments as $document) @php $isOtherNationality = $activeCountryCode !== '' && $activeCountryCode !== 'IN' && $activeCountryCode !== 'MV'; $applies = in_array($activeCountryCode, $document['countries'], true) || ($isOtherNationality && !empty($document['other'])); $hasFile = filled($profile->{$document['file']} ?? null); $fileOptional = in_array($document['key'], ['aadhaar', 'voters', 'passport', 'maldivian', 'id_card'], true); @endphp @endforeach
@if($mustSetPassword)

Login Password

You signed in with Google. A password is optional. If you add one, you can also sign in with your email after you log out.

At least 6 characters, with 1 letter and 1 number.
@error('password')
{{ $message }}
@enderror
@error('password_confirmation')
{{ $message }}
@enderror
@endif
@push('styles') @endpush @push('scripts') @endpush