@section('title', __('Document Validation'))
@if (!$svcEnabled) {{ __('Infosimples token is not configured yet.') }} {{ __('Open settings') }} @endif @if ($isTestMode) {{ __('TEST MODE is on — all queries are SIMULATED and free.') }} {{ __('settings') }} @endif

Infosimples

{{ __('Provider') }} · {{ __('settings') }}

{{ __('Validation settings') }}
ID {{ __('Driver') }} CPF {{ __('Active') }} CPF ✓ CNH ✓ {{ __('Vehicle') }} ✓ @forelse ($drivers as $driver) @php($lv = $latestByDriver->get($driver->id, [])) {{ $driver->id }} {{ $driver->name }}
{{ $driver->email }} {{ $driver->cpf ?: '·' }} {{ $driver->is_active ? __('Yes') : __('No') }} @foreach (['cpf', 'cnh', 'veiculo'] as $cat) @if (isset($lv[$cat])) {{ $lv[$cat]->success ? '✔' : '✖' }} {{ $lv[$cat]->created_at->format('d/m') }} @else · @endif @endforeach @empty {{ __('No drivers found') }} @endforelse
{{ __('Analyzing documents, please wait...') }}
{{ __('Date') }} {{ __('Driver') }} {{ __('Service') }} {{ __('Result') }} {{ __('Cost') }} {{ __('Details') }} @forelse ($history as $h) {{ $h->created_at->format('d/m/Y H:i') }} {{ optional($h->user)->name ?: '·' }} {{ $h->service }} @if (\Illuminate\Support\Str::startsWith((string) $h->code_message, 'SIMULADO')) {{ __('TEST') }} @endif {{ $h->success ? __('OK') : __('Error') }} ({{ $h->code }}) {{ \Illuminate\Support\Str::limit($h->code_message, 60) }} {{ $h->price !== null ? 'R$ ' . number_format($h->price, 2, ',', '.') : '·' }}
{{ __('view') }}
{{ json_encode(['args' => $h->args, 'result' => $h->result, 'errors' => $h->errors], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) }}
@foreach ((array) $h->receipts as $r) {{ __('Receipt') }} {{ $loop->iteration }} @endforeach
@empty {{ __('No validations yet') }} @endforelse
{{-- modal validar --}}

{{ __('Validate') }}: {{ $valUserName }}

{{ __('Official queries') }}

@foreach (['cpf' => 'CPF', 'cnh' => 'CNH', 'veiculo' => __('Vehicle'), 'custom' => __('Custom')] as $m => $label) @endforeach

{{ __('Image analysis (uploaded documents)') }}

@foreach (['ocr_cnh' => 'OCR CNH', 'ocr_crlv' => 'OCR CRLV', 'qr' => 'QR Code'] as $m => $label) @endforeach
@if ($mode === 'cpf')
@error('cpf')

{{ $message }}

@enderror @error('birthdate')

{{ $message }}

@enderror @elseif ($mode === 'cnh')

{{ __('Required fields vary by state') }} — {{ __('see per-state docs') }} · {{ __('Tip: run OCR CNH first to extract the registro automatically.') }}

@error('uf')

{{ $message }}

@enderror @error('cpf')

{{ $message }}

@enderror @elseif ($mode === 'veiculo')
@error('uf')

{{ $message }}

@enderror @error('placa')

{{ $message }}

@enderror @elseif (in_array($mode, ['ocr_cnh', 'ocr_crlv', 'qr']))
@error('ocrSource')

{{ $message }}

@enderror
@if ($ocrSource === 'upload')
{{ __('Uploading...') }}
@endif

{{ $mode === 'qr' ? __('Decodes the QR Code (e.g. digital CRLV-e) — R$ 0,02') : __('Extracts the document fields with confidence score — R$ 0,10') }}. {{ __('Note: a valid image that is not the expected document is billed too (code 702).') }}

@else
@error('customService')

{{ $message }}

@enderror @endif
{{ __('Querying, please wait...') }}
@if ($lastResult)

{{ $lastResult['success'] ? __('Success') : __('Error') }} ({{ $lastResult['code'] }}) @if ($lastResult['price']) · R$ {{ number_format($lastResult['price'], 2, ',', '.') }} @endif

{{ $lastResult['message'] }}

@if (!empty($lastResult['campos'])) @foreach ($lastResult['campos'] as $c) @endforeach
{{ __('Field') }}{{ __('Value') }}Score
{{ $c['titulo'] }} {{ $c['valor'] }} {{ $c['score'] !== null ? number_format($c['score'] * 100, 0) . '%' : '—' }}
@elseif (!empty($lastResult['result']))
{{ json_encode($lastResult['result'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) }}
@endif @foreach ((array) ($lastResult['receipts'] ?? []) as $r) {{ __('Receipt') }} {{ $loop->iteration }} @endforeach
@endif {{-- selfie --}}

{{ __('Selfie (liveness by web link)') }}

{{ $selfieInfo ? __('Selfie received at') . ' ' . $selfieInfo['at'] : __('No selfie received yet.') }} @if ($selfieInfo) · {{ __('view') }} @endif

@if ($selfieUrl)

{{ __('Send this link to the driver (WhatsApp/e-mail). It opens the phone camera in the browser.') }}

@endif