Edit updateRadioSelected so that we have two entry points massCreation or singleCreation.

This commit is contained in:
ogerly 2021-11-29 09:58:29 +01:00 committed by elweyn
parent 4c8c0678b1
commit 17a2feeb72

View File

@ -193,27 +193,26 @@ export default {
createdIndex: null, createdIndex: null,
} }
}, },
methods: { methods: {
// Auswählen eines Zeitraumes // Auswählen eines Zeitraumes
updateRadioSelected(name, index, openCreation) { updateRadioSelected(name, index, openCreation) {
this.createdIndex = index this.createdIndex = index
console.log("radioSelected", this.radioSelected) console.log('radioSelected', this.radioSelected)
// Wenn Mehrfachschöpfung // Wenn Mehrfachschöpfung
if (this.type === 'massCreation') { if (this.type === 'massCreation') {
// An Creation.vue emitten und radioSelectedMass aktualisieren // An Creation.vue emitten und radioSelectedMass aktualisieren
this.$emit('update-radio-selected', [name, index]) this.$emit('update-radio-selected', [name, index])
} } else if (this.type === 'singleCreation') {
// Wenn Einzelschöpfung
if (this.type === 'singleCreation') {
this.rangeMin = 0 this.rangeMin = 0
// Der maximale offene Betrag an GDD die für ein User noch geschöpft werden kann // Der maximale offene Betrag an GDD die für ein User noch geschöpft werden kann
this.rangeMax = openCreation this.rangeMax = openCreation
}
// Wenn Einzelschöpfung // Wenn Einzelschöpfung
if (this.pagetype === 'PageCreationConfirm') { if (this.pagetype === 'PageCreationConfirm') {
this.rangeMin = 0 this.rangeMin = 0
this.rangeMax = openCreation + this.creationUserData.amount / 10000 this.rangeMax = openCreation + this.creationUserData.amount / 10000
this.creation[index] = this.creation[index] + this.creationUserData.amount / 10000 this.creation[index] = this.creation[index] + ( this.creationUserData.amount / 10000 )
}
} }
}, },
/* /*