@extends('layouts.app') @php use App\Models\Permission; use App\Support\AgeingBucket; use App\Support\Format; @endphp @section('title', 'Dashboard') @section('heading', 'Tenancy Ageing dashboard') @section('subheading', 'As at '.now()->format('d M Y')) @section('actions') @can(Permission::REPORT_VIEW) Ageing report @endcan @include('partials.export-buttons') @endsection @section('content') {{-- The one-click ageing buttons, counted cumulatively --}} @include('partials.ageing-buttons', [ 'bucketCounts' => $cumulativeCounts, 'totalVisible' => $total, 'target' => 'tenancies.index', 'showMode' => false, ])
Records you can see
{{ number_format($total) }}
Already expired
{{ number_format($bandCounts[AgeingBucket::EXPIRED] ?? 0) }}
Due within 3 months
{{ number_format($cumulativeCounts[AgeingBucket::M3] ?? 0) }}
Due within 12 months
{{ number_format($cumulativeCounts[AgeingBucket::M12] ?? 0) }}
{{-- -------------------------------------------------------- --}} {{-- Expiring soonest --}} {{-- -------------------------------------------------------- --}}
Next to expire (within 3 months) See all
@forelse ($urgent as $tenancy) @empty @endforelse
Outlet Region Expiry Stage
{{ $tenancy->outlet }}
{{ $tenancy->location }}
{{ $tenancy->region?->code }} {{ $tenancy->display_expiry }}
{{ Format::countdown($tenancy->days_to_expiry, '') }}
{{ $tenancy->renewal_stage_label ?? '—' }}
Nothing expires in the next three months.
{{-- -------------------------------------------------------- --}} {{-- Already expired --}} {{-- -------------------------------------------------------- --}}
Already expired See all
@forelse ($overdue as $tenancy) @empty @endforelse
Outlet Region Expired Status
{{ $tenancy->outlet }}
{{ $tenancy->location }}
{{ $tenancy->region?->code }} {{ $tenancy->display_expiry }}
{{ Format::countdown($tenancy->days_to_expiry, '') }}
{{ $tenancy->status_label }}
Nothing is past its expiry date.
{{-- -------------------------------------------------------- --}} {{-- Breakdowns --}} {{-- -------------------------------------------------------- --}}
@include('partials.ageing-breakdown', [ 'title' => 'By region', 'icon' => 'bi-geo-alt', 'rows' => $byRegion, 'buckets' => $buckets, 'column' => 'region', ])
@include('partials.ageing-breakdown', [ 'title' => 'By category', 'icon' => 'bi-tags', 'rows' => $byCategory, 'buckets' => $buckets, 'column' => 'category', ])
@endsection