@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 24.2.
|
|
3
|
+
* version : 24.2.8
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-gantt@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-gantt@24.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@24.2.7",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-3AGEjY04my/08ZHFZqlEAtMNXVuY0fevAT6eeSrfO1AuMjVJDIP+WQpW84I3XqDdnJXzEyKADEMArwv9j0ezYA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-gantt",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-gantt",
|
|
24
24
|
"/@syncfusion/ej2-vue-gantt"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-24.2.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-24.2.7.tgz",
|
|
27
|
+
"_shasum": "e0c70b260e7a97016d1d6cf1ae3a4623f5eba2df",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~24.2.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~24.2.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~24.2.
|
|
38
|
+
"@syncfusion/ej2-base": "~24.2.7",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~24.2.7",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~24.2.8",
|
|
41
41
|
"@syncfusion/ej2-data": "~24.2.3",
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~24.2.
|
|
43
|
-
"@syncfusion/ej2-grids": "~24.2.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~24.2.
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~24.2.8",
|
|
43
|
+
"@syncfusion/ej2-grids": "~24.2.8",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~24.2.7",
|
|
45
45
|
"@syncfusion/ej2-layouts": "~24.2.4",
|
|
46
|
-
"@syncfusion/ej2-lists": "~24.2.
|
|
47
|
-
"@syncfusion/ej2-navigations": "~24.2.
|
|
46
|
+
"@syncfusion/ej2-lists": "~24.2.8",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~24.2.8",
|
|
48
48
|
"@syncfusion/ej2-notifications": "~24.2.4",
|
|
49
|
-
"@syncfusion/ej2-popups": "~24.2.
|
|
50
|
-
"@syncfusion/ej2-richtexteditor": "~24.2.
|
|
49
|
+
"@syncfusion/ej2-popups": "~24.2.8",
|
|
50
|
+
"@syncfusion/ej2-richtexteditor": "~24.2.8",
|
|
51
51
|
"@syncfusion/ej2-svg-base": "~24.2.3",
|
|
52
|
-
"@syncfusion/ej2-treegrid": "~24.2.
|
|
52
|
+
"@syncfusion/ej2-treegrid": "~24.2.8"
|
|
53
53
|
},
|
|
54
54
|
"deprecated": false,
|
|
55
55
|
"description": "Essential JS 2 Gantt Component",
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"url": "git+https://github.com/syncfusion/ej2-gantt.git"
|
|
75
75
|
},
|
|
76
76
|
"typings": "index.d.ts",
|
|
77
|
-
"version": "24.2.
|
|
77
|
+
"version": "24.2.8",
|
|
78
78
|
"sideEffects": false
|
|
79
79
|
}
|
|
@@ -183,6 +183,9 @@ var ConnectorLineEdit = /** @class */ (function () {
|
|
|
183
183
|
var match = [];
|
|
184
184
|
for (var j = 0; j < preArray.length; j++) {
|
|
185
185
|
var strArray = [];
|
|
186
|
+
var firstPart = void 0;
|
|
187
|
+
var isAlpha = false;
|
|
188
|
+
var predecessorName = void 0;
|
|
186
189
|
var isGUId = false;
|
|
187
190
|
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}$/;
|
|
188
191
|
var elSplit = preArray[j].split('-');
|
|
@@ -197,6 +200,26 @@ var ConnectorLineEdit = /** @class */ (function () {
|
|
|
197
200
|
isGUId = true;
|
|
198
201
|
}
|
|
199
202
|
}
|
|
203
|
+
if (preArray[j].includes('-')) {
|
|
204
|
+
if (preArray[j].includes('-') && preArray[j].includes('days')) {
|
|
205
|
+
predecessorName = preArray[j].slice(-9).toString();
|
|
206
|
+
}
|
|
207
|
+
if (preArray[j].includes('-') && preArray[j].includes('day')) {
|
|
208
|
+
predecessorName = preArray[j].slice(-8).toString();
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
predecessorName = preArray[j].slice(-2).toString();
|
|
212
|
+
}
|
|
213
|
+
if (preArray[j].includes('-') && /[A-Za-z]/.test(predecessorName)) {
|
|
214
|
+
var indexFS = preArray[j].indexOf(predecessorName);
|
|
215
|
+
if (indexFS !== -1) {
|
|
216
|
+
firstPart = preArray[j].substring(0, indexFS);
|
|
217
|
+
if (firstPart.includes('-')) {
|
|
218
|
+
isAlpha = true;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
200
223
|
if (isGUId) {
|
|
201
224
|
var split = void 0;
|
|
202
225
|
split = elSplit[4].split('+');
|
|
@@ -224,11 +247,16 @@ var ConnectorLineEdit = /** @class */ (function () {
|
|
|
224
247
|
}
|
|
225
248
|
}
|
|
226
249
|
else {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
250
|
+
if (isAlpha && firstPart.includes('-')) {
|
|
251
|
+
values[0] = firstPart;
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
values = preArray[j].split('+');
|
|
255
|
+
offsetValue = '+';
|
|
256
|
+
if (preArray[j].indexOf('-') >= 0) {
|
|
257
|
+
values = preArray[j].split('-');
|
|
258
|
+
offsetValue = '-';
|
|
259
|
+
}
|
|
232
260
|
}
|
|
233
261
|
}
|
|
234
262
|
if (!isNullOrUndefined(values[0])) {
|
|
@@ -11,6 +11,8 @@ export declare class Dependency {
|
|
|
11
11
|
private parentPredecessors;
|
|
12
12
|
private validatedParentIds;
|
|
13
13
|
isValidatedParentTaskID: string;
|
|
14
|
+
validatedChildItems: IGanttData[];
|
|
15
|
+
private storeId;
|
|
14
16
|
constructor(gantt: Gantt);
|
|
15
17
|
/**
|
|
16
18
|
* Method to populate predecessor collections in records
|
|
@@ -156,6 +158,27 @@ export declare class Dependency {
|
|
|
156
158
|
* @private
|
|
157
159
|
*/
|
|
158
160
|
validatePredecessor(childGanttRecord: IGanttData, previousValue: IPredecessor[], validationOn: string): void;
|
|
161
|
+
/**
|
|
162
|
+
*
|
|
163
|
+
* @param {IGanttData} ganttRecord .
|
|
164
|
+
* @returns {void} .
|
|
165
|
+
*/
|
|
166
|
+
private updateChildItems;
|
|
167
|
+
/**
|
|
168
|
+
* To get updated child records.
|
|
169
|
+
*
|
|
170
|
+
* @param {IGanttData} parentRecord .
|
|
171
|
+
* @param {IGanttData} childLists .
|
|
172
|
+
* @returns {void} .
|
|
173
|
+
*/
|
|
174
|
+
private getUpdatableChildRecords;
|
|
175
|
+
/**
|
|
176
|
+
*
|
|
177
|
+
* @param {IGanttData} data .
|
|
178
|
+
* @param {Date} newStartDate .
|
|
179
|
+
* @returns {void} .
|
|
180
|
+
*/
|
|
181
|
+
private calculateDateByRoundOffDuration;
|
|
159
182
|
/**
|
|
160
183
|
* Method to get validate able predecessor alone from record
|
|
161
184
|
*
|
|
@@ -6,6 +6,7 @@ var Dependency = /** @class */ (function () {
|
|
|
6
6
|
this.parentIds = [];
|
|
7
7
|
this.parentPredecessors = [];
|
|
8
8
|
this.validatedParentIds = [];
|
|
9
|
+
this.storeId = null;
|
|
9
10
|
this.parent = gantt;
|
|
10
11
|
this.dateValidateModule = this.parent.dateValidationModule;
|
|
11
12
|
}
|
|
@@ -43,7 +44,7 @@ var Dependency = /** @class */ (function () {
|
|
|
43
44
|
for (var c = 0; c < predecessorVal.length; c++) {
|
|
44
45
|
var predecessorItem = predecessorVal[c];
|
|
45
46
|
var preValue = {};
|
|
46
|
-
preValue.from = getValue('from', predecessorItem);
|
|
47
|
+
preValue.from = getValue('from', predecessorItem) ? getValue('from', predecessorItem) : predecessorVal[c];
|
|
47
48
|
preValue.to = getValue('to', predecessorItem) ? getValue('to', predecessorItem) : ganttProp.rowUniqueID;
|
|
48
49
|
preValue.type = getValue('type', predecessorItem) ? getValue('type', predecessorItem) : 'FS';
|
|
49
50
|
var offsetUnits = getValue('offset', predecessorItem);
|
|
@@ -129,6 +130,9 @@ var Dependency = /** @class */ (function () {
|
|
|
129
130
|
var predecessorText;
|
|
130
131
|
predecessor.split(',').forEach(function (el) {
|
|
131
132
|
var isGUId = false;
|
|
133
|
+
var firstPart;
|
|
134
|
+
var predecessorName;
|
|
135
|
+
var isAlpha = false;
|
|
132
136
|
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}$/;
|
|
133
137
|
var elSplit = el.split('-');
|
|
134
138
|
var id;
|
|
@@ -142,6 +146,26 @@ var Dependency = /** @class */ (function () {
|
|
|
142
146
|
isGUId = true;
|
|
143
147
|
}
|
|
144
148
|
}
|
|
149
|
+
if (el.includes('-')) {
|
|
150
|
+
if (el.includes('-') && el.includes('days')) {
|
|
151
|
+
predecessorName = el.slice(-9).toString();
|
|
152
|
+
}
|
|
153
|
+
if (el.includes('-') && el.includes('day')) {
|
|
154
|
+
predecessorName = el.slice(-8).toString();
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
predecessorName = el.slice(-2).toString();
|
|
158
|
+
}
|
|
159
|
+
if (el.includes('-') && /[A-Za-z]/.test(predecessorName)) {
|
|
160
|
+
var indexFS = el.indexOf(predecessorName);
|
|
161
|
+
if (indexFS !== -1) {
|
|
162
|
+
firstPart = el.substring(0, indexFS);
|
|
163
|
+
if (firstPart.includes('-')) {
|
|
164
|
+
isAlpha = true;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
145
169
|
if (isGUId) {
|
|
146
170
|
var split = void 0;
|
|
147
171
|
split = elSplit[4].split('+');
|
|
@@ -170,11 +194,16 @@ var Dependency = /** @class */ (function () {
|
|
|
170
194
|
}
|
|
171
195
|
}
|
|
172
196
|
else {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
197
|
+
if (isAlpha && firstPart.includes('-')) {
|
|
198
|
+
values[0] = firstPart;
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
values = el.split('+');
|
|
202
|
+
offsetValue = '+';
|
|
203
|
+
if (el.indexOf('-') >= 0) {
|
|
204
|
+
values = el.split('-');
|
|
205
|
+
offsetValue = '-';
|
|
206
|
+
}
|
|
178
207
|
}
|
|
179
208
|
}
|
|
180
209
|
match = [];
|
|
@@ -212,6 +241,16 @@ var Dependency = /** @class */ (function () {
|
|
|
212
241
|
predecessorText = 'FS';
|
|
213
242
|
}
|
|
214
243
|
}
|
|
244
|
+
else if (el.includes('-') && /[A-Za-z]/.test(predecessorName) && firstPart.includes('-')) {
|
|
245
|
+
var type = el.slice(-2).toString();
|
|
246
|
+
type.toUpperCase();
|
|
247
|
+
if (type === 'FS' || type === 'FF' || type === 'SF' || type === 'SS') {
|
|
248
|
+
predecessorText = type;
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
predecessorText = 'FS';
|
|
252
|
+
}
|
|
253
|
+
}
|
|
215
254
|
else {
|
|
216
255
|
predecessorText = 'FS';
|
|
217
256
|
}
|
|
@@ -445,7 +484,7 @@ var Dependency = /** @class */ (function () {
|
|
|
445
484
|
}
|
|
446
485
|
if (flatData[count].hasChildRecords && this.parent.editModule && !this.parent.allowUnscheduledTasks
|
|
447
486
|
&& this.parent.allowParentDependency) {
|
|
448
|
-
this.
|
|
487
|
+
this.updateChildItems(flatData[count]);
|
|
449
488
|
}
|
|
450
489
|
}
|
|
451
490
|
}
|
|
@@ -457,7 +496,7 @@ var Dependency = /** @class */ (function () {
|
|
|
457
496
|
var item = this.parentPredecessors[i];
|
|
458
497
|
this.validatePredecessorDates(item);
|
|
459
498
|
if (item.ganttProperties.startDate) {
|
|
460
|
-
this.
|
|
499
|
+
this.updateChildItems(item);
|
|
461
500
|
}
|
|
462
501
|
}
|
|
463
502
|
}
|
|
@@ -835,7 +874,15 @@ var Dependency = /** @class */ (function () {
|
|
|
835
874
|
continue;
|
|
836
875
|
}
|
|
837
876
|
if (record) {
|
|
838
|
-
this.
|
|
877
|
+
if (this.parent.editModule.isFirstCall) {
|
|
878
|
+
this.storeId = JSON.parse(JSON.stringify(this.parent.ids));
|
|
879
|
+
this.parent.editModule.isFirstCall = false;
|
|
880
|
+
}
|
|
881
|
+
var index = (this.storeId && this.storeId.indexOf(record[this.parent.taskFields.id].toString()) !== -1) ? this.storeId.indexOf(record[this.parent.taskFields.id].toString()) : -1;
|
|
882
|
+
if (index !== -1) {
|
|
883
|
+
this.storeId = this.storeId.slice(0, index).concat(this.storeId.slice(index + 1));
|
|
884
|
+
this.validatePredecessor(record, undefined, 'successor');
|
|
885
|
+
}
|
|
839
886
|
}
|
|
840
887
|
}
|
|
841
888
|
if (record && !record.hasChildRecords && record.parentItem && this.validatedParentIds.indexOf(record.parentItem.taskId) == -1) {
|
|
@@ -850,13 +897,13 @@ var Dependency = /** @class */ (function () {
|
|
|
850
897
|
if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
|
|
851
898
|
if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
|
|
852
899
|
if (!ganttProp.hasChildRecords && record.hasChildRecords) {
|
|
853
|
-
this.
|
|
900
|
+
this.updateChildItems(record);
|
|
854
901
|
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
855
902
|
}
|
|
856
903
|
}
|
|
857
904
|
else if ((!record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
|
|
858
905
|
(record.hasChildRecords && taskBarModule.taskBarEditAction == 'ParentDrag')) {
|
|
859
|
-
this.
|
|
906
|
+
this.updateChildItems(record);
|
|
860
907
|
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
861
908
|
}
|
|
862
909
|
if (!ganttProp.hasChildRecords) {
|
|
@@ -864,10 +911,127 @@ var Dependency = /** @class */ (function () {
|
|
|
864
911
|
}
|
|
865
912
|
}
|
|
866
913
|
else if (record && record.hasChildRecords && !ganttProp) {
|
|
867
|
-
this.
|
|
914
|
+
this.updateChildItems(record);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
};
|
|
919
|
+
/**
|
|
920
|
+
*
|
|
921
|
+
* @param {IGanttData} ganttRecord .
|
|
922
|
+
* @returns {void} .
|
|
923
|
+
*/
|
|
924
|
+
Dependency.prototype.updateChildItems = function (ganttRecord) {
|
|
925
|
+
var previousData = this.parent.previousRecords[ganttRecord.uniqueID];
|
|
926
|
+
var previousStartDate;
|
|
927
|
+
if (isNullOrUndefined(previousData) ||
|
|
928
|
+
(isNullOrUndefined(previousData) && !isNullOrUndefined(previousData.ganttProperties))) {
|
|
929
|
+
previousStartDate = new Date(ganttRecord.ganttProperties.startDate.getTime());
|
|
930
|
+
}
|
|
931
|
+
else {
|
|
932
|
+
if (!isNullOrUndefined(previousData.ganttProperties.startDate)) {
|
|
933
|
+
previousStartDate = new Date(previousData.ganttProperties.startDate.getTime());
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
var currentStartDate = ganttRecord.ganttProperties.startDate;
|
|
937
|
+
var childRecords = [];
|
|
938
|
+
var validStartDate;
|
|
939
|
+
var validEndDate;
|
|
940
|
+
var calcEndDate;
|
|
941
|
+
var isRightMove;
|
|
942
|
+
var durationDiff;
|
|
943
|
+
this.getUpdatableChildRecords(ganttRecord, childRecords);
|
|
944
|
+
if (childRecords.length === 0) {
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
if (!isNullOrUndefined(previousStartDate) && !isNullOrUndefined(currentStartDate) && previousStartDate.getTime() > currentStartDate.getTime()) {
|
|
948
|
+
validStartDate = this.parent.dateValidationModule.checkStartDate(currentStartDate);
|
|
949
|
+
validEndDate = this.parent.dateValidationModule.checkEndDate(previousStartDate, ganttRecord.ganttProperties);
|
|
950
|
+
isRightMove = false;
|
|
951
|
+
}
|
|
952
|
+
else {
|
|
953
|
+
validStartDate = this.parent.dateValidationModule.checkStartDate(previousStartDate);
|
|
954
|
+
validEndDate = this.parent.dateValidationModule.checkEndDate(currentStartDate, ganttRecord.ganttProperties);
|
|
955
|
+
isRightMove = true;
|
|
956
|
+
}
|
|
957
|
+
//Get Duration
|
|
958
|
+
if (!isNullOrUndefined(validStartDate) && !isNullOrUndefined(validEndDate) && validStartDate.getTime() >= validEndDate.getTime()) {
|
|
959
|
+
durationDiff = 0;
|
|
960
|
+
}
|
|
961
|
+
else {
|
|
962
|
+
durationDiff = this.parent.dateValidationModule.getDuration(validStartDate, validEndDate, 'minute', true, false);
|
|
963
|
+
}
|
|
964
|
+
for (var i = 0; i < childRecords.length; i++) {
|
|
965
|
+
if (childRecords[i].ganttProperties.isAutoSchedule) {
|
|
966
|
+
if (durationDiff > 0) {
|
|
967
|
+
var startDate = isScheduledTask(childRecords[i].ganttProperties) ?
|
|
968
|
+
childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.startDate ?
|
|
969
|
+
childRecords[i].ganttProperties.startDate : childRecords[i].ganttProperties.endDate ?
|
|
970
|
+
childRecords[i].ganttProperties.endDate : new Date(previousStartDate.toString());
|
|
971
|
+
if (isRightMove) {
|
|
972
|
+
calcEndDate = this.parent.dateValidationModule.getEndDate(this.parent.dateValidationModule.checkStartDate(startDate, childRecords[i].ganttProperties, childRecords[i].ganttProperties.isMilestone), durationDiff, 'minute', childRecords[i].ganttProperties, false);
|
|
973
|
+
}
|
|
974
|
+
else {
|
|
975
|
+
calcEndDate = this.parent.dateValidationModule.getStartDate(this.parent.dateValidationModule.checkEndDate(startDate, childRecords[i].ganttProperties), durationDiff, 'minute', childRecords[i].ganttProperties);
|
|
976
|
+
}
|
|
977
|
+
this.calculateDateByRoundOffDuration(childRecords[i], calcEndDate);
|
|
978
|
+
if (this.parent.isOnEdit && this.validatedChildItems.indexOf(childRecords[i]) === -1) {
|
|
979
|
+
this.validatedChildItems.push(childRecords[i]);
|
|
980
|
+
}
|
|
868
981
|
}
|
|
982
|
+
else if (isNullOrUndefined(previousData)) {
|
|
983
|
+
calcEndDate = previousStartDate;
|
|
984
|
+
this.calculateDateByRoundOffDuration(childRecords[i], calcEndDate);
|
|
985
|
+
if (this.parent.isOnEdit && this.validatedChildItems.indexOf(childRecords[i]) === -1) {
|
|
986
|
+
this.validatedChildItems.push(childRecords[i]);
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
if (childRecords.length) {
|
|
992
|
+
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
993
|
+
}
|
|
994
|
+
};
|
|
995
|
+
/**
|
|
996
|
+
* To get updated child records.
|
|
997
|
+
*
|
|
998
|
+
* @param {IGanttData} parentRecord .
|
|
999
|
+
* @param {IGanttData} childLists .
|
|
1000
|
+
* @returns {void} .
|
|
1001
|
+
*/
|
|
1002
|
+
Dependency.prototype.getUpdatableChildRecords = function (parentRecord, childLists) {
|
|
1003
|
+
var childRecords = parentRecord.childRecords;
|
|
1004
|
+
for (var i = 0; i < childRecords.length; i++) {
|
|
1005
|
+
if (childRecords[i].ganttProperties.isAutoSchedule) {
|
|
1006
|
+
childLists.push(childRecords[i]);
|
|
1007
|
+
if (childRecords[i].hasChildRecords) {
|
|
1008
|
+
this.getUpdatableChildRecords(childRecords[i], childLists);
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
};
|
|
1013
|
+
/**
|
|
1014
|
+
*
|
|
1015
|
+
* @param {IGanttData} data .
|
|
1016
|
+
* @param {Date} newStartDate .
|
|
1017
|
+
* @returns {void} .
|
|
1018
|
+
*/
|
|
1019
|
+
Dependency.prototype.calculateDateByRoundOffDuration = function (data, newStartDate) {
|
|
1020
|
+
var ganttRecord = data;
|
|
1021
|
+
var taskData = ganttRecord.ganttProperties;
|
|
1022
|
+
var projectStartDate = new Date(newStartDate.getTime());
|
|
1023
|
+
if (!isNullOrUndefined(taskData.endDate) && isNullOrUndefined(taskData.startDate)) {
|
|
1024
|
+
var endDate = this.parent.dateValidationModule.checkStartDate(projectStartDate, taskData, null);
|
|
1025
|
+
this.parent.setRecordValue('endDate', this.parent.dateValidationModule.checkEndDate(endDate, ganttRecord.ganttProperties), taskData, true);
|
|
1026
|
+
}
|
|
1027
|
+
else {
|
|
1028
|
+
this.parent.setRecordValue('startDate', this.parent.dateValidationModule.checkStartDate(projectStartDate, taskData, false), taskData, true);
|
|
1029
|
+
if (!isNullOrUndefined(taskData.duration)) {
|
|
1030
|
+
this.parent.dateValidationModule.calculateEndDate(ganttRecord);
|
|
869
1031
|
}
|
|
870
1032
|
}
|
|
1033
|
+
this.parent.dataOperation.updateWidthLeft(data);
|
|
1034
|
+
this.parent.dataOperation.updateTaskData(ganttRecord);
|
|
871
1035
|
};
|
|
872
1036
|
/**
|
|
873
1037
|
* Method to get validate able predecessor alone from record
|
|
@@ -2646,7 +2646,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
2646
2646
|
}
|
|
2647
2647
|
}
|
|
2648
2648
|
else {
|
|
2649
|
-
if (fieldName ===
|
|
2649
|
+
if (fieldName === this.parent.taskFields.duration) {
|
|
2650
2650
|
var numericValue = parseFloat(String(controlObj.value));
|
|
2651
2651
|
;
|
|
2652
2652
|
tasksData[fieldName] = numericValue;
|
|
@@ -12,11 +12,11 @@ import { Dialog } from '@syncfusion/ej2-popups';
|
|
|
12
12
|
*/
|
|
13
13
|
export declare class Edit {
|
|
14
14
|
private parent;
|
|
15
|
-
validatedChildItems: IGanttData[];
|
|
16
15
|
private isFromDeleteMethod;
|
|
17
16
|
private targetedRecords;
|
|
18
17
|
private isNewRecordAdded;
|
|
19
18
|
private isValidatedEditedRecord;
|
|
19
|
+
isFirstCall: boolean;
|
|
20
20
|
/**
|
|
21
21
|
* @private
|
|
22
22
|
*/
|
|
@@ -204,13 +204,6 @@ export declare class Edit {
|
|
|
204
204
|
* @private
|
|
205
205
|
*/
|
|
206
206
|
updateTaskScheduleModes(data: IGanttData): void;
|
|
207
|
-
/**
|
|
208
|
-
*
|
|
209
|
-
* @param {IGanttData} data .
|
|
210
|
-
* @param {Date} newStartDate .
|
|
211
|
-
* @returns {void} .
|
|
212
|
-
*/
|
|
213
|
-
private calculateDateByRoundOffDuration;
|
|
214
207
|
/**
|
|
215
208
|
* To update progress value of parent tasks
|
|
216
209
|
*
|
|
@@ -250,20 +243,6 @@ export declare class Edit {
|
|
|
250
243
|
* @private
|
|
251
244
|
*/
|
|
252
245
|
private updateScheduleDatesOnEditing;
|
|
253
|
-
/**
|
|
254
|
-
*
|
|
255
|
-
* @param {IGanttData} ganttRecord .
|
|
256
|
-
* @returns {void} .
|
|
257
|
-
*/
|
|
258
|
-
private updateChildItems;
|
|
259
|
-
/**
|
|
260
|
-
* To get updated child records.
|
|
261
|
-
*
|
|
262
|
-
* @param {IGanttData} parentRecord .
|
|
263
|
-
* @param {IGanttData} childLists .
|
|
264
|
-
* @returns {void} .
|
|
265
|
-
*/
|
|
266
|
-
private getUpdatableChildRecords;
|
|
267
246
|
/**
|
|
268
247
|
* @param {ITaskbarEditedEventArgs} args .
|
|
269
248
|
* @returns {void} .
|