Skip to content

Commit c9f8416

Browse files
committed
Remove global scope for 'daftarSp2d' count in KerangkaAcuan: Simplify model and UI components
1 parent 486a25e commit c9f8416

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

app/Models/KerangkaAcuan.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ public function spesifikasiKerangkaAcuan(): HasMany
5353

5454
protected static function booted(): void
5555
{
56-
static::addGlobalScope('with-daftar-sp2d-count', function (Builder $builder) {
57-
$builder->withCount('daftarSp2d');
58-
});
59-
6056
static::creating(function (KerangkaAcuan $kak) {
6157
$kak->status = 'dibuat';
6258
$kak->createNaskahKeluar();

app/Nova/KerangkaAcuan.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,6 @@ 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(),
135127
BelongsToMany::make('SP2D', 'daftarSp2d', 'App\Nova\DaftarSp2d'),
136128
Tabs::make('Detail', [
137129
HasMany::make('Anggaran', 'anggaranKerangkaAcuan', 'App\Nova\AnggaranKerangkaAcuan'),

0 commit comments

Comments
 (0)