diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue index bdd25f23c..9a2ffb54b 100644 --- a/frontend/src/components/Contributions/ContributionForm.vue +++ b/frontend/src/components/Contributions/ContributionForm.vue @@ -3,7 +3,7 @@ - - - +
+ {{ noOpenCreation }} +
+
+ + + - - - - {{ $t('form.cancel') }} - - - - - {{ form.id ? $t('form.change') : $t('contribution.submit') }} - - - + + + + {{ $t('form.cancel') }} + + + + + {{ form.id ? $t('form.change') : $t('contribution.submit') }} + + + +
@@ -133,6 +153,18 @@ export default { validMaxTime() { return Number(this.validMaxGDD / 20) }, + noOpenCreation() { + if (this.maxGddThisMonth <= 0 && this.maxGddLastMonth <= 0) { + return this.$t('contribution.noOpenCreation.allMonth') + } + if (this.isThisMonth && this.maxGddThisMonth <= 0) { + return this.$t('contribution.noOpenCreation.thisMonth') + } + if (!this.isThisMonth && this.maxGddLastMonth <= 0) { + return this.$t('contribution.noOpenCreation.lastMonth') + } + return '' + }, }, watch: { value() { @@ -142,6 +174,9 @@ export default { }