Problem:
- Icon bergeser ke bawah saat hover
- transform: 'scale(1.1)' mengganti transform: 'translateY(-80%)'
- CSS transform property di-replace, bukan di-mix
Solution:
- Gabungkan kedua transform dalam satu string
- Hover: 'translateY(-80%) scale(1.1)' - maintain posisi + scale
- Leave: 'translateY(-80%)' - kembali ke posisi semula
Changes:
- onMouseEnter: transform = 'translateY(-80%) scale(1.1)'
- onMouseLeave: transform = 'translateY(-80%)'
- Added 'ease' timing function for smoother transition
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Fix types.ts transformAPBDesData to map totalRealisasi → realisasi
- Backend returns totalRealisasi, frontend expects realisasi
- Add fallback to use item.realisasi if totalRealisasi not available
- Fix grafikRealisasi.tsx to use realisasi field
- Update Summary component to use i.realisasi || i.totalRealisasi
- Update total calculation to use realisasi field
- Fix apbDesaTable.tsx to use realisasi field
- Update total calculation to use item.realisasi
- Fix apbDesaProgress.tsx to use realisasi field
- Update calcTotal to use item.realisasi with fallback
Root cause: Backend Prisma schema uses 'totalRealisasi' field, but public
page components were expecting 'realisasi' field.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Fix backend updt.ts to preserve realisasiItems from old items
- Load existing items with realisasiItems before delete
- Re-create realisasiItems for new items based on kode match
- Recalculate totalRealisasi, selisih, persentase after restore
- Update frontend state to handle realisasi fields
- Add realisasi, selisih, persentase to ApbdesItemSchema
- Fix edit.load() to map totalRealisasi → realisasi
- Fix edit.update() to omit calculated fields when sending to backend
- Update edit page.tsx to display realisasi data
- Fix load data to use item.totalRealisasi (not item.realisasi)
- Add Realisasi, Selisih, % columns to items table
- Update handleAddItem and handleReset to preserve realisasi fields
Root cause: Backend was resetting totalRealisasi=0 for all items on update,
and frontend was accessing wrong field name (realisasi vs totalRealisasi)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add kode field to RealisasiItem model in Prisma schema
- Update API endpoints (create, update) to accept kode parameter
- Update state management with proper type definitions
- Add kode input field in RealisasiManager component
- Simplify realisasiTable to show flat list (Kode, Uraian, Realisasi, %)
- Remove section grouping and expandable details
- Fix race condition in findUnique.load() with loading guard
- Fix linting errors across multiple files
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Fix:
- Change i.realisasi to i.totalRealisasi in Summary component
- Change i.realisasi to i.totalRealisasi in total calculation
- Add fragment wrapper <> to fix Box children type error
- Reorder Total Keseluruhan section to top (before category breakdown)
Now grafik shows correct data from multiple realisasi items.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Features:
- Add expandable rows for each APBDes item
- Show detailed realisasi breakdown per item
- Each realisasi shows:
* Keterangan/Uraian
* Jumlah (formatted in Rupiah)
* Tanggal (formatted date)
- Chevron icon indicator (right/down)
- Click row to expand/collapse
- Hover effect on clickable rows
- Info text: "Klik pada item untuk melihat detail realisasi"
UI Components:
- RealisasiDetail: Component to display list of realisasi
- ItemRow: Expandable row with click handler
- Updated Section: Manage expanded state per item
Styling:
- Gray background for detail section
- Blue color for amount
- Dimmed color for date
- Responsive layout with wrap="nowrap"
- Proper spacing between items
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Schema Changes:
- Add RealisasiItem model for multiple realizations per APBDesItem
- Replace realisasi field with totalRealisasi (auto-calculated sum)
- Add selisih and persentase as auto-calculated fields
- Cascade delete realisasi when item is deleted
API Changes:
- Update index.ts: Add realisasi CRUD endpoints
- POST /:itemId/realisasi - Create realisasi
- PUT /realisasi/:realisasiId - Update realisasi
- DELETE /realisasi/:realisasiId - Delete realisasi
- Update create.ts: Auto-calculate totalRealisasi=0, selisih, persentase
- Update updt.ts: Reset calculations when items updated
- Update findUnique.ts: Include realisasiItems in response
- Update findMany.ts: Include realisasiItems in response
- Remove realisasi field from ApbdesItemSchema
New Files:
- realisasi/create.ts - Create realisasi with auto-calculation
- realisasi/update.ts - Update realisasi with recalculation
- realisasi/delete.ts - Soft delete with recalculation
Features:
- Auto-calculate totalRealisasi from sum of all realisasiItems
- Auto-calculate selisih = totalRealisasi - anggaran
- Auto-calculate persentase = (totalRealisasi / anggaran) * 100
- Support for bukti file attachment
- Support for keterangan (notes) per realisasi
- Soft delete support for audit trail
UI Updates:
- Update admin detail page to use totalRealisasi instead of realisasi
- Update landing page realisasiTable to use totalRealisasi
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Display percentage value prominently next to each category title
- Add formatted currency (Rupiah) for better readability
- Color-coded progress bars based on achievement level:
* Teal: ≥100% (target tercapai)
* Blue: ≥80% (baik)
* Yellow: ≥60% (cukup)
* Red: <60% (perlu perhatian)
- Add contextual feedback messages based on percentage:
* ✓ Achievement message for 100%
* ⚡ Positive message for 80-99%
* ⚠️ Warning messages for <80%
- Add TOTAL KESELURUHAN summary section at the top
- Add emoji icons for better visual distinction (💰💸📊)
- Animated progress bars for <100% achievement
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Restore Apbdes component with full functionality (fetch data, year selector, tables, charts)
- Fix realisasiTable.tsx: add missing items variable
- Fix grafikRealisasi.tsx: dynamic year title instead of hardcoded 2026
- Add eslint-disable comments for TypeScript any types
- Remove unused imports in paguTable.tsx
- Integrate PaguTable, RealisasiTable, GrafikRealisasi into main Apbdes component
- Component now fetches data from Valtio state and displays 3 tables + charts
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>