From 2e18ca41c9b008198a70c0b23c90b299380becd6 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Fri, 10 Feb 2023 13:33:38 +0100 Subject: [PATCH] get it working --- .../components/Contributions/ContributionForm.vue | 14 ++++++++++---- frontend/src/pages/Community.vue | 1 - 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue index 9a2ffb54b..3b631f63e 100644 --- a/frontend/src/components/Contributions/ContributionForm.vue +++ b/frontend/src/components/Contributions/ContributionForm.vue @@ -23,10 +23,7 @@ -
+
{{ noOpenCreation }}
@@ -135,6 +132,15 @@ export default { }, }, computed: { + showMessage() { + if (this.maxGddThisMonth <= 0 && this.maxGddLastMonth <= 0) return true + if (this.form.date) + return ( + (this.isThisMonth && this.maxGddThisMonth <= 0) || + (!this.isThisMonth && this.maxGddLastMonth <= 0) + ) + return false + }, disabled() { return ( this.form.date === '' || diff --git a/frontend/src/pages/Community.vue b/frontend/src/pages/Community.vue index 71fb9f552..113bcd4e4 100644 --- a/frontend/src/pages/Community.vue +++ b/frontend/src/pages/Community.vue @@ -188,7 +188,6 @@ export default { return new Date(date.setMonth(date.getMonth() - 1, 1)) }, isThisMonth() { - if (!this.form.date) return false const formDate = new Date(this.form.date) return ( formDate.getFullYear() === this.maximalDate.getFullYear() &&