@syncfusion/ej2-gantt 20.4.38 → 20.4.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2541,7 +2541,7 @@ class TaskProcessor extends DateProcessor {
2541
2541
  }
2542
2542
  else if (endDate) {
2543
2543
  sDate = new Date(endDate.getTime());
2544
- milestone = true;
2544
+ milestone = isNullOrUndefined(startDate) && this.parent.allowUnscheduledTasks ? false : true;
2545
2545
  }
2546
2546
  else {
2547
2547
  sDate = this.getValidStartDate(ganttProp);
@@ -2664,6 +2664,9 @@ class TaskProcessor extends DateProcessor {
2664
2664
  else if (isMilestone && this.getSecondsInDecimal(date) === this.parent.defaultEndTime) {
2665
2665
  date.setHours(24);
2666
2666
  }
2667
+ else if (this.getSecondsInDecimal(date) === this.parent.defaultEndTime && this.parent.allowUnscheduledTasks) {
2668
+ date.setHours(22);
2669
+ }
2667
2670
  }
2668
2671
  const timelineStartDate = this.parent.timelineModule.timelineStartDate;
2669
2672
  if (timelineStartDate) {
@@ -3637,7 +3640,12 @@ class TaskProcessor extends DateProcessor {
3637
3640
  durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 60));
3638
3641
  break;
3639
3642
  default:
3640
- durationInDay = childGanttRecord.ganttProperties.duration;
3643
+ if (childGanttRecord.ganttProperties.duration < 1) {
3644
+ durationInDay = (childGanttRecord.ganttProperties.duration / (this.parent.secondsPerDay / 3600));
3645
+ }
3646
+ else {
3647
+ durationInDay = childGanttRecord.ganttProperties.duration;
3648
+ }
3641
3649
  }
3642
3650
  if (childGanttRecord.hasChildRecords) {
3643
3651
  setValue('totalProgress', childGanttRecord.ganttProperties.totalProgress, progressValues);
@@ -3714,7 +3722,13 @@ class TaskProcessor extends DateProcessor {
3714
3722
  if (!childData.ganttProperties.isMilestone && isScheduledTask(childData.ganttProperties)) {
3715
3723
  progressValues = this.getParentProgress(childData);
3716
3724
  totalProgress += getValue('totalProgress', progressValues);
3717
- totalDuration += getValue('totalDuration', progressValues);
3725
+ if (childData[this.parent.taskFields.duration] < 1) {
3726
+ totalDuration += getValue('totalDuration', progressValues);
3727
+ totalDuration = Number(totalDuration.toFixed(4));
3728
+ }
3729
+ else {
3730
+ totalDuration += getValue('totalDuration', progressValues);
3731
+ }
3718
3732
  }
3719
3733
  else {
3720
3734
  milestoneCount++;
@@ -5515,7 +5529,7 @@ class Timeline {
5515
5529
  this.totalTimelineWidth = 0;
5516
5530
  this.customTimelineSettings = null;
5517
5531
  this.parent.isTimelineRoundOff = this.isZoomToFit ? false : isNullOrUndefined(this.parent.projectStartDate) ? true : false;
5518
- if (this.parent.enablePersistence) {
5532
+ if (this.parent.enablePersistence && this.parent.isLoad) {
5519
5533
  this.parent.timelineSettings = this.parent.currentZoomingLevel;
5520
5534
  }
5521
5535
  }
@@ -8690,7 +8704,7 @@ class ChartRows extends DateProcessor {
8690
8704
  const splitStartDate = this.parent.dataOperation.checkStartDate(splitDate, ganttProp, false);
8691
8705
  if (splitStartDate.getTime() !== ganttProp.startDate.getTime()) {
8692
8706
  if (ganttProp.isAutoSchedule) {
8693
- if (!isNullOrUndefined(segments)) {
8707
+ if (!isNullOrUndefined(segments) && segments.length > 0) {
8694
8708
  segmentIndex = this.getSegmentIndex(splitStartDate, splitRecord);
8695
8709
  }
8696
8710
  //check atleast one day difference is there to split
@@ -9009,11 +9023,11 @@ class ChartRows extends DateProcessor {
9009
9023
  'width:' + data.ganttProperties.width + 'px;' +
9010
9024
  'height:' + taskbarHeight + 'px;>' + innerDiv + ((data.ganttProperties.startDate && data.ganttProperties.endDate &&
9011
9025
  data.ganttProperties.duration) || data.ganttProperties.duration ? '<div class="e-gantt-manualparenttaskbar-left" style=' +
9012
- (this.parent.enableRtl ? 'margin-right:0px;' : '') + '"height:' + taskbarHeight + 'px;border-left-width:' + taskbarHeight / 5 +
9026
+ (this.parent.enableRtl ? 'margin-right:0px;' : '') + '"height:' + ((taskbarHeight / 5) + 8) + 'px;border-left-width:' + taskbarHeight / 5 +
9013
9027
  'px; border-bottom:' + taskbarHeight / 5 + 'px solid transparent;"></div>' +
9014
9028
  '<div class="e-gantt-manualparenttaskbar-right" style=' + (this.parent.enableRtl ? 'margin-right:-8px;' : '') +
9015
- (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - taskbarHeight / 5) + 'px;height:' +
9016
- (taskbarHeight) + 'px;border-right-width:' + taskbarHeight / 5 + 'px;border-bottom:' +
9029
+ (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - Math.floor(((taskbarHeight / 5) + 8) / 5)) + 'px;height:' +
9030
+ ((taskbarHeight / 5) + 8) + 'px;border-right-width:' + taskbarHeight / 5 + 'px;border-bottom:' +
9017
9031
  taskbarHeight / 5 + 'px solid transparent;>' + '</div></div>' : '');
9018
9032
  const milestoneTemplate = '<div class="' + manualParentMilestone + '" style="position:absolute;' +
9019
9033
  (this.parent.enableRtl ? 'right:' : 'left:') +
@@ -9077,7 +9091,8 @@ class ChartRows extends DateProcessor {
9077
9091
  }
9078
9092
  if (isNaN(parseInt(labelString))) {
9079
9093
  labelDiv = '<span class="' + taskLabel + '" style="line-height:' +
9080
- (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
9094
+ (data['isManual'] && data.hasChildRecords ? (Math.floor((60 / 100) * this.taskBarHeight)) : (this.taskBarHeight - 1)) +
9095
+ 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
9081
9096
  'display:' + 'inline-block;' +
9082
9097
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
9083
9098
  this.taskBarHeight + 'px;">' + labelString + '</span>';
@@ -9085,7 +9100,8 @@ class ChartRows extends DateProcessor {
9085
9100
  else {
9086
9101
  labelDiv = '<span class="' +
9087
9102
  taskLabel + '" style="line-height:' +
9088
- (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
9103
+ (data['isManual'] && data.hasChildRecords ? (Math.floor((60 / 100) * this.taskBarHeight)) : (this.taskBarHeight - 1)) + 'px;' +
9104
+ (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
9089
9105
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
9090
9106
  (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
9091
9107
  (this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
@@ -9501,6 +9517,7 @@ class ChartRows extends DateProcessor {
9501
9517
  }
9502
9518
  this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
9503
9519
  }
9520
+ this.parent.ganttChartModule.updateLastRowBottomWidth();
9504
9521
  }
9505
9522
  /**
9506
9523
  * To render taskbars.
@@ -9609,9 +9626,9 @@ class ChartRows extends DateProcessor {
9609
9626
  }
9610
9627
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9611
9628
  this.templateData.ganttProperties.baselineEndDate) {
9612
- taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9629
+ taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9613
9630
  && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9614
- this.templateData.ganttProperties.isMilestone)
9631
+ this.templateData.ganttProperties.isMilestone))
9615
9632
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9616
9633
  }
9617
9634
  }
@@ -9622,9 +9639,9 @@ class ChartRows extends DateProcessor {
9622
9639
  }
9623
9640
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9624
9641
  this.templateData.ganttProperties.baselineEndDate) {
9625
- taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9642
+ taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9626
9643
  && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9627
- this.templateData.ganttProperties.isMilestone)
9644
+ this.templateData.ganttProperties.isMilestone))
9628
9645
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9629
9646
  }
9630
9647
  }
@@ -9670,9 +9687,9 @@ class ChartRows extends DateProcessor {
9670
9687
  }
9671
9688
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9672
9689
  this.templateData.ganttProperties.baselineEndDate) {
9673
- taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9690
+ taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9674
9691
  && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9675
- this.templateData.ganttProperties.isMilestone)
9692
+ this.templateData.ganttProperties.isMilestone))
9676
9693
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9677
9694
  }
9678
9695
  }
@@ -9771,6 +9788,10 @@ class ChartRows extends DateProcessor {
9771
9788
  const taskbarElement = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ? trElement :
9772
9789
  trElement.querySelector('.' + taskBarMainContainer);
9773
9790
  let rowElement;
9791
+ let segmentRowElement;
9792
+ if (data.ganttProperties.segments && data.ganttProperties.segments.length > 0) {
9793
+ segmentRowElement = trElement.parentElement.parentElement.parentElement;
9794
+ }
9774
9795
  let triggerTaskbarElement;
9775
9796
  const args = {
9776
9797
  data: data,
@@ -9783,7 +9804,8 @@ class ChartRows extends DateProcessor {
9783
9804
  args.milestoneColor = taskbarElement.querySelector(classCollections[0]) ?
9784
9805
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).borderBottomColor : null;
9785
9806
  args.baselineColor = trElement.querySelector(classCollections[1]) ?
9786
- getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor : null;
9807
+ getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor :
9808
+ (trElement.querySelector('.' + baselineBar) ? getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor : null);
9787
9809
  }
9788
9810
  else {
9789
9811
  const childTask = taskbarElement.querySelector(classCollections[0]);
@@ -9800,17 +9822,33 @@ class ChartRows extends DateProcessor {
9800
9822
  getComputedStyle(taskbarElement.querySelector(classCollections[1])).backgroundColor;
9801
9823
  // args.progressBarBorderColor = taskbarElement.querySelector(progressBarClass) ?
9802
9824
  // getComputedStyle(taskbarElement.querySelector(progressBarClass)).borderColor : null;
9803
- args.baselineColor = trElement.querySelector('.' + baselineBar) ?
9804
- getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor : null;
9825
+ if (segmentRowElement) {
9826
+ args.baselineColor = segmentRowElement.querySelector('.' + baselineBar) ?
9827
+ getComputedStyle(segmentRowElement.querySelector('.' + baselineBar)).backgroundColor : null;
9828
+ }
9829
+ else {
9830
+ args.baselineColor = trElement.querySelector('.' + baselineBar) ?
9831
+ getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor : null;
9832
+ }
9805
9833
  args.taskLabelColor = taskbarElement.querySelector('.' + taskLabel) ?
9806
9834
  getComputedStyle(taskbarElement.querySelector('.' + taskLabel)).color : null;
9807
9835
  }
9808
- args.rightLabelColor = trElement.querySelector('.' + rightLabelContainer) &&
9809
- (trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label) ?
9810
- getComputedStyle((trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label)).color : null;
9811
- args.leftLabelColor = trElement.querySelector('.' + leftLabelContainer) &&
9812
- (trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label) ?
9813
- getComputedStyle((trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label)).color : null;
9836
+ if (segmentRowElement) {
9837
+ args.rightLabelColor = segmentRowElement.querySelector('.' + rightLabelContainer) &&
9838
+ (segmentRowElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label) ?
9839
+ getComputedStyle((segmentRowElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label)).color : null;
9840
+ args.leftLabelColor = segmentRowElement.querySelector('.' + leftLabelContainer) &&
9841
+ (segmentRowElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label) ?
9842
+ getComputedStyle((segmentRowElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label)).color : null;
9843
+ }
9844
+ else {
9845
+ args.rightLabelColor = trElement.querySelector('.' + rightLabelContainer) &&
9846
+ (trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label) ?
9847
+ getComputedStyle((trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label)).color : null;
9848
+ args.leftLabelColor = trElement.querySelector('.' + leftLabelContainer) &&
9849
+ (trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label) ?
9850
+ getComputedStyle((trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label)).color : null;
9851
+ }
9814
9852
  this.parent.trigger('queryTaskbarInfo', args, (taskbarArgs) => {
9815
9853
  this.updateQueryTaskbarInfoArgs(taskbarArgs, rowElement, triggerTaskbarElement);
9816
9854
  });
@@ -9828,6 +9866,10 @@ class ChartRows extends DateProcessor {
9828
9866
  const trElement = args.rowElement;
9829
9867
  const taskbarElement = args.taskbarElement;
9830
9868
  const classCollections = this.getClassName(args);
9869
+ let segmentRowElement;
9870
+ if (args.data.ganttProperties.segments && args.data.ganttProperties.segments.length > 0) {
9871
+ segmentRowElement = trElement.parentElement.parentElement.parentElement;
9872
+ }
9831
9873
  if (args.taskbarType === 'Milestone') {
9832
9874
  if (taskbarElement.querySelector(classCollections[0]) &&
9833
9875
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).borderBottomColor !== args.milestoneColor) {
@@ -9839,6 +9881,10 @@ class ChartRows extends DateProcessor {
9839
9881
  trElement.querySelector(classCollections[1]).style.borderBottomColor = args.baselineColor;
9840
9882
  trElement.querySelector('.' + baselineMilestoneBottom).style.borderTopColor = args.baselineColor;
9841
9883
  }
9884
+ if (trElement.querySelector('.' + baselineBar) &&
9885
+ getComputedStyle(trElement.querySelector('.' + baselineBar)).borderTopColor !== args.baselineColor) {
9886
+ trElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
9887
+ }
9842
9888
  }
9843
9889
  else {
9844
9890
  if (taskbarElement.querySelector(classCollections[0]) &&
@@ -9873,20 +9919,42 @@ class ChartRows extends DateProcessor {
9873
9919
  getComputedStyle(taskbarElement.querySelector('.' + taskLabel)).color !== args.taskLabelColor) {
9874
9920
  taskbarElement.querySelector('.' + taskLabel).style.color = args.taskLabelColor;
9875
9921
  }
9876
- if (trElement.querySelector('.' + baselineBar) &&
9877
- getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor !== args.baselineColor) {
9878
- trElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
9922
+ if (segmentRowElement) {
9923
+ if (segmentRowElement.querySelector('.' + baselineBar) &&
9924
+ getComputedStyle(segmentRowElement.querySelector('.' + baselineBar)).backgroundColor !== args.baselineColor) {
9925
+ segmentRowElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
9926
+ }
9927
+ }
9928
+ else {
9929
+ if (trElement.querySelector('.' + baselineBar) &&
9930
+ getComputedStyle(trElement.querySelector('.' + baselineBar)).backgroundColor !== args.baselineColor) {
9931
+ trElement.querySelector('.' + baselineBar).style.backgroundColor = args.baselineColor;
9932
+ }
9879
9933
  }
9880
9934
  }
9881
- if (trElement.querySelector('.' + leftLabelContainer) &&
9882
- (trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label) &&
9883
- getComputedStyle((trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label)).color !== args.leftLabelColor) {
9884
- (trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label).style.color = args.leftLabelColor;
9935
+ if (segmentRowElement) {
9936
+ if (segmentRowElement.querySelector('.' + leftLabelContainer) &&
9937
+ (segmentRowElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label) &&
9938
+ getComputedStyle((segmentRowElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label)).color !== args.leftLabelColor) {
9939
+ (segmentRowElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label).style.color = args.leftLabelColor;
9940
+ }
9941
+ if (segmentRowElement.querySelector('.' + rightLabelContainer) &&
9942
+ (segmentRowElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label) &&
9943
+ getComputedStyle((segmentRowElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label)).color !== args.rightLabelColor) {
9944
+ (segmentRowElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label).style.color = args.rightLabelColor;
9945
+ }
9885
9946
  }
9886
- if (trElement.querySelector('.' + rightLabelContainer) &&
9887
- (trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label) &&
9888
- getComputedStyle((trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label)).color !== args.rightLabelColor) {
9889
- (trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label).style.color = args.rightLabelColor;
9947
+ else {
9948
+ if (trElement.querySelector('.' + leftLabelContainer) &&
9949
+ (trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label) &&
9950
+ getComputedStyle((trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label)).color !== args.leftLabelColor) {
9951
+ (trElement.querySelector('.' + leftLabelContainer)).querySelector('.' + label).style.color = args.leftLabelColor;
9952
+ }
9953
+ if (trElement.querySelector('.' + rightLabelContainer) &&
9954
+ (trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label) &&
9955
+ getComputedStyle((trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label)).color !== args.rightLabelColor) {
9956
+ (trElement.querySelector('.' + rightLabelContainer)).querySelector('.' + label).style.color = args.rightLabelColor;
9957
+ }
9890
9958
  }
9891
9959
  }
9892
9960
  getClassName(args) {
@@ -10495,9 +10563,9 @@ class Dependency {
10495
10563
  const flatData = this.parent.flatData;
10496
10564
  const totLength = this.parent.flatData.length;
10497
10565
  for (let count = 0; count < totLength; count++) {
10498
- if (flatData[count].ganttProperties.predecessor) {
10566
+ if (flatData[count].ganttProperties.predecessorsName) {
10499
10567
  this.validatePredecessorDates(flatData[count]);
10500
- if (flatData[count].hasChildRecords && this.parent.editModule) {
10568
+ if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks) {
10501
10569
  this.parent.editModule['updateChildItems'](flatData[count]);
10502
10570
  }
10503
10571
  }
@@ -10509,6 +10577,9 @@ class Dependency {
10509
10577
  for (let i = parentPredecessorLength - 1; i >= 0; i--) {
10510
10578
  let item = this.parentPredecessors[i];
10511
10579
  this.validatePredecessorDates(item);
10580
+ if (item.ganttProperties.startDate) {
10581
+ this.parent.editModule['updateChildItems'](item);
10582
+ }
10512
10583
  }
10513
10584
  }
10514
10585
  }
@@ -15104,18 +15175,24 @@ let Gantt = class Gantt extends Component {
15104
15175
  */
15105
15176
  /* eslint-disable-next-line */
15106
15177
  setRecordValue(field, value, record, isTaskData) {
15178
+ value = isUndefined(value) ? null : value;
15107
15179
  if (this.isOnEdit || this.isOnDelete) {
15108
15180
  this.makeCloneData(field, record, isTaskData);
15109
- const id = isTaskData ? record.rowUniqueID : record.ganttProperties.rowUniqueID;
15181
+ const ganttData = isTaskData ? record : record.ganttProperties;
15182
+ const id = ganttData.rowUniqueID;
15110
15183
  const task = this.getRecordByID(id);
15111
- if (task && this.editedRecords.indexOf(task) === -1) {
15184
+ let isValid = false;
15185
+ if (isNullOrUndefined(value) || (!isNullOrUndefined(value) && !isNullOrUndefined(ganttData[field]) && (value instanceof Date ? value.getTime() !==
15186
+ ganttData[field].getTime() : ganttData[field] !== value))) {
15187
+ isValid = true;
15188
+ }
15189
+ if (task && ((this.editedRecords.indexOf(task) === -1 && isValid) || this.editedRecords.length === 0)) {
15112
15190
  this.editedRecords.push(task);
15113
15191
  if (this.enableImmutableMode) {
15114
15192
  this.modifiedRecords.push(task);
15115
15193
  }
15116
15194
  }
15117
15195
  }
15118
- value = isUndefined(value) ? null : value;
15119
15196
  setValue(field, value, record);
15120
15197
  }
15121
15198
  makeCloneData(field, record, isTaskData) {
@@ -22978,7 +23055,9 @@ class Edit$2 {
22978
23055
  if ((key === tasks.baselineStartDate || key === tasks.baselineEndDate) &&
22979
23056
  (ganttData.ganttProperties.baselineStartDate && ganttData.ganttProperties.baselineEndDate)) {
22980
23057
  ganttObj.setRecordValue('baselineStartDate', ganttObj.dataOperation.checkBaselineStartDate(ganttData.ganttProperties.baselineStartDate), ganttData.ganttProperties, true);
22981
- ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
23058
+ if (ganttData.ganttProperties.baselineEndDate && ganttData.ganttProperties.baselineEndDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
23059
+ ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
23060
+ }
22982
23061
  ganttObj.setRecordValue('baselineEndDate', ganttObj.dataOperation.checkBaselineEndDate(ganttData.ganttProperties.baselineEndDate), ganttData.ganttProperties, true);
22983
23062
  ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(ganttData.ganttProperties), ganttData.ganttProperties, true);
22984
23063
  ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(ganttData.ganttProperties), ganttData.ganttProperties, true);
@@ -25295,6 +25374,12 @@ class Edit$2 {
25295
25374
  else {
25296
25375
  this.parent.showSpinner();
25297
25376
  }
25377
+ const tasks = this.parent.taskFields;
25378
+ const ganttData = this.parent.viewType === 'ResourceView' ?
25379
+ this.parent.flatData[this.parent.getTaskIds().indexOf('T' + args.data[tasks.id])] : this.parent.getRecordByID(args.data[tasks.id]);
25380
+ if (!isNullOrUndefined(ganttData)) {
25381
+ this.validateUpdateValues(args.newTaskData, ganttData, true);
25382
+ }
25298
25383
  if (!isNullOrUndefined(args.data[tempTaskID])) {
25299
25384
  if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
25300
25385
  args.data['ganttProperties']['taskId'] = args.data[tempTaskID];