feat: tambah role editor, workflow post, leaderboard, rekap kehadiran, kategori kas dengan type, seeder lengkap
This commit is contained in:
@@ -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.000–2.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 500rb–2jt
|
||||
|
||||
Reference in New Issue
Block a user