From ab88f6873b7c2e64db25e854e627720764665f5e Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Sat, 12 Nov 2022 20:38:08 +0100 Subject: [PATCH] fix: moving task chagnes duration --- src/components/tasks/GanttChart.vue | 19 +++++++++++++------ src/types/DateISO.ts | 4 +--- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/components/tasks/GanttChart.vue b/src/components/tasks/GanttChart.vue index c2580d1ca..9afc5e73e 100644 --- a/src/components/tasks/GanttChart.vue +++ b/src/components/tasks/GanttChart.vue @@ -6,8 +6,8 @@
() @@ -88,6 +88,13 @@ const dayjsLanguageLoading = ref(false) dayjs.extend(isToday) extendDayjs() +const testdate = new Date() + +console.log(testdate) + +console.log('reference date isostring', testdate.toISOString()) +console.log('dayjs', dayjs(testdate).toDate().toISOString) + const router = useRouter() const dateFromDate = computed(() => new Date(new Date(filters.value.dateFrom).setHours(0,0,0,0))) @@ -117,8 +124,8 @@ watch( function transformTaskToGanttBar(t: ITask) { const black = 'var(--grey-800)' return [{ - startDate: isoToKebabDate(t.startDate ? t.startDate.toISOString() : props.defaultTaskStartDate), - endDate: isoToKebabDate(t.endDate ? t.endDate.toISOString() : props.defaultTaskEndDate), + startDate: t.startDate ? t.startDate.toISOString() : props.defaultTaskStartDate, + endDate: t.endDate ? t.endDate.toISOString() : props.defaultTaskEndDate, ganttBarConfig: { id: String(t.id), label: t.title, diff --git a/src/types/DateISO.ts b/src/types/DateISO.ts index 0db782318..38d4949c9 100644 --- a/src/types/DateISO.ts +++ b/src/types/DateISO.ts @@ -2,6 +2,4 @@ * Returns a date as a string value in ISO format. * same format as `new Date().toISOString()` */ -export type DateISO = T - -new Date().toISOString() \ No newline at end of file +export type DateISO = T \ No newline at end of file