@php /** @var array $locales */ $locales = config('clinic.locales', []); $direction = $locales[app()->getLocale()]['dir'] ?? 'ltr'; /** @var \App\Support\Documents\VerificationResult|null $result */ // green | amber | red → the panel's accent. Never the only signal: every // state is spelled out in words beside it, because a colour is invisible to // a colour-blind reader and to a photocopier. $tones = ['green' => 'success', 'amber' => 'caution', 'red' => 'critical']; $icons = ['green' => 'patch-check-fill', 'amber' => 'exclamation-triangle-fill', 'red' => 'x-octagon-fill']; @endphp {{-- The public verification page. Its own document rather than the guest layout, and for one reason: that layout puts the software's name and icon at the top. Here that would be a lie of emphasis — a patient scanning their report must land on their clinic, not on the company that wrote the software. The vendor gets one muted line at the very bottom, as a technical attribution, and nothing more. --}} {{-- Nothing here should be indexed: the addresses contain verification tokens, and a search engine holding a list of them defeats the point. --}} {{ __('documents.verify.title') }} · {{ $clinic['name'] ?: __('documents.verify.heading') }} @vite(['resources/css/app.scss', 'resources/js/app.js']) @if (! empty($brandingCss)) @endif
{{-- ── The issuing clinic, first and largest ──────────────────────── --}}
@if ($clinic['logo']) @endif

{{ $clinic['name'] }}

@if ($clinic['address'])

{{ $clinic['address'] }}

@endif @if ($clinic['phone'] || $clinic['email'])

{{ collect([$clinic['phone'], $clinic['email']])->filter()->implode(' · ') }}

@endif

{{ __('documents.verify.heading') }}

@if ($result === null) @include('partials.verify-form', ['number' => '']) @else @php($tone = $result->state->tone()) {{-- The answer, in words. The badge repeats it in colour; the paragraph underneath says what it does and does not mean, because "official record found" and "verified" are the two things a reader must never confuse. --}}
{{ __($result->state->translationKey()) }} {{ __('documents.state_detail.'.strtolower($result->state->value)) }}
@if ($result->found)
{{ __('documents.verify.clinic') }}
{{ $clinic['name'] }}
{{ __('documents.verify.document') }}
{{ __($result->type->translationKey()) }}
{{ __('documents.verify.document_id') }}
{{ $result->number }}
{{ __('documents.verify.version') }}
{{ $result->version }}
{{ __('documents.verify.status') }}
{{ $result->status->publicState() }}
{{ __('documents.verify.issued') }}
{{ $result->issuedAt?->translatedFormat('d F Y H:i') }}
@if ($result->revokedAt)
{{ __('documents.verify.revoked_on') }}
{{ $result->revokedAt->translatedFormat('d F Y H:i') }}
@endif @if ($result->releasedBy)
{{ __('documents.verify.released_by') }}
{{ $result->releasedBy }}
@endif @if ($result->patient)
{{ __('documents.verify.patient') }}
{{ $result->patient }}
@endif
{{ __('documents.verify.signature') }}
@if ($result->signatureValid === true) {{ __('documents.verify.signature_signed') }} @elseif ($result->signatureValid === false) {{ __('documents.verify.signature_invalid') }} @else {{ __('documents.verify.signature_none') }} @endif
{{-- The replacement is named, not linked. A link would hand whoever holds the outdated copy the newer document's address, and the person entitled to that copy is the patient — who should get it from the clinic. --}} @if ($result->supersededBy)
{{ __('documents.verify.replaced_by') }}
{{ $result->supersededBy }}
@endif
@else @include('partials.verify-form', ['number' => '']) @endif @endif
{{-- ── The official results ───────────────────────────────────────── --}} @if ($result?->found && $result->results !== [])

{{ __('documents.verify.results_title') }}

{{ __('documents.verify.results_intro') }}

@foreach ($result->results as $row) @endforeach
{{ __('documents.verify.results_test') }} {{ __('documents.verify.results_value') }} {{ __('documents.verify.results_unit') }} {{ __('documents.verify.results_range') }}
{{ $row['test'] ?? '' }} {{ $row['value'] ?? '—' }} {{ $row['unit'] ?? '' }} {{ $row['range'] ?? '' }}
@endif {{-- ── Verify your copy ───────────────────────────────────────────── --}} @if ($result?->found && $token)

{{ __('documents.verify.upload_title') }}

{{ __('documents.verify.upload_intro') }}

@if ($uploadError) @endif @error('document') @enderror @if (! $result->hasStoredPdf)

{{ __('documents.verify.upload_none_stored') }}

@else
@csrf {{ __('documents.verify.upload_hint', ['size' => $maxUploadMb]) }}
@endif
@endif {{-- What this page did and did not prove. Under the result rather than tucked away, because the difference matters in a dispute. --}}

{{ __('documents.verify.scope') }}

{{-- The one place the software vendor is named, and never as the issuer. --}}

{{ config('clinic.product.name') }}