Commit Graph

485 Commits

Author SHA1 Message Date
fd2060405f feat(kesehatan): slim ringkasan kesehatan schema + tambah seeder balita & ibu hamil - bump 0.1.52
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 10:31:40 +08:00
afe0d9d04b fix(kesehatan): solve valtio mutation error and sync db
- Fix 'Cannot assign to read only property' by mutating original Valtio proxy in create/edit pages for IbuHamil and Balita
- Sync database schema with 'prisma db push' to create IbuHamil and Balita tables
- Verify build success
2026-05-04 17:04:44 +08:00
dccba1f82b feat(kesehatan): refactor ringkasan kesehatan to auto-derived stats
- Add IbuHamil and Balita models to schema.prisma
- Implement IbuHamil and Balita API modules (CRUD)
- Implement /stats endpoint for aggregated health KPIs
- Refactor ringkasan-kesehatan admin page to dashboard-style UI
- Update sidebar with Ibu Hamil and Balita entries
- Fix type errors and icon exports in admin UI
- Bump version to 0.1.52
2026-05-04 16:52:14 +08:00
fc6846f7a1 feat(kesehatan): admin page ringkasan-kesehatan + sidebar entry - bump ke 0.1.51
- New page src/app/admin/(dashboard)/kesehatan/ringkasan-kesehatan/page.tsx
  konsumsi ringkasanKesehatanState (load + submit) dengan 7 NumberInput
  (3 count + 4 pct).
- Tambah Kesehatan_8 "Ringkasan Kesehatan" di 3 instance sidebar
  (list_PageAdmin.tsx).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 15:20:39 +08:00
68a2a6390b feat(kesehatan): tambah state file ringkasanKesehatan + bump ke 0.1.50
State Valtio untuk RingkasanKesehatanDesa: findUnique (load + sync form)
dan update (zod validation, PUT, refresh). Cover 3 KPI + 4 field Pct baru.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 14:30:55 +08:00
ba2b90be75 feat(kesehatan): tambah 4 field statistik pct ke RingkasanKesehatanDesa - bump ke 0.1.49
Tambah imunisasiLengkapPct, pemeriksaanRutinPct, giziBaikPct, targetStuntingPct
ke schema + migration + Elysia body validation (range 0-100) + updt handler.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04 14:19:27 +08:00
0a5d17f45e docs: add AI collaboration contract and fix KegiatanCard image handling - bump to 0.1.48 2026-04-30 15:30:24 +08:00
83a2dece57 refactor(kegiatan-desa): redesign public list page to card grid + kategori filter
- Remove hero/featured section and tab navigation
- Redesign to pecalang-style: 3-col card grid (image, title, desc, Detail button)
- Replace tabs with Select dropdown filter by kategori
- Search + kategori filter use query params, stay on /semua route
- Image hidden when empty (no placeholder)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 15:09:33 +08:00
e0a5177257 feat(kegiatan-desa): add full CRUD frontend + public detail page - bump to 0.1.47
- API: add GET /:id endpoint (findUnique) for KegiatanDesa
- Admin CMS: add pages for list-kegiatan-desa and kategori-kegiatan-desa (list, create, detail, edit)
- Public: add detail page at /desa/kegiatan-desa/[kategori]/[id]
- Refactor: move KegiatanCard to _com to fix Next.js page export constraint
- Nav: register kegiatan-desa in navbar and admin page list

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 14:27:28 +08:00
23c955597e feat(api): add KategoriKegiatan CRUD API and register module - bump to 0.1.46
- Add KategoriKegiatan CRUD (create, findMany, findUnique, update, del)
- Register KategoriKegiatan in Desa API router
- Support soft delete for categories
2026-04-30 11:33:29 +08:00
b39f9b39da feat(sosial): add schema fields + API endpoints for Sosial dashboard - bump to 0.1.45
- Add persentase field to ProgramKesehatan (for health stats bar chart)
- Add BeasiswaConfig model (dana tersalurkan + tahun ajaran)
- Add RingkasanKesehatanDesa model (ibu hamil, balita, alert stunting)
- Add KegiatanDesa CRUD API (GET /api/desa/kegiatandesa/find-many?kategori=Budaya)
- Add BeasiswaConfig API (GET/PUT /api/pendidikan/beasiswa/beasiswaconfig/...)
- Add RingkasanKesehatan API (GET/PUT /api/kesehatan/ringkasankesehatan/...)
- Migration: 20260430000000_add_sosial_fields

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-30 00:16:25 +08:00
5cd6e3aa99 fix(api): update swagger path and add scalarConfig - bump to 0.1.43 2026-04-29 14:15:51 +08:00
0517d50c8e feat(umkm): dashboard frontend - mode toggle, kategoriAktif, jumlahKategoriTerbanyak, growth badge, trendPersen, filter dropdowns - bump to 0.1.41
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 07:41:42 +08:00
fa7a52a0f3 fix(umkm): dashboard backend - jumlahKategoriTerbanyak, kategoriAktif, growth, trendPersen, mode=week - bump to 0.1.40
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-29 02:34:36 +08:00
f6107e971d fix(umkm): use KategoriProdukUmkm in KPI and fix product detail description - bump to 0.1.39 2026-04-28 16:22:55 +08:00
a4c7a97593 feat(umkm): migrate KategoriProduk to KategoriProdukUmkm for UMKM isolation
- update prisma schema to use KategoriProdukUmkm for Umkm model
- add @@map to KategoriProdukUmkm for lowercase table naming
- update API endpoints and KPI dashboard to use new model
- bump version to 0.1.33
2026-04-28 00:47:22 +08:00
5ab014281a feat(umkm): implement full CRUD for product categories
- added CRUD endpoints for KategoriProduk in Elysia API
- updated umkmState with category management logic
- added 'Kategori Produk' tab in admin dashboard
- created list, create, and edit pages for category management
- bumped version to 0.1.32
2026-04-27 17:37:16 +08:00
71e23dea1a feat(api): add /version endpoint and increment version to 0.1.25 2026-04-27 10:19:56 +08:00
cd7425292c feat(ekonomi): refactor umkm module with sales delete, stock validation, and ordering system 2026-04-24 16:57:43 +08:00
187e3a2115 feat(admin): refactor UMKM edit pages to match berita pattern with interfaces 2026-04-24 14:34:02 +08:00
7f5588f69e feat(admin): refactor UMKM edit pages to match berita pattern 2026-04-24 14:20:40 +08:00
30fbed73c9 fix(admin): resolve 404 on kategoriProduk API and correct Valtio state endpoint mismatches
- Created missing API endpoint
- Corrected UMKM and Produk update/delete routes in Valtio state to match Elysia API:
  - UMKM Update:
  - UMKM Delete:
  - Produk Update:
  - Produk Delete:
