resolve conflict

This commit is contained in:
ogerly 2022-07-21 07:43:46 +02:00
parent 5719884461
commit 539f858dec
5 changed files with 26 additions and 14 deletions

View File

@ -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: {

View File

@ -26,7 +26,14 @@
>
<b-icon icon="pencil" class="h2"></b-icon>
</div>
<div class="pointer" @click="deleteContribution(id)">
<div
class="pointer"
@click="
$emit('delete-contribution', {
id: id,
})
"
>
<b-icon icon="trash" class="h2"></b-icon>
</div>
</div>
@ -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,
})

View File

@ -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"

View File

@ -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"

View File

@ -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,