Add pen icon to link to task detail

This commit is contained in:
kolaente 2021-05-20 17:15:53 +02:00
parent 7e6d5956ba
commit affaa95e3f
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 17 additions and 6 deletions

View file

@ -37,11 +37,13 @@
:highlight-on-hover="true"
>
<template v-slot:bar-label>
{{ t.title }}
<span>
{{ t.title }}
</span>
<router-link :to="{name: 'task.detail', params: {id: t.id}}" class="edit-task-link">
<icon icon="pen"/>
</router-link>
</template>
<!-- <template #bar-label="{bar}">-->
<!-- <span>{{ bar.label }}</span>-->
<!-- </template>-->
</g-gantt-row>
</g-gantt-chart>
@ -546,7 +548,6 @@ export default {
const bar = e.movedBars.entries().next().value[0]
const index = this.theTasks.findIndex(t => t.id === bar.id)
const task = this.theTasks[index]
console.log(bar, task)
task.startDate = new Date(bar.start)
task.endDate = new Date(bar.end)
this.$set(this.theTasks, index, task)

View file

@ -246,12 +246,22 @@ $gantt-vertical-border-color: $grey-100;
.g-gantt-bar {
border-radius: 6px !important;
overflow: visible !important;
cursor: grab;
&:active {
cursor: grabbing;
}
.g-gantt-bar-label {
font-size: .85rem;
justify-content: start;
justify-content: space-between;
padding: 0 .5rem !important;
overflow: hidden;
.edit-task-link {
color: inherit;
padding: 0 .25rem;
}
}
.g-gantt-bar-handle-left, .g-gantt-bar-handle-right {