From d49a99fcfffc16628d8b9ea399b6830758ab134d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Mon, 8 Aug 2022 11:28:31 +0200 Subject: [PATCH] Refactor method 'disabled' --- frontend/src/components/Contributions/ContributionForm.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue index d890e6a1e..e9feb72d7 100644 --- a/frontend/src/components/Contributions/ContributionForm.vue +++ b/frontend/src/components/Contributions/ContributionForm.vue @@ -127,8 +127,7 @@ export default { return new Date(this.maximalDate.getFullYear(), this.maximalDate.getMonth() - 1, 1) }, disabled() { - // Wolle: refactor - if ( + return ( this.form.date === '' || this.form.memo.length < this.minlength || this.form.memo.length > this.maxlength || @@ -137,8 +136,6 @@ export default { (this.isThisMonth && parseInt(this.form.amount) > parseInt(this.maxGddThisMonth)) || (!this.isThisMonth && parseInt(this.form.amount) > parseInt(this.maxGddLastMonth)) ) - return true - return false }, lastMonthObject() { // Wolle: refine logic and melt with 'thisMonthObject'