diff --git a/admin/src/components/CreationFormular.vue b/admin/src/components/CreationFormular.vue
index d5e774dc5..f9fee802a 100644
--- a/admin/src/components/CreationFormular.vue
+++ b/admin/src/components/CreationFormular.vue
@@ -154,21 +154,6 @@ export default {
required: true,
},
},
- created() {
- console.log(' created this.pagetype', this.pagetype)
- if (this.pagetype === 'PageCreationConfirm' && this.creationUserData.date) {
- console.log('if created CreationFormular.vue', this.creationUserData.date)
- console.log(
- 'this.$moment(this.creationUserData.date).format("MMMM")',
- this.$moment(this.creationUserData.date).format('MMMM'),
- )
- console.log(
- 'this.$moment(this.creationUserData.date).format("YYYY-MM-DD")',
- this.$moment(this.creationUserData.date).format('YYYY-MM-DD'),
- )
- // const id = this.$moment(this.creationUserData.date).format('MMMM')
- }
- },
data() {
return {
radioSelected: '',
@@ -198,7 +183,6 @@ export default {
// Auswählen eines Zeitraumes
updateRadioSelected(name, index, openCreation) {
this.createdIndex = index
- console.log('radioSelected', this.radioSelected)
// Wenn Mehrfachschöpfung
if (this.type === 'massCreation') {
// An Creation.vue emitten und radioSelectedMass aktualisieren
@@ -209,23 +193,6 @@ export default {
this.rangeMax = openCreation
}
},
- /*
- checkFormForUpdate(input) {
- console.log('checkFormForUpdate', input)
- console.log('checkFormForUpdate creationUserData', this.creationUserData)
- switch (input) {
- case 'text':
- this.text = this.creationUserData.text
- break
- case 'range':
- this.value = this.creationUserData.creationGdd
- break
- default:
- // TODO: Toast
- alert("I don't know such values")
- }
- },
- */
submitCreation() {
// Formular Prüfen ob ein Zeitraum ausgewählt wurde. Ansonsten abbrechen und Hinweis anzeigen
if (this.radioSelected === '') {
@@ -243,31 +210,6 @@ export default {
if (this.text.length < 10) {
return alert('Bitte gib einen Text ein der länger als 10 Zeichen ist!')
}
- /*
- if (this.type === 'massCreation') {
- // Die anzahl der Mitglieder aus der Mehrfachschöpfung
- const i = Object.keys(this.itemsMassCreation).length
- // hinweis das eine Mehrfachschöpfung ausgeführt wird an (Anzahl der MItgleider an die geschöpft wird)
- alert('SUBMIT CREATION => ' + this.type + ' >> für VIELE ' + i + ' Mitglieder')
- this.submitObj = [
- {
- item: this.itemsMassCreation,
- email: this.item.email,
- creationDate: this.radioSelected.long,
- amount: this.value,
- note: this.text,
- moderator: this.$store.state.moderator.id,
- },
- ]
- alert('MehrfachSCHÖPFUNG ABSENDEN FÜR >> ' + i + ' Mitglieder')
-
- // $store - offene Schöpfungen hochzählen
- this.$store.commit('openCreationsPlus', i)
-
- // lösche alle Mitglieder aus der MehrfachSchöpfungsListe nach dem alle Mehrfachschpfungen zum bestätigen gesendet wurden.
- this.$emit('remove-all-bookmark')
- }
- */
if (this.type === 'singleCreation') {
this.submitObj = {
email: this.item.email,
@@ -277,43 +219,32 @@ export default {
moderator: Number(this.$store.state.moderator.id),
}
- if (this.pagetype === 'PageCreationConfirm') {
- // hinweis das eine ein einzelne Schöpfung abgesendet wird an (email)
- alert('UPDATE EINZEL SCHÖPFUNG ABSENDEN FÜR >> ')
- // umschreiben, update eine bestehende Schöpfung eine
- this.$emit('update-creation-data', {
- datum: this.radioSelected.long,
- creationGdd: this.value,
- text: this.text,
+ this.$apollo
+ .query({
+ query: createPendingCreation,
+ variables: this.submitObj,
+ })
+ .then((result) => {
+ this.$emit('update-user-data', this.item, result.data.createPendingCreation)
+ this.$toasted.success(
+ `Offene schöpfung (${this.value} GDD) für ${this.item.email} wurde gespeichert, liegen zur bestätigung bereit`,
+ )
+ this.$store.commit('openCreationsPlus', 1)
+ this.submitObj = null
+ this.createdIndex = null
+ // das creation Formular reseten
+ this.$refs.creationForm.reset()
+ // Den geschöpften Wert auf o setzen
+ this.value = 0
+ })
+ .catch((error) => {
+ this.$toasted.error(error.message)
+ this.submitObj = null
+ // das creation Formular reseten
+ this.$refs.creationForm.reset()
+ // Den geschöpften Wert auf o setzen
+ this.value = 0
})
- } else {
- this.$apollo
- .query({
- query: createPendingCreation,
- variables: this.submitObj,
- })
- .then((result) => {
- this.$emit('update-user-data', this.item, result.data.createPendingCreation)
- this.$toasted.success(
- `Offene schöpfung (${this.value} GDD) für ${this.item.email} wurde gespeichert, liegen zur bestätigung bereit`,
- )
- this.$store.commit('openCreationsPlus', 1)
- this.submitObj = null
- this.createdIndex = null
- // das creation Formular reseten
- this.$refs.creationForm.reset()
- // Den geschöpften Wert auf o setzen
- this.value = 0
- })
- .catch((error) => {
- this.$toasted.error(error.message)
- this.submitObj = null
- // das creation Formular reseten
- this.$refs.creationForm.reset()
- // Den geschöpften Wert auf o setzen
- this.value = 0
- })
- }
}
},
},
diff --git a/admin/src/components/EditCreationFormular.vue b/admin/src/components/EditCreationFormular.vue
index 22d151b9b..922c6d830 100644
--- a/admin/src/components/EditCreationFormular.vue
+++ b/admin/src/components/EditCreationFormular.vue
@@ -13,7 +13,12 @@
@change="updateRadioSelected(beforeLastMonth, 0, selectedOpenCreationAmount[0])"
>
@@ -26,7 +31,12 @@
@change="updateRadioSelected(lastMonth, 1, selectedOpenCreationAmount[1])"
>
@@ -39,7 +49,12 @@
@change="updateRadioSelected(currentMonth, 2, selectedOpenCreationAmount[2])"
>
@@ -144,17 +159,7 @@ export default {
},
},
created() {
- console.log(' created this.pagetype', this.pagetype)
if (this.pagetype === 'PageCreationConfirm' && this.creationUserData.date) {
- console.log('if created CreationFormular.vue', this.creationUserData.date)
- console.log(
- 'this.$moment(this.creationUserData.date).format("MMMM")',
- this.$moment(this.creationUserData.date).format('MMMM'),
- )
- console.log(
- 'this.$moment(this.creationUserData.date).format("YYYY-MM")',
- this.$moment(this.creationUserData.date).format('YYYY-MM'),
- )
switch (this.$moment(this.creationUserData.date).format('MMMM')) {
case this.currentMonth.short:
this.createdIndex = 2
@@ -171,10 +176,8 @@ export default {
default:
throw new Error('Something went wrong')
}
- console.log(this.creation)
- const openCreations = this.creationUserData.creation
- this.selectedOpenCreationAmount = openCreations
- this.selectedOpenCreationAmount[this.createdIndex] = this.selectedOpenCreationAmount[this.createdIndex] + this.creationUserData.amount / 10000
+ this.selectedOpenCreationAmount[this.createdIndex] =
+ this.creation[this.createdIndex] + this.creationUserData.amount / 10000
this.rangeMax = this.selectedOpenCreationAmount[this.createdIndex]
}
},
@@ -206,11 +209,7 @@ export default {
methods: {
updateRadioSelected(name, index, openCreation) {
- console.log('createdIndex before update', this.createdIndex)
this.createdIndex = index
- console.log('radioSelected', this.radioSelected)
- console.log('openCreation', openCreation)
-
this.rangeMin = 0
this.rangeMax = this.creation[index]
},
@@ -242,8 +241,6 @@ export default {
if (this.pagetype === 'PageCreationConfirm') {
// hinweis das eine ein einzelne Schöpfung abgesendet wird an (email)
- alert('UPDATE EINZELSCHÖPFUNG ABSENDEN FÜR >> ' + JSON.stringify(this.submitObj))
-
this.$apollo
.query({
query: updatePendingCreation,
diff --git a/admin/src/components/UserTable.vue b/admin/src/components/UserTable.vue
index 1f7ffa94a..f2bc2e43b 100644
--- a/admin/src/components/UserTable.vue
+++ b/admin/src/components/UserTable.vue
@@ -232,12 +232,8 @@ export default {
this.$emit('remove-confirm-result', item, 'remove')
},
editCreationUserTable(row, rowItem) {
- alert('editCreationUserTable')
if (!row.detailsShowing) {
- alert('offen edit loslegen')
- // this.item = rowItem
this.creationUserData = rowItem
- console.log('editCreationUserTable creationUserData', this.creationUserData)
} else {
this.creationUserData = {}
}