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
|
public function table(Table $table): Table
|
||||||
{
|
{
|
||||||
return $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([
|
->columns([
|
||||||
TextColumn::make('created_at')->label('Waktu')
|
TextColumn::make('created_at')->label('Waktu')
|
||||||
->dateTime('d M Y H:i')->sortable(),
|
->dateTime('d M Y H:i')->sortable(),
|
||||||
|
|||||||
Reference in New Issue
Block a user