From 17213ba4b0b854677100fce0ac1bac594ae1d468 Mon Sep 17 00:00:00 2001 From: Andreas Knuth Date: Mon, 9 Sep 2024 20:13:11 +0200 Subject: [PATCH] Fix: #104 --- .../account/account.component.html | 35 ++++++++++--------- .../subscription/account/account.component.ts | 8 ++--- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/bizmatch/src/app/pages/subscription/account/account.component.html b/bizmatch/src/app/pages/subscription/account/account.component.html index cfaf8a1..2f05ab4 100644 --- a/bizmatch/src/app/pages/subscription/account/account.component.html +++ b/bizmatch/src/app/pages/subscription/account/account.component.html @@ -147,28 +147,31 @@ } -
-
+
+
-
+
@for (areasServed of user.areasServed; track areasServed; let i=$index){ -
-
+
+
-
+
+
+ +
}
- - + + [Add more Areas or remove existing ones.]
@@ -185,20 +188,20 @@ } -
-
+
+
-
+
@for (licensedIn of user.licensedIn; track licensedIn; let i=$index){ -
-
+
+
-
+
+
}
- - + [Add more licenses or remove existing ones.]
diff --git a/bizmatch/src/app/pages/subscription/account/account.component.ts b/bizmatch/src/app/pages/subscription/account/account.component.ts index dc4285c..cac5ad4 100644 --- a/bizmatch/src/app/pages/subscription/account/account.component.ts +++ b/bizmatch/src/app/pages/subscription/account/account.component.ts @@ -204,14 +204,14 @@ export class AccountComponent { addLicence() { this.user.licensedIn.push({ registerNo: '', state: '' }); } - removeLicence() { - this.user.licensedIn.splice(this.user.licensedIn.length - 1, 1); + removeLicence(index: number) { + this.user.licensedIn.splice(index, 1); } addArea() { this.user.areasServed.push({ county: '', state: '' }); } - removeArea() { - this.user.areasServed.splice(this.user.areasServed.length - 1, 1); + removeArea(index: number) { + this.user.areasServed.splice(index, 1); } get isProfessional() { return this.user.customerType === 'professional';