feat: add open task detail when double clicking
This commit is contained in:
parent
7f3c754389
commit
c9c9056baf
1 changed files with 12 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
bar-end="endDate"
|
bar-end="endDate"
|
||||||
:grid="true"
|
:grid="true"
|
||||||
@dragend-bar="updateTask"
|
@dragend-bar="updateTask"
|
||||||
|
@dblclick-bar="openTask"
|
||||||
>
|
>
|
||||||
<g-gantt-row
|
<g-gantt-row
|
||||||
v-for="(bar, k) in ganttBars"
|
v-for="(bar, k) in ganttBars"
|
||||||
|
@ -46,10 +47,12 @@ import TaskService from '@/services/task'
|
||||||
import {useStore} from 'vuex'
|
import {useStore} from 'vuex'
|
||||||
import Rights from '../../models/constants/rights.json'
|
import Rights from '../../models/constants/rights.json'
|
||||||
import TaskModel from '@/models/task'
|
import TaskModel from '@/models/task'
|
||||||
|
import {useRouter} from 'vue-router'
|
||||||
|
|
||||||
const dateFormat = 'yyyy-LL-dd kk:mm'
|
const dateFormat = 'yyyy-LL-dd kk:mm'
|
||||||
|
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
listId: {
|
listId: {
|
||||||
|
@ -180,6 +183,15 @@ async function createTask() {
|
||||||
newTaskTitle.value = ''
|
newTaskTitle.value = ''
|
||||||
hideCreateNewTask()
|
hideCreateNewTask()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openTask(e) {
|
||||||
|
console.log('open', e.bar.ganttBarConfig.id)
|
||||||
|
router.push({
|
||||||
|
name: 'task.detail',
|
||||||
|
params: { id: e.bar.ganttBarConfig.id },
|
||||||
|
state: { backdropView: router.currentRoute.value.fullPath },
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Reference in a new issue