Commit Graph

95 Commits

Author SHA1 Message Date
c7a986aebc fix: remove hardcoded trend percentages and add debug logging
Chart Surat:
- Added console.log debugging to track API response and data mapping
- Helps identify if data is being received but not rendered

Stat Cards:
- Removed hardcoded trend='0%' and trendValue={0} props
- Cards now display clean without misleading 0% trends
- Trend feature can be re-added later with proper API support

Files changed:
- dashboard/chart-surat.tsx: Added debug logging
- dashboard-content.tsx: Removed hardcoded trend props

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 14:50:34 +08:00
c6951dec80 fix: add sample data for dashboard stats (weekly service & completed complaints)
- 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>
2026-03-27 14:42:09 +08:00
8da53127c7 feat: add duplicate prevention to seed - skip if data already exists
- 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>
2026-03-27 14:36:46 +08:00
354e706dc5 fix: update service letter seed with realistic dates for chart trends
- 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>
2026-03-27 14:34:49 +08:00
c216fa074d [darmasaba-dashboard][2026-03-27] feat: complete all seeders and update Phase 2 schema
Schema Updates:
- Added fields to Umkm model (name, owner, productType, description, timestamps)
- Added fields to Posyandu model (name, location, schedule, type, timestamps)
- Added fields to SecurityReport model (reportNumber, title, description, location, reportedBy, status, timestamps)
- Added fields to EmploymentRecord model (companyName, position, startDate, endDate, isActive, timestamps)
- Added fields to PopulationDynamic model (type, residentName, eventDate, description, timestamps)
- Added fields to BudgetTransaction model (transactionNumber, type, category, amount, description, date, timestamps)
- Added fields to HealthRecord model (type, notes, timestamps)

New Seeders:
- seed-discussions.ts: Documents, Discussions, DivisionMetrics
- seed-phase2.ts: UMKM, Posyandu, SecurityReports, EmploymentRecords, PopulationDynamics, BudgetTransactions

Enhanced Seeders:
- seed-auth.ts: Added seedApiKeys() function
- seed-public-services.ts: Added seedComplaintUpdates() and getComplaintIds()

New NPM Scripts:
- seed:documents - Seed documents and discussions
- seed:phase2 - Seed Phase 2+ features

