diff --git a/src/components/Configuration/ConfigurationSteps/BankAccount.vue b/src/components/Configuration/ConfigurationSteps/BankAccount.vue index b83969e4321866e9c3e41865fd58c9b6147d6b2e..e37709b89e5681de22914d80683993007bc4838c 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 0a2fa0a7e7e00417d0215c5b3553a2fbfd2caf56..465edde65849684c603a94dc25225fe6f037743a 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