Fix poll duration unit
This commit is contained in:
parent
d884082761
commit
bae81f8d39
|
@ -28,19 +28,19 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
pollType: {
|
pollType: {
|
||||||
get () { return pollFallback(this.modelValue, 'pollType') },
|
get () { return pollFallback(this.modelValue, 'pollType') },
|
||||||
set (newVal) { this.$emit('update:modelValue', { ...this.modelValue, pollType: newVal }) }
|
set (newVal) { this.modelValue.pollType = newVal }
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
get () { return pollFallback(this.modelValue, 'options') },
|
get () { return pollFallback(this.modelValue, 'options') },
|
||||||
set (newVal) { this.$emit('update:modelValue', { ...this.modelValue, options: newVal }) }
|
set (newVal) { this.modelValue.options = newVal }
|
||||||
},
|
},
|
||||||
expiryAmount: {
|
expiryAmount: {
|
||||||
get () { return pollFallback(this.modelValue, 'expiryAmount') },
|
get () { return pollFallback(this.modelValue, 'expiryAmount') },
|
||||||
set (newVal) { this.$emit('update:modelValue', { ...this.modelValue, expiryAmount: newVal }) }
|
set (newVal) { this.modelValue.expiryAmount = newVal }
|
||||||
},
|
},
|
||||||
expiryUnit: {
|
expiryUnit: {
|
||||||
get () { return pollFallback(this.modelValue, 'expiryUnit') },
|
get () { return pollFallback(this.modelValue, 'expiryUnit') },
|
||||||
set (newVal) { this.$emit('update:modelValue', { ...this.modelValue, expiryUnit: newVal }) }
|
set (newVal) { this.modelValue.expiryUnit = newVal }
|
||||||
},
|
},
|
||||||
pollLimits () {
|
pollLimits () {
|
||||||
return this.$store.state.instance.pollLimits
|
return this.$store.state.instance.pollLimits
|
||||||
|
@ -98,7 +98,7 @@ export default {
|
||||||
},
|
},
|
||||||
addOption () {
|
addOption () {
|
||||||
if (this.options.length < this.maxOptions) {
|
if (this.options.length < this.maxOptions) {
|
||||||
this.options = [...this.options, '']
|
this.options.push('')
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@ -106,7 +106,6 @@ export default {
|
||||||
deleteOption (index, event) {
|
deleteOption (index, event) {
|
||||||
if (this.options.length > 2) {
|
if (this.options.length > 2) {
|
||||||
this.options.splice(index, 1)
|
this.options.splice(index, 1)
|
||||||
this.options = [...this.options]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
convertExpiryToUnit (unit, amount) {
|
convertExpiryToUnit (unit, amount) {
|
||||||
|
|
Loading…
Reference in New Issue