@extends('layouts.app') @section('title', report_index_list_page_title()) @push('stylesheets') @include('reports.partials.mec-listing-table-styles') @include('partials.filter-card-styles') @include('partials.collapsible-filter-styles') @include('partials.index-datatable-styles') @endpush @section('contents')
@php $reportListTabStatus = report_index_status(); $reportListResetUrl = $reportListTabStatus !== '' ? route('reports.index', ['status' => $reportListTabStatus]) : route('reports.index'); $reportFiltersOpen = ($reportTypeFilter ?? '') !== '' || ($initiatorFilter ?? '') !== '' || ($schemeUidFilter ?? '') !== '' || ($adpNumberFilter ?? '') !== '' || ($schemeNameFilter ?? '') !== '' || ($locationFilter ?? '') !== '' || ($departmentFilter ?? '') !== '' || ($reportRegionFilter ?? '') !== '' || ($reportAssessmentFilter ?? '') !== '' || ($reportStatusFilter ?? '') !== '' || ($dateFromFilter ?? '') !== '' || ($dateToFilter ?? '') !== '' || (($dateFieldFilter ?? '') === \App\Support\MecReportDateFieldFilter::PUBLISHED_DATE); @endphp
@if ($reportListTabStatus !== '') @endif @if (! empty($perPage)) @endif
@if(mec_report_list_shows_region_filter())
@endif @if(mec_report_list_shows_assessment_status_filter($listingMode ?? 'hub'))
@endif @if (($listingMode ?? '') === 'published')
@endif

{{ report_index_list_page_title() }}

@include('reports.partials.mec-listing-scheme-name-toggle')
@include('reports.partials.new-monitoring-report-button')
@php $listingSummary = $listingSummary ?? ['total' => 0, 'satisfactory' => 0, 'unsatisfactory' => 0]; @endphp
{{ __('Total Reports') }}: {{ number_format((int) ($listingSummary['total'] ?? 0)) }} {{ __('Satisfactory') }}: {{ number_format((int) ($listingSummary['satisfactory'] ?? 0)) }} {{ __('Un-Satisfactory') }}: {{ number_format((int) ($listingSummary['unsatisfactory'] ?? 0)) }}
@include('reports.partials.mec-listing-table', [ 'tableId' => 'tblReportsHub', 'reportRows' => $reportRows, 'listingMode' => $listingMode ?? 'hub', ])
@include('partials.listing-pagination', [ 'paginator' => $paginator ?? null, 'perPage' => $perPage ?? 25, 'baseUrl' => request()->url(), ])
@endsection @push('scripts') @include('partials.index-datatable-scripts') @include('partials.collapsible-filter-scripts') @include('reports.partials.mec-listing-filter-form-scripts') @include('reports.partials.mec-listing-datatable', [ 'tableId' => 'tblReportsHub', 'listingMode' => $listingMode ?? 'hub', 'emptyTableMessage' => __('No reports yet.'), ]) @include('reports.partials.mec-listing-scheme-name-toggle-scripts') @endpush