From: Bastian Dehn Date: Mon, 6 Jun 2022 13:49:23 +0000 (+0200) Subject: add: edit subtitle X-Git-Tag: v1.0^2~39 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=630bc0b315941375af384a48cefdd13eba7ae8e3;p=speisekarten-editor.git add: edit subtitle --- diff --git a/src/app/app.component.html b/src/app/app.component.html index 1e75cf9..d15fe62 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -28,7 +28,13 @@ +
@@ -54,6 +60,8 @@

{{title.Title}}

{{subtitle.Subtitle}}

+
{{food.Food}}
{{food.sideDish}}
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 587a62a..17ac977 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -71,6 +71,21 @@ export class AppComponent this.formSubtitleVisible = false; } + public saveSubtitle(): void + { + this.subtitle = { Subtitle: "", Foods: [] }; + this.formSubtitleVisible = false; + this.edit = false; + } + + public editSubtitle(subtitle: ISubtitle): void + { + this.formSubtitleVisible = true; + this.subtitle = subtitle; + this.edit = true; + + } + public addFood(): void { let lastSubtitle = this.getLastSubtitle();