From: Bastian Dehn Date: Tue, 7 Jun 2022 17:23:05 +0000 (+0200) Subject: change: add food button to subtitle X-Git-Tag: v1.0^2~22 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=b1b0aa401dd0073f7e0271dca460cc192be1a699;p=speisekarten-editor.git change: add food button to subtitle --- diff --git a/src/app/app.component.html b/src/app/app.component.html index 6b39e5f..4e4319e 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -17,11 +17,6 @@ type="button" id="buttonTitle" (click)="changeFormTitleVisible()">Titel hinzufügen -
@@ -63,11 +58,6 @@ - +
{{food.Food}}
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 1da9ab5..2472b79 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -39,8 +39,11 @@ export class AppComponent this.formSubtitleVisible = !this.formSubtitleVisible; } - public changeFormFoodVisible(): void + public addNewFood(title: ITitle, index: number): void { + let titleIndex = this.foodcard.Titles.indexOf(title); + this.insertIndicies = [ titleIndex, index, + title.Subtitles[index].Foods.length - 1 ]; this.formFoodVisible = !this.formFoodVisible; }