diff --git a/admin/src/locales/de.json b/admin/src/locales/de.json index fa0ca6903..3d88e0257 100644 --- a/admin/src/locales/de.json +++ b/admin/src/locales/de.json @@ -35,6 +35,7 @@ "creation_form": { "creation_failed": "Ausstehende Schöpfung für {email} konnte nicht erzeugt werden.", "creation_for": "Aktives Grundeinkommen für", + "deleteNow": "Möchtest du diesen Beitrag zur Gemeinschaft wirklich löschen?", "enter_text": "Text eintragen", "form": "Schöpfungsformular", "min_characters": "Mindestens 10 Zeichen eingeben", diff --git a/admin/src/locales/en.json b/admin/src/locales/en.json index 6d19b1732..f23c61e21 100644 --- a/admin/src/locales/en.json +++ b/admin/src/locales/en.json @@ -35,6 +35,7 @@ "creation_form": { "creation_failed": "Could not create pending creation for {email}", "creation_for": "Active Basic Income for", + "deleteNow": "Do you really want to delete this contribution to the community?", "enter_text": "Enter text", "form": "Creation form", "min_characters": "Enter at least 10 characters", diff --git a/admin/src/pages/CreationConfirm.vue b/admin/src/pages/CreationConfirm.vue index 061556ba1..e78499c4b 100644 --- a/admin/src/pages/CreationConfirm.vue +++ b/admin/src/pages/CreationConfirm.vue @@ -34,20 +34,23 @@ export default { }, methods: { removeCreation(item) { - this.$apollo - .mutate({ - mutation: adminDeleteContribution, - variables: { - id: item.id, - }, - }) - .then((result) => { - this.updatePendingCreations(item.id) - this.toastSuccess(this.$t('creation_form.toasted_delete')) - }) - .catch((error) => { - this.toastError(error.message) - }) + this.$bvModal.msgBoxConfirm(this.$t('creation_form.deleteNow')).then(async (value) => { + if (value) + await this.$apollo + .mutate({ + mutation: adminDeleteContribution, + variables: { + id: item.id, + }, + }) + .then((result) => { + this.updatePendingCreations(item.id) + this.toastSuccess(this.$t('creation_form.toasted_delete')) + }) + .catch((error) => { + this.toastError(error.message) + }) + }) }, confirmCreation() { this.$apollo