@syncfusion/ej2-gantt 24.2.6 → 24.2.8
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.
- package/CHANGELOG.md +27 -0
- package/dist/ej2-gantt.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +295 -170
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +295 -170
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +16 -16
- package/src/gantt/actions/connector-line-edit.js +33 -5
- package/src/gantt/actions/dependency.d.ts +23 -0
- package/src/gantt/actions/dependency.js +176 -12
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/actions/edit.d.ts +1 -22
- package/src/gantt/actions/edit.js +9 -129
- package/src/gantt/actions/selection.js +8 -1
- package/src/gantt/actions/taskbar-edit.js +20 -4
- package/src/gantt/base/date-processor.js +10 -3
- package/src/gantt/base/gantt.js +14 -1
- package/src/gantt/base/task-processor.js +22 -10
- package/src/gantt/base/tree-grid.js +1 -1
- package/src/gantt/renderer/timeline.js +2 -4
- package/styles/bootstrap.css +3 -3
- package/styles/gantt/bootstrap.css +3 -3
|
@@ -1279,9 +1279,16 @@ var DateProcessor = /** @__PURE__ @class */ (function () {
|
|
|
1279
1279
|
DateProcessor.prototype.convert = function (date, timezone) {
|
|
1280
1280
|
var fromOffset = date.getTimezoneOffset();
|
|
1281
1281
|
var toOffset = this.offset(date, timezone);
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1282
|
+
if (fromOffset < 0) {
|
|
1283
|
+
date = new Date(date.getTime() - (fromOffset - toOffset) / 60000);
|
|
1284
|
+
var toLocalOffset = date.getTimezoneOffset();
|
|
1285
|
+
return new Date(date.getTime() - (toLocalOffset - fromOffset) / 60000);
|
|
1286
|
+
}
|
|
1287
|
+
else {
|
|
1288
|
+
date = new Date(date.getTime() + (fromOffset - toOffset) * 60000);
|
|
1289
|
+
var toLocalOffset = date.getTimezoneOffset();
|
|
1290
|
+
return new Date(date.getTime() + (toLocalOffset - fromOffset) * 60000);
|
|
1291
|
+
}
|
|
1285
1292
|
};
|
|
1286
1293
|
/**
|
|
1287
1294
|
* @param {string | Date} date .
|
|
@@ -2256,12 +2263,14 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2256
2263
|
work = parseFloat(work.toFixed(2));
|
|
2257
2264
|
}
|
|
2258
2265
|
}
|
|
2259
|
-
if (ganttData.childRecords
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2266
|
+
if (ganttData.childRecords) {
|
|
2267
|
+
if (ganttData.childRecords.length > 0 && this.parent.isOnEdit) {
|
|
2268
|
+
var childCompletedWorks = 0;
|
|
2269
|
+
for (var i = 0; i < ganttData.childRecords.length; i++) {
|
|
2270
|
+
childCompletedWorks += ganttData.childRecords[i].ganttProperties.work;
|
|
2271
|
+
}
|
|
2272
|
+
work += childCompletedWorks;
|
|
2263
2273
|
}
|
|
2264
|
-
work += childCompletedWorks;
|
|
2265
2274
|
}
|
|
2266
2275
|
this.parent.setRecordValue('work', work, ganttData.ganttProperties, true);
|
|
2267
2276
|
if (!isNullOrUndefined(this.parent.taskFields.work)) {
|
|
@@ -2477,7 +2486,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2477
2486
|
this.parent.setRecordValue('work', work, ganttProperties, true);
|
|
2478
2487
|
switch (tType) {
|
|
2479
2488
|
case 'FixedDuration':
|
|
2480
|
-
this.
|
|
2489
|
+
this.updateWorkWithDuration(ganttData);
|
|
2481
2490
|
break;
|
|
2482
2491
|
case 'FixedWork':
|
|
2483
2492
|
this.updateUnitWithWork(ganttData);
|
|
@@ -2833,7 +2842,12 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2833
2842
|
return ((this.getTimeDifference(sDate, eDate, true) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
|
|
2834
2843
|
}
|
|
2835
2844
|
else {
|
|
2836
|
-
|
|
2845
|
+
if (ganttData.durationUnit === "day" && ganttData.duration < 1 && isNullOrUndefined(this.parent.taskFields.duration)) {
|
|
2846
|
+
return (ganttData.duration * this.parent.perDayWidth);
|
|
2847
|
+
}
|
|
2848
|
+
else {
|
|
2849
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * hour)) * this.parent.perDayWidth);
|
|
2850
|
+
}
|
|
2837
2851
|
}
|
|
2838
2852
|
}
|
|
2839
2853
|
}
|
|
@@ -2844,6 +2858,7 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2844
2858
|
}
|
|
2845
2859
|
if (this.getSecondsInDecimal(eDate) === this.parent.defaultEndTime) {
|
|
2846
2860
|
eDate.setHours(24);
|
|
2861
|
+
eDate.setHours(0, 0, 0, 0);
|
|
2847
2862
|
}
|
|
2848
2863
|
if (this.getSecondsInDecimal(eDate) === this.parent.defaultStartTime) {
|
|
2849
2864
|
eDate.setHours(0, 0, 0, 0);
|
|
@@ -2886,14 +2901,18 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2886
2901
|
this.parent.ganttChartModule.scrollObject['isSetScrollLeft'])) && !isFromTimelineVirtulization) {
|
|
2887
2902
|
isValid = false;
|
|
2888
2903
|
}
|
|
2889
|
-
if (this.parent.enableTimelineVirtualization && isValid && !this.parent.timelineModule['performedTimeSpanAction']) {
|
|
2904
|
+
if (!this.parent.editModule && this.parent.enableTimelineVirtualization && isValid && !this.parent.timelineModule['performedTimeSpanAction']) {
|
|
2890
2905
|
leftValueForStartDate = (this.parent.enableTimelineVirtualization && this.parent.ganttChartModule.scrollObject.element.scrollLeft != 0)
|
|
2891
2906
|
? this.parent.ganttChartModule.scrollObject.getTimelineLeft() : null;
|
|
2892
2907
|
}
|
|
2893
|
-
var timelineStartDate = (this.parent.enableTimelineVirtualization && !isNullOrUndefined(leftValueForStartDate))
|
|
2908
|
+
var timelineStartDate = (!this.parent.editModule && this.parent.enableTimelineVirtualization && !isNullOrUndefined(leftValueForStartDate))
|
|
2894
2909
|
? new Date((this.parent.timelineModule['dateByLeftValue'](leftValueForStartDate)).toString()) : new Date(this.parent.timelineModule.timelineStartDate);
|
|
2895
2910
|
if (timelineStartDate) {
|
|
2896
|
-
|
|
2911
|
+
var leftValue = (date.getTime() - timelineStartDate.getTime()) / (1000 * 60 * 60 * 24) * this.parent.perDayWidth;
|
|
2912
|
+
if (this.parent.isInDst(timelineStartDate) && !this.parent.isInDst(startDate) && (this.parent.timelineModule.topTier == 'Hour' || this.parent.timelineModule.bottomTier == 'Hour')) {
|
|
2913
|
+
leftValue = leftValue - this.parent.timelineSettings.timelineUnitSize;
|
|
2914
|
+
}
|
|
2915
|
+
return leftValue;
|
|
2897
2916
|
}
|
|
2898
2917
|
else {
|
|
2899
2918
|
return 0;
|
|
@@ -6380,10 +6399,8 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6380
6399
|
this.parent.dateValidationModule.calculateProjectDates();
|
|
6381
6400
|
}
|
|
6382
6401
|
if (!isNullOrUndefined(this.parent.zoomingProjectStartDate)) {
|
|
6383
|
-
this.parent.cloneProjectStartDate = this.parent.
|
|
6384
|
-
|
|
6385
|
-
this.parent.cloneProjectEndDate = this.parent.cloneProjectEndDate.getTime() > this.parent.zoomingProjectEndDate.getTime()
|
|
6386
|
-
? this.parent.cloneProjectEndDate : this.parent.zoomingProjectEndDate;
|
|
6402
|
+
this.parent.cloneProjectStartDate = this.parent.zoomingProjectStartDate;
|
|
6403
|
+
this.parent.cloneProjectEndDate = this.parent.zoomingProjectEndDate;
|
|
6387
6404
|
}
|
|
6388
6405
|
this.parent.zoomingProjectStartDate = null;
|
|
6389
6406
|
this.parent.zoomingProjectEndDate = null;
|
|
@@ -8452,7 +8469,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
8452
8469
|
this.currentEditRow = {};
|
|
8453
8470
|
}
|
|
8454
8471
|
}
|
|
8455
|
-
if (getValue('requestType', args) === '
|
|
8472
|
+
if (getValue('requestType', args) === 'filterAfterOpen') {
|
|
8456
8473
|
this.parent.notify('actionComplete', args);
|
|
8457
8474
|
}
|
|
8458
8475
|
if (getValue('requestType', args) === 'searching') {
|
|
@@ -11991,6 +12008,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
11991
12008
|
this.parentIds = [];
|
|
11992
12009
|
this.parentPredecessors = [];
|
|
11993
12010
|
this.validatedParentIds = [];
|
|
12011
|
+
this.storeId = null;
|
|
11994
12012
|
this.parent = gantt;
|
|
11995
12013
|
this.dateValidateModule = this.parent.dateValidationModule;
|
|
11996
12014
|
}
|
|
@@ -12028,7 +12046,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12028
12046
|
for (var c = 0; c < predecessorVal.length; c++) {
|
|
12029
12047
|
var predecessorItem = predecessorVal[c];
|
|
12030
12048
|
var preValue = {};
|
|
12031
|
-
preValue.from = getValue('from', predecessorItem);
|
|
12049
|
+
preValue.from = getValue('from', predecessorItem) ? getValue('from', predecessorItem) : predecessorVal[c];
|
|
12032
12050
|
preValue.to = getValue('to', predecessorItem) ? getValue('to', predecessorItem) : ganttProp.rowUniqueID;
|
|
12033
12051
|
preValue.type = getValue('type', predecessorItem) ? getValue('type', predecessorItem) : 'FS';
|
|
12034
12052
|
var offsetUnits = getValue('offset', predecessorItem);
|
|
@@ -12113,6 +12131,9 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12113
12131
|
var predecessorText;
|
|
12114
12132
|
predecessor.split(',').forEach(function (el) {
|
|
12115
12133
|
var isGUId = false;
|
|
12134
|
+
var firstPart;
|
|
12135
|
+
var predecessorName;
|
|
12136
|
+
var isAlpha = false;
|
|
12116
12137
|
var regex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
12117
12138
|
var elSplit = el.split('-');
|
|
12118
12139
|
var id;
|
|
@@ -12126,6 +12147,26 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12126
12147
|
isGUId = true;
|
|
12127
12148
|
}
|
|
12128
12149
|
}
|
|
12150
|
+
if (el.includes('-')) {
|
|
12151
|
+
if (el.includes('-') && el.includes('days')) {
|
|
12152
|
+
predecessorName = el.slice(-9).toString();
|
|
12153
|
+
}
|
|
12154
|
+
if (el.includes('-') && el.includes('day')) {
|
|
12155
|
+
predecessorName = el.slice(-8).toString();
|
|
12156
|
+
}
|
|
12157
|
+
else {
|
|
12158
|
+
predecessorName = el.slice(-2).toString();
|
|
12159
|
+
}
|
|
12160
|
+
if (el.includes('-') && /[A-Za-z]/.test(predecessorName)) {
|
|
12161
|
+
var indexFS = el.indexOf(predecessorName);
|
|
12162
|
+
if (indexFS !== -1) {
|
|
12163
|
+
firstPart = el.substring(0, indexFS);
|
|
12164
|
+
if (firstPart.includes('-')) {
|
|
12165
|
+
isAlpha = true;
|
|
12166
|
+
}
|
|
12167
|
+
}
|
|
12168
|
+
}
|
|
12169
|
+
}
|
|
12129
12170
|
if (isGUId) {
|
|
12130
12171
|
var split = void 0;
|
|
12131
12172
|
split = elSplit[4].split('+');
|
|
@@ -12154,11 +12195,16 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12154
12195
|
}
|
|
12155
12196
|
}
|
|
12156
12197
|
else {
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12198
|
+
if (isAlpha && firstPart.includes('-')) {
|
|
12199
|
+
values[0] = firstPart;
|
|
12200
|
+
}
|
|
12201
|
+
else {
|
|
12202
|
+
values = el.split('+');
|
|
12203
|
+
offsetValue = '+';
|
|
12204
|
+
if (el.indexOf('-') >= 0) {
|
|
12205
|
+
values = el.split('-');
|
|
12206
|
+
offsetValue = '-';
|
|
12207
|
+
}
|
|
12162
12208
|
}
|
|
12163
12209
|
}
|
|
12164
12210
|
match = [];
|
|
@@ -12196,6 +12242,16 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12196
12242
|
predecessorText = 'FS';
|
|
12197
12243
|
}
|
|
12198
12244
|
}
|
|
12245
|
+
else if (el.includes('-') && /[A-Za-z]/.test(predecessorName) && firstPart.includes('-')) {
|
|
12246
|
+
var type = el.slice(-2).toString();
|
|
12247
|
+
type.toUpperCase();
|
|
12248
|
+
if (type === 'FS' || type === 'FF' || type === 'SF' || type === 'SS') {
|
|
12249
|
+
predecessorText = type;
|
|
12250
|
+
}
|
|
12251
|
+
else {
|
|
12252
|
+
predecessorText = 'FS';
|
|
12253
|
+
}
|
|
12254
|
+
}
|
|
12199
12255
|
else {
|
|
12200
12256
|
predecessorText = 'FS';
|
|
12201
12257
|
}
|
|
@@ -12429,7 +12485,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12429
12485
|
}
|
|
12430
12486
|
if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
|
|
12431
12487
|
&& this.parent.allowParentDependency) {
|
|
12432
|
-
this.
|
|
12488
|
+
this.updateChildItems(flatData[count]);
|
|
12433
12489
|
}
|
|
12434
12490
|
}
|
|
12435
12491
|
}
|
|
@@ -12441,7 +12497,7 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12441
12497
|
var item = this.parentPredecessors[i];
|
|
12442
12498
|
this.validatePredecessorDates(item);
|
|
12443
12499
|
if (item.ganttProperties.startDate) {
|
|
12444
|
-
this.
|
|
12500
|
+
this.updateChildItems(item);
|
|
12445
12501
|
}
|
|
12446
12502
|
}
|
|
12447
12503
|
}
|
|
@@ -12819,7 +12875,15 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12819
12875
|
continue;
|
|
12820
12876
|
}
|
|
12821
12877
|
if (record) {
|
|
12822
|
-
this.
|
|
12878
|
+
if (this.parent.editModule.isFirstCall) {
|
|
12879
|
+
this.storeId = JSON.parse(JSON.stringify(this.parent.ids));
|
|
12880
|
+
this.parent.editModule.isFirstCall = false;
|
|
12881
|
+
}
|
|
12882
|
+
var index = (this.storeId && this.storeId.indexOf(record[this.parent.taskFields.id].toString()) !== -1) ? this.storeId.indexOf(record[this.parent.taskFields.id].toString()) : -1;
|
|
12883
|
+
if (index !== -1) {
|
|
12884
|
+
this.storeId = this.storeId.slice(0, index).concat(this.storeId.slice(index + 1));
|
|
12885
|
+
this.validatePredecessor(record, undefined, 'successor');
|
|
12886
|
+
}
|
|
12823
12887
|
}
|
|
12824
12888
|
}
|
|
12825
12889
|
if (record && !record.hasChildRecords && record.parentItem && this.validatedParentIds.indexOf(record.parentItem.taskId) == -1) {
|
|
@@ -12834,13 +12898,13 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12834
12898
|
if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
|
|
12835
12899
|
if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
|
|
12836
12900
|
if (!ganttProp.hasChildRecords && record.hasChildRecords) {
|
|
12837
|
-
this.
|
|
12901
|
+
this.updateChildItems(record);
|
|
12838
12902
|
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
12839
12903
|
}
|
|
12840
12904
|
}
|
|
12841
12905
|
else if ((!record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
|
|
12842
12906
|
(record.hasChildRecords && taskBarModule.taskBarEditAction == 'ParentDrag')) {
|
|
12843
|
-
this.
|
|
12907
|
+
this.updateChildItems(record);
|
|
12844
12908
|
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
12845
12909
|
}
|
|
12846
12910
|
if (!ganttProp.hasChildRecords) {
|
|
@@ -12848,11 +12912,128 @@ var Dependency = /** @__PURE__ @class */ (function () {
|
|
|
12848
12912
|
}
|
|
12849
12913
|
}
|
|
12850
12914
|
else if (record && record.hasChildRecords && !ganttProp) {
|
|
12851
|
-
this.
|
|
12915
|
+
this.updateChildItems(record);
|
|
12852
12916
|
}
|
|
12853
12917
|
}
|
|
12854
12918
|
}
|
|
12855
12919
|
};
|
|
12920
|
+
/**
|
|
12921
|
+
*
|
|
12922
|
+
* @param {IGanttData} ganttRecord .
|
|
12923
|
+
* @returns {void} .
|
|
12924
|
+
*/
|
|
12925
|
+
Dependency.prototype.updateChildItems = function (ganttRecord) {
|
|
12926
|
+
var previousData = this.parent.previousRecords[ganttRecord.uniqueID];
|
|
12927
|
+
var previousStartDate;
|
|
12928
|
+
if (isNullOrUndefined(previousData) ||
|
|
12929
|
+
(isNullOrUndefined(previousData) && !isNullOrUndefined(previousData.ganttProperties))) {
|
|
12930
|
+
previousStartDate = new Date(ganttRecord.ganttProperties.startDate.getTime());
|
|
12931
|
+
}
|
|
12932
|
+
else {
|
|
12933
|
+
if (!isNullOrUndefined(previousData.ganttProperties.startDate)) {
|
|
12934
|
+
previousStartDate = new Date(previousData.ganttProperties.startDate.getTime());
|
|
12935
|
+
}
|
|
12936
|
+
}
|
|
12937
|
+
var currentStartDate = ganttRecord.ganttProperties.startDate;
|
|
12938
|
+
var childRecords = [];
|
|
12939
|
+
var validStartDate;
|
|
12940
|
+
var validEndDate;
|
|
12941
|
+
var calcEndDate;
|
|
12942
|
+
var isRightMove;
|
|
12943
|
+
var durationDiff;
|
|
12944
|
+
this.getUpdatableChildRecords(ganttRecord, childRecords);
|
|
12945
|
+
if (childRecords.length === 0) {
|
|
12946
|
+
return;
|
|
12947
|
+
}
|
|
12948
|
+
if (!isNullOrUndefined(previousStartDate) && !isNullOrUndefined(currentStartDate) && previousStartDate.getTime() > currentStartDate.getTime()) {
|
|
12949
|
+
validStartDate = this.parent.dateValidationModule.checkStartDate(currentStartDate);
|
|
12950
|
+
validEndDate = this.parent.dateValidationModule.checkEndDate(previousStartDate, ganttRecord.ganttProperties);
|
|
12951
|
+
isRightMove = false;
|
|
12952
|
+
}
|
|
12953
|
+
else {
|
|
12954
|
+
validStartDate = this.parent.dateValidationModule.checkStartDate(previousStartDate);
|
|
12955
|
+
validEndDate = this.parent.dateValidationModule.checkEndDate(currentStartDate, ganttRecord.ganttProperties);
|
|
12956
|
+
isRightMove = true;
|
|
12957
|
+
}
|
|
12958
|
+
//Get Duration
|
|
12959
|
+
if (!isNullOrUndefined(validStartDate) && !isNullOrUndefined(validEndDate) && validStartDate.getTime() >= validEndDate.getTime()) {
|
|
12960
|
+
durationDiff = 0;
|
|
12961
|
+
}
|
|
12962
|
+
else {
|
|
12963
|
+
durationDiff = this.parent.dateValidationModule.getDuration(validStartDate, validEndDate, 'minute', true, false);
|
|
12964
|
+
}
|
|
12965
|
+
for (var i = 0; i < childRecords.length; i++) {
|
|
12966
|
+
if (childRecords[i].ganttProperties.isAutoSchedule) {
|
|
12967
|
+
if (durationDiff > 0) {
|
|
12968
|
+
var startDate = isScheduledTask(childRecords[i].ganttProperties) ?
|
|
12969
|
+
childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.startDate ?
|
|
12970
|
+
childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.endDate ?
|
|
12971
|
+
childRecords[i].ganttProperties.endDate : new Date(previousStartDate.toString());
|
|
12972
|
+
if (isRightMove) {
|
|
12973
|
+
calcEndDate = this.parent.dateValidationModule.getEndDate(this.parent.dateValidationModule.checkStartDate(startDate, childRecords[i].ganttProperties, childRecords[i].ganttProperties.isMilestone), durationDiff, 'minute', childRecords[i].ganttProperties, false);
|
|
12974
|
+
}
|
|
12975
|
+
else {
|
|
12976
|
+
calcEndDate = this.parent.dateValidationModule.getStartDate(this.parent.dateValidationModule.checkEndDate(startDate, childRecords[i].ganttProperties), durationDiff, 'minute', childRecords[i].ganttProperties);
|
|
12977
|
+
}
|
|
12978
|
+
this.calculateDateByRoundOffDuration(childRecords[i], calcEndDate);
|
|
12979
|
+
if (this.parent.isOnEdit && this.validatedChildItems.indexOf(childRecords[i]) === -1) {
|
|
12980
|
+
this.validatedChildItems.push(childRecords[i]);
|
|
12981
|
+
}
|
|
12982
|
+
}
|
|
12983
|
+
else if (isNullOrUndefined(previousData)) {
|
|
12984
|
+
calcEndDate = previousStartDate;
|
|
12985
|
+
this.calculateDateByRoundOffDuration(childRecords[i], calcEndDate);
|
|
12986
|
+
if (this.parent.isOnEdit && this.validatedChildItems.indexOf(childRecords[i]) === -1) {
|
|
12987
|
+
this.validatedChildItems.push(childRecords[i]);
|
|
12988
|
+
}
|
|
12989
|
+
}
|
|
12990
|
+
}
|
|
12991
|
+
}
|
|
12992
|
+
if (childRecords.length) {
|
|
12993
|
+
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
12994
|
+
}
|
|
12995
|
+
};
|
|
12996
|
+
/**
|
|
12997
|
+
* To get updated child records.
|
|
12998
|
+
*
|
|
12999
|
+
* @param {IGanttData} parentRecord .
|
|
13000
|
+
* @param {IGanttData} childLists .
|
|
13001
|
+
* @returns {void} .
|
|
13002
|
+
*/
|
|
13003
|
+
Dependency.prototype.getUpdatableChildRecords = function (parentRecord, childLists) {
|
|
13004
|
+
var childRecords = parentRecord.childRecords;
|
|
13005
|
+
for (var i = 0; i < childRecords.length; i++) {
|
|
13006
|
+
if (childRecords[i].ganttProperties.isAutoSchedule) {
|
|
13007
|
+
childLists.push(childRecords[i]);
|
|
13008
|
+
if (childRecords[i].hasChildRecords) {
|
|
13009
|
+
this.getUpdatableChildRecords(childRecords[i], childLists);
|
|
13010
|
+
}
|
|
13011
|
+
}
|
|
13012
|
+
}
|
|
13013
|
+
};
|
|
13014
|
+
/**
|
|
13015
|
+
*
|
|
13016
|
+
* @param {IGanttData} data .
|
|
13017
|
+
* @param {Date} newStartDate .
|
|
13018
|
+
* @returns {void} .
|
|
13019
|
+
*/
|
|
13020
|
+
Dependency.prototype.calculateDateByRoundOffDuration = function (data, newStartDate) {
|
|
13021
|
+
var ganttRecord = data;
|
|
13022
|
+
var taskData = ganttRecord.ganttProperties;
|
|
13023
|
+
var projectStartDate = new Date(newStartDate.getTime());
|
|
13024
|
+
if (!isNullOrUndefined(taskData.endDate) && isNullOrUndefined(taskData.startDate)) {
|
|
13025
|
+
var endDate = this.parent.dateValidationModule.checkStartDate(projectStartDate, taskData, null);
|
|
13026
|
+
this.parent.setRecordValue('endDate', this.parent.dateValidationModule.checkEndDate(endDate, ganttRecord.ganttProperties), taskData, true);
|
|
13027
|
+
}
|
|
13028
|
+
else {
|
|
13029
|
+
this.parent.setRecordValue('startDate', this.parent.dateValidationModule.checkStartDate(projectStartDate, taskData, false), taskData, true);
|
|
13030
|
+
if (!isNullOrUndefined(taskData.duration)) {
|
|
13031
|
+
this.parent.dateValidationModule.calculateEndDate(ganttRecord);
|
|
13032
|
+
}
|
|
13033
|
+
}
|
|
13034
|
+
this.parent.dataOperation.updateWidthLeft(data);
|
|
13035
|
+
this.parent.dataOperation.updateTaskData(ganttRecord);
|
|
13036
|
+
};
|
|
12856
13037
|
/**
|
|
12857
13038
|
* Method to get validate able predecessor alone from record
|
|
12858
13039
|
*
|
|
@@ -16406,7 +16587,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
16406
16587
|
this.treeGridModule.treeGridColumns = [];
|
|
16407
16588
|
this.treeGridModule.validateGanttColumns();
|
|
16408
16589
|
this.treeGrid.columns = this.treeGridModule.treeGridColumns;
|
|
16409
|
-
this.treeGrid.
|
|
16590
|
+
this.treeGrid.refreshColumns();
|
|
16410
16591
|
this.chartRowsModule.initiateTemplates();
|
|
16411
16592
|
this.timelineModule.updateChartByNewTimeline();
|
|
16412
16593
|
break;
|
|
@@ -17453,6 +17634,19 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
17453
17634
|
var tempSplitterSettings = {};
|
|
17454
17635
|
tempSplitterSettings[type] = value;
|
|
17455
17636
|
var splitterPosition = this.splitterModule.calculateSplitterPosition(tempSplitterSettings);
|
|
17637
|
+
switch (type) {
|
|
17638
|
+
case 'view':
|
|
17639
|
+
this.splitterSettings.view = tempSplitterSettings[type];
|
|
17640
|
+
break;
|
|
17641
|
+
case 'columnIndex':
|
|
17642
|
+
this.splitterSettings.columnIndex = tempSplitterSettings[type];
|
|
17643
|
+
break;
|
|
17644
|
+
case 'position':
|
|
17645
|
+
this.splitterSettings.position = tempSplitterSettings[type];
|
|
17646
|
+
break;
|
|
17647
|
+
default:
|
|
17648
|
+
break;
|
|
17649
|
+
}
|
|
17456
17650
|
var pane1 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[0];
|
|
17457
17651
|
var pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
|
|
17458
17652
|
this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
|
|
@@ -20327,7 +20521,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20327
20521
|
event.preventDefault();
|
|
20328
20522
|
if (!isNullOrUndefined(this.taskbarElement) && !isNullOrUndefined(this.editElement) && (this.taskBarEditAction !== "ConnectorPointRightDrag" && this.taskBarEditAction !== "ConnectorPointLeftDrag") && !(this.parent.viewType === 'ResourceView' && this.currentData.hasChildRecords)) {
|
|
20329
20523
|
var currentElement = this.editElement.parentElement;
|
|
20330
|
-
|
|
20524
|
+
if (this.parent.enableTimelineVirtualization && this.parent.timelineModule.wholeTimelineWidth > this.parent.element.offsetWidth * 3) {
|
|
20525
|
+
currentElement.style.setProperty("position", "relative");
|
|
20526
|
+
}
|
|
20527
|
+
else {
|
|
20528
|
+
currentElement.style.setProperty("position", "absolute");
|
|
20529
|
+
}
|
|
20331
20530
|
if ((this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'LeftResizing') && !isNullOrUndefined(this.currentIndex) && !isNullOrUndefined(this.currentIndex) ? Number(this.currentIndex) === 0 : false) {
|
|
20332
20531
|
this.taskbarElement.childNodes[0].childNodes[0].style.setProperty("top", currentElement.parentElement.offsetTop + "px");
|
|
20333
20532
|
if (this.parent.allowTaskbarDragAndDrop && this.taskBarEditAction !== 'LeftResizing' && this.taskBarEditAction !== 'RightResizing' && this.taskBarEditAction !== 'ProgressResizing') {
|
|
@@ -20346,8 +20545,14 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20346
20545
|
}
|
|
20347
20546
|
}
|
|
20348
20547
|
if (this.taskBarEditAction !== 'ProgressResizing') {
|
|
20349
|
-
|
|
20350
|
-
|
|
20548
|
+
if (this.parent.enableTimelineVirtualization && this.parent.timelineModule.wholeTimelineWidth > this.parent.element.offsetWidth * 3) {
|
|
20549
|
+
var rootElement = this.parent.ganttChartModule.chartBodyContainer.querySelectorAll(".e-chart-scroll-container");
|
|
20550
|
+
rootElement[0].appendChild(this.taskbarResizer);
|
|
20551
|
+
}
|
|
20552
|
+
else {
|
|
20553
|
+
var rootElement = this.parent.ganttChartModule.chartBodyContainer.querySelectorAll(".e-chart-rows-container");
|
|
20554
|
+
rootElement[0].appendChild(this.taskbarResizer);
|
|
20555
|
+
}
|
|
20351
20556
|
}
|
|
20352
20557
|
}
|
|
20353
20558
|
if (this.parent.allowTaskbarDragAndDrop && (this.taskBarEditAction === "ChildDrag" || this.taskBarEditAction === "ParentDrag" ||
|
|
@@ -21474,7 +21679,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
21474
21679
|
currentElement.style.position = null;
|
|
21475
21680
|
}
|
|
21476
21681
|
else {
|
|
21477
|
-
|
|
21682
|
+
if (this.parent.enableTimelineVirtualization && this.parent.timelineModule.wholeTimelineWidth > this.parent.element.offsetWidth * 3) {
|
|
21683
|
+
currentElement.style.setProperty("position", "relative");
|
|
21684
|
+
}
|
|
21685
|
+
else {
|
|
21686
|
+
currentElement.style.setProperty("position", "absolute");
|
|
21687
|
+
}
|
|
21478
21688
|
}
|
|
21479
21689
|
}
|
|
21480
21690
|
var item = this.taskBarEditRecord.ganttProperties;
|
|
@@ -24902,7 +25112,7 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
24902
25112
|
}
|
|
24903
25113
|
}
|
|
24904
25114
|
else {
|
|
24905
|
-
if (fieldName ===
|
|
25115
|
+
if (fieldName === this.parent.taskFields.duration) {
|
|
24906
25116
|
var numericValue = parseFloat(String(controlObj.value));
|
|
24907
25117
|
|
|
24908
25118
|
tasksData[fieldName] = numericValue;
|
|
@@ -25238,6 +25448,9 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
25238
25448
|
var match = [];
|
|
25239
25449
|
for (var j = 0; j < preArray.length; j++) {
|
|
25240
25450
|
var strArray = [];
|
|
25451
|
+
var firstPart = void 0;
|
|
25452
|
+
var isAlpha = false;
|
|
25453
|
+
var predecessorName = void 0;
|
|
25241
25454
|
var isGUId = false;
|
|
25242
25455
|
var regex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
|
|
25243
25456
|
var elSplit = preArray[j].split('-');
|
|
@@ -25252,6 +25465,26 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
25252
25465
|
isGUId = true;
|
|
25253
25466
|
}
|
|
25254
25467
|
}
|
|
25468
|
+
if (preArray[j].includes('-')) {
|
|
25469
|
+
if (preArray[j].includes('-') && preArray[j].includes('days')) {
|
|
25470
|
+
predecessorName = preArray[j].slice(-9).toString();
|
|
25471
|
+
}
|
|
25472
|
+
if (preArray[j].includes('-') && preArray[j].includes('day')) {
|
|
25473
|
+
predecessorName = preArray[j].slice(-8).toString();
|
|
25474
|
+
}
|
|
25475
|
+
else {
|
|
25476
|
+
predecessorName = preArray[j].slice(-2).toString();
|
|
25477
|
+
}
|
|
25478
|
+
if (preArray[j].includes('-') && /[A-Za-z]/.test(predecessorName)) {
|
|
25479
|
+
var indexFS = preArray[j].indexOf(predecessorName);
|
|
25480
|
+
if (indexFS !== -1) {
|
|
25481
|
+
firstPart = preArray[j].substring(0, indexFS);
|
|
25482
|
+
if (firstPart.includes('-')) {
|
|
25483
|
+
isAlpha = true;
|
|
25484
|
+
}
|
|
25485
|
+
}
|
|
25486
|
+
}
|
|
25487
|
+
}
|
|
25255
25488
|
if (isGUId) {
|
|
25256
25489
|
var split = void 0;
|
|
25257
25490
|
split = elSplit[4].split('+');
|
|
@@ -25278,10 +25511,15 @@ var ConnectorLineEdit = /** @__PURE__ @class */ (function () {
|
|
|
25278
25511
|
}
|
|
25279
25512
|
}
|
|
25280
25513
|
else {
|
|
25281
|
-
|
|
25282
|
-
|
|
25283
|
-
|
|
25284
|
-
|
|
25514
|
+
if (isAlpha && firstPart.includes('-')) {
|
|
25515
|
+
values[0] = firstPart;
|
|
25516
|
+
}
|
|
25517
|
+
else {
|
|
25518
|
+
values = preArray[j].split('+');
|
|
25519
|
+
if (preArray[j].indexOf('-') >= 0) {
|
|
25520
|
+
values = preArray[j].split('-');
|
|
25521
|
+
|
|
25522
|
+
}
|
|
25285
25523
|
}
|
|
25286
25524
|
}
|
|
25287
25525
|
if (!isNullOrUndefined(values[0])) {
|
|
@@ -26151,7 +26389,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
26151
26389
|
*/
|
|
26152
26390
|
this.deletedTaskDetails = [];
|
|
26153
26391
|
this.parent = parent;
|
|
26154
|
-
this.validatedChildItems = [];
|
|
26392
|
+
this.parent.predecessorModule.validatedChildItems = [];
|
|
26155
26393
|
if (this.parent.editSettings.allowEditing && this.parent.editSettings.mode === 'Auto') {
|
|
26156
26394
|
this.cellEditModule = new CellEdit(this.parent);
|
|
26157
26395
|
}
|
|
@@ -26988,8 +27226,8 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
26988
27226
|
}
|
|
26989
27227
|
if (this.parent.isConnectorLineUpdate && this.parent.autoCalculateDateScheduling) {
|
|
26990
27228
|
/* validating predecessor for updated child items */
|
|
26991
|
-
for (var i = 0; i < this.validatedChildItems.length; i++) {
|
|
26992
|
-
var child = this.validatedChildItems[i];
|
|
27229
|
+
for (var i = 0; i < this.parent.predecessorModule.validatedChildItems.length; i++) {
|
|
27230
|
+
var child = this.parent.predecessorModule.validatedChildItems[i];
|
|
26993
27231
|
if (child.ganttProperties.predecessor && child.ganttProperties.predecessor.length > 0) {
|
|
26994
27232
|
this.parent.editedTaskBarItem = child;
|
|
26995
27233
|
this.parent.predecessorModule.validatePredecessor(child, [], '');
|
|
@@ -27003,6 +27241,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27003
27241
|
this.parent.editedTaskBarItem = ganttRecord;
|
|
27004
27242
|
}
|
|
27005
27243
|
if (!this.isValidatedEditedRecord) {
|
|
27244
|
+
this.isFirstCall = true;
|
|
27006
27245
|
this.parent.predecessorModule.validatePredecessor(ganttRecord, [], '');
|
|
27007
27246
|
}
|
|
27008
27247
|
this.isValidatedEditedRecord = false;
|
|
@@ -27010,7 +27249,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27010
27249
|
}
|
|
27011
27250
|
if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
27012
27251
|
(args.action === "DrawConnectorLine")) {
|
|
27013
|
-
this.updateChildItems(ganttRecord);
|
|
27252
|
+
this.parent.predecessorModule['updateChildItems'](ganttRecord);
|
|
27014
27253
|
}
|
|
27015
27254
|
this.updateParentItemOnEditing();
|
|
27016
27255
|
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
@@ -27023,6 +27262,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27023
27262
|
var parentData = this.parent.getRecordByID(ganttRecord.parentItem.taskId);
|
|
27024
27263
|
if (!isNullOrUndefined(parentData)) {
|
|
27025
27264
|
if (!parentData.ganttProperties.predecessorsName) {
|
|
27265
|
+
this.isFirstCall = true;
|
|
27026
27266
|
this.parent.predecessorModule.validatePredecessor(parentData, [], '');
|
|
27027
27267
|
this.updateParentItemOnEditing();
|
|
27028
27268
|
this.parent.ganttChartModule.reRenderConnectorLines();
|
|
@@ -27053,7 +27293,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27053
27293
|
Edit$$1.prototype.updateParentChildRecord = function (data) {
|
|
27054
27294
|
var ganttRecord = data;
|
|
27055
27295
|
if (ganttRecord.hasChildRecords && this.taskbarMoved && (ganttRecord[this.parent.taskFields.manual] === false || this.parent.taskMode === 'Auto') && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
|
|
27056
|
-
this.updateChildItems(ganttRecord);
|
|
27296
|
+
this.parent.predecessorModule['updateChildItems'](ganttRecord);
|
|
27057
27297
|
}
|
|
27058
27298
|
if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
|
|
27059
27299
|
this.parent.editModule.cellEditModule.isResourceCellEdited = false;
|
|
@@ -27098,29 +27338,6 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27098
27338
|
this.parent.dataOperation.updateWidthLeft(data);
|
|
27099
27339
|
}
|
|
27100
27340
|
};
|
|
27101
|
-
/**
|
|
27102
|
-
*
|
|
27103
|
-
* @param {IGanttData} data .
|
|
27104
|
-
* @param {Date} newStartDate .
|
|
27105
|
-
* @returns {void} .
|
|
27106
|
-
*/
|
|
27107
|
-
Edit$$1.prototype.calculateDateByRoundOffDuration = function (data, newStartDate) {
|
|
27108
|
-
var ganttRecord = data;
|
|
27109
|
-
var taskData = ganttRecord.ganttProperties;
|
|
27110
|
-
var projectStartDate = new Date(newStartDate.getTime());
|
|
27111
|
-
if (!isNullOrUndefined(taskData.endDate) && isNullOrUndefined(taskData.startDate)) {
|
|
27112
|
-
var endDate = this.parent.dateValidationModule.checkStartDate(projectStartDate, taskData, null);
|
|
27113
|
-
this.parent.setRecordValue('endDate', this.parent.dateValidationModule.checkEndDate(endDate, ganttRecord.ganttProperties), taskData, true);
|
|
27114
|
-
}
|
|
27115
|
-
else {
|
|
27116
|
-
this.parent.setRecordValue('startDate', this.parent.dateValidationModule.checkStartDate(projectStartDate, taskData, false), taskData, true);
|
|
27117
|
-
if (!isNullOrUndefined(taskData.duration)) {
|
|
27118
|
-
this.parent.dateValidationModule.calculateEndDate(ganttRecord);
|
|
27119
|
-
}
|
|
27120
|
-
}
|
|
27121
|
-
this.parent.dataOperation.updateWidthLeft(data);
|
|
27122
|
-
this.parent.dataOperation.updateTaskData(ganttRecord);
|
|
27123
|
-
};
|
|
27124
27341
|
/**
|
|
27125
27342
|
* To update progress value of parent tasks
|
|
27126
27343
|
*
|
|
@@ -27230,106 +27447,6 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27230
27447
|
Edit$$1.prototype.updateScheduleDatesOnEditing = function (args) {
|
|
27231
27448
|
//..
|
|
27232
27449
|
};
|
|
27233
|
-
/**
|
|
27234
|
-
*
|
|
27235
|
-
* @param {IGanttData} ganttRecord .
|
|
27236
|
-
* @returns {void} .
|
|
27237
|
-
*/
|
|
27238
|
-
Edit$$1.prototype.updateChildItems = function (ganttRecord) {
|
|
27239
|
-
var previousData = this.parent.previousRecords[ganttRecord.uniqueID];
|
|
27240
|
-
var previousStartDate;
|
|
27241
|
-
if (isNullOrUndefined(previousData) ||
|
|
27242
|
-
(isNullOrUndefined(previousData) && !isNullOrUndefined(previousData.ganttProperties))) {
|
|
27243
|
-
previousStartDate = new Date(ganttRecord.ganttProperties.startDate.getTime());
|
|
27244
|
-
}
|
|
27245
|
-
else {
|
|
27246
|
-
if (!isNullOrUndefined(previousData.ganttProperties.startDate)) {
|
|
27247
|
-
previousStartDate = new Date(previousData.ganttProperties.startDate.getTime());
|
|
27248
|
-
}
|
|
27249
|
-
}
|
|
27250
|
-
var currentStartDate = ganttRecord.ganttProperties.startDate;
|
|
27251
|
-
var childRecords = [];
|
|
27252
|
-
var validStartDate;
|
|
27253
|
-
var validEndDate;
|
|
27254
|
-
var calcEndDate;
|
|
27255
|
-
var isRightMove;
|
|
27256
|
-
var durationDiff;
|
|
27257
|
-
this.getUpdatableChildRecords(ganttRecord, childRecords);
|
|
27258
|
-
if (childRecords.length === 0) {
|
|
27259
|
-
return;
|
|
27260
|
-
}
|
|
27261
|
-
if (!isNullOrUndefined(previousStartDate) && !isNullOrUndefined(currentStartDate) && previousStartDate.getTime() > currentStartDate.getTime()) {
|
|
27262
|
-
validStartDate = this.parent.dateValidationModule.checkStartDate(currentStartDate);
|
|
27263
|
-
validEndDate = this.parent.dateValidationModule.checkEndDate(previousStartDate, ganttRecord.ganttProperties);
|
|
27264
|
-
isRightMove = false;
|
|
27265
|
-
}
|
|
27266
|
-
else {
|
|
27267
|
-
validStartDate = this.parent.dateValidationModule.checkStartDate(previousStartDate);
|
|
27268
|
-
validEndDate = this.parent.dateValidationModule.checkEndDate(currentStartDate, ganttRecord.ganttProperties);
|
|
27269
|
-
isRightMove = true;
|
|
27270
|
-
}
|
|
27271
|
-
//Get Duration
|
|
27272
|
-
if (!isNullOrUndefined(validStartDate) && !isNullOrUndefined(validEndDate) && validStartDate.getTime() >= validEndDate.getTime()) {
|
|
27273
|
-
durationDiff = 0;
|
|
27274
|
-
}
|
|
27275
|
-
else {
|
|
27276
|
-
durationDiff = this.parent.dateValidationModule.getDuration(validStartDate, validEndDate, 'minute', true, false);
|
|
27277
|
-
}
|
|
27278
|
-
for (var i = 0; i < childRecords.length; i++) {
|
|
27279
|
-
if (childRecords[i].ganttProperties.isAutoSchedule) {
|
|
27280
|
-
if (durationDiff > 0) {
|
|
27281
|
-
var startDate = isScheduledTask(childRecords[i].ganttProperties) ?
|
|
27282
|
-
childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.startDate ?
|
|
27283
|
-
childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.endDate ?
|
|
27284
|
-
childRecords[i].ganttProperties.endDate : new Date(previousStartDate.toString());
|
|
27285
|
-
if (isRightMove) {
|
|
27286
|
-
calcEndDate = this.parent.dateValidationModule.getEndDate(this.parent.dateValidationModule.checkStartDate(startDate, childRecords[i].ganttProperties, childRecords[i].ganttProperties.isMilestone), durationDiff, 'minute', childRecords[i].ganttProperties, false);
|
|
27287
|
-
}
|
|
27288
|
-
else {
|
|
27289
|
-
calcEndDate = this.parent.dateValidationModule.getStartDate(this.parent.dateValidationModule.checkEndDate(startDate, childRecords[i].ganttProperties), durationDiff, 'minute', childRecords[i].ganttProperties);
|
|
27290
|
-
}
|
|
27291
|
-
this.calculateDateByRoundOffDuration(childRecords[i], calcEndDate);
|
|
27292
|
-
if (this.parent.isOnEdit && this.validatedChildItems.indexOf(childRecords[i]) === -1) {
|
|
27293
|
-
this.validatedChildItems.push(childRecords[i]);
|
|
27294
|
-
}
|
|
27295
|
-
}
|
|
27296
|
-
else if (isNullOrUndefined(previousData)) {
|
|
27297
|
-
calcEndDate = previousStartDate;
|
|
27298
|
-
var initialData = this.parent.initialLoadData[childRecords[i].index];
|
|
27299
|
-
if (this.parent.isLoad) {
|
|
27300
|
-
this.calculateDateByRoundOffDuration(initialData, calcEndDate);
|
|
27301
|
-
}
|
|
27302
|
-
else {
|
|
27303
|
-
this.calculateDateByRoundOffDuration(childRecords[i], calcEndDate);
|
|
27304
|
-
}
|
|
27305
|
-
if (this.parent.isOnEdit && this.validatedChildItems.indexOf(childRecords[i]) === -1) {
|
|
27306
|
-
this.validatedChildItems.push(childRecords[i]);
|
|
27307
|
-
}
|
|
27308
|
-
}
|
|
27309
|
-
}
|
|
27310
|
-
}
|
|
27311
|
-
if (childRecords.length) {
|
|
27312
|
-
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
27313
|
-
}
|
|
27314
|
-
};
|
|
27315
|
-
/**
|
|
27316
|
-
* To get updated child records.
|
|
27317
|
-
*
|
|
27318
|
-
* @param {IGanttData} parentRecord .
|
|
27319
|
-
* @param {IGanttData} childLists .
|
|
27320
|
-
* @returns {void} .
|
|
27321
|
-
*/
|
|
27322
|
-
Edit$$1.prototype.getUpdatableChildRecords = function (parentRecord, childLists) {
|
|
27323
|
-
var childRecords = parentRecord.childRecords;
|
|
27324
|
-
for (var i = 0; i < childRecords.length; i++) {
|
|
27325
|
-
if (childRecords[i].ganttProperties.isAutoSchedule) {
|
|
27326
|
-
childLists.push(childRecords[i]);
|
|
27327
|
-
if (childRecords[i].hasChildRecords) {
|
|
27328
|
-
this.getUpdatableChildRecords(childRecords[i], childLists);
|
|
27329
|
-
}
|
|
27330
|
-
}
|
|
27331
|
-
}
|
|
27332
|
-
};
|
|
27333
27450
|
/**
|
|
27334
27451
|
* @param {ITaskbarEditedEventArgs} args .
|
|
27335
27452
|
* @returns {void} .
|
|
@@ -27842,7 +27959,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27842
27959
|
this.resetValidateArgs();
|
|
27843
27960
|
this.parent.editedTaskBarItem = null;
|
|
27844
27961
|
this.parent.isOnEdit = false;
|
|
27845
|
-
this.validatedChildItems = [];
|
|
27962
|
+
this.parent.predecessorModule.validatedChildItems = [];
|
|
27846
27963
|
this.parent.isConnectorLineUpdate = false;
|
|
27847
27964
|
this.parent.editedTaskBarItem = null;
|
|
27848
27965
|
this.taskbarMoved = false;
|
|
@@ -29749,6 +29866,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
29749
29866
|
for (var k = 0; k < this.updateParentRecords.length; k++) {
|
|
29750
29867
|
this.parent.dataOperation.updateParentItems(this.updateParentRecords[k]);
|
|
29751
29868
|
}
|
|
29869
|
+
this.isFirstCall = true;
|
|
29752
29870
|
this.parent.editedRecords.forEach(function (record) {
|
|
29753
29871
|
_this.parent.predecessorModule.validatePredecessor(record, [], '');
|
|
29754
29872
|
});
|
|
@@ -30802,7 +30920,14 @@ var Selection$1 = /** @__PURE__ @class */ (function () {
|
|
|
30802
30920
|
if (this.parent.enableTimelineVirtualization) {
|
|
30803
30921
|
this.parent['isRowSelected'] = true;
|
|
30804
30922
|
}
|
|
30805
|
-
|
|
30923
|
+
if (args.data && !isNullOrUndefined(args.data['length'])) {
|
|
30924
|
+
for (var i = 0; i < args.data['length']; i++) {
|
|
30925
|
+
this.parent.ganttChartModule.updateScrollLeft(args.data[i].ganttProperties.left);
|
|
30926
|
+
}
|
|
30927
|
+
}
|
|
30928
|
+
else {
|
|
30929
|
+
this.parent.ganttChartModule.updateScrollLeft(getValue('data.ganttProperties.left', args));
|
|
30930
|
+
}
|
|
30806
30931
|
}
|
|
30807
30932
|
args.target = this.actualTarget;
|
|
30808
30933
|
if (!isNullOrUndefined(args.foreignKeyData) && Object.keys(args.foreignKeyData).length === 0) {
|