fix(gantt): only update today value when changing to the gantt chart view
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
kolaente 2023-03-24 19:47:24 +01:00
parent d3289cc07b
commit 906646e28a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 3 additions and 5 deletions

View File

@ -38,9 +38,8 @@
</template>
<script setup lang="ts">
import {computed, ref, watch, toRefs} from 'vue'
import {computed, ref, watch, toRefs, onMounted} from 'vue'
import {useRouter} from 'vue-router'
import {useNow} from '@vueuse/core'
import {getHexColor} from '@/models/task'
@ -157,9 +156,8 @@ function openTask(e: {
const weekDayFromDate = useWeekDayFromDate()
const today = useNow({
interval: 6 * 60 * 60 * 1000, // Every 6 hours
})
const today = ref(new Date())
onMounted(() => today.value = new Date())
const dateIsToday = computed(() => (date: Date) => {
return (
date.getDate() === today.value.getDate() &&