tnx-shared 5.1.389 → 5.1.392
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/app-context/component-context.service.d.ts.map +1 -1
- package/bundles/tnx-shared.umd.js +87 -144
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/base/list-component-base.d.ts.map +1 -1
- package/components/common-app-component/common-app-component.d.ts.map +1 -1
- package/esm2015/app-context/component-context.service.js +1 -1
- package/esm2015/classes/base/list-component-base.js +31 -30
- package/esm2015/components/common-app-component/common-app-component.js +5 -4
- package/esm2015/services/crud.service.js +28 -64
- package/fesm2015/tnx-shared.js +60 -94
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/crud.service.d.ts +1 -0
- package/services/crud.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-context.service.d.ts","sourceRoot":"../../../../projects/tnx-shared/src/lib/","sources":["app-context/component-context.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"component-context.service.d.ts","sourceRoot":"../../../../projects/tnx-shared/src/lib/","sources":["app-context/component-context.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE1D,OAAO,EAAE,SAAS,EAAE,MAAM,8CAA8C,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAEzF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,qBACa,uBAAuB;IAiB5B,OAAO,CAAC,cAAc;IAhB1B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,uBAAuB,CAAC;IAChC,IAAI,EAAE,uBAAuB,CAAC;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,MAAW;IACf,WAAW,EAAE,oBAAoB,CAAC;IAElC,eAAe,eAAsB;IACrC,QAAQ,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;KAAE,CAAM;IACjD,QAAQ,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;KAAE,CAAM;IACjD,cAAc,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;KAAE,CAAM;IAE7D,GAAG,EAAE,GAAG,CAAC;gBAGG,cAAc,EAAE,aAAa;IAKzC,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,gBAAgB;IAYxB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,YAAY,GAAE,OAAe;IAOxE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,YAAY,GAAE,OAAe;IAajE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,YAAY,GAAE,OAAe;IAavE,aAAa,CAAC,IAAI,KAAA;IAMlB,mBAAmB,CAAC,IAAI,KAAA;IAMxB,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,qBAAqB;IAQ7B,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,mBAAmB;IAQ3B,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG;IAW3C,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG;IAe/C,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC;IAKnC,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG;IAWrC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG;IAezC,WAAW,CAAC,IAAI,EAAE,MAAM;IAOxB,kBAAkB,CAAC,IAAI,EAAE,MAAM;IAO/B,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,GAAG,GAAG,GAAG;IAK5D,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,GAAG,GAAG,GAAG;IAIvD,OAAO,CAAC,eAAe;IASvB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAKvC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAInC,eAAe,CAAC,GAAG,KAAA,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,GAAG;IAKrD,cAAc;IAgBd,YAAY,CAAC,GAAG,EAAE,SAAS;CAK9B"}
|
|
@@ -6034,31 +6034,23 @@
|
|
|
6034
6034
|
};
|
|
6035
6035
|
CrudService.prototype.getRefDataInDatasource = function (dataSource, schemas, callBackAfterGetRefDataDropdown) {
|
|
6036
6036
|
if (callBackAfterGetRefDataDropdown === void 0) { callBackAfterGetRefDataDropdown = null; }
|
|
6037
|
-
var _a;
|
|
6038
6037
|
return __awaiter(this, void 0, void 0, function () {
|
|
6039
|
-
var dicData,
|
|
6040
|
-
var e_1,
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
switch (_d.label) {
|
|
6038
|
+
var dicData, schemas_1, schemas_1_1, schema, promise, data, lstData, _loop_1, this_1, index;
|
|
6039
|
+
var e_1, _a;
|
|
6040
|
+
return __generator(this, function (_b) {
|
|
6041
|
+
switch (_b.label) {
|
|
6044
6042
|
case 0:
|
|
6045
6043
|
if (!dataSource || !dataSource.length)
|
|
6046
6044
|
return [2 /*return*/];
|
|
6047
6045
|
if (!schemas || !schemas.length)
|
|
6048
6046
|
return [2 /*return*/];
|
|
6049
6047
|
dicData = [];
|
|
6050
|
-
lstSchemaWithBaseService = [];
|
|
6051
6048
|
try {
|
|
6052
6049
|
// preprocess schema, them schema vao arr voi index = schema.order
|
|
6053
|
-
// and them schema co base service vao 1 array rieng de xu ly sau
|
|
6054
6050
|
for (schemas_1 = __values(schemas), schemas_1_1 = schemas_1.next(); !schemas_1_1.done; schemas_1_1 = schemas_1.next()) {
|
|
6055
6051
|
schema = schemas_1_1.value;
|
|
6056
|
-
|
|
6057
|
-
lstSchemaWithBaseService.push(schema);
|
|
6058
|
-
continue;
|
|
6059
|
-
}
|
|
6052
|
+
promise = schema.baseService ? this.processSchemaWithBaseService(schema, dataSource) : new Promise(function (resolve) { return resolve(true); });
|
|
6060
6053
|
data = dicData[schema.order];
|
|
6061
|
-
promise = new Promise(function (resolve) { return resolve(true); });
|
|
6062
6054
|
if (data == null) {
|
|
6063
6055
|
dicData[schema.order] = {
|
|
6064
6056
|
promises: [promise],
|
|
@@ -6073,126 +6065,54 @@
|
|
|
6073
6065
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
6074
6066
|
finally {
|
|
6075
6067
|
try {
|
|
6076
|
-
if (schemas_1_1 && !schemas_1_1.done && (
|
|
6068
|
+
if (schemas_1_1 && !schemas_1_1.done && (_a = schemas_1.return)) _a.call(schemas_1);
|
|
6077
6069
|
}
|
|
6078
6070
|
finally { if (e_1) throw e_1.error; }
|
|
6079
6071
|
}
|
|
6080
|
-
if (lstSchemaWithBaseService.length > 0) {
|
|
6081
|
-
mapSchemaToData_1 = {};
|
|
6082
|
-
dataSource.forEach(function (itemData) {
|
|
6083
|
-
var e_3, _b;
|
|
6084
|
-
var _loop_2 = function (schema) {
|
|
6085
|
-
var currentValue = schema.funcGetValueOfField(itemData);
|
|
6086
|
-
if (currentValue == null) {
|
|
6087
|
-
return "continue";
|
|
6088
|
-
}
|
|
6089
|
-
var schemaDataMap = mapSchemaToData_1[schema.field];
|
|
6090
|
-
var arrValue = schemaDataMap !== null && schemaDataMap !== void 0 ? schemaDataMap : [];
|
|
6091
|
-
if (schema.multiple) {
|
|
6092
|
-
_this.mapValueMultiple(arrValue, currentValue, schema);
|
|
6093
|
-
}
|
|
6094
|
-
else if (!arrValue.some(function (p) { return p == currentValue; })) {
|
|
6095
|
-
arrValue.push(currentValue);
|
|
6096
|
-
}
|
|
6097
|
-
if (schemaDataMap == null) {
|
|
6098
|
-
mapSchemaToData_1[schema.field] = arrValue;
|
|
6099
|
-
return "continue";
|
|
6100
|
-
}
|
|
6101
|
-
schemaDataMap.push.apply(schemaDataMap, __spread(arrValue));
|
|
6102
|
-
};
|
|
6103
|
-
try {
|
|
6104
|
-
for (var lstSchemaWithBaseService_2 = __values(lstSchemaWithBaseService), lstSchemaWithBaseService_2_1 = lstSchemaWithBaseService_2.next(); !lstSchemaWithBaseService_2_1.done; lstSchemaWithBaseService_2_1 = lstSchemaWithBaseService_2.next()) {
|
|
6105
|
-
var schema = lstSchemaWithBaseService_2_1.value;
|
|
6106
|
-
_loop_2(schema);
|
|
6107
|
-
}
|
|
6108
|
-
}
|
|
6109
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
6110
|
-
finally {
|
|
6111
|
-
try {
|
|
6112
|
-
if (lstSchemaWithBaseService_2_1 && !lstSchemaWithBaseService_2_1.done && (_b = lstSchemaWithBaseService_2.return)) _b.call(lstSchemaWithBaseService_2);
|
|
6113
|
-
}
|
|
6114
|
-
finally { if (e_3) throw e_3.error; }
|
|
6115
|
-
}
|
|
6116
|
-
});
|
|
6117
|
-
try {
|
|
6118
|
-
// add schema co value de query vao dicdata
|
|
6119
|
-
for (lstSchemaWithBaseService_1 = __values(lstSchemaWithBaseService), lstSchemaWithBaseService_1_1 = lstSchemaWithBaseService_1.next(); !lstSchemaWithBaseService_1_1.done; lstSchemaWithBaseService_1_1 = lstSchemaWithBaseService_1.next()) {
|
|
6120
|
-
schema = lstSchemaWithBaseService_1_1.value;
|
|
6121
|
-
arrValue = (_a = mapSchemaToData_1[schema.field]) !== null && _a !== void 0 ? _a : [];
|
|
6122
|
-
if (arrValue.length === 0) {
|
|
6123
|
-
continue;
|
|
6124
|
-
}
|
|
6125
|
-
promise = null;
|
|
6126
|
-
if (schema.baseService instanceof MasterDataService) {
|
|
6127
|
-
promise = schema.baseService.getDataDropdown(schema.groupCode, arrValue, this.createDropdownOptions(schema));
|
|
6128
|
-
}
|
|
6129
|
-
else {
|
|
6130
|
-
promise = schema.baseService.getDataDropdownByFilter([this._commonService.newFilter(schema.valueField, exports.Operator.in, arrValue)], this.createDropdownOptions(schema));
|
|
6131
|
-
}
|
|
6132
|
-
dataByOrder = dicData[schema.order];
|
|
6133
|
-
if (dataByOrder == null) {
|
|
6134
|
-
dicData[schema.order] = {
|
|
6135
|
-
promises: [promise],
|
|
6136
|
-
schemas: [schema]
|
|
6137
|
-
};
|
|
6138
|
-
continue;
|
|
6139
|
-
}
|
|
6140
|
-
dataByOrder.promises.push(promise);
|
|
6141
|
-
dataByOrder.schemas.push(schema);
|
|
6142
|
-
}
|
|
6143
|
-
}
|
|
6144
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
6145
|
-
finally {
|
|
6146
|
-
try {
|
|
6147
|
-
if (lstSchemaWithBaseService_1_1 && !lstSchemaWithBaseService_1_1.done && (_c = lstSchemaWithBaseService_1.return)) _c.call(lstSchemaWithBaseService_1);
|
|
6148
|
-
}
|
|
6149
|
-
finally { if (e_2) throw e_2.error; }
|
|
6150
|
-
}
|
|
6151
|
-
}
|
|
6152
6072
|
lstData = Object.values(dicData);
|
|
6153
6073
|
_loop_1 = function (index) {
|
|
6154
|
-
var data, promises,
|
|
6155
|
-
return __generator(this, function (
|
|
6156
|
-
switch (
|
|
6074
|
+
var data, promises, schemaDatas, arrRes;
|
|
6075
|
+
return __generator(this, function (_a) {
|
|
6076
|
+
switch (_a.label) {
|
|
6157
6077
|
case 0:
|
|
6158
6078
|
data = lstData[index];
|
|
6159
6079
|
if (data == null) {
|
|
6160
6080
|
return [2 /*return*/, "continue"];
|
|
6161
6081
|
}
|
|
6162
6082
|
promises = data.promises;
|
|
6163
|
-
|
|
6083
|
+
schemaDatas = data.schemas;
|
|
6164
6084
|
if (promises.length === 0) {
|
|
6165
6085
|
return [2 /*return*/, "continue"];
|
|
6166
6086
|
}
|
|
6167
6087
|
return [4 /*yield*/, Promise.all(promises)];
|
|
6168
6088
|
case 1:
|
|
6169
|
-
arrRes =
|
|
6170
|
-
|
|
6171
|
-
var
|
|
6089
|
+
arrRes = _a.sent();
|
|
6090
|
+
schemaDatas.forEach(function (schema, resIndex) {
|
|
6091
|
+
var schemaData = arrRes[resIndex] === true ? schema.dataSource : arrRes[resIndex];
|
|
6172
6092
|
if (schema.callbackDataFinish) {
|
|
6173
6093
|
schema.callbackDataFinish({
|
|
6174
|
-
data:
|
|
6094
|
+
data: schemaData
|
|
6175
6095
|
});
|
|
6176
6096
|
}
|
|
6177
|
-
schema.dataSource =
|
|
6097
|
+
schema.dataSource = schemaData;
|
|
6178
6098
|
if (callBackAfterGetRefDataDropdown) {
|
|
6179
6099
|
callBackAfterGetRefDataDropdown(schema.field);
|
|
6180
6100
|
}
|
|
6181
6101
|
});
|
|
6182
|
-
this_1.mergeRefDatasToDatasource(dataSource,
|
|
6102
|
+
this_1.mergeRefDatasToDatasource(dataSource, schemaDatas);
|
|
6183
6103
|
return [2 /*return*/];
|
|
6184
6104
|
}
|
|
6185
6105
|
});
|
|
6186
6106
|
};
|
|
6187
6107
|
this_1 = this;
|
|
6188
6108
|
index = 0;
|
|
6189
|
-
|
|
6109
|
+
_b.label = 1;
|
|
6190
6110
|
case 1:
|
|
6191
6111
|
if (!(index < lstData.length)) return [3 /*break*/, 4];
|
|
6192
6112
|
return [5 /*yield**/, _loop_1(index)];
|
|
6193
6113
|
case 2:
|
|
6194
|
-
|
|
6195
|
-
|
|
6114
|
+
_b.sent();
|
|
6115
|
+
_b.label = 3;
|
|
6196
6116
|
case 3:
|
|
6197
6117
|
index++;
|
|
6198
6118
|
return [3 /*break*/, 1];
|
|
@@ -6201,6 +6121,27 @@
|
|
|
6201
6121
|
});
|
|
6202
6122
|
});
|
|
6203
6123
|
};
|
|
6124
|
+
CrudService.prototype.processSchemaWithBaseService = function (schema, dataSource) {
|
|
6125
|
+
var _this = this;
|
|
6126
|
+
var arrValue = [];
|
|
6127
|
+
dataSource.forEach(function (itemData) {
|
|
6128
|
+
var currentValue = schema.funcGetValueOfField(itemData);
|
|
6129
|
+
if (currentValue == null) {
|
|
6130
|
+
return;
|
|
6131
|
+
}
|
|
6132
|
+
if (schema.multiple) {
|
|
6133
|
+
_this.mapValueMultiple(arrValue, currentValue, schema);
|
|
6134
|
+
return;
|
|
6135
|
+
}
|
|
6136
|
+
if (!arrValue.some(function (p) { return p == currentValue; })) {
|
|
6137
|
+
arrValue.push(currentValue);
|
|
6138
|
+
}
|
|
6139
|
+
});
|
|
6140
|
+
if (schema.baseService instanceof MasterDataService) {
|
|
6141
|
+
return schema.baseService.getDataDropdown(schema.groupCode, arrValue, this.createDropdownOptions(schema));
|
|
6142
|
+
}
|
|
6143
|
+
return schema.baseService.getDataDropdownByFilter([this._commonService.newFilter(schema.valueField, exports.Operator.in, arrValue)], this.createDropdownOptions(schema));
|
|
6144
|
+
};
|
|
6204
6145
|
CrudService.prototype.mapValueMultiple = function (arrValue, valueToMap, schema) {
|
|
6205
6146
|
if (!valueToMap) {
|
|
6206
6147
|
return;
|
|
@@ -6224,12 +6165,12 @@
|
|
|
6224
6165
|
return schema.funcGetLabel ? schema.funcGetLabel : function (item) { return item[schema.displayFieldInGrid] || item[schema.displayField] || item['ten']; };
|
|
6225
6166
|
};
|
|
6226
6167
|
CrudService.prototype.mergeRefDatasToDatasource = function (dataSource, schemas, callBackAfterGetRefDataDropdown) {
|
|
6227
|
-
var
|
|
6168
|
+
var e_2, _a, e_3, _b;
|
|
6228
6169
|
try {
|
|
6229
6170
|
// #region set default function
|
|
6230
6171
|
for (var dataSource_1 = __values(dataSource), dataSource_1_1 = dataSource_1.next(); !dataSource_1_1.done; dataSource_1_1 = dataSource_1.next()) {
|
|
6231
6172
|
var rowData = dataSource_1_1.value;
|
|
6232
|
-
var
|
|
6173
|
+
var _loop_2 = function (schema) {
|
|
6233
6174
|
var data = schema.dataSource;
|
|
6234
6175
|
var field = schema.field;
|
|
6235
6176
|
if (!data || !data.length) {
|
|
@@ -6294,29 +6235,29 @@
|
|
|
6294
6235
|
};
|
|
6295
6236
|
var this_2 = this;
|
|
6296
6237
|
try {
|
|
6297
|
-
for (var schemas_2 = (
|
|
6238
|
+
for (var schemas_2 = (e_3 = void 0, __values(schemas)), schemas_2_1 = schemas_2.next(); !schemas_2_1.done; schemas_2_1 = schemas_2.next()) {
|
|
6298
6239
|
var schema = schemas_2_1.value;
|
|
6299
|
-
|
|
6240
|
+
_loop_2(schema);
|
|
6300
6241
|
}
|
|
6301
6242
|
}
|
|
6302
|
-
catch (
|
|
6243
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
6303
6244
|
finally {
|
|
6304
6245
|
try {
|
|
6305
|
-
if (schemas_2_1 && !schemas_2_1.done && (
|
|
6246
|
+
if (schemas_2_1 && !schemas_2_1.done && (_b = schemas_2.return)) _b.call(schemas_2);
|
|
6306
6247
|
}
|
|
6307
|
-
finally { if (
|
|
6248
|
+
finally { if (e_3) throw e_3.error; }
|
|
6308
6249
|
}
|
|
6309
6250
|
// if (callBackAfterGetRefDataDropdown) {
|
|
6310
6251
|
// callBackAfterGetRefDataDropdown(rowData);
|
|
6311
6252
|
// }
|
|
6312
6253
|
}
|
|
6313
6254
|
}
|
|
6314
|
-
catch (
|
|
6255
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
6315
6256
|
finally {
|
|
6316
6257
|
try {
|
|
6317
|
-
if (dataSource_1_1 && !dataSource_1_1.done && (
|
|
6258
|
+
if (dataSource_1_1 && !dataSource_1_1.done && (_a = dataSource_1.return)) _a.call(dataSource_1);
|
|
6318
6259
|
}
|
|
6319
|
-
finally { if (
|
|
6260
|
+
finally { if (e_2) throw e_2.error; }
|
|
6320
6261
|
}
|
|
6321
6262
|
};
|
|
6322
6263
|
CrudService.prototype.mergeRefDataToDatasource = function (dataSource, schema, data) {
|
|
@@ -6763,7 +6704,7 @@
|
|
|
6763
6704
|
return result;
|
|
6764
6705
|
};
|
|
6765
6706
|
CrudService.prototype.deQuyReplaceValue = function (filters, filter, model, rootModel) {
|
|
6766
|
-
var
|
|
6707
|
+
var e_4, _a;
|
|
6767
6708
|
var _this = this;
|
|
6768
6709
|
var valueFilter = null;
|
|
6769
6710
|
var sourceField = filter.sourceField;
|
|
@@ -6801,12 +6742,12 @@
|
|
|
6801
6742
|
}
|
|
6802
6743
|
}
|
|
6803
6744
|
}
|
|
6804
|
-
catch (
|
|
6745
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
6805
6746
|
finally {
|
|
6806
6747
|
try {
|
|
6807
|
-
if (fields_1_1 && !fields_1_1.done && (
|
|
6748
|
+
if (fields_1_1 && !fields_1_1.done && (_a = fields_1.return)) _a.call(fields_1);
|
|
6808
6749
|
}
|
|
6809
|
-
finally { if (
|
|
6750
|
+
finally { if (e_4) throw e_4.error; }
|
|
6810
6751
|
}
|
|
6811
6752
|
if (canAccessSubField(temp)) {
|
|
6812
6753
|
valueFilter = temp[subField];
|
|
@@ -21169,36 +21110,36 @@
|
|
|
21169
21110
|
ListComponentBase.prototype.tongHopWorkflowHistoryForNextFirstStep = function (itemWorkflowHistory, itemTask, workflowSetting, workflowCode) {
|
|
21170
21111
|
if (itemWorkflowHistory == null)
|
|
21171
21112
|
return null;
|
|
21172
|
-
|
|
21173
|
-
|
|
21174
|
-
|
|
21175
|
-
|
|
21176
|
-
|
|
21177
|
-
|
|
21178
|
-
|
|
21179
|
-
|
|
21180
|
-
|
|
21181
|
-
|
|
21182
|
-
|
|
21183
|
-
|
|
21184
|
-
|
|
21185
|
-
|
|
21186
|
-
|
|
21187
|
-
|
|
21188
|
-
|
|
21189
|
-
|
|
21190
|
-
|
|
21191
|
-
|
|
21192
|
-
|
|
21193
|
-
name = crudListSetting.baseService.objectName + " " + name;
|
|
21194
|
-
itemWorkflowHistory.tableName = this._congViecService.entityName;
|
|
21195
|
-
itemWorkflowHistory.objectFullName = name;
|
|
21196
|
-
itemWorkflowHistory.objectName = name;
|
|
21197
|
-
itemWorkflowHistory.workflowCode = workflowCode;
|
|
21198
|
-
itemWorkflowHistory.itemId = itemTask.id;
|
|
21199
|
-
itemWorkflowHistory.sourceStatusCode = stateStart_1.code;
|
|
21200
|
-
itemWorkflowHistory.actionCode = actionCode_1;
|
|
21113
|
+
itemWorkflowHistory.id = this._commonService.guid();
|
|
21114
|
+
itemWorkflowHistory.ignoreValidateBaseInBussiness = true;
|
|
21115
|
+
var workflow = workflowSetting.workflows.find(function (q) { return q.code == workflowCode; });
|
|
21116
|
+
if (workflow == null)
|
|
21117
|
+
return null;
|
|
21118
|
+
var stateStart = workflow.data.machines.find(function (q) { return q.type == exports.EnumStateType.START; });
|
|
21119
|
+
if (stateStart == null)
|
|
21120
|
+
return null;
|
|
21121
|
+
var actionCode = itemWorkflowHistory.actionCode;
|
|
21122
|
+
var existAction = workflow.data.connections.some(function (x) { return x.source == stateStart.id
|
|
21123
|
+
&& x.code == actionCode; });
|
|
21124
|
+
if (!existAction)
|
|
21125
|
+
return null;
|
|
21126
|
+
var crudListSetting = new CrudListSetting();
|
|
21127
|
+
this._congViecService.adjustSettingWorkflowForCrudList(crudListSetting);
|
|
21128
|
+
var name = '';
|
|
21129
|
+
if (typeof crudListSetting.displayField == 'string') {
|
|
21130
|
+
name = itemTask[(crudListSetting.displayField)];
|
|
21131
|
+
}
|
|
21132
|
+
else {
|
|
21133
|
+
name = (crudListSetting.displayField)(itemTask);
|
|
21201
21134
|
}
|
|
21135
|
+
name = crudListSetting.baseService.objectName + " " + name;
|
|
21136
|
+
itemWorkflowHistory.tableName = this._congViecService.entityName;
|
|
21137
|
+
itemWorkflowHistory.objectFullName = name;
|
|
21138
|
+
itemWorkflowHistory.objectName = crudListSetting.baseService.objectName;
|
|
21139
|
+
itemWorkflowHistory.workflowCode = workflowCode;
|
|
21140
|
+
itemWorkflowHistory.itemId = itemTask.id;
|
|
21141
|
+
itemWorkflowHistory.sourceStatusCode = stateStart.code;
|
|
21142
|
+
itemWorkflowHistory.actionCode = actionCode;
|
|
21202
21143
|
return itemWorkflowHistory;
|
|
21203
21144
|
};
|
|
21204
21145
|
ListComponentBase.prototype.insertTaskAndReload = function (modelTask, rowData, workflowSetting) {
|
|
@@ -21217,6 +21158,7 @@
|
|
|
21217
21158
|
_c.label = 2;
|
|
21218
21159
|
case 2: return [4 /*yield*/, this._congViecService.post(modelTask)
|
|
21219
21160
|
.then(function (res) { return _this.handleResponse(res, '', function (f) {
|
|
21161
|
+
_this.onStartedWorkflow.emit(rowData.id);
|
|
21220
21162
|
_this.getData();
|
|
21221
21163
|
}); })];
|
|
21222
21164
|
case 3:
|
|
@@ -30603,7 +30545,9 @@
|
|
|
30603
30545
|
this.environment = this._moduleConfigService.getConfig().environment;
|
|
30604
30546
|
this.appCode = this._moduleConfigService.getConfig().appCode;
|
|
30605
30547
|
this.icon = this.environment.appMetadata.main.favicon;
|
|
30606
|
-
this.favIcon
|
|
30548
|
+
if (this.favIcon) {
|
|
30549
|
+
this.favIcon.href = this.icon;
|
|
30550
|
+
}
|
|
30607
30551
|
if (this.environment.keyPressPermissionUtils) {
|
|
30608
30552
|
this.keyPressPermissionUtils = this.environment.keyPressPermissionUtils;
|
|
30609
30553
|
}
|
|
@@ -31046,7 +30990,6 @@
|
|
|
31046
30990
|
_this._authenService.cleanupSessionStorage();
|
|
31047
30991
|
_this._storageUpdatedService.cleanupStorageService();
|
|
31048
30992
|
_this._oauthService.revokeTokenAndLogout(null, true).then(function (res) {
|
|
31049
|
-
_this._applicationContext.getRootContext().data.isLoggingOut = false;
|
|
31050
30993
|
});
|
|
31051
30994
|
}
|
|
31052
30995
|
else if (evt.type == 'session_terminated') {
|