feat: replace our home-grown gantt implementation with ganttastic #2180

Merged
konrad merged 78 commits from feature/ganttastic into main 2022-10-27 16:03:27 +00:00
1 changed files with 6 additions and 6 deletions
Showing only changes of commit 64fdae81ec - Show all commits

View File

@ -54,7 +54,7 @@
</template>
<script setup lang="ts">
import {computed, nextTick, ref, watch} from 'vue'
import {computed, nextTick, ref, watch, watchEffect} from 'vue'
import TaskCollectionService from '@/services/taskCollection'
import TaskService from '@/services/task'
import {format, parse} from 'date-fns'
@ -174,11 +174,11 @@ async function loadTasks() {
mapGanttBars()
}
konrad marked this conversation as resolved Outdated

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,
})
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, }) ```

Done.

Done.
loadTasks()
watch(() => props.dateTo, loadTasks)
watch(() => props.dateFrom, loadTasks)
watch(() => props.showTasksWithoutDates, loadTasks)
watchEffect(() => loadTasks({
dateTo: props.dateTo,
dateFrom: props.dateFrom,
showTasksWithoutDates: props.showTasksWithoutDates,
}))
async function updateTask(e) {
const task = tasks.value.get(e.bar.ganttBarConfig.id)