diff --git a/frontend/src/components/Contributions/ContributionList.vue b/frontend/src/components/Contributions/ContributionList.vue
index 4e8c68eb7..0c542a492 100644
--- a/frontend/src/components/Contributions/ContributionList.vue
+++ b/frontend/src/components/Contributions/ContributionList.vue
@@ -57,10 +57,8 @@ export default {
updateContributionForm(item) {
this.$emit('update-contribution-form', item)
},
- deleteContribution(id) {
- this.$emit('delete-contribution', {
- id: id,
- })
+ deleteContribution(item) {
+ this.$emit('delete-contribution', item)
},
},
computed: {
diff --git a/frontend/src/components/Contributions/ContributionListItem.vue b/frontend/src/components/Contributions/ContributionListItem.vue
index 6c3d78c35..ad1d0bf98 100644
--- a/frontend/src/components/Contributions/ContributionListItem.vue
+++ b/frontend/src/components/Contributions/ContributionListItem.vue
@@ -26,7 +26,14 @@
>
-
@@ -96,7 +103,7 @@ export default {
methods: {
deleteContribution(id) {
this.boxOne = ''
- this.$bvModal.msgBoxConfirm('Delete Contribution! Are you sure?').then((value) => {
+ this.$bvModal.msgBoxConfirm(this.$t('contribution.delete')).then((value) => {
this.$emit('delete-contribution', {
id: id,
})
diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json
index 9625dc04b..46976d4b4 100644
--- a/frontend/src/locales/de.json
+++ b/frontend/src/locales/de.json
@@ -33,6 +33,8 @@
},
"contribution": {
"activity": "Tätigkeit",
+ "delete": "Beitrag löschen! Bist du sicher?",
+ "deleted": "Der Beitrag wurde gelöscht! Wird aber sichtbar bleiben.",
"formText": {
"h3": "Dein Beitrag zum Gemeinwohl",
"maxGDDforMonth": "Du kannst für den ausgewählten Monat nur noch maximal {amount} GDD einreichen.",
@@ -41,7 +43,9 @@
"text2": "Beschreibe deine Gemeinwohl-Tätigkeit mit Angabe der Stunden und trage einen Betrag von 20 GDD pro Stunde ein! Nach Bestätigung durch einen Moderator wird der Betrag deinem Konto gutgeschrieben."
},
"noDateSelected": "Kein Datum ausgewählt",
- "submit": "Einreichen"
+ "submit": "Einreichen",
+ "submitted":"Der Beitrag wurde eingereicht.",
+ "updated":"Der Beitrag wurde geändert."
},
"contribution-link": {
"thanksYouWith": "dankt dir mit"
diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json
index 7237ab74f..acab470bd 100644
--- a/frontend/src/locales/en.json
+++ b/frontend/src/locales/en.json
@@ -33,6 +33,8 @@
},
"contribution": {
"activity": "Activity",
+ "delete": "Delete Contribution! Are you sure?",
+ "deleted": "The contribution has been deleted! But it will remain visible.",
"formText": {
"h3": "Your contribution to the common good",
"maxGDDforMonth": "You can only submit a maximum of {amount} GDD for the selected month.",
@@ -41,7 +43,9 @@
"text2": "Describe your community service activity with hours and enter an amount of 20 GDD per hour! After confirmation by a moderator, the amount will be credited to your account."
},
"noDateSelected": "No date selected",
- "submit": "Submit"
+ "submit": "Submit",
+ "submitted":"The contribution was submitted.",
+ "updated":"The contribution was changed."
},
"contribution-link": {
"thanksYouWith": "thanks you with"
diff --git a/frontend/src/pages/Community.vue b/frontend/src/pages/Community.vue
index 860be3af8..bb2cf3de4 100644
--- a/frontend/src/pages/Community.vue
+++ b/frontend/src/pages/Community.vue
@@ -77,7 +77,7 @@ export default {
},
})
.then((result) => {
- this.toastSuccess(result.data)
+ this.toastSuccess(this.$t('contribution.submitted'))
this.updateListContributions({
currentPage: this.currentPage,
pageSize: this.pageSize,
@@ -101,7 +101,7 @@ export default {
},
})
.then((result) => {
- this.toastSuccess(result.data)
+ this.toastSuccess(this.$t('contribution.updated'))
this.updateListContributions({
currentPage: this.currentPage,
pageSize: this.pageSize,
@@ -112,18 +112,17 @@ export default {
this.toastError(err.message)
})
},
- deleteContribution(id) {
+ deleteContribution(data) {
this.$apollo
.mutate({
fetchPolicy: 'no-cache',
mutation: deleteContribution,
variables: {
- id: id,
+ id: data.id,
},
})
.then((result) => {
- // console.log('result', result.data)
- this.toastSuccess(result.data)
+ this.toastSuccess(this.$t('contribution.deleted'))
this.updateListContributions({
currentPage: this.currentPage,
pageSize: this.pageSize,