2026-04-24 12:19:24 +08:00
b1916ca3a3 feat(admin): implement edit and delete functionality for UMKM and Produk modules
- Added update and del methods to UMKM Valtio state
- Wired up edit and delete buttons in UMKM and Produk list pages
- Integrated ModalKonfirmasiHapus for deletion safety
- Created UMKM and Produk edit pages with data loading and image previews
- Cleaned up unused imports and fixed useEffect dependencies
- Bumped version to 0.1.21
2026-04-24 11:46:08 +08:00
b9d43eb723 fix(storage): migrate domain-specific delete and update handlers to MinIO
- Replaces local filesystem operations (fs.unlink, path.join) with MinIO removeObject in all domain lib handlers
- Updated handlers for: Berita, GalleryFoto, Layanan, Musik, Penghargaan, Potensi, Profile, Inovasi, Keamanan, Kesehatan, LandingPage, and PPID
- bump: version 0.1.19 -> 0.1.20
2026-04-23 17:05:44 +08:00
37940fc7e2 fix(img): fix WebP Content-Type bug and seed 232 missing FileStorage records
- img.ts: replace hardcoded 'image/jpeg' Content-Type with dynamic MIME_MAP
  lookup per file extension — WebP files now served with correct 'image/webp'
  header so browsers can decode them
- img.ts: skip sharp resize when no size param (serve original buffer directly)
- Adds migration 20260423072135 to add stok and umkmId columns to PasarDesa
- FileStorage DB now has all 232 MinIO images seeded (was 80, missing 152)
- All domain records (Berita 18/18, GalleryFoto 3/3, PasarDesa 4/4, etc.)
  now have imageId properly linked after full re-seed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 15:41:20 +08:00
2958950585 fix(storage): migrate fileStorage handlers and seeder from local disk/Seafile to MinIO
Root cause: images not showing because:
1. seed_assets.ts was listing from Seafile (unreliable, 502 errors)
2. fileStorage create/findUniq/del handlers used local disk (not available in containers)
3. link format in file-storage.json had inconsistent path prefix

