docs(mind): update plan + tambah summary statistik kesehatan ringkasan

Tandai Step A & B selesai, catat decision log dan pending manual
(bunx prisma migrate deploy + trigger GH workflow).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-04 14:35:42 +08:00
parent 68a2a6390b
commit 9ef5773cc2
2 changed files with 82 additions and 8 deletions

View File

@@ -15,15 +15,30 @@ Tambah ke model `RingkasanKesehatanDesa` (additive, tidak ubah field lama):
| `giziBaikPct` | Int | 0 | Persentase gizi baik (0-100) |
| `targetStuntingPct` | Int | 0 | Persentase target stunting (0-100) |
## Step
## Step A — Schema + API
- [ ] 1. Edit `prisma/schema.prisma` — tambah 4 field
- [ ] 2. Run migration: `bunx prisma migrate dev --name add-statistik-pct-ringkasan-kesehatan`
- [ ] 3. Update `kesehatan/ringkasan-kesehatan/findUnique.ts` — select field baru
- [ ] 4. Update `kesehatan/ringkasan-kesehatan/updt.ts` — tambah validasi Elysia + update logic
- [ ] 5. `bun run build`pastikan 0 error
- [ ] 6. Bump version `package.json`
- [ ] 7. Commit + push branch baru
- [x] 1. Edit `prisma/schema.prisma` — tambah 4 field
- [x] 2. Buat migration manual `20260504000000_add_statistik_pct_ringkasan_kesehatan/migration.sql` (mode interaktif tidak tersedia di sandbox)
- [x] 3. `findUnique.ts` tidak perlu diubah — `findFirst` tanpa `select` otomatis bawa field baru
- [x] 4. `updt.ts` + `index.ts` — handler create/update + Elysia body validation (range 0-100)
- [x] 5. `bun run build`exit 0
- [x] 6. Bump `0.1.48 → 0.1.49`
- [x] 7. Commit `feat(kesehatan): tambah 4 field statistik pct...` + push branch `tasks/statistik-kesehatan-ringkasan/add-pct-fields/20260504` + merge ke `stg`
## Step B — State File Admin
- [x] 1. Bikin `_state/kesehatan/ringkasan-kesehatan/ringkasanKesehatan.ts` (Valtio + zod)
- [x] 2. `findUnique.load()` — GET + sync ke form
- [x] 3. `update.submit()` — zod validate (count ≥ 0, Pct 0-100) + PUT + refresh
- [x] 4. `update.reset()`
- [x] 5. `bun run build` — exit 0
- [x] 6. Bump `0.1.49 → 0.1.50`
- [x] 7. Commit + push ke `stg` (2 remote)
## Pending Manual
- [ ] User jalankan `bunx prisma migrate deploy` di terminal lokal — apply 4 kolom baru ke DB
- [ ] Trigger GitHub Workflow (publish + re-pull) bila mau deploy ke STG
## Prinsip
- Additive only — field lama (`ibuHamilAkh`, `balitaTerdaftar`, `alertStunting`) tidak disentuh