From 12e374a04d728215ec4fec8a341446ab66e4319a Mon Sep 17 00:00:00 2001 From: Andy Ford Date: Wed, 13 Sep 2023 18:43:44 +0100 Subject: [PATCH] fix: show soft deleted stand assignments and sort --- app/Filament/Resources/StandAssignmentsHistoryResource.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/StandAssignmentsHistoryResource.php b/app/Filament/Resources/StandAssignmentsHistoryResource.php index d704e7b52..4fc7a32b1 100644 --- a/app/Filament/Resources/StandAssignmentsHistoryResource.php +++ b/app/Filament/Resources/StandAssignmentsHistoryResource.php @@ -36,7 +36,10 @@ class StandAssignmentsHistoryResource extends Resource public static function getEloquentQuery(): Builder { - return StandAssignmentsHistory::with('stand', 'stand.airfield'); + return StandAssignmentsHistory::with('stand', 'stand.airfield') + ->withoutGlobalScopes([ + SoftDeletingScope::class, + ]); } public static function canGloballySearch(): bool @@ -101,6 +104,7 @@ public static function table(Table $table): Table TextColumn::make('type') ->label(static::translateTablePath('columns.type')), ]) + ->defaultSort('id', 'desc') ->actions([ ViewAction::make('view_context') ->label('View Context')