Skip to content

Commit fff3891

Browse files
committed
Add SP2D count filter to KerangkaAcuan detail view: Enhance data visibility
1 parent 5866f6e commit fff3891

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/Nova/KerangkaAcuan.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@ public function fields(NovaRequest $request)
124124
->options(Helper::setOptionDipa())
125125
->default(Helper::getPropertyFromCollection(Dipa::cache()->get('all')->where('tahun', session('year'))->first(), 'id')),
126126
]),
127+
Select::make('SP2D', 'daftar_sp2d_count')
128+
->options([
129+
0 => 'Tidak Ada',
130+
])
131+
->filterable(function ($request, $query, $value, $attribute) {
132+
$query->has('daftarSp2d', '<=', $value);
133+
})
134+
->onlyOnDetail(),
127135
BelongsToMany::make('SP2D', 'daftarSp2d', 'App\Nova\DaftarSp2d'),
128136
Tabs::make('Detail', [
129137
HasMany::make('Anggaran', 'anggaranKerangkaAcuan', 'App\Nova\AnggaranKerangkaAcuan'),

0 commit comments

Comments
 (0)