feat: replace our home-grown gantt implementation with ganttastic #2180
|
@ -118,6 +118,7 @@ function transformTaskToGanttBar(t: TaskModel) {
|
||||||
color: t.startDate ? (colorIsDark(t.getHexColor()) ? black : 'white') : black,
|
color: t.startDate ? (colorIsDark(t.getHexColor()) ? black : 'white') : black,
|
||||||
backgroundColor: t.startDate ? t.getHexColor() : 'var(--grey-100)',
|
backgroundColor: t.startDate ? t.getHexColor() : 'var(--grey-100)',
|
||||||
border: t.startDate ? '' : '2px dashed var(--grey-300)',
|
border: t.startDate ? '' : '2px dashed var(--grey-300)',
|
||||||
|
'text-decoration': t.done ? 'line-through' : null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}]
|
}]
|
||||||
|
@ -137,9 +138,9 @@ async function loadTasks() {
|
||||||
const params = {
|
const params = {
|
||||||
sort_by: ['start_date', 'done', 'id'],
|
sort_by: ['start_date', 'done', 'id'],
|
||||||
order_by: ['asc', 'asc', 'desc'],
|
order_by: ['asc', 'asc', 'desc'],
|
||||||
filter_by: ['done', 'start_date', 'start_date'],
|
filter_by: ['start_date', 'start_date'],
|
||||||
filter_comparator: ['equals', 'greater_equals', 'less_equals'],
|
filter_comparator: ['greater_equals', 'less_equals'],
|
||||||
filter_value: ['false', props.dateFrom, props.dateTo],
|
filter_value: [props.dateFrom, props.dateTo],
|
||||||
filter_concat: 'and',
|
filter_concat: 'and',
|
||||||
konrad marked this conversation as resolved
Outdated
|
|||||||
filter_include_nulls: true,
|
filter_include_nulls: true,
|
||||||
}
|
}
|
||||||
|
@ -175,7 +176,7 @@ async function updateTask(e) {
|
||||||
const r = await taskService.update(task)
|
const r = await taskService.update(task)
|
||||||
konrad marked this conversation as resolved
Outdated
dpschen
commented
This and the three lines below should be combined to one watcher that trigger immediately.
Something like:
This and the three lines below should be combined to one watcher that trigger immediately.
`loadTasks` should accept these three as params, so that it's clear that these are needed to reload.
Something like:
```
watchEffect(() => loadTasks({
dateTo: props.dateTo,
dateFrom: props.dateFrom,
showTasksWithoutDates: props.showTasksWithoutDates,
})
```
|
|||||||
// TODO: Loading animation
|
// TODO: Loading animation
|
||||||
for (const i in ganttBars.value) {
|
for (const i in ganttBars.value) {
|
||||||
if(ganttBars.value[i][0].ganttBarConfig.id === task.id) {
|
if (ganttBars.value[i][0].ganttBarConfig.id === task.id) {
|
||||||
ganttBars.value[i] = transformTaskToGanttBar(r)
|
ganttBars.value[i] = transformTaskToGanttBar(r)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue
define types
Done.