diff --git a/app/Filament/Resources/PhotoResource.php b/app/Filament/Resources/PhotoResource.php index 0c1493e4..709566db 100644 --- a/app/Filament/Resources/PhotoResource.php +++ b/app/Filament/Resources/PhotoResource.php @@ -28,6 +28,12 @@ public static function table(Table $table): Table ImageColumn::make('path') ->label('Photo') ->searchable(), + TextColumn::make('gps') + ->label('GPS') + ->getStateUsing(fn (Photo $photo): ?string => $photo->latitude && $photo->longitude + ? "{$photo->latitude}, {$photo->longitude}" + : null + ), TextColumn::make('created_at') ->dateTime() ->sortable() diff --git a/app/Filament/Resources/UserResource.php b/app/Filament/Resources/UserResource.php index 6b1aae18..6d6d0945 100644 --- a/app/Filament/Resources/UserResource.php +++ b/app/Filament/Resources/UserResource.php @@ -15,6 +15,7 @@ use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; +use Illuminate\Database\Eloquent\Builder; class UserResource extends Resource { @@ -66,6 +67,7 @@ public static function table(Table $table): Table ->sortable() ->toggleable(isToggledHiddenByDefault: true), ]) + ->modifyQueryUsing(fn (Builder $query) => $query->with(['currentTeam', 'ownedTeams'])) ->filters([ // ])