Skip to content

Commit

Permalink
fixing gantt chart, new driver version was returning {low,high} numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredorubin96 committed Feb 29, 2024
1 parent f700e57 commit 4eb9285
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/extensions/advancedcharts/chart/gantt/Utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { toNumber } from '../../../../chart/ChartUtils';
import { buildGraphVisualizationObjectFromRecords } from '../../../../chart/graph/util/RecordUtils';
import date_utils from './frappe/lib/date_utils';

Expand Down Expand Up @@ -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],
Expand All @@ -112,6 +113,7 @@ export function createTasksList(
isDisabled: true,
styles: { progressColor: '#ffbb54', progressSelectedColor: '#ff9e0d' },
};
return res;
})
.filter((i) => i !== undefined);
}

0 comments on commit 4eb9285

Please sign in to comment.