@extends('admin::layouts.layout') @section('content')

Compliance & Verification

{{ $provider->company_name ?? $provider->user->name }} · {{ $provider->user->email }}

Back
@php $kycStatusLabel = ucfirst(str_replace('_', ' ', $kycStatus)); $kycBadgeClass = $kycStatus === 'approved' ? 'text-bg-success' : ($kycStatus === 'rejected' ? 'text-bg-danger' : ($kycStatus === 'under_review' ? 'text-bg-warning' : 'text-bg-secondary')); $verifiedCount = count(array_filter($documents, fn($d) => $d['status'] === 'verified')); $totalDocs = count($documents); $completionPct = $totalDocs ? round(($verifiedCount / $totalDocs) * 100) : 0; @endphp {{-- ================= VERIFICATION STATUS ================= --}}

Verification Status

@if($totalRequired > 0 && $verifiedCount == $totalRequired) Fully Verified @elseif($totalRequired > 0 && $verifiedCount > 0) Partially Verified @elseif($totalRequired > 0) Verification Required @else No Documents Required @endif @if($kycRecord) KYC: {{ $kycStatusLabel }} @endif
Completion Rate

{{ $completionPct }}%

Last Verified

@php $lastVerified = collect($documents) ->filter(fn($d) => $d['verified_at'] !== null) ->sortByDesc('verified_at')->first(); @endphp {{ $lastVerified ? \Carbon\Carbon::parse($lastVerified['verified_at'])->format('Y-m-d') : 'N/A' }}

Next Review

{{ now()->addMonths(3)->format('Y-m-d') }}

@if($kycRecord)
Risk Level

{{ ucfirst($riskLevel) }}

@endif
{{-- ================= TABS ================= --}}
{{-- ================= OVERVIEW ================= --}}
Compliance Checklist
@forelse($documents as $document)
@if($document['status'] === 'verified') @elseif($document['status'] === 'rejected') @elseif($document['status'] === 'received') @else @endif

{{ $document['document_name'] }}

@if(!$document['is_required']) Optional @endif
@if($document['status'] === 'verified') Verified @elseif($document['status'] === 'received') Pending Review @elseif($document['status'] === 'rejected') Rejected @else Not Uploaded @endif
@empty

No documents required for this role.

@endforelse
{{-- ================= DOCUMENTS ================= --}}
Documents & Agreements
{{ $verifiedCount }} / {{ $totalDocs }} Verified
@forelse($documents as $document)
{{ $document['document_name'] }}
{{ $document['is_required'] ? 'Required' : 'Optional' }} @if($document['status'] === 'verified') Verified @elseif($document['status'] === 'received') Pending Review @elseif($document['status'] === 'rejected') Rejected @else Not Uploaded @endif
@if($document['kyc_document_id']) @if($document['status'] !== 'verified') @endif @if($document['status'] === 'received') @endif @else @endif
Status

@if($document['status'] === 'verified') Verified @elseif($document['status'] === 'received') Pending Review @elseif($document['status'] === 'rejected') Rejected @else Not Uploaded @endif

@if($document['file_name'])
File Name

{{ $document['file_name'] }}

@endif @if($document['received_at'])
Uploaded

{{ \Carbon\Carbon::parse($document['received_at'])->format('Y-m-d') }}

@endif @if($document['verified_at'])
Verified

{{ \Carbon\Carbon::parse($document['verified_at'])->format('Y-m-d') }}

@endif @if($document['rejection_reason'])
Rejection Reason

{{ $document['rejection_reason'] }}

@endif
@empty

No documents required for this role.

@endforelse
{{-- Hidden file input --}} {{-- Reject reason modal --}} @push('styles') @endpush @push('scripts') @endpush @endsection