{{-- Header --}}

DSAR Report by Client

Which clients have had all their DSARs returned and can be progressed onwards

{{-- Stat Cards --}}

Clients with DSARs

{{ number_format($statTotal) }}

Have at least one sent DSAR

Ready to Progress

{{ number_format($statReady) }}

All DSARs returned

With Outstanding

{{ number_format($statOutstanding) }}

Still awaiting responses

Needs Attention

{{ number_format($statNeedsAttn) }}

Have a failed DSAR
{{-- Clients Table --}}
Clients
@forelse($rows as $row) @empty @endforelse
Client Returned Outstanding Acknowledged Oldest (days) Status
{{ $row->client->fullName }} @if($row->client->reference)
{{ $row->client->reference }}
@endif
{{ $row->returned }} / {{ $row->total }}
@if($row->outstanding > 0) {{ $row->outstanding }} @else 0 @endif @if($row->acknowledged > 0) {{ $row->acknowledged }} @else 0 @endif {{ $row->oldest_age !== null ? $row->oldest_age : '—' }} @if($row->ready) Ready to progress @else {{ $row->outstanding }} outstanding @if($row->failed > 0) {{ $row->failed }} failed @endif @endif
No clients with DSARs found.
{{-- Offcanvas: per-client DSAR breakdown --}}
{{ $selectedClient?->fullName ?? 'DSAR Breakdown' }}
@if($selectedClient && $selectedClient->reference)
{{ $selectedClient->reference }}
@endif
@if($selectedClient) @php $returnedCount = $selectedDsars->whereIn('status', \App\Enum\Dsar\DsarStatus::terminal())->count(); $outstandingCount = $selectedDsars->whereIn('status', \App\Enum\Dsar\DsarStatus::outstanding())->count(); $acknowledgedCount = $selectedDsars->where('status', 'acknowledged')->count(); $failedCount = $selectedDsars->where('status', 'failed')->count(); $allReturned = $selectedDsars->count() > 0 && $returnedCount === $selectedDsars->count(); @endphp @if($allReturned)
All DSARs returned — this client can be progressed onwards.
@endif
{{ $returnedCount }} returned {{ $outstandingCount }} outstanding @if($acknowledgedCount > 0) {{ $acknowledgedCount }} acknowledged @endif @if($failedCount > 0) {{ $failedCount }} failed @endif Open client
@php $canViewDsar = auth()->user()?->can('dsars.view'); @endphp
@forelse($selectedDsars as $dsar) @php $isOverdue = $dsar->expected_at && $dsar->expected_at->isPast() && !in_array($dsar->status, \App\Enum\Dsar\DsarStatus::terminal()); @endphp
{{ $dsar->institution->display_name ?? 'Unknown' }}
{{ $dsar->institution->dsarType->display_name ?? 'N/A' }}
{{ \App\Enum\Dsar\DsarStatus::label($dsar->status) }}
Sent {{ $dsar->created_at->format('d M Y') }} @if($dsar->expected_at) Due {{ $dsar->expected_at->format('d M Y') }} @endif @if($dsar->reference) {{ $dsar->reference }} @endif
@if($canViewDsar) @endif
@empty

No DSARs recorded.

@endforelse
@else

Select a client to view their DSAR breakdown.

@endif
@script @endscript