mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-09 19:22:51 +00:00
fix: canteen module layout
This commit is contained in:
@@ -56,11 +56,9 @@ export class PlaceMensaDetailComponent implements AfterViewInit {
|
||||
*/
|
||||
startingDay: Moment;
|
||||
|
||||
constructor(private mensaService: PlaceMensaService) {
|
||||
this.startingDay = moment();
|
||||
this.startingDay.hour(0);
|
||||
this.startingDay.minute(0);
|
||||
this.startingDay.millisecond(0);
|
||||
constructor(private readonly mensaService: PlaceMensaService) {
|
||||
this.startingDay = moment()
|
||||
.startOf('day');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,6 +66,13 @@ export class PlaceMensaDetailComponent implements AfterViewInit {
|
||||
*/
|
||||
ngAfterViewInit() {
|
||||
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