From f9113abc75060add46ce5de05b9967df8fe82bd7 Mon Sep 17 00:00:00 2001 From: ogerly Date: Mon, 29 Nov 2021 12:08:53 +0100 Subject: [PATCH] Selected radioButton automatically. --- admin/src/components/EditCreationFormular.vue | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/admin/src/components/EditCreationFormular.vue b/admin/src/components/EditCreationFormular.vue index da63f3aff..22d151b9b 100644 --- a/admin/src/components/EditCreationFormular.vue +++ b/admin/src/components/EditCreationFormular.vue @@ -8,12 +8,12 @@ @@ -21,12 +21,12 @@ @@ -34,12 +34,12 @@ @@ -158,18 +158,24 @@ export default { switch (this.$moment(this.creationUserData.date).format('MMMM')) { case this.currentMonth.short: this.createdIndex = 2 + this.radioSelected = this.currentMonth break case this.lastMonth.short: this.createdIndex = 1 + this.radioSelected = this.lastMonth break case this.beforeLastMonth.short: this.createdIndex = 0 + this.radioSelected = this.beforeLastMonth break default: throw new Error('Something went wrong') } - this.selectedOpenCreationAmount = this.creation - this.rangeMax = this.selectedOpenCreationAmount[this.createdIndex] + this.creationUserData.amount / 10000 + 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.rangeMax = this.selectedOpenCreationAmount[this.createdIndex] } }, data() {