Skip to content
Snippets Groups Projects
Commit 07e12877 authored by Jens Christian Aanestad's avatar Jens Christian Aanestad
Browse files

bug/Fixed build error in BankAccount component

parent 5cdd016b
No related branches found
No related tags found
1 merge request!77refactor/Added bank account selection to configuration steps
Pipeline #282962 passed with warnings
...@@ -8,8 +8,8 @@ import { useConfigurationStore } from '@/stores/ConfigurationStore' ...@@ -8,8 +8,8 @@ import { useConfigurationStore } from '@/stores/ConfigurationStore'
const router = useRouter(); const router = useRouter();
const formRef = ref(); const formRef = ref();
const spendingAccount = ref<number>(); const spendingAccount = ref<string>('');
const savingsAccount = ref<number>(); const savingsAccount = ref<string>('');
let errorMsg = ref(''); let errorMsg = ref('');
// Updates progress bar in the parent Configuration component. // Updates progress bar in the parent Configuration component.
...@@ -27,8 +27,8 @@ const handleSubmit = () => { ...@@ -27,8 +27,8 @@ const handleSubmit = () => {
formRef.value.classList.add("was-validated") formRef.value.classList.add("was-validated")
const form = formRef.value; const form = formRef.value;
if (form.checkValidity()) { if (form.checkValidity()) {
useConfigurationStore().setSpendingAccount(spendingAccount.value) useConfigurationStore().setSpendingAccount(Number(spendingAccount.value))
useConfigurationStore().setSavingsAccount(savingsAccount.value) useConfigurationStore().setSavingsAccount(Number(savingsAccount.value))
router.push("/commitment") router.push("/commitment")
} }
} }
......
...@@ -9,7 +9,7 @@ export const useConfigurationStore = defineStore('ConfigurationStore', { ...@@ -9,7 +9,7 @@ export const useConfigurationStore = defineStore('ConfigurationStore', {
}), }),
actions: { actions: {
setSpendingAccount(newValue: number) { setSpendingAccount(newValue: number) {
this.spendingAccount = newValue this.spendingAccount = newValue;
}, },
setSavingsAccount(newValue: number) { setSavingsAccount(newValue: number) {
this.savingsAccount = newValue this.savingsAccount = newValue
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment