@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.
@@ -25237,6 +25237,13 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
25237
25237
  if (ganttData.ganttProperties.baselineEndDate && ganttData.ganttProperties.baselineEndDate.getHours() === 0 && this.parent.defaultEndTime !== 86400) {
25238
25238
  ganttObj.dataOperation.setTime(this.parent.defaultEndTime, ganttData.ganttProperties.baselineEndDate);
25239
25239
  }
25240
+ if ((ganttData.ganttProperties.baselineStartDate && ganttData.ganttProperties.baselineEndDate &&
25241
+ (ganttData.ganttProperties.baselineStartDate.getTime() > ganttData.ganttProperties.baselineEndDate.getTime())) ||
25242
+ ((!isNullOrUndefined(ganttData.ganttProperties.baselineStartDate) && !isNullOrUndefined(ganttData.ganttProperties.startDate) && (ganttData.ganttProperties.baselineStartDate.getTime() === ganttData.ganttProperties.startDate.getTime()))
25243
+ && (!isNullOrUndefined(ganttData.ganttProperties.baselineEndDate) && !isNullOrUndefined(ganttData.ganttProperties.endDate) && (ganttData.ganttProperties.baselineEndDate.toLocaleDateString() === ganttData.ganttProperties.endDate.toLocaleDateString())) &&
25244
+ ganttData.ganttProperties.isMilestone)) {
25245
+ ganttData.ganttProperties.baselineEndDate = ganttData.ganttProperties.baselineStartDate;
25246
+ }
25240
25247
  ganttObj.setRecordValue('baselineEndDate', ganttObj.dataOperation.checkBaselineEndDate(ganttData.ganttProperties.baselineEndDate), ganttData.ganttProperties, true);
25241
25248
  ganttObj.setRecordValue('baselineLeft', ganttObj.dataOperation.calculateBaselineLeft(ganttData.ganttProperties), ganttData.ganttProperties, true);
25242
25249
  ganttObj.setRecordValue('baselineWidth', ganttObj.dataOperation.calculateBaselineWidth(ganttData.ganttProperties), ganttData.ganttProperties, true);
@@ -31324,8 +31331,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
31324
31331
  if (record.ganttProperties.progress < 100) {
31325
31332
  record.isCritical = true;
31326
31333
  record.ganttProperties.isCritical = true;
31327
- if (criticalPathIds.indexOf(parseInt(record.ganttProperties.taskId)) == -1) {
31328
- criticalPathIds.push(parseInt(record.ganttProperties.taskId));
31334
+ if (criticalPathIds.indexOf(record.ganttProperties.taskId) == -1) {
31335
+ criticalPathIds.push(record.ganttProperties.taskId);
31329
31336
  }
31330
31337
  }
31331
31338
  }
@@ -31347,9 +31354,11 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
31347
31354
  fromRecord.slack = record.slack;
31348
31355
  fromRecord.isCritical = record.ganttProperties.isCritical;
31349
31356
  fromRecord.ganttProperties.isCritical = record.ganttProperties.isCritical;
31350
- if (criticalPathIds.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
31357
+ if (criticalPathIds.indexOf(fromRecord.ganttProperties.taskId) === -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
31351
31358
  this.validatedids.push(parseInt(fromRecord.ganttProperties.taskId));
31352
- criticalPathIds.push(parseInt(fromRecord.ganttProperties.taskId));
31359
+ if (this.criticalTasks.indexOf(fromRecord) === -1) {
31360
+ this.criticalTasks.push(fromRecord);
31361
+ }
31353
31362
  }
31354
31363
  if (fromRecord.ganttProperties.predecessorsName) {
31355
31364
  this.updateCriticalTasks(fromRecord, criticalPathIds);
@@ -31434,7 +31443,9 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
31434
31443
  if (flatRecords[index].ganttProperties.progress < 100) {
31435
31444
  flatRecords[index].isCritical = true;
31436
31445
  flatRecords[index].ganttProperties.isCritical = true;
31437
- this.criticalTasks.push(flatRecords[index]);
31446
+ if (this.criticalTasks.indexOf(flatRecords[index]) == -1) {
31447
+ this.criticalTasks.push(flatRecords[index]);
31448
+ }
31438
31449
  if (criticalPathIds.indexOf(collection[x]['taskid']) === -1) {
31439
31450
  criticalPathIds.push(collection[x]['taskid']);
31440
31451
  }