@php use App\Enums\KycStatus; $kycSubmission = auth()->user()->kycSubmission; $kycStatus = $kycSubmission?->status ?? null; $state = match ($kycStatus) { KycStatus::PENDING => 'pending', KycStatus::APPROVED => 'approved', KycStatus::REJECTED => 'rejected', default => 'new', }; $stateLabel = match ($state) { 'pending' => __('Under Review'), 'approved' => __('Verified'), 'rejected' => __('Rejected'), default => __('Not Started'), }; $stateIcon = match ($state) { 'pending' => 'fas fa-hourglass-half', 'approved' => 'fas fa-circle-check', 'rejected' => 'fas fa-circle-exclamation', default => 'fas fa-id-card', }; $stateTitle = match ($state) { 'pending' => __('KYC review in progress'), 'approved' => __('KYC verification complete'), 'rejected' => __('KYC needs attention'), default => __('Start identity verification'), }; $stateSubtitle = match ($state) { 'pending' => __('Your KYC details are with our review team. We will update this page after the decision.'), 'approved' => __('Your identity verification is complete. No further KYC action is required right now.'), 'rejected' => __('Review the feedback, update your documents, and resubmit your identity details.'), default => __('Submit your identity details and documents to complete KYC verification.'), }; $canSubmit = ! $kycSubmission || $kycStatus === KycStatus::REJECTED; $submittedAt = $kycSubmission?->created_at; $reviewedAt = $kycSubmission?->updated_at?->gt($kycSubmission->created_at) ? $kycSubmission->updated_at : null; @endphp @extends('frontend.user.setting.index') @section('title', __('KYC Verification')) @section('user_setting_content')
{{ __('Identity Verification') }}
{{ $stateTitle }}

{{ $stateSubtitle }}

{{ $stateLabel }}
{{ __('Current Status') }} {{ $stateLabel }}
{{ __('Submitted') }} {{ $submittedAt ? $submittedAt->diffForHumans() : __('Not submitted') }}
{{ __('Last Update') }} {{ $reviewedAt ? $reviewedAt->diffForHumans() : __('Awaiting review') }}
{{-- Status panel with submission timeline --}} @if($kycSubmission)
{{ __('Verification History') }}
{{ __('Review timeline') }}
{{ $stateLabel }}
  1. {{ __('Submitted') }} {{ $kycSubmission->created_at?->diffForHumans() }}
  2. {{ __('Under Review') }} {{ $state === 'pending' ? __('In progress') : __('Completed') }}
  3. @switch($state) @case('approved') {{ __('Approved') }} @break @case('rejected') {{ __('Rejected') }} @break @default {{ __('Decision') }} @endswitch {{ $reviewedAt ? $reviewedAt->diffForHumans() : __('Awaiting') }}
@endif {{-- Submission form --}} @if($canSubmit)
{{ $kycStatus === KycStatus::REJECTED ? __('Resubmit your verification') : __('Start your verification') }}

{{ __('Provide accurate information to avoid delays in review.') }}

{{ __('Your data is encrypted and private.') }}
@csrf

{{ __('Choose the document type that matches what you have on hand.') }}

{{ __('Fill in every required field and upload clear, legible documents.') }}

{{ __('Select a verification type above to load the required fields.') }}

{{ __('Anything the reviewer should know about your submission.') }}

@endif @endsection @push('scripts') @endpush