feat: tambah role editor, workflow post, leaderboard, rekap kehadiran, kategori kas dengan type, seeder lengkap

This commit is contained in:
2026-04-05 06:21:16 +07:00
parent cde63da358
commit 6c23cc8660
40 changed files with 2432 additions and 129 deletions
@@ -16,7 +16,11 @@ class CashRecordForm
{
return $schema->components([
Select::make('category_id')->label('Kategori')
->options(CashCategory::pluck('name', 'id'))
->options(
CashCategory::all()->mapWithKeys(fn ($c) => [
$c->id => $c->name . ' (' . ucfirst($c->type) . ')'
])
)
->required(),
TextInput::make('amount')->label('Jumlah (Rp)')->numeric()->required()
->helperText('< Rp500.000: langsung | Rp500.0002.000.000: perlu approval ketua | > Rp2.000.000: perlu voting')
@@ -58,6 +58,11 @@ class CashRecordsTable
->filters([
SelectFilter::make('category_id')->label('Kategori')
->options(CashCategory::pluck('name', 'id')),
SelectFilter::make('type')->label('Tipe')
->options(['pemasukan' => 'Pemasukan', 'pengeluaran' => 'Pengeluaran'])
->query(fn ($query, $state) => $state['value']
? $query->whereHas('category', fn ($q) => $q->where('type', $state['value']))
: $query),
])
->recordActions([
// Ketua: approve transaksi 500rb2jt