create radio buttons in mixin

This commit is contained in:
Moriz Wahl 2022-01-25 17:25:58 +01:00
parent daa8684cc6
commit dd7b95b9af
3 changed files with 12 additions and 15 deletions

View File

@ -470,7 +470,7 @@ jobs:
report_name: Coverage Admin Interface
type: lcov
result_path: ./coverage/lcov.info
min_coverage: 78
min_coverage: 79
token: ${{ github.token }}
##############################################################################

View File

@ -199,16 +199,12 @@ export default {
}),
)
this.$store.commit('openCreationsPlus', 1)
// 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)
// das creation Formular reseten
this.$refs.creationForm.reset()
// Den geschöpften Wert auf o setzen
this.value = 0
})
}
@ -219,15 +215,5 @@ export default {
this.updateRadioSelected(this.selected)
},
},
computed: {
radioOptions() {
return this.creationDateObjects.map((obj, idx) => {
return {
item: { ...obj, creation: this.creation[idx] },
name: obj.short + (this.creation[idx] ? ' ' + this.creation[idx] + ' GDD' : ''),
}
})
},
},
}
</script>

View File

@ -1,4 +1,7 @@
export const creationMonths = {
props: {
creation: [1000, 1000, 1000],
},
computed: {
creationDates() {
const now = new Date(Date.now())
@ -20,5 +23,13 @@ export const creationMonths = {
})
return result
},
radioOptions() {
return this.creationDateObjects.map((obj, idx) => {
return {
item: { ...obj, creation: this.creation[idx] },
name: obj.short + (this.creation[idx] ? ' ' + this.creation[idx] + ' GDD' : ''),
}
})
},
},
}