Skip to content

Commit 5147513

Browse files
Enhance DigitalPayment menu item with badge for incomplete entries
1 parent e67bb09 commit 5147513

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/Providers/NovaServiceProvider.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Helpers\Helper;
66
use App\Helpers\Policy;
7+
use App\Models\DigitalPayment as ModelsDigitalPayment;
78
use App\Models\MataAnggaran;
89
use App\Models\Pengelola;
910
use App\Models\User as UserModel;
@@ -125,7 +126,8 @@ public function boot()
125126
])->icon('chart-bar'),
126127

127128
MenuSection::make('Manajemen', [
128-
MenuItem::resource(DigitalPayment::class),
129+
MenuItem::resource(DigitalPayment::class)
130+
->withBadgeIf(fn () => '!', 'danger', fn () => ModelsDigitalPayment::whereNull('nomor')->count('id') > 0),
129131
MenuItem::resource(HonorKegiatan::class),
130132
MenuItem::resource(IzinKeluar::class),
131133
MenuItem::resource(KerangkaAcuan::class),

0 commit comments

Comments
 (0)