mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Rename reject to deny and rejected to denied.
This commit is contained in:
parent
24557ae35b
commit
da652e6745
@ -54,7 +54,7 @@
|
||||
<b-button
|
||||
variant="danger"
|
||||
size="md"
|
||||
@click="$emit('reject-creation', row.item)"
|
||||
@click="$emit('deny-creation', row.item)"
|
||||
class="mr-2"
|
||||
>
|
||||
<b-icon icon="x" variant="light"></b-icon>
|
||||
|
||||
7
admin/src/graphql/denyContribution.js
Normal file
7
admin/src/graphql/denyContribution.js
Normal file
@ -0,0 +1,7 @@
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
export const denyContribution = gql`
|
||||
mutation ($id: Int!) {
|
||||
denyContribution(id: $id)
|
||||
}
|
||||
`
|
||||
@ -1,7 +0,0 @@
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
export const rejectContribution = gql`
|
||||
mutation ($id: Int!) {
|
||||
rejectContribution(id: $id)
|
||||
}
|
||||
`
|
||||
@ -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",
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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 } }),
|
||||
)
|
||||
|
||||
|
||||
@ -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') },
|
||||
]
|
||||
},
|
||||
},
|
||||
|
||||
@ -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',
|
||||
}
|
||||
|
||||
@ -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 <peter@lustig.de>',
|
||||
},
|
||||
template: 'contributionRejected',
|
||||
template: 'contributionDenied',
|
||||
locals: {
|
||||
firstName: 'Peter',
|
||||
lastName: 'Lustig',
|
||||
|
||||
@ -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<Record<string, unknown> | null> => {
|
||||
return sendEmailTranslated({
|
||||
receiver: { to: `${data.firstName} ${data.lastName} <${data.email}>` },
|
||||
template: 'contributionRejected',
|
||||
template: 'contributionDenied',
|
||||
locals: {
|
||||
firstName: data.firstName,
|
||||
lastName: data.lastName,
|
||||
|
||||
@ -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')
|
||||
= " "
|
||||
|
||||
@ -1 +1 @@
|
||||
= t('emails.contributionRejected.subject')
|
||||
= t('emails.contributionDenied.subject')
|
||||
|
||||
@ -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<boolean> {
|
||||
@ -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,
|
||||
|
||||
@ -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!"
|
||||
},
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
</div>
|
||||
<div v-if="state === 'DENIED' && allContribution" class="font-weight-bold">
|
||||
<b-icon icon="x-circle" variant="danger"></b-icon>
|
||||
{{ $t('contribution.alert.rejected') }}
|
||||
{{ $t('contribution.alert.denied') }}
|
||||
</div>
|
||||
<div v-if="state === 'DELETED'" class="small">
|
||||
{{ $t('contribution.deleted') }}
|
||||
|
||||
@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<b-icon icon="x-circle" variant="warning"></b-icon>
|
||||
{{ $t('contribution.alert.rejected') }}
|
||||
{{ $t('contribution.alert.denied') }}
|
||||
</li>
|
||||
<li>
|
||||
<b-icon icon="trash" variant="danger"></b-icon>
|
||||
|
||||
@ -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.",
|
||||
|
||||
@ -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.",
|
||||
|
||||
@ -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?",
|
||||
|
||||
@ -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?",
|
||||
|
||||
@ -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?",
|
||||
|
||||
@ -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?",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user