feat: tambah widget statistik kas dan perbaikan alur verifikasi transaksi
- Tambah CashStatsWidget: total saldo, pemasukan/pengeluaran bulan ini, saldo bulan lalu - Widget hanya tampil di halaman transaksi kas (bukan dashboard) - Hanya transaksi yang sudah diverifikasi masuk ke perhitungan total kas - Perbaiki namespace Action notifikasi (Filament v5) - Perbaiki observer: hapus throw Exception yang menyebabkan widget hilang - Tambah redirect setelah aksi setujui/tolak/verifikasi agar halaman refresh otomatis - Tambah file DOKUMENTASI.md
This commit is contained in:
@@ -92,7 +92,8 @@ class CashRecordsTable
|
||||
'success',
|
||||
route('filament.admin.resources.cash-records.index')
|
||||
);
|
||||
}),
|
||||
})
|
||||
->after(fn ($livewire) => redirect(request()->header('Referer'))),
|
||||
|
||||
// Ketua: tolak transaksi 500rb–2jt
|
||||
Action::make('reject_ketua')
|
||||
@@ -125,7 +126,8 @@ class CashRecordsTable
|
||||
'danger',
|
||||
route('filament.admin.resources.cash-records.index')
|
||||
);
|
||||
}),
|
||||
})
|
||||
->after(fn ($livewire) => redirect(request()->header('Referer'))),
|
||||
|
||||
// Bendahara/ketua: verifikasi (hanya jika approval sudah selesai atau tidak diperlukan)
|
||||
Action::make('verify')
|
||||
@@ -155,7 +157,8 @@ class CashRecordsTable
|
||||
->action(fn (CashRecord $record) => $record->update([
|
||||
'verified_by' => auth()->id(),
|
||||
'verified_at' => now(),
|
||||
])),
|
||||
]))
|
||||
->after(fn ($livewire) => redirect(request()->header('Referer'))),
|
||||
|
||||
EditAction::make()->hidden(fn ($record) => $record->verified_at !== null),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user