diff --git a/admin/src/components/Tables/OpenCreationsTable.vue b/admin/src/components/Tables/OpenCreationsTable.vue index 2c32c2fbf..5cb407989 100644 --- a/admin/src/components/Tables/OpenCreationsTable.vue +++ b/admin/src/components/Tables/OpenCreationsTable.vue @@ -54,7 +54,7 @@ diff --git a/admin/src/graphql/denyContribution.js b/admin/src/graphql/denyContribution.js new file mode 100644 index 000000000..063059c97 --- /dev/null +++ b/admin/src/graphql/denyContribution.js @@ -0,0 +1,7 @@ +import gql from 'graphql-tag' + +export const denyContribution = gql` + mutation ($id: Int!) { + denyContribution(id: $id) + } +` diff --git a/admin/src/graphql/rejectContribution.js b/admin/src/graphql/rejectContribution.js deleted file mode 100644 index 095a36854..000000000 --- a/admin/src/graphql/rejectContribution.js +++ /dev/null @@ -1,7 +0,0 @@ -import gql from 'graphql-tag' - -export const rejectContribution = gql` - mutation ($id: Int!) { - rejectContribution(id: $id) - } -` diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index 5d894ff06..11e84c5cd 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -38,7 +38,7 @@ "enter_text": "Text eintragen", "form": "Schöpfungsformular", "min_characters": "Mindestens 10 Zeichen eingeben", - "rejectNow": "Möchtest du diesen Beitrag zur Gemeinschaft wirklich ablehnen?", + "denyNow": "Möchtest du diesen Beitrag zur Gemeinschaft wirklich ablehnen?", "reset": "Zurücksetzen", "select_month": "Monat auswählen", "select_value": "Betrag auswählen", @@ -46,7 +46,7 @@ "toasted": "Offene Schöpfung ({value} GDD) für {email} wurde gespeichert und liegt zur Bestätigung bereit", "toasted_created": "Schöpfung wurde erfolgreich gespeichert", "toasted_delete": "Offene Schöpfung wurde gelöscht", - "toasted_rejected": "Offene Schöpfung wurde abgelehnt", + "toasted_denied": "Offene Schöpfung wurde abgelehnt", "toasted_update": "`Offene Schöpfung {value} GDD) für {email} wurde geändert und liegt zur Bestätigung bereit", "update_creation": "Schöpfung aktualisieren" }, @@ -121,7 +121,7 @@ } }, "redeemed": "eingelöst", - "reject": "Ablehnen", + "deny": "Ablehnen", "remove": "Entfernen", "removeNotSelf": "Als Admin/Moderator kannst du dich nicht selber löschen.", "remove_all": "alle Nutzer entfernen", diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 8c94a0296..54df546cd 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -38,7 +38,7 @@ "enter_text": "Enter text", "form": "Creation form", "min_characters": "Enter at least 10 characters", - "rejectNow": "Do you really want to reject this contribution to the community?", + "denyNow": "Do you really want to reject this contribution to the community?", "reset": "Reset", "select_month": "Select month", "select_value": "Select amount", @@ -46,7 +46,7 @@ "toasted": "Open creation ({value} GDD) for {email} has been saved and is ready for confirmation.", "toasted_created": "Creation has been successfully saved", "toasted_delete": "Open creation has been deleted", - "toasted_rejected": "Open creation has been denied", + "toasted_denied": "Open creation has been denied", "toasted_update": "Open creation {value} GDD) for {email} has been changed and is ready for confirmation.", "update_creation": "Creation update" }, @@ -121,7 +121,7 @@ } }, "redeemed": "redeemed", - "reject": "Reject", + "deny": "Reject", "remove": "Remove", "removeNotSelf": "As an admin/moderator, you cannot delete yourself.", "remove_all": "Remove all users", diff --git a/admin/src/pages/CreationConfirm.spec.js b/admin/src/pages/CreationConfirm.spec.js index e5748d489..786f7db4a 100644 --- a/admin/src/pages/CreationConfirm.spec.js +++ b/admin/src/pages/CreationConfirm.spec.js @@ -1,7 +1,7 @@ import { mount } from '@vue/test-utils' import CreationConfirm from './CreationConfirm.vue' import { adminDeleteContribution } from '../graphql/adminDeleteContribution' -import { rejectContribution } from '../graphql/rejectContribution' +import { denyContribution } from '../graphql/denyContribution' import { listUnconfirmedContributions } from '../graphql/listUnconfirmedContributions' import { confirmContribution } from '../graphql/confirmContribution' import { toastErrorSpy, toastSuccessSpy } from '../../test/testSetup' @@ -92,7 +92,7 @@ describe('CreationConfirm', () => { ) mockClient.setRequestHandler( - rejectContribution, + denyContribution, adminRejectContributionMock.mockResolvedValue({ data: { rejectContribution: true } }), ) diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue index ce0ba3a8c..0a6b5ca6e 100644 --- a/admin/src/pages/CreationConfirm.vue +++ b/admin/src/pages/CreationConfirm.vue @@ -7,7 +7,7 @@ class="mt-4" :items="pendingCreations" :fields="fields" - @reject-creation="rejectCreation" + @deny-creation="denyCreation" @remove-creation="removeCreation" @show-overlay="showOverlay" @update-state="updateState" @@ -21,7 +21,7 @@ import OpenCreationsTable from '../components/Tables/OpenCreationsTable.vue' import { listUnconfirmedContributions } from '../graphql/listUnconfirmedContributions' import { adminDeleteContribution } from '../graphql/adminDeleteContribution' import { confirmContribution } from '../graphql/confirmContribution' -import { rejectContribution } from '../graphql/rejectContribution' +import { denyContribution } from '../graphql/denyContribution' export default { name: 'CreationConfirm', @@ -37,19 +37,19 @@ export default { } }, methods: { - rejectCreation(item) { - this.$bvModal.msgBoxConfirm(this.$t('creation_form.rejectNow')).then(async (value) => { + denyCreation(item) { + this.$bvModal.msgBoxConfirm(this.$t('creation_form.denyNow')).then(async (value) => { if (value) { await this.$apollo .mutate({ - mutation: rejectContribution, + mutation: denyContribution, variables: { id: item.id, }, }) .then((result) => { this.updatePendingCreations(item.id) - this.toastSuccess(this.$t('creation_form.toasted_rejected')) + this.toastSuccess(this.$t('creation_form.toasted_denied')) }) .catch((error) => { this.toastError(error.message) @@ -132,7 +132,7 @@ export default { { key: 'moderator', label: this.$t('moderator') }, { key: 'editCreation', label: this.$t('edit') }, { key: 'confirm', label: this.$t('save') }, - { key: 'reject', label: this.$t('reject') }, + { key: 'deny', label: this.$t('deny') }, ] }, }, diff --git a/backend/src/auth/RIGHTS.ts b/backend/src/auth/RIGHTS.ts index 146eeb5b8..98f6cf118 100644 --- a/backend/src/auth/RIGHTS.ts +++ b/backend/src/auth/RIGHTS.ts @@ -54,5 +54,5 @@ export enum RIGHTS { DELETE_CONTRIBUTION_LINK = 'DELETE_CONTRIBUTION_LINK', UPDATE_CONTRIBUTION_LINK = 'UPDATE_CONTRIBUTION_LINK', ADMIN_CREATE_CONTRIBUTION_MESSAGE = 'ADMIN_CREATE_CONTRIBUTION_MESSAGE', - REJECT_CONTRIBUTION = 'REJECT_CONTRIBUTION', + DENY_CONTRIBUTION = 'DENY_CONTRIBUTION', } diff --git a/backend/src/emails/sendEmailVariants.test.ts b/backend/src/emails/sendEmailVariants.test.ts index 1015f2cb5..ddbc387a1 100644 --- a/backend/src/emails/sendEmailVariants.test.ts +++ b/backend/src/emails/sendEmailVariants.test.ts @@ -9,7 +9,7 @@ import { sendAccountActivationEmail, sendAccountMultiRegistrationEmail, sendContributionConfirmedEmail, - sendContributionRejectedEmail, + sendContributionDeniedEmail, sendResetPasswordEmail, sendTransactionLinkRedeemedEmail, sendTransactionReceivedEmail, @@ -360,9 +360,9 @@ describe('sendEmailVariants', () => { }) }) - describe('sendContributionRejectedEmail', () => { + describe('sendContributionDeniedEmail', () => { beforeAll(async () => { - result = await sendContributionRejectedEmail({ + result = await sendContributionDeniedEmail({ firstName: 'Peter', lastName: 'Lustig', email: 'peter@lustig.de', @@ -379,7 +379,7 @@ describe('sendEmailVariants', () => { receiver: { to: 'Peter Lustig ', }, - template: 'contributionRejected', + template: 'contributionDenied', locals: { firstName: 'Peter', lastName: 'Lustig', diff --git a/backend/src/emails/sendEmailVariants.ts b/backend/src/emails/sendEmailVariants.ts index cb1376510..681ee56af 100644 --- a/backend/src/emails/sendEmailVariants.ts +++ b/backend/src/emails/sendEmailVariants.ts @@ -103,7 +103,7 @@ export const sendContributionConfirmedEmail = (data: { }) } -export const sendContributionRejectedEmail = (data: { +export const sendContributionDeniedEmail = (data: { firstName: string lastName: string email: string @@ -114,7 +114,7 @@ export const sendContributionRejectedEmail = (data: { }): Promise | null> => { return sendEmailTranslated({ receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` }, - template: 'contributionRejected', + template: 'contributionDenied', locals: { firstName: data.firstName, lastName: data.lastName, diff --git a/backend/src/emails/templates/contributionRejected/html.pug b/backend/src/emails/templates/contributionRejected/html.pug index 531f75543..a324374a7 100644 --- a/backend/src/emails/templates/contributionRejected/html.pug +++ b/backend/src/emails/templates/contributionRejected/html.pug @@ -1,13 +1,13 @@ doctype html html(lang=locale) head - title= t('emails.contributionRejected.subject') + title= t('emails.contributionDenied.subject') body - h1(style='margin-bottom: 24px;')= t('emails.contributionRejected.subject') + h1(style='margin-bottom: 24px;')= t('emails.contributionDenied.subject') #container.col include ../hello.pug - p= t('emails.contributionRejected.commonGoodContributionRejected', { senderFirstName, senderLastName, contributionMemo }) - p= t('emails.contributionRejected.toSeeContributionsAndMessages') + p= t('emails.contributionDenied.commonGoodContributionDenied', { senderFirstName, senderLastName, contributionMemo }) + p= t('emails.contributionDenied.toSeeContributionsAndMessages') p = t('emails.general.linkToYourAccount') = " " diff --git a/backend/src/emails/templates/contributionRejected/subject.pug b/backend/src/emails/templates/contributionRejected/subject.pug index 40a7622b8..57431e56e 100644 --- a/backend/src/emails/templates/contributionRejected/subject.pug +++ b/backend/src/emails/templates/contributionRejected/subject.pug @@ -1 +1 @@ -= t('emails.contributionRejected.subject') += t('emails.contributionDenied.subject') diff --git a/backend/src/graphql/resolver/ContributionResolver.ts b/backend/src/graphql/resolver/ContributionResolver.ts index 72009bc7b..c458e800f 100644 --- a/backend/src/graphql/resolver/ContributionResolver.ts +++ b/backend/src/graphql/resolver/ContributionResolver.ts @@ -50,7 +50,7 @@ import { eventProtocol } from '@/event/EventProtocolEmitter' import { calculateDecay } from '@/util/decay' import { sendContributionConfirmedEmail, - sendContributionRejectedEmail, + sendContributionDeniedEmail, } from '@/emails/sendEmailVariants' import { TRANSACTIONS_LOCK } from '@/util/TRANSACTIONS_LOCK' @@ -541,7 +541,7 @@ export class ContributionResolver { await eventProtocol.writeEvent( event.setEventAdminContributionDelete(eventAdminContributionDelete), ) - sendContributionRejectedEmail({ + sendContributionDeniedEmail({ firstName: user.firstName, lastName: user.lastName, email: user.emailContact.email, @@ -721,9 +721,9 @@ export class ContributionResolver { }) } - @Authorized([RIGHTS.REJECT_CONTRIBUTION]) + @Authorized([RIGHTS.DENY_CONTRIBUTION]) @Mutation(() => Boolean) - async rejectContribution( + async denyContribution( @Arg('id', () => Int) id: number, @Ctx() context: Context, ): Promise { @@ -765,7 +765,7 @@ export class ContributionResolver { contributionToUpdate.deniedAt = new Date() const res = await contributionToUpdate.save() - sendContributionRejectedEmail({ + sendContributionDeniedEmail({ firstName: user.firstName, lastName: user.lastName, email: user.emailContact.email, diff --git a/backend/src/locales/en.json b/backend/src/locales/en.json index ac1ad380f..5cde70d26 100644 --- a/backend/src/locales/en.json +++ b/backend/src/locales/en.json @@ -23,8 +23,8 @@ "commonGoodContributionConfirmed": "Your public good contribution “{contributionMemo}” has just been confirmed by {senderFirstName} {senderLastName} and credited to your Gradido account.", "subject": "Gradido: Your contribution to the common good was confirmed" }, - "contributionRejected": { - "commonGoodContributionRejected": "Your public good contribution “{contributionMemo}” was rejected by {senderFirstName} {senderLastName}.", + "contributionDenied": { + "commonGoodContributionDenied": "Your public good contribution “{contributionMemo}” was rejected by {senderFirstName} {senderLastName}.", "subject": "Gradido: Your common good contribution was rejected", "toSeeContributionsAndMessages": "To see your common good contributions and related messages, go to the “Community” menu in your Gradido account and click on the “My contributions to the common good” tab!" }, diff --git a/frontend/src/components/Contributions/ContributionListItem.vue b/frontend/src/components/Contributions/ContributionListItem.vue index 4930fb518..d830f1bcd 100644 --- a/frontend/src/components/Contributions/ContributionListItem.vue +++ b/frontend/src/components/Contributions/ContributionListItem.vue @@ -35,7 +35,7 @@
- {{ $t('contribution.alert.rejected') }} + {{ $t('contribution.alert.denied') }}
{{ $t('contribution.deleted') }} diff --git a/frontend/src/components/Template/RightSide/ContributionInfo.spec.js b/frontend/src/components/Template/RightSide/ContributionInfo.spec.js index 88a6b6ab8..f4c88b9f5 100644 --- a/frontend/src/components/Template/RightSide/ContributionInfo.spec.js +++ b/frontend/src/components/Template/RightSide/ContributionInfo.spec.js @@ -55,7 +55,7 @@ describe('ContributionInfo', () => { expect(listItems.at(2).text()).toBe('contribution.alert.confirm') expect(listItems.at(3).find('svg').attributes('aria-label')).toEqual('x circle') - expect(listItems.at(3).text()).toBe('contribution.alert.rejected') + expect(listItems.at(3).text()).toBe('contribution.alert.denied') }) }) diff --git a/frontend/src/components/Template/RightSide/ContributionInfo.vue b/frontend/src/components/Template/RightSide/ContributionInfo.vue index e57d5de89..f9952fd83 100644 --- a/frontend/src/components/Template/RightSide/ContributionInfo.vue +++ b/frontend/src/components/Template/RightSide/ContributionInfo.vue @@ -20,7 +20,7 @@
  • - {{ $t('contribution.alert.rejected') }} + {{ $t('contribution.alert.denied') }}
  • diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 406f2564a..3db98b5bb 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -45,7 +45,7 @@ "in_progress": "Es gibt eine Rückfrage der Moderatoren.", "myContributionNoteList": "Eingereichte Beiträge, die noch nicht bestätigt wurden, kannst du jederzeit bearbeiten oder löschen.", "pending": "Eingereicht und wartet auf Bestätigung", - "rejected": "abgelehnt" + "denied": "abgelehnt" }, "delete": "Beitrag löschen! Bist du sicher?", "deleted": "Der Beitrag wurde gelöscht! Wird aber sichtbar bleiben.", diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 16d4a414b..830e50275 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -45,7 +45,7 @@ "in_progress": "There is a question from the moderators.", "myContributionNoteList": "You can edit or delete entries that have not yet been confirmed at any time.", "pending": "Submitted and waiting for confirmation", - "rejected": "deleted" + "denied": "deleted" }, "delete": "Delete Contribution! Are you sure?", "deleted": "The contribution has been deleted! But it will remain visible.", diff --git a/frontend/src/locales/es.json b/frontend/src/locales/es.json index 0377dcb4e..4e7ed113e 100644 --- a/frontend/src/locales/es.json +++ b/frontend/src/locales/es.json @@ -42,7 +42,7 @@ "in_progress": "Hay una pregunta de los moderatores.", "myContributionNoteList": "Puedes editar o eliminar las contribuciones enviadas que aún no han sido confirmadas en cualquier momento.", "pending": "Enviado y a la espera de confirmación", - "rejected": "rechazado" + "denied": "rechazado" }, "date": "Contribución para:", "delete": "Eliminar la contribución. ¿Estás seguro?", diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json index 389e86307..c2a72f964 100644 --- a/frontend/src/locales/fr.json +++ b/frontend/src/locales/fr.json @@ -44,7 +44,7 @@ "in_progress": "Il y a une question du modérateur.", "myContributionNoteList": "À tout moment vous pouvez éditer ou supprimer les données qui n´ont pas été confirmées.", "pending": "Inscription en attente de validation", - "rejected": "supprimé" + "denied": "supprimé" }, "date": "Contribution pour:", "delete": "Supprimer la contribution! Êtes-vous sûr?", diff --git a/frontend/src/locales/nl.json b/frontend/src/locales/nl.json index ed1181e4c..75d25b13c 100644 --- a/frontend/src/locales/nl.json +++ b/frontend/src/locales/nl.json @@ -42,7 +42,7 @@ "in_progress": "There is a question from the moderators.", "myContributionNoteList": "Ingediende bijdragen, die nog niet bevestigd zijn, kun je op elk moment wijzigen of verwijderen.", "pending": "Ingediend en wacht op bevestiging", - "rejected": "afgewezen" + "denied": "afgewezen" }, "date": "Bijdrage voor:", "delete": "Bijdrage verwijderen! Weet je het zeker?", diff --git a/frontend/src/locales/tr.json b/frontend/src/locales/tr.json index 33642f3c6..1b807c1ce 100644 --- a/frontend/src/locales/tr.json +++ b/frontend/src/locales/tr.json @@ -37,7 +37,7 @@ "myContributionNoteList": "Bildirmiş olduğun henüz onaylanmamış olan faaliyetleri istediğin zaman düzenleyebilir veya silebilirsin.", "myContributionNoteSupport": "Yakın zamanda moderatörlerle aranda bir diyalog olasılığı olacak. Şu anda herhangi bir sorun yaşıyorsan, lütfen destek hattına başvur.", "pending": "Gönderildi ve onay bekleniyor", - "rejected": "reddedildi" + "denied": "reddedildi" }, "date": "Hizmet:", "delete": "Hizmeti sil! Emin misin?",