fix(realisasi): add kode field to RealisasiItem and simplify table display
- 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>
This commit is contained in:
@@ -238,19 +238,21 @@ model APBDesItem {
|
||||
// Model baru untuk multiple realisasi per item
|
||||
model RealisasiItem {
|
||||
id String @id @default(cuid())
|
||||
kode String? // Kode realisasi, mirip dengan APBDesItem
|
||||
apbdesItemId String
|
||||
apbdesItem APBDesItem @relation(fields: [apbdesItemId], references: [id], onDelete: Cascade)
|
||||
|
||||
|
||||
jumlah Float // Jumlah realisasi dalam Rupiah
|
||||
tanggal DateTime @db.Date // Tanggal realisasi
|
||||
keterangan String? @db.Text // Keterangan tambahan (opsional)
|
||||
buktiFileId String? // FileStorage ID untuk bukti/foto (opsional)
|
||||
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime?
|
||||
isActive Boolean @default(true)
|
||||
|
||||
@@index([kode])
|
||||
@@index([apbdesItemId])
|
||||
@@index([tanggal])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user