From 150935afeaaac2330e4e329b1059e4b75b897843 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Mon, 6 Jun 2022 13:54:12 +0200 Subject: [PATCH] change: disable buttons contitions --- src/app/app.component.html | 2 ++ src/app/app.component.ts | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/app/app.component.html b/src/app/app.component.html index 9a712ea..5f965b8 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -5,10 +5,12 @@
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 900d1a4..9eeab51 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -41,6 +41,26 @@ export class AppComponent this.formFoodVisible = !this.formFoodVisible; } + public disableFoodButton(): boolean + { + if (this.foodcard.Titles.length < 1) + return true; + + let lastTitle = this.getLastTitle(); + if (lastTitle.Subtitles.length < 1) + return true; + + return false; + } + + public disableSubtitleButton(): boolean + { + if (this.foodcard.Titles.length < 1) + return true; + + return false; + } + public addTitle(): void { this.foodcard.Titles.push({ -- 2.39.5