All 33 Prisma models now have seeder coverage (82% direct, 12% stubs, 6% auto-managed)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 14:05:15 +08:00
44b6b158ef [darmasaba-dashboard][2026-03-27] feat: modular seeders and database-backed dashboard
- Split seeders into modular files per feature category
- Added seed:auth, seed:demographics, seed:divisions, seed:services, seed:dashboard commands
- Connected dashboard components to live database (Budget, SDGs, Satisfaction)
- Added API endpoints: /api/dashboard/budget, /api/dashboard/sdgs, /api/dashboard/satisfaction
- Updated prisma schema with dashboard metrics models
- Added loading states to dashboard components
- Fixed header navigation to /admin

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-27 12:14:19 +08:00
34804127c5 Refactor: move AppShell to global layout, add breadcrumbs, and restructure profile routes 2026-03-26 17:10:40 +08:00
0d0dc187a5 chore: fix linting and type safety across the project 2026-03-26 15:51:45 +08:00
ec057ef2e5 feat(dashboard): connect dashboard components to database 2026-03-26 14:28:09 +08:00
0900b8f199 feat(database): implement resident and complaint API and connect DemografiPekerjaan 2026-03-26 14:17:41 +08:00
aeedb17402 fix(header): fix missing Divider, Badge, IconUserShield and navigate 2026-03-26 14:13:59 +08:00
ebc1242bee docs: add task for dev-inspector implementation 2026-03-26 11:50:26 +08:00
0e063cb79e docs: add task for phase 1 core database implementation 2026-03-26 11:14:03 +08:00
3eb84921a1 Fix Konsisten Warna Bg 4 2026-03-25 17:15:07 +08:00
c6415c5aab Fix Konsisten Warna Bg 2 2026-03-25 17:08:39 +08:00
519a14adaa Fix Konsisten Warna Bg 2 2026-03-25 17:02:18 +08:00
366c08fbaa Fix Konsisten Warna Bg 2026-03-25 16:46:59 +08:00
5c09e7a0be Fix Ga Perlu Akses Login Saat Ke Semua Fitur Dashboard 2026-03-25 15:35:20 +08:00
7c8012d277 Fix Lint-1 2026-03-25 15:07:10 +08:00
687ce11a81 Refactor New Ui Semua Pengaturan 2026-03-25 14:38:37 +08:00
1ba4643e23 Refactor New Ui Pengaturan Umum 2026-03-25 11:56:22 +08:00
113dd7ba6f Refactor New Ui Sosial, Keamanan, & Bantuan 2026-03-25 11:10:50 +08:00
71a305cd4b Refactor New Ui Bumdes 02 2026-03-25 10:32:31 +08:00
84b96ca3be Refactor New Ui Bumdes 2026-03-25 00:09:38 +08:00
8159216a2c Refactor ui keuangan 2026-03-24 23:17:23 +08:00
d714c09efc Fix New UI Pengaduan 2026-03-18 00:43:44 +07:00
0a97e31416 Fix New UI Pengaduan 2026-03-18 00:34:53 +07:00
158a2db435 Fix New UI Pengaduan 2026-03-17 21:41:03 +07:00
2d68d4dc06 Fix New UI Kinerja Divisi 2026-03-17 21:19:10 +07:00
97e6caa332 Fix UI Beranda 2026-03-17 21:03:36 +07:00
f0c37272b9 Progress Tampilan UI Dashboard Desa Plus NOC 2026-03-17 20:53:33 +07:00
8c35d58b38 refactor: modularize kinerja-divisi components per PromptDashboard.md
- Create ActivityCard component for program kegiatan cards
- Create DivisionList component for divisi teraktif with arrow icons
- Create DocumentChart component for bar chart (jumlah dokumen)
- Create ProgressChart component for pie chart (progres kegiatan)
- Create DiscussionPanel component for diskusi internal
- Create EventCard component for agenda hari ini
- Create ArchiveCard component for arsip digital perangkat desa
- Refactor main KinerjaDivisi component to use new modular components
- Implement responsive 3-column grid layout
- Add proper dark mode support with specified colors
- Add hover effects and smooth animations

New components structure:
  src/components/kinerja-divisi/
    - activity-card.tsx
    - archive-card.tsx
    - discussion-panel.tsx
    - division-list.tsx
    - document-chart.tsx
    - event-card.tsx
    - progress-chart.tsx
    - index.ts (exports)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-13 16:47:19 +08:00
952f7ecb16 refactor: modularize dashboard components per PromptDashboard.md
- Create reusable StatCard component for header metrics
- Create ChartSurat component for bar chart (surat statistics)
- Create DivisionProgress component for divisi teraktif
- Create ChartAPBDes component for APBDes horizontal bar chart
- Create ActivityList component for calendar events
- Create SatisfactionChart component for donut chart
- Create SDGSCard component for SDGs metrics
- Refactor DashboardContent to use new modular components
- Add proper dark mode support with specified colors
- Implement responsive grid layout (12/6/1 columns)
- Add custom SDGs icons (Energy, Peace, Health, Poverty, Ocean)

New components structure:
  src/components/dashboard/
    - stat-card.tsx
    - chart-surat.tsx
    - chart-apbdes.tsx
    - division-progress.tsx
    - activity-list.tsx
    - satisfaction-chart.tsx
    - sdgs-card.tsx
    - index.ts (exports)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-13 15:36:31 +08:00
