From 17a2feeb722a275c528f9570eb963c4727e0e659 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 29 Nov 2021 09:58:29 +0100 Subject: [PATCH] Edit updateRadioSelected so that we have two entry points massCreation or singleCreation. --- admin/src/components/CreationFormular.vue | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/admin/src/components/CreationFormular.vue b/admin/src/components/CreationFormular.vue index 5b7648bb4..fa21ed993 100644 --- a/admin/src/components/CreationFormular.vue +++ b/admin/src/components/CreationFormular.vue @@ -193,27 +193,26 @@ export default { createdIndex: null, } }, + methods: { // Auswählen eines Zeitraumes updateRadioSelected(name, index, openCreation) { this.createdIndex = index - console.log("radioSelected", this.radioSelected) + console.log('radioSelected', this.radioSelected) // Wenn Mehrfachschöpfung if (this.type === 'massCreation') { // An Creation.vue emitten und radioSelectedMass aktualisieren this.$emit('update-radio-selected', [name, index]) - } - // Wenn Einzelschöpfung - if (this.type === 'singleCreation') { + } else if (this.type === 'singleCreation') { this.rangeMin = 0 // Der maximale offene Betrag an GDD die für ein User noch geschöpft werden kann this.rangeMax = openCreation - } - // Wenn Einzelschöpfung - if (this.pagetype === 'PageCreationConfirm') { - this.rangeMin = 0 - this.rangeMax = openCreation + this.creationUserData.amount / 10000 - this.creation[index] = this.creation[index] + this.creationUserData.amount / 10000 + // Wenn Einzelschöpfung + if (this.pagetype === 'PageCreationConfirm') { + this.rangeMin = 0 + this.rangeMax = openCreation + this.creationUserData.amount / 10000 + this.creation[index] = this.creation[index] + ( this.creationUserData.amount / 10000 ) + } } }, /*