- Added 1 service letter with createdAt 5 days ago (within current week)
→ SKT-2025-001 (KTP) now shows in 'Surat Minggu Ini' stat
- Added 1 complaint with status SELESAI
→ COMP-20250320-003 shows in 'Layanan Selesai' stat
Dashboard stats now display:
- Surat Minggu Ini: 1 (was 0)
- Layanan Selesai: 1 (was 0)
- Pengaduan Aktif: 2 (BARU + DIPROSES)
- Total Penduduk: from resident stats
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Added hasExistingData() function to check for existing seed data
- Checks core entities: users (>1), banjars (>=6), divisions (>=4)
- runSeed() now skips entirely if data exists
- runSpecificSeeder() skips non-auth seeders if data exists
- Provides helpful message with reset instructions
- Prevents accidental duplicate data on re-run
Usage:
- bun run seed - Will skip if data exists
- bun x prisma migrate reset - Reset database before re-seeding
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Added 5 service letters with createdAt dates spread across 6 months
- Changed from upsert to update/create pattern to allow createdAt modification
- This ensures chart-surat.tsx displays proper trend data
- Previous data had all timestamps at seed time, causing empty 6-month trend
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add text truncation for title on mobile screens
- Hide user info section on mobile, show simplified icons only
- Update seed.ts to create admin and demo users with proper password hashing
- Add bcryptjs for password hashing in seed script
- Update QWEN.md documentation with seed command and default users
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>