Open source personal finance application
fix (TrnForm): fix validate & transfer
ilkome773a0d7290f6
diff --git a/components/trnForm/TrnForm.vue b/components/trnForm/TrnForm.vueindex 58a85c94..24d68408 100644--- a/components/trnForm/TrnForm.vue+++ b/components/trnForm/TrnForm.vue@@ -228,7 +228,7 @@ export default {TrnFormCalendarTrnFormCalculator(@onSubmit="handleSubmitForm")TrnFormHeader- TrnFormHeaderTransfer(v-show="isTransfer")+ LazyTrnFormHeaderTransfer(v-if="isTransfer")//- Quick selector.swiper-slide(:style="{ height: maxHeight }")diff --git a/components/trnForm/useTrnFormValidate.ts b/components/trnForm/useTrnFormValidate.tsindex 2fbf926d..67be5640 100644--- a/components/trnForm/useTrnFormValidate.ts+++ b/components/trnForm/useTrnFormValidate.ts@@ -29,7 +29,7 @@ export default function useTrnFormValidate () {}}- if (!values.walletId) {+ if (!values.walletId && values.type !== 2) {return {error: {title: errorTitle,@@ -38,7 +38,7 @@ export default function useTrnFormValidate () {}}- if (!values.categoryId) {+ if (!values.categoryId && values.type !== 2) {return {error: {title: errorTitle,@@ -48,7 +48,7 @@ export default function useTrnFormValidate () {}// Transfer- if (values.amountType === 2) {+ if (values.type === 2) {if (values.walletFromId === values.walletToId) {return {error: {