@extends('layouts.app') @section('title', 'Reports') @section('content') @include('partials.flash') @php $base = $user->primaryRole(); $filterBase = array_filter([ 'service' => $serviceId, 'q' => $q !== '' ? $q : null, 'period' => request('period'), 'from' => request('from'), 'to' => request('to'), ]); @endphp {{-- Report type tabs --}}
@foreach($defs as $key => [$title, $desc, $icon]) {{ $icon }} {{ $title }} @endforeach
{{-- Filters + export --}}
@if($type === 'completions')
@endif @if($services->count() > 1)
@endif
search
@if($q !== '' || $serviceId) Clear @endif @if($type === 'completions') picture_as_pdf PDF @endif download Export CSV
{{-- Table --}}
{{ $defs[$type][2] }}

{{ $defs[$type][0] }} ({{ $total }})

{{ $type === 'completions' ? 'Completions in '.$periodLabel : $defs[$type][1] }}

@foreach($columns as $col)@endforeach @forelse($reports as $row) @foreach($columns as $col) @endforeach @empty @endforelse
{{ $col }}
{{ $row[$col] ?? '—' }}
No data for this report.
@if($reports->hasPages())
{{ $reports->links() }}
@endif
@endsection