diff --git a/frontend/src/app/components/result/result.component.html b/frontend/src/app/components/result/result.component.html index 84505d1..131007b 100644 --- a/frontend/src/app/components/result/result.component.html +++ b/frontend/src/app/components/result/result.component.html @@ -13,7 +13,7 @@
euro - {{result.total_accommodation_costs|number:'1.2-2'}}€ + {{result.total_accommodation_costs|number:'1.2-2'}}€
diff --git a/frontend/src/app/containers/search/search.component.ts b/frontend/src/app/containers/search/search.component.ts index f246d00..470a2cf 100644 --- a/frontend/src/app/containers/search/search.component.ts +++ b/frontend/src/app/containers/search/search.component.ts @@ -53,12 +53,15 @@ export class SearchComponent implements OnInit { this.sortOptions = [ {name: 'Relevance', property: 'score', descending: true}, - {name: 'Name', property: 'name'} + {name: 'Name', property: 'name'}, + {name: 'Accommodation', property: 'accommodation_costs'} ]; if (this.results.length > 0) { this.results[0].scores.forEach(({type}) => { - this.sortOptions.push({name: type, property: type, isScore: true}); + if (!this.sortOptions.find(i => i.property === type)) { + this.sortOptions.push({name: type, property: type, isScore: true}); + } }); }