mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
@@ -28,22 +28,6 @@ export class FoodDataListComponent extends SearchPageComponent {
|
||||
initialize() {
|
||||
this.showDefaultData = true;
|
||||
|
||||
if (this.positionService.position) {
|
||||
this.sortQuery = [
|
||||
{
|
||||
type: 'distance',
|
||||
order: 'asc',
|
||||
arguments: {
|
||||
field: 'geo.point.coordinates',
|
||||
position: [
|
||||
this.positionService.position.longitude,
|
||||
this.positionService.position.latitude,
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
this.sortQuery = [
|
||||
{
|
||||
arguments: {field: 'name'},
|
||||
@@ -88,5 +72,21 @@ export class FoodDataListComponent extends SearchPageComponent {
|
||||
},
|
||||
type: 'boolean',
|
||||
};
|
||||
|
||||
if (this.positionService.position) {
|
||||
this.sortQuery = [
|
||||
{
|
||||
type: 'distance',
|
||||
order: 'asc',
|
||||
arguments: {
|
||||
field: 'geo',
|
||||
position: [
|
||||
this.positionService.position.longitude,
|
||||
this.positionService.position.latitude,
|
||||
],
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user