Skip to content

Commit 4eb9285

Browse files
fixing gantt chart, new driver version was returning {low,high} numbers
1 parent f700e57 commit 4eb9285

File tree

1 file changed

+5
-3
lines changed
  • src/extensions/advancedcharts/chart/gantt

1 file changed

+5
-3
lines changed

src/extensions/advancedcharts/chart/gantt/Utils.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { toNumber } from '../../../../chart/ChartUtils';
12
import { buildGraphVisualizationObjectFromRecords } from '../../../../chart/graph/util/RecordUtils';
23
import date_utils from './frappe/lib/date_utils';
34

@@ -97,9 +98,9 @@ export function createTasksList(
9798
return undefined;
9899
}
99100
}
100-
return {
101-
start: new Date(neoStartDate.year, neoStartDate.month, neoStartDate.day),
102-
end: new Date(neoEndDate.year, neoEndDate.month, neoEndDate.day),
101+
let res = {
102+
start: new Date(toNumber(neoStartDate.year), toNumber(neoStartDate.month), toNumber(neoStartDate.day)),
103+
end: new Date(toNumber(neoEndDate.year), toNumber(neoEndDate.month), toNumber(neoEndDate.day)),
103104
name: name || '(undefined)',
104105
labels: n.labels,
105106
dependencies: dependencies[n.id],
@@ -112,6 +113,7 @@ export function createTasksList(
112113
isDisabled: true,
113114
styles: { progressColor: '#ffbb54', progressSelectedColor: '#ff9e0d' },
114115
};
116+
return res;
115117
})
116118
.filter((i) => i !== undefined);
117119
}

0 commit comments

Comments
 (0)