mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 09:03:02 +00:00
fix: canteen module layout
This commit is contained in:
@@ -56,11 +56,9 @@ export class PlaceMensaDetailComponent implements AfterViewInit {
|
|||||||
*/
|
*/
|
||||||
startingDay: Moment;
|
startingDay: Moment;
|
||||||
|
|
||||||
constructor(private mensaService: PlaceMensaService) {
|
constructor(private readonly mensaService: PlaceMensaService) {
|
||||||
this.startingDay = moment();
|
this.startingDay = moment()
|
||||||
this.startingDay.hour(0);
|
.startOf('day');
|
||||||
this.startingDay.minute(0);
|
|
||||||
this.startingDay.millisecond(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -68,6 +66,13 @@ export class PlaceMensaDetailComponent implements AfterViewInit {
|
|||||||
*/
|
*/
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
this.dishes = this.mensaService.getAllDishes(this.item, this.displayRange);
|
this.dishes = this.mensaService.getAllDishes(this.item, this.displayRange);
|
||||||
this.dishes.then(result => (this.selectedDay = keys(result)[0]));
|
this.dishes.then((result) => {
|
||||||
|
for (const [key, value] of Object.entries(result)) {
|
||||||
|
if (value.length === 0) {
|
||||||
|
delete result[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.selectedDay = keys(result)[0];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user