
Hide Team UI elements if the user does not have the rights to use them Fix replacing the right saved in the model when updating Hide UI-Elements on task if the user does not have the rights to use them Hide UI-Elements on gantt if the user does not have the rights to use them Hide UI-Elements on kanban if the user does not have rights to use them Fix canWrite condition Hide list components if the user has no right to write to the list Add max right to model Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/211
53 lines
1.1 KiB
Vue
53 lines
1.1 KiB
Vue
<template>
|
|
<div class="select">
|
|
<select v-model.number="percentDone" @change="updateData" :disabled="disabled">
|
|
<option value="0">0%</option>
|
|
<option value="0.1">10%</option>
|
|
<option value="0.2">20%</option>
|
|
<option value="0.3">30%</option>
|
|
<option value="0.4">40%</option>
|
|
<option value="0.5">50%</option>
|
|
<option value="0.6">60%</option>
|
|
<option value="0.7">70%</option>
|
|
<option value="0.8">80%</option>
|
|
<option value="0.9">90%</option>
|
|
<option value="1">100%</option>
|
|
</select>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'percentDoneSelect',
|
|
data() {
|
|
return {
|
|
percentDone: 0,
|
|
}
|
|
},
|
|
props: {
|
|
value: {
|
|
default: 0,
|
|
type: Number,
|
|
},
|
|
disabled: {
|
|
default: false,
|
|
},
|
|
},
|
|
watch: {
|
|
// Set the priority to the :value every time it changes from the outside
|
|
value(newVal) {
|
|
this.percentDone = newVal
|
|
},
|
|
},
|
|
mounted() {
|
|
this.percentDone = this.value
|
|
},
|
|
methods: {
|
|
updateData() {
|
|
this.$emit('input', this.percentDone)
|
|
this.$emit('change')
|
|
}
|
|
},
|
|
}
|
|
</script>
|