From 630bc0b315941375af384a48cefdd13eba7ae8e3 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Mon, 6 Jun 2022 15:49:23 +0200 Subject: [PATCH] add: edit subtitle --- src/app/app.component.html | 8 ++++++++ src/app/app.component.ts | 15 +++++++++++++++ 2 files changed, 23 insertions(+) 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(); -- 2.39.5