From 01b9a856ff070f61b2b4f2ce436c61ace4c0d0fb Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 26 Oct 2022 07:31:45 +0200 Subject: [PATCH 01/14] fix: Change Orange Color --- frontend/src/assets/scss/custom/gradido-custom/_color.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/assets/scss/custom/gradido-custom/_color.scss b/frontend/src/assets/scss/custom/gradido-custom/_color.scss index 20fcbefd6..5f4751c32 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_color.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_color.scss @@ -33,7 +33,8 @@ $indigo: #5603ad !default; $purple: #8965e0 !default; $pink: #f3a4b5 !default; $red: #f5365c !default; -$orange: #fb6340 !default; +// $orange: #fb6340 !default; +$orange: #8C0505 !default; $yellow: #ffd600 !default; $green: #2dce89 !default; $teal: #11cdef !default; From f2903f839ee068b4cff4d08b2eacfd2bca47fb56 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Thu, 27 Oct 2022 06:45:14 +0200 Subject: [PATCH 02/14] linting --- frontend/src/assets/scss/custom/gradido-custom/_color.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/assets/scss/custom/gradido-custom/_color.scss b/frontend/src/assets/scss/custom/gradido-custom/_color.scss index 5f4751c32..f42555adf 100644 --- a/frontend/src/assets/scss/custom/gradido-custom/_color.scss +++ b/frontend/src/assets/scss/custom/gradido-custom/_color.scss @@ -33,8 +33,9 @@ $indigo: #5603ad !default; $purple: #8965e0 !default; $pink: #f3a4b5 !default; $red: #f5365c !default; + // $orange: #fb6340 !default; -$orange: #8C0505 !default; +$orange: #8c0505 !default; $yellow: #ffd600 !default; $green: #2dce89 !default; $teal: #11cdef !default; From 629ee2fdff77e2b3e5c1298f818081b20a43b75c Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 31 Oct 2022 08:01:39 +0100 Subject: [PATCH 03/14] remove horizontal scrollbar in admin overview --- admin/src/components/ContentFooter.vue | 4 ++-- admin/src/components/ContributionLinkList.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/src/components/ContentFooter.vue b/admin/src/components/ContentFooter.vue index bab3f5d12..a875100f6 100644 --- a/admin/src/components/ContentFooter.vue +++ b/admin/src/components/ContentFooter.vue @@ -1,7 +1,7 @@ diff --git a/admin/src/pages/Overview.spec.js b/admin/src/pages/Overview.spec.js index 1861c5330..affd018a7 100644 --- a/admin/src/pages/Overview.spec.js +++ b/admin/src/pages/Overview.spec.js @@ -1,6 +1,5 @@ import { mount } from '@vue/test-utils' import Overview from './Overview.vue' -import { listContributionLinks } from '@/graphql/listContributionLinks.js' import { communityStatistics } from '@/graphql/communityStatistics.js' import { listUnconfirmedContributions } from '@/graphql/listUnconfirmedContributions.js' @@ -36,27 +35,6 @@ const apolloQueryMock = jest }, }, }) - .mockResolvedValueOnce({ - data: { - listContributionLinks: { - links: [ - { - id: 1, - name: 'Meditation', - memo: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut l', - amount: '200', - validFrom: '2022-04-01', - validTo: '2022-08-01', - cycle: 'täglich', - maxPerCycle: '3', - maxAmountPerMonth: 0, - link: 'https://localhost/redeem/CL-1a2345678', - }, - ], - count: 1, - }, - }, - }) .mockResolvedValue({ data: { listUnconfirmedContributions: [ @@ -118,14 +96,6 @@ describe('Overview', () => { ) }) - it('calls listContributionLinks', () => { - expect(apolloQueryMock).toBeCalledWith( - expect.objectContaining({ - query: listContributionLinks, - }), - ) - }) - it('commits three pending creations to store', () => { expect(storeCommitMock).toBeCalledWith('setOpenCreations', 3) }) diff --git a/admin/src/pages/Overview.vue b/admin/src/pages/Overview.vue index cfa247b8e..57bf7ff8c 100644 --- a/admin/src/pages/Overview.vue +++ b/admin/src/pages/Overview.vue @@ -28,31 +28,21 @@ - diff --git a/admin/src/router/router.test.js b/admin/src/router/router.test.js index eb9b646cb..bf2e724d2 100644 --- a/admin/src/router/router.test.js +++ b/admin/src/router/router.test.js @@ -45,7 +45,7 @@ describe('router', () => { describe('routes', () => { it('has seven routes defined', () => { - expect(routes).toHaveLength(7) + expect(routes).toHaveLength(8) }) it('has "/overview" as default', async () => { @@ -81,6 +81,13 @@ describe('router', () => { }) }) + describe('contribution-link', () => { + it('loads the "ContributionLink" component', async () => { + const component = await routes.find((r) => r.path === '/contribution-link').component() + expect(component.default.name).toBe('ContributionLinks') + }) + }) + describe('not found page', () => { it('renders the "NotFound" component', async () => { const component = await routes.find((r) => r.path === '*').component() diff --git a/admin/src/router/routes.js b/admin/src/router/routes.js index 72e7b1ac5..caf1030a1 100644 --- a/admin/src/router/routes.js +++ b/admin/src/router/routes.js @@ -23,6 +23,10 @@ const routes = [ path: '/creation-confirm', component: () => import('@/pages/CreationConfirm.vue'), }, + { + path: '/contribution-link', + component: () => import('@/pages/ContributionLink.vue'), + }, { path: '*', component: () => import('@/components/NotFoundPage.vue'), From 214378f683f5416ebd513950c37fd0ecb05d1679 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 31 Oct 2022 12:14:28 +0100 Subject: [PATCH 05/14] fix lint --- admin/src/locales/de.json | 2 +- admin/src/locales/en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index 2016f81a1..85f33660c 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -101,7 +101,7 @@ "open_creation": "Offene Schöpfungen", "overview": "Übersicht", "user_search": "Nutzersuche", - "automaticContributions":"automatische Beiträge" + "automaticContributions": "automatische Beiträge" }, "not_open_creations": "Keine offenen Schöpfungen", "open": "offen", diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index e79050b69..8146455d2 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -101,7 +101,7 @@ "open_creation": "Open creations", "overview": "Overview", "user_search": "User search", - "automaticContributions":"Automatic Contributions" + "automaticContributions": "Automatic Contributions" }, "not_open_creations": "No open creations", "open": "open", From f0e67930748df49a257f6d14082c2d508edf17e2 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 31 Oct 2022 12:14:49 +0100 Subject: [PATCH 06/14] fix locales --- admin/src/locales/de.json | 4 ++-- admin/src/locales/en.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index 85f33660c..ecd33045c 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -95,13 +95,13 @@ "multiple_creation_text": "Bitte wähle ein oder mehrere Mitglieder aus für die du Schöpfen möchtest.", "name": "Name", "navbar": { + "automaticContributions": "automatische Beiträge", "logout": "Abmelden", "multi_creation": "Mehrfachschöpfung", "my-account": "Mein Konto", "open_creation": "Offene Schöpfungen", "overview": "Übersicht", - "user_search": "Nutzersuche", - "automaticContributions": "automatische Beiträge" + "user_search": "Nutzersuche" }, "not_open_creations": "Keine offenen Schöpfungen", "open": "offen", diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 8146455d2..91d7d406e 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -95,13 +95,13 @@ "multiple_creation_text": "Please select one or more members for which you would like to perform creations.", "name": "Name", "navbar": { + "automaticContributions": "Automatic Contributions", "logout": "Logout", "multi_creation": "Multiple creation", "my-account": "My Account", "open_creation": "Open creations", "overview": "Overview", - "user_search": "User search", - "automaticContributions": "Automatic Contributions" + "user_search": "User search" }, "not_open_creations": "No open creations", "open": "open", From df8b1623ac8efada494eacfd29e50d5ae5bdf8c9 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 31 Oct 2022 12:50:37 +0100 Subject: [PATCH 07/14] Contact email under own heading --- frontend/src/locales/de.json | 1 + frontend/src/locales/en.json | 1 + frontend/src/pages/InfoStatistic.vue | 3 +++ 3 files changed, 5 insertions(+) diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index a9aee274d..b5736d3e0 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -31,6 +31,7 @@ "submitContribution": "Beitrag einreichen", "switch-to-this-community": "zu dieser Gemeinschaft wechseln" }, + "contact":"Kontakt", "contribution": { "activity": "Tätigkeit", "alert": { diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index d9f69581d..e947965d7 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -31,6 +31,7 @@ "submitContribution": "Submit contribution", "switch-to-this-community": "Switch to this community" }, + "contact":"Contact", "contribution": { "activity": "Activity", "alert": { diff --git a/frontend/src/pages/InfoStatistic.vue b/frontend/src/pages/InfoStatistic.vue index de4b9e224..9b3b4dff5 100644 --- a/frontend/src/pages/InfoStatistic.vue +++ b/frontend/src/pages/InfoStatistic.vue @@ -44,6 +44,9 @@ {{ item.firstName }} {{ item.lastName }} + + +
{{ $t('contact') }}
{{ supportMail }}