fix: don't allow reordering tasks in filtered lists
This commit is contained in:
parent
99fb78dbd4
commit
d284db672e
1 changed files with 7 additions and 6 deletions
|
@ -99,7 +99,7 @@
|
||||||
task-detail-route="task.detail"
|
task-detail-route="task.detail"
|
||||||
v-for="t in tasks"
|
v-for="t in tasks"
|
||||||
>
|
>
|
||||||
<span class="icon handle">
|
<span class="icon handle" v-if="canWrite">
|
||||||
<icon icon="grip-lines"/>
|
<icon icon="grip-lines"/>
|
||||||
</span>
|
</span>
|
||||||
<div
|
<div
|
||||||
|
@ -150,7 +150,6 @@ import Nothing from '@/components/misc/nothing.vue'
|
||||||
import createTask from '@/components/tasks/mixins/createTask'
|
import createTask from '@/components/tasks/mixins/createTask'
|
||||||
import Pagination from '@/components/misc/pagination.vue'
|
import Pagination from '@/components/misc/pagination.vue'
|
||||||
|
|
||||||
import {mapState} from 'vuex'
|
|
||||||
import draggable from 'vuedraggable'
|
import draggable from 'vuedraggable'
|
||||||
import {calculateItemPosition} from '../../../helpers/calculateItemPosition'
|
import {calculateItemPosition} from '../../../helpers/calculateItemPosition'
|
||||||
|
|
||||||
|
@ -215,10 +214,12 @@ export default {
|
||||||
|
|
||||||
return calculateItemPosition(null, this.tasks[0].position)
|
return calculateItemPosition(null, this.tasks[0].position)
|
||||||
},
|
},
|
||||||
...mapState({
|
canWrite() {
|
||||||
canWrite: state => state.currentList.maxRight > Rights.READ,
|
return this.list.maxRight > Rights.READ && this.list.id > 0
|
||||||
list: state => state.currentList,
|
},
|
||||||
}),
|
list() {
|
||||||
|
return this.$store.state.currentList
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => (this.ctaVisible = true))
|
this.$nextTick(() => (this.ctaVisible = true))
|
||||||
|
|
Loading…
Reference in a new issue