- 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>