fix: sembunyikan log kegiatan draft/pending dari widget aktivitas terbaru

This commit is contained in:
2026-04-04 11:24:16 +07:00
parent a4f2f54928
commit 0757e3d116
+9 -1
View File
@@ -17,7 +17,15 @@ class ActivityLogWidget extends BaseWidget
public function table(Table $table): Table
{
return $table
->query(ActivityLog::with('user')->latest()->limit(15))
->query(
ActivityLog::with('user')
->where(function (Builder $query) {
$query->where('model_type', '!=', \App\Models\Activity::class)
->orWhereIn('action', ['approved', 'verified', 'executed']);
})
->latest()
->limit(15)
)
->columns([
TextColumn::make('created_at')->label('Waktu')
->dateTime('d M Y H:i')->sortable(),