@if (Auth::user()->can('hc_dash.view')) @php $financePeriodLabel = $accountingPeriodLabel ?? 'selected period'; $financeSublabel = $accountingPeriodFrom && $accountingPeriodTo ? \Carbon\Carbon::parse($accountingPeriodFrom)->format('d M').' – '.\Carbon\Carbon::parse($accountingPeriodTo)->format('d M Y') : 'select working period'; @endphp
Finance — {{ $financePeriodLabel }}
@endif @php $hasCfdpKpis = Auth::user()->can('active_sponsorship.view') || Auth::user()->can('awaiting_sponsorship.view') || Auth::user()->can('graduated.view') || Auth::user()->can('success_rate.view'); $totalChildren = ($activeSponsorships ?? 0) + ($pendingSponsorships ?? 0) + ($graduated ?? 0); $sponsorshipRate = $totalChildren > 0 ? round((($activeSponsorships ?? 0) / $totalChildren) * 100, 1) : 0; @endphp @if ($hasCfdpKpis)
CFDP — Sponsorship
@if (Auth::user()->can('active_sponsorship.view')) @endif @if (Auth::user()->can('awaiting_sponsorship.view')) @endif @if (Auth::user()->can('graduated.view')) @endif @if (Auth::user()->can('success_rate.view')) @endif
@endif @if (Auth::user()->can('active_farmers.view') || Auth::user()->can('groups_dash.view'))
Transformation
@if (Auth::user()->can('active_farmers.view')) @endif @if (Auth::user()->can('groups_dash.view')) @endif
@endif