@php use App\Support\MecReportType; /** @var \App\Models\MecReportDraft $draft */ /** @var \App\Models\PC\Plan|null $plan */ /** @var \App\Models\Core\Project|null $project */ $updated = $draft->updated_at; $updatedLabel = $updated instanceof \Illuminate\Support\Carbon ? $updated->timezone(config('app.timezone'))->format('d M Y, H:i') : (string) $updated; $periodLabel = $plan !== null ? \Carbon\Carbon::create()->month((int) $plan->month)->format('F').' '.$plan->year : '—'; $planMetaRegion = $plan !== null ? plan_region_label_for_plan($plan) : '—'; $reportTypeLabel = match (MecReportType::normalize((string) $draft->report_type)) { MecReportType::RMR, MecReportType::CMR => __('Monitoring Report'), MecReportType::SAR => __('Short Assessment Report (SAR)'), MecReportType::DRR => __('Desk Review Report (DRR)'), MecReportType::SER => __('Summative Evaluation Report (SER)'), MecReportType::IER => __('Impact Evaluation Report (IER)'), MecReportType::TPR => __('Third Party Validation Report (TPR)'), MecReportType::PPR, MecReportType::PMR => __('Project Monitoring Report (PMR)'), default => (string) $draft->report_type, }; $planTypeLabel = $plan === null ? '—' : match ($plan->plan_type ?? '') { 'RVP' => __('Regular Visit Plan (RVP)'), 'CVP' => __('Compliance Visit Plan (CVP)'), 'SVP' => __('Special Visit Plan (SVP)'), 'DRP' => __('Desk Review Plan (DRP)'), 'ERP' => __('Evaluation Plan (ERP)'), 'PMP' => __('Project Monitoring Plan (PMP)'), default => $plan->plan_type ?? __('Plan'), }; $canDeleteDraft = can_mec_report((string) $draft->report_type, 'delete_draft'); @endphp
{{ __('Opening the editor loads your saved fields from this draft only (not from PC-I or the core scheme record).') }}