@props(['document', 'label' => null, 'showDriver' => false])
{{-- One KYC document with preview and approve / reject actions. --}}
@php($doc = $document)
@if ($doc)
@if ($doc->document_number)
- {{ __('Number') }}
- {{ $doc->document_number }}
@endif
@if ($doc->expires_at)
- {{ __('Expires') }}
- $doc->isExpired()])>{{ $doc->expires_at->toFormattedDateString() }}
@endif
- {{ __('Uploaded') }}
- {{ $doc->created_at->diffForHumans() }}
@if ($doc->reviewed_at)
- {{ __('Reviewed') }}
- {{ $doc->reviewer?->name }} ยท {{ $doc->reviewed_at->diffForHumans() }}
@endif
@if ($doc->rejection_reason && $doc->status->value === 'rejected')
{{ $doc->rejection_reason }}
@endif
@can('documents.approve')
@if ($doc->status->value !== 'approved' || $doc->isExpired())
@unless ($doc->isExpired())
@endunless
@if ($doc->status->value !== 'rejected')
id }}')">{{ __('Reject') }}
@endif
@endif
@endcan
@else
@endif