From 4eb92856dd947bc5b768d17bf1a44eab99f2148a Mon Sep 17 00:00:00 2001 From: Alfred Rubin Date: Thu, 29 Feb 2024 18:06:04 +0100 Subject: [PATCH] fixing gantt chart, new driver version was returning {low,high} numbers --- src/extensions/advancedcharts/chart/gantt/Utils.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/extensions/advancedcharts/chart/gantt/Utils.ts b/src/extensions/advancedcharts/chart/gantt/Utils.ts index 012c77201..331be20ff 100644 --- a/src/extensions/advancedcharts/chart/gantt/Utils.ts +++ b/src/extensions/advancedcharts/chart/gantt/Utils.ts @@ -1,3 +1,4 @@ +import { toNumber } from '../../../../chart/ChartUtils'; import { buildGraphVisualizationObjectFromRecords } from '../../../../chart/graph/util/RecordUtils'; import date_utils from './frappe/lib/date_utils'; @@ -97,9 +98,9 @@ export function createTasksList( return undefined; } } - return { - start: new Date(neoStartDate.year, neoStartDate.month, neoStartDate.day), - end: new Date(neoEndDate.year, neoEndDate.month, neoEndDate.day), + let res = { + start: new Date(toNumber(neoStartDate.year), toNumber(neoStartDate.month), toNumber(neoStartDate.day)), + end: new Date(toNumber(neoEndDate.year), toNumber(neoEndDate.month), toNumber(neoEndDate.day)), name: name || '(undefined)', labels: n.labels, dependencies: dependencies[n.id], @@ -112,6 +113,7 @@ export function createTasksList( isDisabled: true, styles: { progressColor: '#ffbb54', progressSelectedColor: '#ff9e0d' }, }; + return res; }) .filter((i) => i !== undefined); }