Changes:
- seed_assets.ts: list objects from MinIO bucket instead of Seafile API; seed
  link as /api/img/{name}, path as "image" (matches MinIO prefix)
- fileStorage/create.ts: upload image/audio/document to MinIO via putObject;
  remove WIBU_UPLOAD_DIR dependency and all fs.writeFile calls
- fileStorage/findUniq.ts: stream file from MinIO via getObject; remove
  WIBU_UPLOAD_DIR and fs.readFile
- fileStorage/del.ts: delete from MinIO via removeObject; remove fs.unlink
- file-storage.json: fix path field to "image" (was full path); all 80 entries
  already have correct link=/api/img/{name} format

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 14:28:08 +08:00
437e9aa13c fix(build): resolve type errors in img.ts and cleanup route.ts 2026-04-23 13:52:57 +08:00
55d0735fcf merge(stg): merge main into stg and resolve storage conflicts 2026-04-23 13:48:26 +08:00
6fc79f7541 feat(storage): migrate file storage from local disk to MinIO
Replace local filesystem-based image storage with MinIO S3-compatible
object storage. All upload, serve, delete, and list operations now use
the MinIO bucket defined in MINIO_* env vars.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 11:40:43 +08:00
1a48c15c87 refactor(ekonomi): consolidate Pasar Desa into UMKM module
- Remove "Pasar Desa" as a separate entity; products are now strictly linked to UMKM.
- Delete redundant Pasar Desa API endpoints and state management.
- Update Admin UI: remove "Pasar Desa" menu and unified product management under UMKM.
- Update Public UI: replace "Pasar Desa" with "UMKM" in navbar and unified hub at /darmasaba/ekonomi/umkm.
- Implement mandatory umkmId in PasarDesa model and update seeders accordingly.
- Fix UI bugs, missing imports, and invalid API filters for mandatory umkmId.
- Increment version to 0.1.18.
2026-04-21 17:52:08 +08:00
e286cb4f2b feat(ekonomi): unify UMKM and Pasar Desa models, add business profile and product forms 2026-04-21 15:19:57 +08:00
a2d157ee02 fix(umkm): fix TypeError, 404 API URL, and Recharts warnings 2026-04-21 12:23:22 +08:00
59981683db feat(public-ui): unify Pasar Desa and UMKM into a single tabbed page 2026-04-21 11:34:10 +08:00
1a74a1f683 feat(public-ui): implement public UMKM directory, detail and product catalog pages 2026-04-20 17:44:36 +08:00
b673e36a45 feat(admin-ui): implement UMKM admin dashboard and CRUD pages 2026-04-20 17:15:54 +08:00
58ab306428 feat(ekonomi): implement UMKM module with CRUD API and Dashboard analytics 2026-04-20 16:51:59 +08:00
de4563c914 fix: fileStorage path issues between local and staging environments
- Store relative paths in database instead of absolute paths
- Reconstruct absolute paths at runtime using UPLOAD_DIR env var
- Add VOLUME for /app/uploads in Dockerfile for persistent storage
- Create uploads directory with proper permissions in Docker
- Add error handling for missing UPLOAD_DIR in findUniq.ts
- Simplify GitHub workflow memory in QWEN.md (manual handling)

This fixes the 500 errors on staging for file create/delete operations
caused by environment-specific absolute paths stored in database.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00
04001c905b fix(kependudukan): remove jenisKelamin field and align MigrasiPenduduk with database schema
- Remove jenisKelamin field from API, state, and UI components
- Fix MigrasiPenduduk API to use null instead of undefined for optional fields
- Update create/edit forms to properly handle asal/tujuan fields based on jenis
- Fix DatePickerInput type handling with valueFormat prop
- Update list page to display asal or tujuan conditionally
- Add proper select statements in API responses
- Fix TypeScript type errors in migrasi-penduduk module

Closes: Schema mismatch causing errors when inputting migrasi penduduk data

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00
80186bf493 refactor(kependudukan): improve TypeScript types and clean up code
- Add proper TypeScript interfaces for seeder files
- Rename MigrasiPendudukForm interface for consistency
- Separate asal/tujuan fields in MigrasiPenduduk API based on jenis
- Remove unnecessary eslint-disable comments
- Add local type definitions for public kependudukan pages
- Clean up unused imports (React, Flex, IconBuilding)
- Improve type safety in form handlers (handleChangeText vs handleChangeSelect)
- Add explicit type casting where needed to fix type errors

