From bb65a1b11bcd8d61a2093433c2427d0b758c727c Mon Sep 17 00:00:00 2001 From: mahula Date: Thu, 13 Oct 2022 13:34:09 +0200 Subject: [PATCH 1/3] disable contribution form datepicker when editing existing contribution --- frontend/src/components/Contributions/ContributionForm.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue index 47f2be4c4..efe80f494 100644 --- a/frontend/src/components/Contributions/ContributionForm.vue +++ b/frontend/src/components/Contributions/ContributionForm.vue @@ -25,6 +25,7 @@ reset-value="" :label-no-date-selected="$t('contribution.noDateSelected')" required + :disabled="this.form.id !== null" > From 43a9ec2a4c6f0bb0c5717e80334fb7424a8aee3b Mon Sep 17 00:00:00 2001 From: mahula Date: Thu, 13 Oct 2022 13:34:51 +0200 Subject: [PATCH 2/3] adapt contribution form unit tests to changes --- frontend/src/components/Contributions/ContributionForm.spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Contributions/ContributionForm.spec.js b/frontend/src/components/Contributions/ContributionForm.spec.js index cf47577a3..8f35948f9 100644 --- a/frontend/src/components/Contributions/ContributionForm.spec.js +++ b/frontend/src/components/Contributions/ContributionForm.spec.js @@ -329,7 +329,8 @@ describe('ContributionForm', () => { describe('invalid form data', () => { beforeEach(async () => { - await wrapper.findComponent({ name: 'BFormDatepicker' }).vm.$emit('input', now) + // skip this precondition as long as the datepicker is disabled in the component + // await wrapper.findComponent({ name: 'BFormDatepicker' }).vm.$emit('input', now) await wrapper.find('#contribution-amount').find('input').setValue('200') }) From 7b1daaf7608fd87d2ee4b8796ea16449cceabe52 Mon Sep 17 00:00:00 2001 From: mahula Date: Thu, 13 Oct 2022 13:58:09 +0200 Subject: [PATCH 3/3] disable change of month in creation editing form in admin area --- admin/src/components/EditCreationFormular.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/src/components/EditCreationFormular.vue b/admin/src/components/EditCreationFormular.vue index 0e887ad3d..084e44b87 100644 --- a/admin/src/components/EditCreationFormular.vue +++ b/admin/src/components/EditCreationFormular.vue @@ -12,6 +12,7 @@ value-field="item" text-field="name" name="month-selection" + :disabled="true" >