@syncfusion/ej2-gantt 23.1.39 → 23.1.41

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.
@@ -24704,6 +24704,13 @@ class Edit$2 {
24704
24704
  if (ganttData.ganttProperties.baselineEndDate && ganttData.ganttProperties.baselineEndDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
24705
24705
  ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
24706
24706
  }
24707
+ if ((ganttData.ganttProperties.baselineStartDate && ganttData.ganttProperties.baselineEndDate &&
24708
+ (ganttData.ganttProperties.baselineStartDate.getTime() > ganttData.ganttProperties.baselineEndDate.getTime())) ||
24709
+ ((!isNullOrUndefined(ganttData.ganttProperties.baselineStartDate) && !isNullOrUndefined(ganttData.ganttProperties.startDate) && (ganttData.ganttProperties.baselineStartDate.getTime() === ganttData.ganttProperties.startDate.getTime()))
24710
+ && (!isNullOrUndefined(ganttData.ganttProperties.baselineEndDate) && !isNullOrUndefined(ganttData.ganttProperties.endDate) && (ganttData.ganttProperties.baselineEndDate.toLocaleDateString() === ganttData.ganttProperties.endDate.toLocaleDateString())) &&
24711
+ ganttData.ganttProperties.isMilestone)) {
24712
+ ganttData.ganttProperties.baselineEndDate = ganttData.ganttProperties.baselineStartDate;
24713
+ }
24707
24714
  ganttObj.setRecordValue('baselineEndDate', ganttObj.dataOperation.checkBaselineEndDate(ganttData.ganttProperties.baselineEndDate), ganttData.ganttProperties, true);
24708
24715
  ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(ganttData.ganttProperties), ganttData.ganttProperties, true);
24709
24716
  ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(ganttData.ganttProperties), ganttData.ganttProperties, true);
@@ -30740,8 +30747,8 @@ class CriticalPath {
30740
30747
  if (record.ganttProperties.progress < 100) {
30741
30748
  record.isCritical = true;
30742
30749
  record.ganttProperties.isCritical = true;
30743
- if (criticalPathIds.indexOf(parseInt(record.ganttProperties.taskId)) == -1) {
30744
- criticalPathIds.push(parseInt(record.ganttProperties.taskId));
30750
+ if (criticalPathIds.indexOf(record.ganttProperties.taskId) == -1) {
30751
+ criticalPathIds.push(record.ganttProperties.taskId);
30745
30752
  }
30746
30753
  }
30747
30754
  }
@@ -30763,9 +30770,11 @@ class CriticalPath {
30763
30770
  fromRecord.slack = record.slack;
30764
30771
  fromRecord.isCritical = record.ganttProperties.isCritical;
30765
30772
  fromRecord.ganttProperties.isCritical = record.ganttProperties.isCritical;
30766
- if (criticalPathIds.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
30773
+ if (criticalPathIds.indexOf(fromRecord.ganttProperties.taskId) === -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
30767
30774
  this.validatedids.push(parseInt(fromRecord.ganttProperties.taskId));
30768
- criticalPathIds.push(parseInt(fromRecord.ganttProperties.taskId));
30775
+ if (this.criticalTasks.indexOf(fromRecord) === -1) {
30776
+ this.criticalTasks.push(fromRecord);
30777
+ }
30769
30778
  }
30770
30779
  if (fromRecord.ganttProperties.predecessorsName) {
30771
30780
  this.updateCriticalTasks(fromRecord, criticalPathIds);
@@ -30850,7 +30859,9 @@ class CriticalPath {
30850
30859
  if (flatRecords[index].ganttProperties.progress < 100) {
30851
30860
  flatRecords[index].isCritical = true;
30852
30861
  flatRecords[index].ganttProperties.isCritical = true;
30853
- this.criticalTasks.push(flatRecords[index]);
30862
+ if (this.criticalTasks.indexOf(flatRecords[index]) == -1) {
30863
+ this.criticalTasks.push(flatRecords[index]);
30864
+ }
30854
30865
  if (criticalPathIds.indexOf(collection[x]['taskid']) === -1) {
30855
30866
  criticalPathIds.push(collection[x]['taskid']);
30856
30867
  }