a74e0c02e5 fix: resolve merge conflict in pengaturan/route.tsx
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-13 14:41:22 +08:00
17ecd3feca fix: make dashboard public and remove admin-only restriction from main pages
- Make homepage (/) accessible without authentication
- Allow all authenticated users (user & admin) to access main pages:
  - /kinerja-divisi, /pengaduan, /jenna, /demografi
  - /keuangan, /bumdes, /sosial, /keamanan
  - /bantuan, /pengaturan
- Reserve admin-only access for /admin/* routes
- Update auth middleware to handle public routes properly

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-13 14:21:30 +08:00
d88cf2b100 Merge pull request #5 from bipprojectbali/nico/26-feb-26/fix-seed-2
Fix Gambar
2026-03-12 15:21:17 +08:00
e0955ed2c4 Merge branch 'stg' into nico/26-feb-26/fix-seed-2 2026-03-12 15:21:05 +08:00
918399bf62 Fix Gambar 2026-03-12 15:16:41 +08:00
7ce2eb6ae8 Merge pull request #4 from bipprojectbali/nico/27-feb-26/fix-gambar
Add Deploy
2026-03-12 14:47:12 +08:00
40772859f9 Merge branch 'stg' into nico/27-feb-26/fix-gambar 2026-03-12 14:47:03 +08:00
c7b34b8c28 Add Deploy 2026-03-12 14:40:15 +08:00
9bf73a305c Merge pull request #3 from bipprojectbali/fix-ui-berantakan
fix: production build CSS dan responsive layout untuk staging
2026-03-12 12:19:33 +08:00
947adc1537 fix: production build CSS dan responsive layout untuk staging
- Tambah scripts/build.ts untuk build CSS via PostCSS/Tailwind
- Update package.json build script untuk gunakan build script baru
- Fix responsive grid di sosial-page (lg -> md breakpoint)
- Tambah padding responsive untuk mobile display
- Convert inline styles ke Tailwind classes untuk konsistensi
- Update tailwind.config.js content paths
- Tambah CSS variables di index.css untuk color palette
- Update Dockerfile untuk gunakan build script baru

Fixes: tampilan berantakan di staging karena CSS tidak ter-build dengan benar

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-12 12:16:57 +08:00
9086e28961 Merge pull request #2 from bipprojectbali/nico/11-mar-26/fix-ui-to-figma
Nico/11 mar 26/fix UI to figma
2026-03-11 15:29:54 +08:00
66d207c081 feat: refactor UI components to TailwindCSS with dark mode support
- Convert Mantine-based components to TailwindCSS + Recharts
- Add dark mode support for all dashboard pages
- Update routing to allow public dashboard access
- Components refactored:
  - kinreja-divisi.tsx: Village performance dashboard
  - pengaduan-layanan-publik.tsx: Public complaint management
  - jenna-analytic.tsx: Chatbot analytics dashboard
  - demografi-pekerjaan.tsx: Demographic analytics
  - keuangan-anggaran.tsx: APBDes financial dashboard
  - bumdes-page.tsx: UMKM sales monitoring
  - sosial-page.tsx: Village social monitoring
- Remove landing page, redirect / to /dashboard
- Update auth middleware for public dashboard access

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-11 15:26:16 +08:00
b77f6e8fa3 feat: update APBDes data with real values and fix SDGS layout
- Update APBDes data with actual values (390M, 470M, 290M)
- Fix SDGS Desa layout to display horizontally with auto-wrap
- Add responsive grid for SDGS cards (1 col mobile, 2 tablet, 3 desktop)
- Add GitHub OAuth redirectURI configuration

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 16:37:33 +08:00
9e6734d1a5 Add .env.example template with environment variables documentation
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-10 13:55:14 +08:00
github-actions[bot]
1b9ddf0f4b chore: sync workflows from base-template 2026-03-10 04:39:12 +00:00
a0f440f6b3 Docker File 2026-03-10 12:36:33 +08:00
1f56dd7660 First Deploy 2026-03-10 10:24:45 +08:00