Co-authored-by: Qwen Code

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 15:00:33 +08:00
8b14c6ce44 feat: add kependudukan seeders, API routes, year filter, and navbar menu
- Add Prisma models: DataBanjar, DistribusiAgama, DistribusiUmur, MigrasiPenduduk, DinamikaPenduduk
- Create seeders for all kependudukan models with year 2026 data
- Register Kependudukan API routes in route.ts
- Update API findMany endpoints to make tahun parameter optional
- Add YearFilter reusable component for admin pages
- Update 4 kependudukan admin pages with year filter UI
- Fix Mantine color array in AdminThemeProvider (add 10th element)
- Fix invalid Mantine color scale in paguTable.tsx (gray.50 -> gray.1)
- Add Kependudukan menu to navbar-list-menu.ts
- Fix Bun JSON import resolution with loadJsonData helper
- Update 74 seeder files to use dynamic JSON loading

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-10 11:54:36 +08:00
5e822f0b05 feat: implement Kependudukan menu with CRUD admin pages
- Add Distribusi Umur admin pages (list, create, edit)
- Add Data Banjar admin pages (list, create, edit)
- Add Migrasi Penduduk admin pages (list, create, edit)
- Update state management with full CRUD operations for all modules
- Add Kependudukan menu to admin sidebar (devBar, navBar, role1)
- Add public pages for Distribusi Umur with age range sorting
- Update Dinamika Penduduk to use real-time birth/death data
- Add Biome configuration for code linting
- Create API routes for all Kependudukan modules

Features:
- Pagination and search for all admin list pages
- Responsive design (table for desktop, cards for mobile)
- Delete confirmation modal
- Toast notifications for user feedback
- Zod validation for all forms
- Age range auto-sorting in public Distribusi Umur chart

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-09 17:10:29 +08:00
0e6f7e1769 fix(landing-page): remove incorrect national holiday entry for April 9, 2026
- Remove '2026-04-09' from national holidays list as it's not an actual holiday
- Fix office status showing 'Tutup' and 'Tidak Beroperasi' incorrectly on regular workday
- Office now correctly shows 'Buka' status during working hours (07:30-15:30 on Thursday)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-09 10:49:10 +08:00
feb853d06e fix(auth): improve OTP error handling and add health check endpoint
Option 2 - Improve Error Handling:
- Track WA success status and error messages in login route
- Return debug info (including OTP code) only in non-production
- Show descriptive message when WhatsApp fails to send
- Better error categorization (HTTP error vs logic error vs connection)

Option 3 - Health Check Endpoint:
- Create /api/health/otp endpoint for OTP service diagnostics
- Support test mode with query params: ?test=true&number=6281234567890
- Check token configuration (configured vs placeholder)
- Measure response time and validate service response
- Return comprehensive status for debugging OTP issues

Usage:
- Basic check: GET /api/health/otp
- Test send: GET /api/health/otp?test=true&number=6281234567890

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 16:27:29 +08:00
74301fe074 Merge pull request #16 from bipprojectbali/tasks/prisma/regenerate-client-fix-types/06-04-2026-1500
Tasks/prisma/regenerate client fix types/06 04 2026 1500
2026-04-06 12:14:23 +08:00
8b19abc628 fix(prisma): regenerate Prisma client to resolve TypeScript type errors
- Regenerate Prisma client to fix missing GetPayload types
- Resolve RespondenGetPayload, JenisKelaminRespondenGetPayload errors
- Resolve PilihanRatingRespondenGetPayload and UmurRespondenGetPayload errors
- Add initial migration files
- Update bun lockfile

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 12:08:49 +08:00
9b74592101 Merge branch 'main' into stg 2026-04-06 11:34:38 +08:00
b403bc754c feat(auth): implement WhatsApp OTP sending function for login
- Create sendCodeOtp utility function using otp.wibudev.com API
- Update login route to use new sendCodeOtp function
- Replace old URL-based WhatsApp approach with authenticated API call
- Add WA_SERVER_TOKEN environment variable documentation
- Support flexible codeOtp type (string | number) for better reusability

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-06 11:27:55 +08:00
dd09d7c90a fix(build): remove eslint-disable and replace 'any' with MantineColor in grafikRealisasi 2026-04-04 08:36:41 +08:00
50a7356618 fix(apbdes): remove redundant eslint-disable and improve type safety in GrafikRealisasi 2026-04-02 12:47:28 +08:00
8777c45a44 fix(build): resolve ESLint and type errors causing build failure 2026-04-01 17:44:48 +08:00