From 07e128776faa63d8165e99ff45e40575e3559bea Mon Sep 17 00:00:00 2001
From: Jens Christian Aanestad <jenscaa@stud.ntnu.no>
Date: Thu, 2 May 2024 12:12:53 +0200
Subject: [PATCH] bug/Fixed build error in BankAccount component

---
 .../Configuration/ConfigurationSteps/BankAccount.vue      | 8 ++++----
 src/stores/ConfigurationStore.ts                          | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/components/Configuration/ConfigurationSteps/BankAccount.vue b/src/components/Configuration/ConfigurationSteps/BankAccount.vue
index b83969e..e37709b 100644
--- a/src/components/Configuration/ConfigurationSteps/BankAccount.vue
+++ b/src/components/Configuration/ConfigurationSteps/BankAccount.vue
@@ -8,8 +8,8 @@ import { useConfigurationStore } from '@/stores/ConfigurationStore'
 const router = useRouter();
 
 const formRef = ref();
-const spendingAccount = ref<number>();
-const savingsAccount = ref<number>();
+const spendingAccount = ref<string>('');
+const savingsAccount = ref<string>('');
 let errorMsg = ref('');
 
 // Updates progress bar in the parent Configuration component.
@@ -27,8 +27,8 @@ const handleSubmit = () => {
   formRef.value.classList.add("was-validated")
   const form = formRef.value;
   if (form.checkValidity()) {
-    useConfigurationStore().setSpendingAccount(spendingAccount.value)
-    useConfigurationStore().setSavingsAccount(savingsAccount.value)
+    useConfigurationStore().setSpendingAccount(Number(spendingAccount.value))
+    useConfigurationStore().setSavingsAccount(Number(savingsAccount.value))
     router.push("/commitment")
   }
 }
diff --git a/src/stores/ConfigurationStore.ts b/src/stores/ConfigurationStore.ts
index 0a2fa0a..465edde 100644
--- a/src/stores/ConfigurationStore.ts
+++ b/src/stores/ConfigurationStore.ts
@@ -9,7 +9,7 @@ export const useConfigurationStore = defineStore('ConfigurationStore', {
   }),
   actions: {
     setSpendingAccount(newValue: number) {
-      this.spendingAccount = newValue
+      this.spendingAccount = newValue;
     },
     setSavingsAccount(newValue: number) {
       this.savingsAccount = newValue
-- 
GitLab