- Create docker-entrypoint.sh to run prisma migrate deploy before app start
- Update Dockerfile to use entrypoint script
- Ensures database schema is always up-to-date after deployment
- Fixes: CRUD kependudukan error 500 di staging karena tabel belum dibuat
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- 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>
- 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>
- Update Prisma schema: kelompok -> rentangUmur
- Update seed data JSON: kelompok -> rentangUmur
- Update seeder file: use rentangUmur field
- This fixes the empty data issue in distribusi-umur admin page
Note: Run 'bunx prisma db push' to apply schema migration
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- 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>
- 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>
- Add playwright-mcp v0.0.19 as dev dependency
- Update bun.lock with new dependency tree
- Add .qwen configuration files
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- 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>
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>
- Add blank line before COPY for readability
- Add PORT and HOSTNAME env vars in runner stage
- Use --chown flag instead of separate chown RUN layer
- Copy only src/prisma instead of entire src directory
- Use glob pattern for next.config.* files
- Move PORT and HOSTNAME before EXPOSE
- Add newline at end of file
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Remove .env file from git tracking (was accidentally committed)
- Simplify .gitignore to use .env* pattern instead of multiple specific patterns
- Update Dockerfile for optimized multi-stage build
- Add gen:api script placeholder to package.json
Security: Ensure sensitive environment variables are not exposed in repository
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- 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>
- Added .dockerignore to prevent build poisoning from local artifacts.
- Updated Dockerfile with stable Bun version, memory limits, and missing config files.
- Refined prisma.ts signal handlers to avoid process termination during Next.js build phases.
- Synchronized eslint-config-next with Next.js version.
treaty from @elysiajs/eden doesn't support relative URLs like '/'
This caused 'ERR_NAME_NOT_RESOLVED' when trying to access 'https://api/fileStorage/create'
Solution:
- Client-side: Use window.location.origin (e.g., https://desa-darmasaba-stg.wibudev.com)
- Server-side dev: Use localhost:3000
- Server-side prod: Use NEXT_PUBLIC_BASE_URL env var
This ensures the API calls use the correct domain in all environments.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>