@php /** * Persistent notice while you are still holding a float you have not * declared. * * The block itself is enforced in the permission layer * (App\Support\CutoverGuard), which is silent by nature: buttons simply are * not there. Silence is the one thing that must not happen here. Somebody * who cannot find "Record payment" needs to be told why in the same breath, * and given the way out, or they will spend the morning asking around and * end up taking the money without recording it, which is the exact outcome * the block exists to prevent. * * So it sits above every page, on every screen, until they have counted. * It disappears the moment they do. */ $cbUser = Auth::user(); $cbTeam = $cbUser?->currentTeam; $cbOutstanding = $cbUser && $cbTeam ? app(\App\Services\CutoverService::class)->outstandingFor($cbUser) : collect(); $cbCampaign = $cbOutstanding->isNotEmpty() ? app(\App\Services\CutoverCampaignService::class)->campaignFor($cbUser) : null; @endphp @if ($cbOutstanding->isNotEmpty())
{{ trans_choice( '{1} You have not declared :names yet.|[2,*] You have not declared :names yet.', $cbOutstanding->count(), ['names' => $cbOutstanding->pluck('name')->implode(', ')], ) }} {{ __('Until you do, you cannot record payments, expenses or income. Everything else about your work is unaffected.') }} @if ($cbCampaign) {{ __('Day :day of :total.', ['day' => $cbCampaign->dayNumber(), 'total' => \App\Models\CutoverCampaign::WINDOW_DAYS]) }} @endif
@if (! request()->routeIs('treasury.punch_in')) {{ __('Count it now') }} @endif