From 57f06280ce1ac19487691bb9c17b74adb74d062b Mon Sep 17 00:00:00 2001 From: elweyn Date: Tue, 26 Jul 2022 13:00:08 +0200 Subject: [PATCH 1/8] Remove nav prev and nav next year arrows. --- frontend/src/components/Contributions/ContributionForm.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Contributions/ContributionForm.vue b/frontend/src/components/Contributions/ContributionForm.vue index f345ffff4..1a1e08d59 100644 --- a/frontend/src/components/Contributions/ContributionForm.vue +++ b/frontend/src/components/Contributions/ContributionForm.vue @@ -25,7 +25,10 @@ reset-value="" :label-no-date-selected="$t('contribution.noDateSelected')" required - > + > + + + Date: Tue, 26 Jul 2022 13:11:52 +0200 Subject: [PATCH 3/8] Change 'myContributionNoteList' to new text --- frontend/src/locales/de.json | 2 +- frontend/src/locales/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 4649ce32f..7c3761827 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -36,7 +36,7 @@ "alert": { "communityNoteList": "Hier findest du alle eingereichten und bestätigten Beiträge von allen Mitgliedern aus dieser Gemeinschaft.", "confirm": "bestätigt", - "myContributionNoteList": "Hier findest du chronologisch aufgelistet alle deine eingereichten Beiträge. Es gibt drei Darstellungsarten. Du kannst deine Beiträge, welche noch nicht bestätigt wurden, jederzeit bearbeiten.", + "myContributionNoteList": "Eingereichte Beiträge, die noch nicht bestätigt wurden, kannst du jederzeit bearbeiten oder löschen.", "myContributionNoteSupport": "Es wird bald an dieser Stelle die Möglichkeit geben das ein Dialog zwischen Moderatoren und dir stattfinden kann. Solltest du jetzt Probleme haben bitte nimm Kontakt mit dem Support auf.", "pending": "Eingereicht und wartet auf Bestätigung", "rejected": "abgelehnt" diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 6340c4ad6..436f789c5 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -36,7 +36,7 @@ "alert": { "communityNoteList": "Here you will find all submitted and confirmed contributions from all members of this community.", "confirm": "confirmed", - "myContributionNoteList": "Here you will find a chronological list of all your submitted contributions. There are three display types. There are three ways of displaying your posts. You can edit your contributions, which have not yet been confirmed, at any time.", + "myContributionNoteList": "You can edit or delete entries that have not yet been confirmed at any time.", "myContributionNoteSupport": "Soon there will be the possibility for a dialogue between moderators and you. If you have any problems now, please contact the support.", "pending": "Submitted and waiting for confirmation", "rejected": "deleted" From 16d098d808e127b8d27848a06f10b7db1741afcc Mon Sep 17 00:00:00 2001 From: elweyn Date: Tue, 26 Jul 2022 16:20:41 +0200 Subject: [PATCH 4/8] Add new locales for contribution date. --- frontend/src/locales/de.json | 1 + frontend/src/locales/en.json | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 62edd9815..8bf402805 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -41,6 +41,7 @@ "pending": "Eingereicht und wartet auf Bestätigung", "rejected": "abgelehnt" }, + "date": "Beitrag für:", "delete": "Beitrag löschen! Bist du sicher?", "deleted": "Der Beitrag wurde gelöscht! Wird aber sichtbar bleiben.", "formText": { diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 1cbdc5a8a..236eff4d1 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -41,6 +41,7 @@ "pending": "Submitted and waiting for confirmation", "rejected": "deleted" }, + "date": "Contribution for:", "delete": "Delete Contribution! Are you sure?", "deleted": "The contribution has been deleted! But it will remain visible.", "formText": { From 722886fedc616625050047c77f9a3b77f2ec41cc Mon Sep 17 00:00:00 2001 From: elweyn Date: Tue, 26 Jul 2022 16:27:44 +0200 Subject: [PATCH 5/8] Add contributionDate month & year to list items. --- .../Contributions/ContributionListItem.vue | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Contributions/ContributionListItem.vue b/frontend/src/components/Contributions/ContributionListItem.vue index ca766a008..174335c97 100644 --- a/frontend/src/components/Contributions/ContributionListItem.vue +++ b/frontend/src/components/Contributions/ContributionListItem.vue @@ -11,6 +11,13 @@ {{ $t('math.minus') }}
{{ $d(new Date(date), 'short') }}
+
+ {{ $t('contribution.date') }} + + {{ $d(new Date(contributionDate), 'month') }} + {{ $d(new Date(contributionDate), 'year') }} + +
{{ memo }}
Date: Tue, 26 Jul 2022 16:42:13 +0200 Subject: [PATCH 6/8] Test that date is always createdAt --- .../Contributions/ContributionListItem.spec.js | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/Contributions/ContributionListItem.spec.js b/frontend/src/components/Contributions/ContributionListItem.spec.js index 20f4db959..08523cae4 100644 --- a/frontend/src/components/Contributions/ContributionListItem.spec.js +++ b/frontend/src/components/Contributions/ContributionListItem.spec.js @@ -13,6 +13,7 @@ describe('ContributionListItem', () => { const propsData = { id: 1, + createdAt: '26/07/2022', contributionDate: '07/06/2022', memo: 'Ich habe 10 Stunden die Elbwiesen von Müll befreit.', amount: '200', @@ -85,20 +86,8 @@ describe('ContributionListItem', () => { }) describe('contribution date', () => { - it('is contributionDate by default', () => { - expect(wrapper.vm.date).toBe(wrapper.vm.contributionDate) - }) - - it('is deletedAt when deletedAt is present', async () => { - const now = new Date().toISOString() - await wrapper.setProps({ deletedAt: now }) - expect(wrapper.vm.date).toBe(now) - }) - - it('is confirmedAt at when confirmedAt is present', async () => { - const now = new Date().toISOString() - await wrapper.setProps({ confirmedAt: now }) - expect(wrapper.vm.date).toBe(now) + it('is equal to createdAt', () => { + expect(wrapper.vm.date).toBe(wrapper.vm.createdAt) }) }) From 89b72f90c581a784f0172d42316742a16fc34c21 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 26 Jul 2022 16:57:39 +0200 Subject: [PATCH 7/8] Update frontend/src/components/Contributions/ContributionListItem.spec.js --- .../src/components/Contributions/ContributionListItem.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Contributions/ContributionListItem.spec.js b/frontend/src/components/Contributions/ContributionListItem.spec.js index 08523cae4..59918e762 100644 --- a/frontend/src/components/Contributions/ContributionListItem.spec.js +++ b/frontend/src/components/Contributions/ContributionListItem.spec.js @@ -85,7 +85,7 @@ describe('ContributionListItem', () => { }) }) - describe('contribution date', () => { + describe('date', () => { it('is equal to createdAt', () => { expect(wrapper.vm.date).toBe(wrapper.vm.createdAt) }) From 96a7f8a2bff284dfc9a9ea239c8fd9d3d4490fd2 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 26 Jul 2022 16:57:53 +0200 Subject: [PATCH 8/8] Update frontend/src/components/Contributions/ContributionListItem.vue --- frontend/src/components/Contributions/ContributionListItem.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/src/components/Contributions/ContributionListItem.vue b/frontend/src/components/Contributions/ContributionListItem.vue index 174335c97..90e98bc4c 100644 --- a/frontend/src/components/Contributions/ContributionListItem.vue +++ b/frontend/src/components/Contributions/ContributionListItem.vue @@ -14,8 +14,7 @@
{{ $t('contribution.date') }} - {{ $d(new Date(contributionDate), 'month') }} - {{ $d(new Date(contributionDate), 'year') }} + {{ $d(new Date(contributionDate), 'monthAndYear') }}
{{ memo }}