@extends('admin.admin_dashboard') @section('admin') @php $classOptions = ['Baby','Top','Primary One','Primary Two','Primary Three','Primary Four','Primary Five','Primary Six','Primary Seven','Senior One','Senior Two','Senior Three','Senior Four','Vocational']; $childCategories = ['children','sponsorship','education','welfare','coffee','graduation']; $presetLabels = ['basic' => 'Basic columns', 'contact' => 'Contact info', 'sponsorship' => 'Sponsorship info', 'financial' => 'Financial', 'all' => 'All columns']; @endphp

CFDP Reports

Generate, filter and export reports across sponsorship, education, welfare, generosity and communications.

@if(($report['count'] ?? 0) > 0)
@endif
{{-- Category hub --}}
@foreach($categories as $key => $meta) @endforeach
{{-- Filters --}}
{{ $categories[$category]['label'] ?? 'Report' }}
Configure filters and columns, then run the report.
@if(in_array($category, $childCategories))
@endif @if(in_array($category, ['sponsorship','graduation']))
@endif @if($category === 'sponsors')
@endif @if(in_array($category, ['education','children']))
@endif @if($category === 'education')
@endif @if($category === 'coffee')
@endif @if(in_array($category, ['gifts','donations','letters','status_audit','welfare'])) @if($category !== 'letters' && $category !== 'status_audit')
@endif @endif @if(in_array($category, ['gifts','donations']))
@endif @if($category === 'donations')
@endif @if($category === 'letters')
@endif @if($category === 'status_audit')
@endif {{-- Column picker --}}

Selected columns appear in the table and exports. At least one column is required.
@if(!empty($summaryCards))
@foreach($summaryCards as $card)
{{ $card['label'] }}
{{ $card['value'] }}
@endforeach
@endif @if(($report['count'] ?? 0) > 0)
@foreach([route('reports.cfdp.pdf') => ['PDF', 'outline-secondary', 'bx-download'], route('reports.cfdp.excel') => ['Excel', 'success', 'bx-file']] as $exportRoute => [$exportLabel, $variant, $icon])
@foreach(request()->all() as $key => $value) @if(is_array($value)) @foreach($value as $v) @endforeach @else @endif @endforeach
@endforeach
{{ $report['label'] }} ({{ number_format($report['count']) }} records)
# @foreach($report['columns'] as $label) {{ $label }} @endforeach @foreach($report['rows'] as $index => $row) {{ $index + 1 }} @foreach(array_keys($report['columns']) as $key) {{ $row[$key] ?? 'N/A' }} @endforeach @endforeach
@else
Choose a report type, select your columns, set any filters, then click Run Report.
@endif
@push('styles') @endpush @push('scripts') @endpush @endsection