@php use App\Models\Dsar\DsarEvidenceItem; $reviewed = $confirmedCount + $dismissedCount; $pct = $totalCount > 0 ? round($reviewed / $totalCount * 100) : 0; @endphp
{{-- ══ Compact review header (replaces the global navigation) ══════════════ --}}
Back
@if($contextLabel)
{{ $contextLabel }}
@endif
{{ $fileName ?: 'Document' }}
{{-- Progress --}}
{{ $reviewed }} of {{ $totalCount }} reviewed
{{-- Save state --}} {{-- Keyboard shortcuts --}}
Keyboard shortcuts
CConfirm finding
DDismiss finding
EEdit interpretation
J / Next finding
K / Previous finding
LLocate in document
EscCancel drawing / edit
{{-- ══ Toolbar ════════════════════════════════════════════════════════════ --}}
{{-- Filters --}}
{{-- Page nav (symmetrical) --}}
Page of
{{-- Zoom --}}
{{-- Finding scan --}}
{{-- Mark evidence area --}}
{{-- Locate / mark banner --}}
{{-- ══ Split: PDF (left) + findings (right) ═══════════════════════════════ --}}
{{-- PDF viewer — wire:ignore keeps Livewire's morphdom away; Alpine/PDF.js own it. --}}
{{-- Saved highlights --}} {{-- Proposed (unsaved) location --}}
{{-- Live draw ghost --}}
{{-- Resizer --}} {{-- Findings panel --}}
{{-- Status strip --}}
{{ $totalCount }} Total {{ $confirmedCount }} Confirmed {{ $toReviewCount }} To review {{ $dismissedCount }} Dismissed
{{-- Bulk action bar --}} @if(count($selected) > 0)
{{ count($selected) }} selected
@endif {{-- Add / annotate form (from "Mark evidence area") --}} @if($showAddForm)
New evidence @if($addPage)Page {{ $addPage }}@endif
@error('addComment')
{{ $message }}
@enderror
@endif {{-- Findings list --}}
@forelse($itemsByPage as $pageNum => $pageItems) @php $pgToReview = $pageItems->filter->isUnreviewed()->count(); $pgConfirmed = $pageItems->filter->isConfirmed()->count(); $pgDismissed = $pageItems->filter->isDismissed()->count(); $pgTotal = $pageItems->count(); $pageKey = (int) ($pageNum ?: 0); $unlocated = $pageKey === 0; // Labelled group summary — never bare adjacent numbers. if ($pgToReview === 0) { $pgSummary = $pgTotal . ' ' . \Illuminate\Support\Str::plural('finding', $pgTotal) . ' · Reviewed'; } elseif ($pgConfirmed === 0 && $pgDismissed === 0) { $pgSummary = $pgTotal . ' ' . \Illuminate\Support\Str::plural('finding', $pgTotal) . ' · ' . $pgToReview . ' to review'; } else { $parts = []; if ($pgConfirmed > 0) $parts[] = $pgConfirmed . ' confirmed'; if ($pgToReview > 0) $parts[] = $pgToReview . ' to review'; if ($pgDismissed > 0) $parts[] = $pgDismissed . ' dismissed'; $pgSummary = $pgTotal . ' ' . \Illuminate\Support\Str::plural('finding', $pgTotal) . ' · ' . implode(' · ', $parts); } @endphp
@if($unlocated)
These findings were extracted from document text but could not be linked to an exact page location. Use Locate to mark where each one appears.
@endif
@foreach($pageItems as $item) @php $colour = DsarEvidenceItem::categoryColour($item->category); $label = DsarEvidenceItem::categoryLabel($item->category); $stateClass = $item->isConfirmed() ? 'confirmed' : ($item->isDismissed() ? 'dismissed' : 'unreviewed'); $isEditing = $editingId === $item->id; $quoteLong = mb_strlen((string) $item->quote) > 240; $commentLong= mb_strlen((string) $item->comment) > 240; $isReviewed = $item->isConfirmed() || $item->isDismissed(); @endphp
{{-- Header: current label · category · severity · source · select --}}
Current {{ $label }} {{ ucfirst($item->severity) }} @if($item->source === 'human') Human @else Synapse @endif
{{-- Location --}}
@if($item->page) Page {{ $item->page }} @else Unlocated @endif
{{-- Source text --}} @if($item->quote)
Source text · from the document
"{{ $item->quote }}"
@if($quoteLong) @endif
@endif {{-- AI interpretation (editable) --}}
{{ $item->source === 'human' ? 'Interpretation' : 'AI interpretation' }} @if($item->source !== 'human')· generated, not verbatim@endif
@if($isEditing)
@error('editingComment')
{{ $message }}
@enderror
@else

{{ $item->comment ?: '—' }}

@if($commentLong) @endif @endif
@if($item->human_notes)

{{ $item->human_notes }}

@endif {{-- Care setting --}} @if(count($careSettings) > 0)
@if($item->care_setting_id && $item->care_setting_is_suggested) Suggested @endif
@endif {{-- Actions --}} @if(!$isEditing)
@if($isReviewed) Status: {{ $item->isConfirmed() ? 'Confirmed' : 'Dismissed' }}
@if($item->isConfirmed()) @else @endif
@if(!$item->page) @endif @else @if(!$item->page) @endif @endif @if($item->source === 'human') @endif
@endif
@endforeach
@empty

No findings match the current filters.

@endforelse {{-- All-reviewed completion state --}}
Review complete
Back to evidence overview
{{-- Toast --}}
@push('scripts') @endpush