fix: sembunyikan log kegiatan draft/pending dari widget aktivitas terbaru
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user