@extends('layouts.admin') @section('title','Program Kerja') @section('page_title','Program Kerja') @section('page_subtitle','Target, progres, PIC, anggaran dan deadline') @section('content')
<div class="grid form-grid"><section class="card"><h3>Tambah Program</h3><form method="post" action="{{ route('programs.store') }}" class="form">@csrf<div class="two"><label>Unit<select name="organization_id">@foreach($orgs as $o)<option value="{{ $o->id }}">{{ $o->acronym }}</option>@endforeach</select></label><label>Kategori<input name="category" placeholder="Organisasi / Kaderisasi / Sosial"></label></div><label>Nama Program<input name="name" required></label><label>Target<input name="target"></label><div class="three"><label>Deadline<input type="date" name="due_date"></label><label>Anggaran<input type="number" name="budget" min="0"></label><label>Progres %<input type="number" name="progress" min="0" max="100" value="0" required></label></div><label>Status<select name="status"><option value="not_started">Belum Mulai</option><option value="running">Berjalan</option><option value="done">Selesai</option><option value="late">Terlambat</option></select></label><button class="btn primary">Simpan Program</button></form></section><section class="card tip"><h3>Monitoring Program</h3><p>Dashboard menghitung rata-rata progres dan menyoroti program yang lewat deadline atau berstatus terlambat.</p><p>Nanti bisa ditambah PIC, indikator keberhasilan, bukti kegiatan, realisasi anggaran, dan LPJ otomatis.</p></section></div>
<section class="card table-card"><div class="section-head"><h3>Daftar Program</h3><span>{{ $programs->total() }} program</span></div><div class="table-wrap"><table><thead><tr><th>Program</th><th>Unit</th><th>Deadline</th><th>Anggaran</th><th>Progres</th><th>Status</th></tr></thead><tbody>@foreach($programs as $p)<tr><td><b>{{ $p->name }}</b><small>{{ $p->target }}</small></td><td>{{ $p->organization?->acronym }}</td><td>{{ $p->due_date?->format('d M Y') ?? '—' }}</td><td>Rp {{ number_format((float)$p->budget,0,',','.') }}</td><td><div class="progress"><i style="width:{{ $p->progress }}%"></i></div><small>{{ $p->progress }}%</small></td><td><span class="pill {{ $p->status==='late'?'danger':'' }}">{{ $p->status }}</span></td></tr>@endforeach</tbody></table></div>{{ $programs->links() }}</section>@endsection