refactor: enable full sort capabilites on search

This commit is contained in:
Rainer Killinger
2021-09-21 14:04:47 +02:00
committed by Jovan Krunić
parent 03084b1c96
commit a1bf950c88
5 changed files with 46 additions and 31 deletions

View File

@@ -27,24 +27,28 @@ export class FoodDataListComponent extends SearchPageComponent {
*/
initialize() {
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 = [
{
type: 'distance',
order: 'asc',
arguments: {
field: 'geo.point.coordinates',
position: [
this.positionService.position.longitude,
this.positionService.position.latitude,
],
},
},
};
];
}
this.sortQuery = {
arguments: {field: 'name'},
order: 'asc',
type: 'ducet',
};
this.sortQuery = [
{
arguments: {field: 'name'},
order: 'asc',
type: 'ducet',
},
];
this.forcedFilter = {
arguments: {