diff --git a/backend/src/emails/__snapshots__/sendEmailVariants.test.ts.snap b/backend/src/emails/__snapshots__/sendEmailVariants.test.ts.snap index 37263e937..aec3510fe 100644 --- a/backend/src/emails/__snapshots__/sendEmailVariants.test.ts.snap +++ b/backend/src/emails/__snapshots__/sendEmailVariants.test.ts.snap @@ -496,7 +496,10 @@ exports[`sendEmailVariants sendAddedContributionMessageEmail result has the corr

Read and reply to message

-
To view and reply to the message, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account +
+

„My message.“

+

To reply to the message, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.

+
To account
Please do not reply to this email.
@@ -667,8 +670,8 @@ exports[`sendEmailVariants sendContributionChangedByModeratorEmail result has th

Contribution details

-
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account -
Or copy the link into your browser window.
http://localhost/community/contributions +
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account +
Or copy the link into your browser window.
https://gradido.net/contributions/own-contributions/1#contributionListItem-1
Please do not reply to this email.
@@ -839,8 +842,8 @@ exports[`sendEmailVariants sendContributionConfirmedEmail result has the correct

Contribution details

-
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account -
Or copy the link into your browser window.
http://localhost/community/contributions +
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account +
Or copy the link into your browser window.
https://gradido.net/contributions/own-contributions/1#contributionListItem-1
Please do not reply to this email.
@@ -1011,8 +1014,8 @@ exports[`sendEmailVariants sendContributionDeletedEmail result has the correct h

Contribution details

-
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account -
Or copy the link into your browser window.
http://localhost/community/contributions +
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account +
Or copy the link into your browser window.
https://gradido.net/contributions/own-contributions/1#contributionListItem-1
Please do not reply to this email.
@@ -1183,8 +1186,8 @@ exports[`sendEmailVariants sendContributionDeniedEmail result has the correct ht

Contribution details

-
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account -
Or copy the link into your browser window.
http://localhost/community/contributions +
To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab.
To account +
Or copy the link into your browser window.
https://gradido.net/contributions/own-contributions/1#contributionListItem-1
Please do not reply to this email.
diff --git a/backend/src/emails/sendEmailVariants.test.ts b/backend/src/emails/sendEmailVariants.test.ts index 2c2885ebf..5c8bde6f2 100644 --- a/backend/src/emails/sendEmailVariants.test.ts +++ b/backend/src/emails/sendEmailVariants.test.ts @@ -65,6 +65,8 @@ const sendEmailTranslatedSpy = jest.spyOn(sendEmailTranslatedApi, 'sendEmailTran describe('sendEmailVariants', () => { let result: any + const contributionFrontendLink = + 'https://gradido.net/contributions/own-contributions/1#contributionListItem-1' describe('sendAddedContributionMessageEmail', () => { beforeAll(async () => { @@ -76,6 +78,8 @@ describe('sendEmailVariants', () => { senderFirstName: 'Bibi', senderLastName: 'Bloxberg', contributionMemo: 'My contribution.', + contributionFrontendLink, + message: 'My message.', }) }) @@ -93,9 +97,9 @@ describe('sendEmailVariants', () => { senderFirstName: 'Bibi', senderLastName: 'Bloxberg', contributionMemo: 'My contribution.', - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, + contributionFrontendLink, + message: 'My message.', supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, - communityURL: CONFIG.COMMUNITY_URL, }, }) }) @@ -234,6 +238,7 @@ describe('sendEmailVariants', () => { senderLastName: 'Bloxberg', contributionMemo: 'My contribution.', contributionAmount: new Decimal(23.54), + contributionFrontendLink, }) }) @@ -252,9 +257,8 @@ describe('sendEmailVariants', () => { senderLastName: 'Bloxberg', contributionMemo: 'My contribution.', contributionAmount: '23.54', - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, - communityURL: CONFIG.COMMUNITY_URL, + contributionFrontendLink, }, }) }) @@ -291,6 +295,7 @@ describe('sendEmailVariants', () => { senderLastName: 'Bloxberg', contributionMemo: 'My contribution.', contributionMemoUpdated: 'This is a better contribution memo.', + contributionFrontendLink, }) }) @@ -309,9 +314,8 @@ describe('sendEmailVariants', () => { senderLastName: 'Bloxberg', contributionMemo: 'My contribution.', contributionMemoUpdated: 'This is a better contribution memo.', - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, + contributionFrontendLink, supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, - communityURL: CONFIG.COMMUNITY_URL, }, }) }) @@ -347,6 +351,7 @@ describe('sendEmailVariants', () => { senderFirstName: 'Bibi', senderLastName: 'Bloxberg', contributionMemo: 'My contribution.', + contributionFrontendLink, }) }) @@ -364,9 +369,8 @@ describe('sendEmailVariants', () => { senderFirstName: 'Bibi', senderLastName: 'Bloxberg', contributionMemo: 'My contribution.', - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, + contributionFrontendLink, supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, - communityURL: CONFIG.COMMUNITY_URL, }, }) }) @@ -402,6 +406,7 @@ describe('sendEmailVariants', () => { senderFirstName: 'Bibi', senderLastName: 'Bloxberg', contributionMemo: 'My contribution.', + contributionFrontendLink, }) }) @@ -419,9 +424,8 @@ describe('sendEmailVariants', () => { senderFirstName: 'Bibi', senderLastName: 'Bloxberg', contributionMemo: 'My contribution.', - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, + contributionFrontendLink, supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, - communityURL: CONFIG.COMMUNITY_URL, }, }) }) @@ -531,7 +535,6 @@ describe('sendEmailVariants', () => { senderEmail: 'bibi@bloxberg.de', transactionMemo: 'You deserve it! 🙏🏼', transactionAmount: '17.65', - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, communityURL: CONFIG.COMMUNITY_URL, }, @@ -590,7 +593,6 @@ describe('sendEmailVariants', () => { senderLastName: 'Bloxberg', senderEmail: 'bibi@bloxberg.de', transactionAmount: '37.40', - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, communityURL: CONFIG.COMMUNITY_URL, }, diff --git a/backend/src/emails/sendEmailVariants.ts b/backend/src/emails/sendEmailVariants.ts index 3373f17ad..642f87387 100644 --- a/backend/src/emails/sendEmailVariants.ts +++ b/backend/src/emails/sendEmailVariants.ts @@ -5,7 +5,7 @@ import { decimalSeparatorByLanguage } from '@/util/utilities' import { sendEmailTranslated } from './sendEmailTranslated' -export const sendAddedContributionMessageEmail = (data: { +export interface ContributionEmailCommonData { firstName: string lastName: string email: string @@ -13,22 +13,35 @@ export const sendAddedContributionMessageEmail = (data: { senderFirstName: string senderLastName: string contributionMemo: string -}): Promise | boolean | null> => { + contributionFrontendLink: string +} + +function toContributionEmailLocales(data: ContributionEmailCommonData): Record { + return { + firstName: data.firstName, + lastName: data.lastName, + locale: data.language, + senderFirstName: data.senderFirstName, + senderLastName: data.senderLastName, + contributionMemo: data.contributionMemo, + contributionFrontendLink: data.contributionFrontendLink, + supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, + } +} + +export const sendAddedContributionMessageEmail = ( + data: ContributionEmailCommonData & { + message: string + }, +): Promise | boolean | null> => { return sendEmailTranslated({ receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>`, }, template: 'addedContributionMessage', locals: { - firstName: data.firstName, - lastName: data.lastName, - locale: data.language, - senderFirstName: data.senderFirstName, - senderLastName: data.senderLastName, - contributionMemo: data.contributionMemo, - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, - supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, - communityURL: CONFIG.COMMUNITY_URL, + ...toContributionEmailLocales(data), + message: data.message, }, }) } @@ -79,111 +92,53 @@ export const sendAccountMultiRegistrationEmail = (data: { }) } -export const sendContributionConfirmedEmail = (data: { - firstName: string - lastName: string - email: string - language: string - senderFirstName: string - senderLastName: string - contributionMemo: string - contributionAmount: Decimal -}): Promise | boolean | null> => { +export const sendContributionConfirmedEmail = ( + data: ContributionEmailCommonData & { + contributionAmount: Decimal + }, +): Promise | boolean | null> => { return sendEmailTranslated({ receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` }, template: 'contributionConfirmed', locals: { - firstName: data.firstName, - lastName: data.lastName, - locale: data.language, - senderFirstName: data.senderFirstName, - senderLastName: data.senderLastName, - contributionMemo: data.contributionMemo, + ...toContributionEmailLocales(data), contributionAmount: decimalSeparatorByLanguage(data.contributionAmount, data.language), - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, - supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, - communityURL: CONFIG.COMMUNITY_URL, }, }) } -export const sendContributionChangedByModeratorEmail = (data: { - firstName: string - lastName: string - email: string - language: string - senderFirstName: string - senderLastName: string - contributionMemo: string - contributionMemoUpdated: string -}): Promise | boolean | null> => { +export const sendContributionChangedByModeratorEmail = ( + data: ContributionEmailCommonData & { + contributionMemoUpdated: string + }, +): Promise | boolean | null> => { return sendEmailTranslated({ receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` }, template: 'contributionChangedByModerator', locals: { - firstName: data.firstName, - lastName: data.lastName, - locale: data.language, - senderFirstName: data.senderFirstName, - senderLastName: data.senderLastName, - contributionMemo: data.contributionMemo, + ...toContributionEmailLocales(data), contributionMemoUpdated: data.contributionMemoUpdated, - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, - supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, - communityURL: CONFIG.COMMUNITY_URL, }, }) } -export const sendContributionDeletedEmail = (data: { - firstName: string - lastName: string - email: string - language: string - senderFirstName: string - senderLastName: string - contributionMemo: string -}): Promise | boolean | null> => { +export const sendContributionDeletedEmail = ( + data: ContributionEmailCommonData, +): Promise | boolean | null> => { return sendEmailTranslated({ receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` }, template: 'contributionDeleted', - locals: { - firstName: data.firstName, - lastName: data.lastName, - locale: data.language, - senderFirstName: data.senderFirstName, - senderLastName: data.senderLastName, - contributionMemo: data.contributionMemo, - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, - supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, - communityURL: CONFIG.COMMUNITY_URL, - }, + locals: toContributionEmailLocales(data), }) } -export const sendContributionDeniedEmail = (data: { - firstName: string - lastName: string - email: string - language: string - senderFirstName: string - senderLastName: string - contributionMemo: string -}): Promise | boolean | null> => { +export const sendContributionDeniedEmail = ( + data: ContributionEmailCommonData, +): Promise | boolean | null> => { return sendEmailTranslated({ receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` }, template: 'contributionDenied', - locals: { - firstName: data.firstName, - lastName: data.lastName, - locale: data.language, - senderFirstName: data.senderFirstName, - senderLastName: data.senderLastName, - contributionMemo: data.contributionMemo, - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, - supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, - communityURL: CONFIG.COMMUNITY_URL, - }, + locals: toContributionEmailLocales(data), }) } @@ -234,7 +189,6 @@ export const sendTransactionLinkRedeemedEmail = (data: { senderEmail: data.senderEmail, transactionMemo: data.transactionMemo, transactionAmount: decimalSeparatorByLanguage(data.transactionAmount, data.language), - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, communityURL: CONFIG.COMMUNITY_URL, }, @@ -264,7 +218,6 @@ export const sendTransactionReceivedEmail = (data: { senderLastName: data.senderLastName, senderEmail: data.senderEmail, transactionAmount: decimalSeparatorByLanguage(data.transactionAmount, data.language), - overviewURL: CONFIG.EMAIL_LINK_OVERVIEW, supportEmail: CONFIG.COMMUNITY_SUPPORT_MAIL, communityURL: CONFIG.COMMUNITY_URL, }, diff --git a/backend/src/emails/templates/addedContributionMessage/html.pug b/backend/src/emails/templates/addedContributionMessage/html.pug index ff7c89c30..df5ba35c4 100644 --- a/backend/src/emails/templates/addedContributionMessage/html.pug +++ b/backend/src/emails/templates/addedContributionMessage/html.pug @@ -7,8 +7,10 @@ block content p= t('emails.addedContributionMessage.commonGoodContributionMessage', { senderFirstName, senderLastName, contributionMemo }) .content h2= t('emails.addedContributionMessage.readMessage') - div(class="p_content")= t('emails.addedContributionMessage.toSeeAndAnswerMessage') + div(class="p_content") + p= t('emails.addedContributionMessage.message', { message }) + p= t('emails.addedContributionMessage.toSeeAndAnswerMessage') - a.button-3(href=`${communityURL}/community/contributions`) #{t('emails.general.toAccount')} + a.button-3(href=`${contributionFrontendLink}`) #{t('emails.general.toAccount')} include ../includes/doNotReply.pug diff --git a/backend/src/emails/templates/includes/contributionDetailsCTA.pug b/backend/src/emails/templates/includes/contributionDetailsCTA.pug index 0a3bd395d..ae3b77e6a 100644 --- a/backend/src/emails/templates/includes/contributionDetailsCTA.pug +++ b/backend/src/emails/templates/includes/contributionDetailsCTA.pug @@ -1,7 +1,7 @@ //- h2= t('emails.general.contributionDetails') div(class="p_content")= t('emails.contribution.toSeeContributionsAndMessages') -a.button-3(href=`${communityURL}/community/contributions`) #{t('emails.general.toAccount')} +a.button-3(href=`${contributionFrontendLink}`) #{t('emails.general.toAccount')} div(class="p_content")= t('emails.general.orCopyLink') -a.clink(href=`${communityURL}/community/contributions`) #{`${communityURL}/community/contributions`} \ No newline at end of file +a.clink(href=`${contributionFrontendLink}`) #{`${contributionFrontendLink}`} \ No newline at end of file diff --git a/backend/src/graphql/resolver/ContributionMessageResolver.test.ts b/backend/src/graphql/resolver/ContributionMessageResolver.test.ts index 00b7032dc..980b7fa22 100644 --- a/backend/src/graphql/resolver/ContributionMessageResolver.test.ts +++ b/backend/src/graphql/resolver/ContributionMessageResolver.test.ts @@ -244,9 +244,11 @@ describe('ContributionMessageResolver', () => { lastName: 'Bloxberg', email: 'bibi@bloxberg.de', language: 'de', + message: 'Admin Test', senderFirstName: 'Peter', senderLastName: 'Lustig', contributionMemo: 'Test env contribution', + contributionFrontendLink: `http://localhost/contributions/own-contributions/1#contributionListItem-${result.data.createContribution.id}`, }) }) diff --git a/backend/src/graphql/resolver/ContributionMessageResolver.ts b/backend/src/graphql/resolver/ContributionMessageResolver.ts index c1d25bd19..1a3323754 100644 --- a/backend/src/graphql/resolver/ContributionMessageResolver.ts +++ b/backend/src/graphql/resolver/ContributionMessageResolver.ts @@ -24,6 +24,7 @@ import { LogError } from '@/server/LogError' import { Context, getUser } from '@/server/context' import { backendLogger as logger } from '@/server/logger' +import { contributionFrontendLink } from './util/contributions' import { findContributionMessages } from './util/findContributionMessages' const db = AppDatabase.getInstance() @@ -180,6 +181,11 @@ export class ContributionMessageResolver { senderFirstName: moderator.firstName, senderLastName: moderator.lastName, contributionMemo: finalContribution.memo, + contributionFrontendLink: await contributionFrontendLink( + finalContribution.id, + finalContribution.createdAt, + ), + message: finalContributionMessage.message, }) } diff --git a/backend/src/graphql/resolver/ContributionResolver.test.ts b/backend/src/graphql/resolver/ContributionResolver.test.ts index 02ec62748..4398c41e4 100644 --- a/backend/src/graphql/resolver/ContributionResolver.test.ts +++ b/backend/src/graphql/resolver/ContributionResolver.test.ts @@ -876,6 +876,7 @@ describe('ContributionResolver', () => { senderFirstName: 'Peter', senderLastName: 'Lustig', contributionMemo: 'Test contribution to deny', + contributionFrontendLink: `http://localhost/contributions/own-contributions/1#contributionListItem-${contributionToDeny.data.createContribution.id}`, }) }) }) @@ -1953,6 +1954,7 @@ describe('ContributionResolver', () => { senderFirstName: 'Peter', senderLastName: 'Lustig', contributionMemo: 'Das war leider zu Viel!', + contributionFrontendLink: `http://localhost/contributions/own-contributions/1#contributionListItem-${creation?.id}`, }) }) }) @@ -2119,6 +2121,7 @@ describe('ContributionResolver', () => { senderLastName: 'Lustig', contributionMemo: 'Herzlich Willkommen bei Gradido liebe Bibi!', contributionAmount: expect.decimalEqual(450), + contributionFrontendLink: `http://localhost/contributions/own-contributions/1#contributionListItem-${creation?.id}`, }) }) diff --git a/backend/src/graphql/resolver/ContributionResolver.ts b/backend/src/graphql/resolver/ContributionResolver.ts index 32bb0ff82..56e01fa27 100644 --- a/backend/src/graphql/resolver/ContributionResolver.ts +++ b/backend/src/graphql/resolver/ContributionResolver.ts @@ -50,7 +50,11 @@ import { fullName } from '@/util/utilities' import { AppDatabase } from 'database' import { ContributionMessageType } from '../enum/ContributionMessageType' -import { loadAllContributions, loadUserContributions } from './util/contributions' +import { + contributionFrontendLink, + loadAllContributions, + loadUserContributions, +} from './util/contributions' import { getOpenCreations, getUserCreation, validateContribution } from './util/creations' import { extractGraphQLFields } from './util/extractGraphQLFields' import { findContributions } from './util/findContributions' @@ -319,6 +323,10 @@ export class ContributionResolver { senderLastName: moderator.lastName, contributionMemo: updateUnconfirmedContributionContext.getOldMemo(), contributionMemoUpdated: contribution.memo, + contributionFrontendLink: await contributionFrontendLink( + contribution.id, + contribution.createdAt, + ), }) } @@ -405,6 +413,10 @@ export class ContributionResolver { senderFirstName: moderator.firstName, senderLastName: moderator.lastName, contributionMemo: contribution.memo, + contributionFrontendLink: await contributionFrontendLink( + contribution.id, + contribution.createdAt, + ), }) return !!res @@ -512,6 +524,10 @@ export class ContributionResolver { senderLastName: moderatorUser.lastName, contributionMemo: contribution.memo, contributionAmount: contribution.amount, + contributionFrontendLink: await contributionFrontendLink( + contribution.id, + contribution.createdAt, + ), }) } catch (e) { await queryRunner.rollbackTransaction() @@ -595,6 +611,10 @@ export class ContributionResolver { senderFirstName: moderator.firstName, senderLastName: moderator.lastName, contributionMemo: contributionToUpdate.memo, + contributionFrontendLink: await contributionFrontendLink( + contributionToUpdate.id, + contributionToUpdate.createdAt, + ), }) return !!res diff --git a/backend/src/graphql/resolver/const/const.ts b/backend/src/graphql/resolver/const/const.ts index b97694221..2d4532cf5 100644 --- a/backend/src/graphql/resolver/const/const.ts +++ b/backend/src/graphql/resolver/const/const.ts @@ -10,3 +10,5 @@ export const CONTRIBUTIONLINK_NAME_MAX_CHARS = 100 export const CONTRIBUTIONLINK_NAME_MIN_CHARS = 5 export const MEMO_MAX_CHARS = 255 export const MEMO_MIN_CHARS = 5 +export const DEFAULT_PAGINATION_PAGE_SIZE = 25 +export const FRONTEND_CONTRIBUTIONS_ITEM_ANCHOR_PREFIX = 'contributionListItem-' diff --git a/backend/src/graphql/resolver/util/contributions.ts b/backend/src/graphql/resolver/util/contributions.ts index 58e0914ba..adf9da800 100644 --- a/backend/src/graphql/resolver/util/contributions.ts +++ b/backend/src/graphql/resolver/util/contributions.ts @@ -1,7 +1,12 @@ +import { CONFIG } from '@/config' import { Order } from '@/graphql/enum/Order' +import { + DEFAULT_PAGINATION_PAGE_SIZE, + FRONTEND_CONTRIBUTIONS_ITEM_ANCHOR_PREFIX, +} from '@/graphql/resolver/const/const' import { Paginated } from '@arg/Paginated' import { Contribution as DbContribution } from 'database' -import { FindManyOptions, In } from 'typeorm' +import { FindManyOptions, In, MoreThan } from 'typeorm' // TODO: combine with Pagination class for all queries to use function buildPaginationOptions(paginated: Paginated): FindManyOptions { @@ -91,3 +96,18 @@ export const loadAllContributions = async ( }) */ } + +export const contributionFrontendLink = async ( + contributionId: number, + _createdAt: Date, +): Promise => { + // TODO: page is sometimes wrong, use page 1 for now, and fix later with more time at hand + // simplified, don't account for order by id, so when the nearly impossible case occur that createdAt is the same for two contributions, + // maybe it is the wrong page + //const countBefore = await DbContribution.count({ + // where: { createdAt: MoreThan(createdAt) }, + //}) + // const page = Math.floor(countBefore / DEFAULT_PAGINATION_PAGE_SIZE) + 1 + const anchor = `${FRONTEND_CONTRIBUTIONS_ITEM_ANCHOR_PREFIX}${contributionId}` + return `${CONFIG.COMMUNITY_URL}/contributions/own-contributions/1#${anchor}` +} diff --git a/backend/src/locales/de.json b/backend/src/locales/de.json index 8c0c8ff0c..8b34f61f4 100644 --- a/backend/src/locales/de.json +++ b/backend/src/locales/de.json @@ -21,7 +21,8 @@ "readMessage": "Nachricht lesen und beantworten", "subject": "Nachricht zu deinem Gemeinwohl-Beitrag", "title": "Nachricht zu deinem Gemeinwohl-Beitrag", - "toSeeAndAnswerMessage": "Um die Nachricht zu sehen und darauf zu antworten, gehe in deinem Gradido-Konto ins Menü „Schöpfen“ auf den Tab „Meine Beiträge“." + "message": "„{message}“", + "toSeeAndAnswerMessage": "Um auf die Nachricht zu antworten, gehe in deinem Gradido-Konto ins Menü „Schöpfen“ auf den Tab „Meine Beiträge“." }, "contribution": { "toSeeContributionsAndMessages": "Um deine Gemeinwohl-Beiträge und dazugehörige Nachrichten zu sehen, gehe in deinem Gradido-Konto ins Menü „Schöpfen“ auf den Tab „Meine Beiträge“." diff --git a/backend/src/locales/en.json b/backend/src/locales/en.json index 9b6b2a4cf..fb90a0334 100644 --- a/backend/src/locales/en.json +++ b/backend/src/locales/en.json @@ -21,7 +21,8 @@ "readMessage": "Read and reply to message", "subject": "Message about your common good contribution", "title": "Message about your common good contribution", - "toSeeAndAnswerMessage": "To view and reply to the message, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab." + "message": "„{message}“", + "toSeeAndAnswerMessage": "To reply to the message, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab." }, "contribution": { "toSeeContributionsAndMessages": "To see your common good contributions and related messages, go to the “Creation” menu in your Gradido account and click on the “My contributions” tab." diff --git a/frontend/src/layouts/templates/ContributionsTemplate.spec.js b/frontend/src/layouts/templates/ContributionsTemplate.spec.js index 75448c0ae..30552edfc 100644 --- a/frontend/src/layouts/templates/ContributionsTemplate.spec.js +++ b/frontend/src/layouts/templates/ContributionsTemplate.spec.js @@ -40,9 +40,9 @@ describe('ContributionsTemplate', () => { expect(wrapper.findComponent({ name: 'ContributionInfo' }).exists()).toBe(true) }) - describe('mounted with parameter contributions', () => { + describe('mounted with parameter own-contributions', () => { beforeEach(() => { - wrapper = createWrapper('contributions') + wrapper = createWrapper('own-contributions') }) it('has a header related to "my contributions"', () => { @@ -73,9 +73,9 @@ describe('ContributionsTemplate', () => { }) }) - describe('mounted with parameter community', () => { + describe('mounted with parameter all-contributions', () => { beforeEach(() => { - wrapper = createWrapper('community') + wrapper = createWrapper('all-contributions') }) it('has a header related to "the community"', () => { diff --git a/frontend/src/layouts/templates/ContributionsTemplate.vue b/frontend/src/layouts/templates/ContributionsTemplate.vue index 85213c972..0e1692e69 100644 --- a/frontend/src/layouts/templates/ContributionsTemplate.vue +++ b/frontend/src/layouts/templates/ContributionsTemplate.vue @@ -12,7 +12,7 @@
-