Changes:
Backend (updt.ts, index.ts):
- Update FormUpdateBody: imageId?: string | null
- Update Elysia schema: t.Optional(t.String())
- Handle null/undefined values when updating
UI (edit/page.tsx):
- Remove mandatory validation for imageId and fileId
- Update labels to show '(Opsional)'
- Simplify handleSubmit logic (no validation check)
- Keep existing file IDs if no new upload
User Flow:
Before: Edit required imageId and fileId to be present
After: Can update APBDes without files, preserve existing or set to null
Files changed:
- src/app/api/[[...slugs]]/_lib/landing_page/apbdes/updt.ts
- src/app/api/[[...slugs]]/_lib/landing_page/apbdes/index.ts
- src/app/admin/(dashboard)/landing-page/apbdes/[id]/edit/page.tsx
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
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>
Layout Changes:
- Center all control buttons (shuffle, prev, play/pause, next, repeat)
- Center progress bar alongside controls
- Keep volume control + close button on the right
- Song info remains on the left
New Feature - Minimize Player:
- Add isMinimized state to track player visibility
- Replace close button with minimize functionality
- Show floating music icon when minimized (bottom-right corner)
- Click floating icon to restore player bar
- Floating icon has hover scale animation for better UX
UI/UX Improvements:
- Better visual hierarchy with centered controls
- Floating icon uses blue bg with white music icon
- Smooth transitions between states
- Icon scales on hover for interactive feedback
- Persistent player state (song continues playing when minimized)
Files changed:
- src/app/darmasaba/_com/FixedPlayerBar.tsx: Complete redesign
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>
- Set defaultColorScheme='light' in root MantineProvider
- Change darkModeStore default from system preference to false (light)
- Add MantineProvider with light theme to darmasaba/layout.tsx
- Remove dark mode dependency from ModuleView component
- Prevent system color scheme from affecting initial page load
This ensures consistent light mode on first visit for both
public pages and admin panel, regardless of OS settings.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Added isFormValid() and isHtmlEmpty() helper functions for form validation
- Disabled submit buttons when required fields are empty across multiple admin and public pages
- Applied consistent validation pattern for creating and editing records
- Commented out WhatsApp OTP sending in login route for debugging/testing
- Fixed path in NavbarMainMenu tooltip action
Menambahkan menu tarif dan layanan, admin bisa create, edit, delete tarif dan layanan
Dibagian fasilitas kesehatan admin bisa multiselect bagian dokter dan tarif layanan
Di tampilan user juga sudah disesuaikan dengan datanya bisa muncul lebih dari 1 dokter dan 1 tarif layanan