Browse Source

#860q2ekrj duration fixed

pull/1/head
Wahyu Ramadhan 2 years ago
parent
commit
ffea53c30e
  1. 2
      edit-mode/function/ganttConfig.js
  2. 5
      edit-mode/function/restActivityLink.js

2
edit-mode/function/ganttConfig.js

@ -205,7 +205,7 @@ function addWithParent(id) {
id: no, id: no,
text: `New Activity`, text: `New Activity`,
start_date: start_date, start_date: start_date,
duration: 1 duration: 0
}, id); }, id);
no = no + 1; no = no + 1;

5
edit-mode/function/restActivityLink.js

@ -61,7 +61,8 @@ var dp = gantt.createDataProcessor(function(entity, action, data, id) {
data['proyek_id'] = proyekId; data['proyek_id'] = proyekId;
//TODO : Possible end date bug //TODO : Possible end date bug
data['start_date'] = `${data.start_date}+07`; data['start_date'] = `${data.start_date}+07`;
data['end_date'] = `${data.start_date}`; let endDate = moment(data.end_date, "YYYY-MM-DD");
data['end_date'] = endDate.format("YYYY-MM-DD")+" 23:59:59+07";
if(data && data.parent){ if(data && data.parent){
data['parent_id'] = data.parent; data['parent_id'] = data.parent;
@ -91,7 +92,7 @@ var dp = gantt.createDataProcessor(function(entity, action, data, id) {
let startDate = moment(data.start_date, "YYYY-MM-DD"); let startDate = moment(data.start_date, "YYYY-MM-DD");
// data['start_date'] = startDate.format("YYYY-MM-DD")+" 00:00:00+07"; // data['start_date'] = startDate.format("YYYY-MM-DD")+" 00:00:00+07";
let endDate = moment(data.end_date, "YYYY-MM-DD"); let endDate = moment(data.end_date, "YYYY-MM-DD");
// data['end_date'] = endDate.format("YYYY-MM-DD")+" 23:59:59+07"; data['end_date'] = endDate.format("YYYY-MM-DD")+" 23:59:59+07";
if(startDate > endDate){ if(startDate > endDate){
gantt.alert({ gantt.alert({

Loading…
Cancel
Save