fix: use base store

This commit is contained in:
kolaente 2022-10-02 14:09:18 +02:00
parent 6db97d1ba1
commit bb280b811c
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -46,6 +46,7 @@ import TaskModel from '@/models/task'
import {useRouter} from 'vue-router' import {useRouter} from 'vue-router'
import Loading from '@/components/misc/loading.vue' import Loading from '@/components/misc/loading.vue'
import type ListModel from '@/models/list' import type ListModel from '@/models/list'
import {useBaseStore} from '@/stores/base'
// FIXME: these types should be exported from vue-ganttastic // FIXME: these types should be exported from vue-ganttastic
// see: https://github.com/InfectoOne/vue-ganttastic/blob/master/src/models/models.ts // 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 DATE_FORMAT = 'yyyy-LL-dd HH:mm'
const store = useStore() const baseStore = useBaseStore()
const router = useRouter() const router = useRouter()
const props = defineProps({ const props = defineProps({
@ -125,7 +126,7 @@ const ganttChartWidth = computed(() => {
return dateDiff * DAY_WIDTH_PIXELS 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<Map<TaskModel['id'], TaskModel>>(new Map()) const tasks = ref<Map<TaskModel['id'], TaskModel>>(new Map())
const ganttBars = ref<GanttBarObject[][]>([]) const ganttBars = ref<GanttBarObject[][]>([])