From bb280b811c7b9b083db3d8a3644a7cbe3e7d0a4a Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 2 Oct 2022 14:09:18 +0200 Subject: [PATCH] fix: use base store --- src/components/tasks/gantt-chart.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/tasks/gantt-chart.vue b/src/components/tasks/gantt-chart.vue index ba32bcbf8..73d701a6c 100644 --- a/src/components/tasks/gantt-chart.vue +++ b/src/components/tasks/gantt-chart.vue @@ -46,6 +46,7 @@ import TaskModel from '@/models/task' import {useRouter} from 'vue-router' import Loading from '@/components/misc/loading.vue' import type ListModel from '@/models/list' +import {useBaseStore} from '@/stores/base' // FIXME: these types should be exported from vue-ganttastic // see: https://github.com/InfectoOne/vue-ganttastic/blob/master/src/models/models.ts @@ -90,7 +91,7 @@ const PRECISION = 'day' const DATE_FORMAT = 'yyyy-LL-dd HH:mm' -const store = useStore() +const baseStore = useBaseStore() const router = useRouter() const props = defineProps({ @@ -125,7 +126,7 @@ const ganttChartWidth = computed(() => { return dateDiff * DAY_WIDTH_PIXELS }) -const canWrite = computed(() => store.state.currentList.maxRight > RIGHTS.READ) +const canWrite = computed(() => baseStore.currentList.maxRight > RIGHTS.READ) const tasks = ref>(new Map()) const ganttBars = ref([])