refactor: improve canteen related views

This commit is contained in:
Rainer Killinger
2021-08-09 16:49:40 +02:00
parent 02cc2a8879
commit 9f75f47e9c
6 changed files with 111 additions and 20 deletions

View File

@@ -26,6 +26,26 @@ export class FoodDataListComponent extends SearchPageComponent {
* Sets the forced filter to present only places for eating/drinking
*/
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 = {
arguments: {field: 'name'},
order: 'asc',
type: 'ducet',
};
this.forcedFilter = {
arguments: {
filters: [