tnx-shared 5.3.237 → 5.3.238
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/bundles/tnx-shared.umd.js +222 -204
- 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/esm2015/classes/base/list-component-base.js +15 -3
- package/fesm2015/tnx-shared.js +14 -2
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
|
@@ -22256,7 +22256,7 @@
|
|
|
22256
22256
|
configurable: true
|
|
22257
22257
|
});
|
|
22258
22258
|
ListComponentBase.prototype.ngOnInit = function () {
|
|
22259
|
-
var e_1,
|
|
22259
|
+
var e_1, _h;
|
|
22260
22260
|
var _this = this;
|
|
22261
22261
|
this.settingDefault = Object.assign({}, this.setting);
|
|
22262
22262
|
this.subscribe(ComCtxConstants.COMMON.ENTITY_METADATA_RELOADED, function (service) {
|
|
@@ -22280,7 +22280,7 @@
|
|
|
22280
22280
|
}
|
|
22281
22281
|
if (!this.setting.hiddenTrinhKy || !this.setting.disableShare) {
|
|
22282
22282
|
if (!this.menuButtons) {
|
|
22283
|
-
this.menuButtons = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (
|
|
22283
|
+
this.menuButtons = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_h) {
|
|
22284
22284
|
return [2 /*return*/, []];
|
|
22285
22285
|
}); }); };
|
|
22286
22286
|
}
|
|
@@ -22312,8 +22312,8 @@
|
|
|
22312
22312
|
}
|
|
22313
22313
|
if (this.currentUser == null) {
|
|
22314
22314
|
try {
|
|
22315
|
-
for (var
|
|
22316
|
-
var buttonPermissionCode =
|
|
22315
|
+
for (var _j = __values(this.lstButtonPermission), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
22316
|
+
var buttonPermissionCode = _k.value;
|
|
22317
22317
|
var buttonPermission = (this.setting.baseService.serviceCode + "/" + this.setting.baseService.entityName + "/" + buttonPermissionCode).toUpperCase();
|
|
22318
22318
|
this.buttonPermissionMap.set(buttonPermission, false);
|
|
22319
22319
|
}
|
|
@@ -22321,7 +22321,7 @@
|
|
|
22321
22321
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
22322
22322
|
finally {
|
|
22323
22323
|
try {
|
|
22324
|
-
if (
|
|
22324
|
+
if (_k && !_k.done && (_h = _j.return)) _h.call(_j);
|
|
22325
22325
|
}
|
|
22326
22326
|
finally { if (e_1) throw e_1.error; }
|
|
22327
22327
|
}
|
|
@@ -22332,13 +22332,13 @@
|
|
|
22332
22332
|
&& (this._moduleConfigService.getConfig().environment.ignoreAdmin === true
|
|
22333
22333
|
|| this.currentUser.isadmin.toLowerCase() !== 'true')) {
|
|
22334
22334
|
this._permissionService.getServicePermission(this.setting.baseService.serviceCode).then(function (result) {
|
|
22335
|
-
var e_2,
|
|
22335
|
+
var e_2, _h;
|
|
22336
22336
|
var _a;
|
|
22337
22337
|
var lstBasePermission = result;
|
|
22338
22338
|
_this.lstButtonPermission = (_a = _this._moduleConfigService.getConfig().environment.buttonPermissions) !== null && _a !== void 0 ? _a : [];
|
|
22339
22339
|
try {
|
|
22340
|
-
for (var
|
|
22341
|
-
var buttonPermissionCode =
|
|
22340
|
+
for (var _j = __values(_this.lstButtonPermission), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
22341
|
+
var buttonPermissionCode = _k.value;
|
|
22342
22342
|
var buttonPermission = (_this.setting.baseService.serviceCode + "/" + _this.setting.baseService.entityName + "/" + buttonPermissionCode).toUpperCase();
|
|
22343
22343
|
_this.buttonPermissionMap.set(buttonPermission, lstBasePermission.includes(buttonPermission));
|
|
22344
22344
|
}
|
|
@@ -22346,7 +22346,7 @@
|
|
|
22346
22346
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
22347
22347
|
finally {
|
|
22348
22348
|
try {
|
|
22349
|
-
if (
|
|
22349
|
+
if (_k && !_k.done && (_h = _j.return)) _h.call(_j);
|
|
22350
22350
|
}
|
|
22351
22351
|
finally { if (e_2) throw e_2.error; }
|
|
22352
22352
|
}
|
|
@@ -22414,7 +22414,7 @@
|
|
|
22414
22414
|
this.buildFilterColumn(this.setting.cols);
|
|
22415
22415
|
};
|
|
22416
22416
|
ListComponentBase.prototype.extendColumns = function (cols, appendCol) {
|
|
22417
|
-
var e_3,
|
|
22417
|
+
var e_3, _h;
|
|
22418
22418
|
var _this = this;
|
|
22419
22419
|
if (appendCol === void 0) { appendCol = true; }
|
|
22420
22420
|
this.setting.fieldNeedGetRef = [];
|
|
@@ -22571,7 +22571,7 @@
|
|
|
22571
22571
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
22572
22572
|
finally {
|
|
22573
22573
|
try {
|
|
22574
|
-
if (cols_1_1 && !cols_1_1.done && (
|
|
22574
|
+
if (cols_1_1 && !cols_1_1.done && (_h = cols_1.return)) _h.call(cols_1);
|
|
22575
22575
|
}
|
|
22576
22576
|
finally { if (e_3) throw e_3.error; }
|
|
22577
22577
|
}
|
|
@@ -22594,7 +22594,7 @@
|
|
|
22594
22594
|
});
|
|
22595
22595
|
};
|
|
22596
22596
|
ListComponentBase.prototype.formatColumns = function (cols) {
|
|
22597
|
-
var e_4,
|
|
22597
|
+
var e_4, _h;
|
|
22598
22598
|
try {
|
|
22599
22599
|
for (var cols_2 = __values(cols), cols_2_1 = cols_2.next(); !cols_2_1.done; cols_2_1 = cols_2.next()) {
|
|
22600
22600
|
var col = cols_2_1.value;
|
|
@@ -22610,13 +22610,13 @@
|
|
|
22610
22610
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
22611
22611
|
finally {
|
|
22612
22612
|
try {
|
|
22613
|
-
if (cols_2_1 && !cols_2_1.done && (
|
|
22613
|
+
if (cols_2_1 && !cols_2_1.done && (_h = cols_2.return)) _h.call(cols_2);
|
|
22614
22614
|
}
|
|
22615
22615
|
finally { if (e_4) throw e_4.error; }
|
|
22616
22616
|
}
|
|
22617
22617
|
};
|
|
22618
22618
|
ListComponentBase.prototype.getColumnSetting = function (colGroup) {
|
|
22619
|
-
var e_5,
|
|
22619
|
+
var e_5, _h;
|
|
22620
22620
|
this.setting.groupColumn = colGroup;
|
|
22621
22621
|
var dataSetting = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.COLUMN_SETTING);
|
|
22622
22622
|
var jsonData = this.tryParseJson(dataSetting);
|
|
@@ -22649,7 +22649,7 @@
|
|
|
22649
22649
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
22650
22650
|
finally {
|
|
22651
22651
|
try {
|
|
22652
|
-
if (settings_1_1 && !settings_1_1.done && (
|
|
22652
|
+
if (settings_1_1 && !settings_1_1.done && (_h = settings_1.return)) _h.call(settings_1);
|
|
22653
22653
|
}
|
|
22654
22654
|
finally { if (e_5) throw e_5.error; }
|
|
22655
22655
|
}
|
|
@@ -22905,7 +22905,7 @@
|
|
|
22905
22905
|
};
|
|
22906
22906
|
ListComponentBase.prototype.handleSearch = function (data) {
|
|
22907
22907
|
return __awaiter(this, void 0, void 0, function () {
|
|
22908
|
-
return __generator(this, function (
|
|
22908
|
+
return __generator(this, function (_h) {
|
|
22909
22909
|
this.filter_commonSearch = data.filters;
|
|
22910
22910
|
this.dataSearchCommon = data.dataForm;
|
|
22911
22911
|
this.setting.pageSetting.page = 1;
|
|
@@ -22944,17 +22944,17 @@
|
|
|
22944
22944
|
if (isTree === void 0) { isTree = false; }
|
|
22945
22945
|
return __awaiter(this, void 0, void 0, function () {
|
|
22946
22946
|
var rs;
|
|
22947
|
-
return __generator(this, function (
|
|
22948
|
-
switch (
|
|
22947
|
+
return __generator(this, function (_h) {
|
|
22948
|
+
switch (_h.label) {
|
|
22949
22949
|
case 0:
|
|
22950
22950
|
if (!this.setting.showConfirmExport) return [3 /*break*/, 2];
|
|
22951
22951
|
return [4 /*yield*/, this._notifierService.showConfirm('Bạn có chắc chắn muốn xuất bản ghi đã chọn (Và các bản ghi con tương ứng)', 'Xác nhận xuất file')];
|
|
22952
22952
|
case 1:
|
|
22953
|
-
rs =
|
|
22953
|
+
rs = _h.sent();
|
|
22954
22954
|
if (!rs) {
|
|
22955
22955
|
return [2 /*return*/];
|
|
22956
22956
|
}
|
|
22957
|
-
|
|
22957
|
+
_h.label = 2;
|
|
22958
22958
|
case 2:
|
|
22959
22959
|
switch (this.setting.exportItemsMode) {
|
|
22960
22960
|
case exports.ExportItemsMode.FromHtml:
|
|
@@ -22975,17 +22975,17 @@
|
|
|
22975
22975
|
if (isTree === void 0) { isTree = false; }
|
|
22976
22976
|
return __awaiter(this, void 0, void 0, function () {
|
|
22977
22977
|
var rs, header, element, tableEle, headEle, bodyEle, arrHeadEle, firstHead, arrRowData, strHeadEle, strBodyEle, css, table;
|
|
22978
|
-
return __generator(this, function (
|
|
22979
|
-
switch (
|
|
22978
|
+
return __generator(this, function (_h) {
|
|
22979
|
+
switch (_h.label) {
|
|
22980
22980
|
case 0:
|
|
22981
22981
|
if (!this.setting.showConfirmExport) return [3 /*break*/, 2];
|
|
22982
22982
|
return [4 /*yield*/, this._notifierService.showConfirm('Bạn có chắc chắn muốn in bản ghi đã chọn (Và các bản ghi con tương ứng)', 'Xác nhận in file')];
|
|
22983
22983
|
case 1:
|
|
22984
|
-
rs =
|
|
22984
|
+
rs = _h.sent();
|
|
22985
22985
|
if (!rs) {
|
|
22986
22986
|
return [2 /*return*/];
|
|
22987
22987
|
}
|
|
22988
|
-
|
|
22988
|
+
_h.label = 2;
|
|
22989
22989
|
case 2:
|
|
22990
22990
|
header = 'Danh sách ' + this.setting.objectName;
|
|
22991
22991
|
element = isTree ? this.treeTable.el.nativeElement : this.table.el.nativeElement;
|
|
@@ -23064,7 +23064,7 @@
|
|
|
23064
23064
|
return result;
|
|
23065
23065
|
};
|
|
23066
23066
|
ListComponentBase.prototype.headHtmlToStringNew = function (arrHeadEle) {
|
|
23067
|
-
var e_6,
|
|
23067
|
+
var e_6, _h, e_7, _j;
|
|
23068
23068
|
var result = '';
|
|
23069
23069
|
try {
|
|
23070
23070
|
for (var arrHeadEle_1 = __values(arrHeadEle), arrHeadEle_1_1 = arrHeadEle_1.next(); !arrHeadEle_1_1.done; arrHeadEle_1_1 = arrHeadEle_1.next()) {
|
|
@@ -23079,7 +23079,7 @@
|
|
|
23079
23079
|
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
23080
23080
|
finally {
|
|
23081
23081
|
try {
|
|
23082
|
-
if (itemHeader_1_1 && !itemHeader_1_1.done && (
|
|
23082
|
+
if (itemHeader_1_1 && !itemHeader_1_1.done && (_j = itemHeader_1.return)) _j.call(itemHeader_1);
|
|
23083
23083
|
}
|
|
23084
23084
|
finally { if (e_7) throw e_7.error; }
|
|
23085
23085
|
}
|
|
@@ -23089,7 +23089,7 @@
|
|
|
23089
23089
|
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
23090
23090
|
finally {
|
|
23091
23091
|
try {
|
|
23092
|
-
if (arrHeadEle_1_1 && !arrHeadEle_1_1.done && (
|
|
23092
|
+
if (arrHeadEle_1_1 && !arrHeadEle_1_1.done && (_h = arrHeadEle_1.return)) _h.call(arrHeadEle_1);
|
|
23093
23093
|
}
|
|
23094
23094
|
finally { if (e_6) throw e_6.error; }
|
|
23095
23095
|
}
|
|
@@ -23136,7 +23136,7 @@
|
|
|
23136
23136
|
return arrHeader;
|
|
23137
23137
|
};
|
|
23138
23138
|
ListComponentBase.prototype.getArrHeadByHtmlNew = function (header) {
|
|
23139
|
-
var e_8,
|
|
23139
|
+
var e_8, _h;
|
|
23140
23140
|
var _a, _b, _c;
|
|
23141
23141
|
var filter = Array.prototype.filter;
|
|
23142
23142
|
var allRow = header.querySelectorAll('tr');
|
|
@@ -23154,7 +23154,7 @@
|
|
|
23154
23154
|
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
23155
23155
|
finally {
|
|
23156
23156
|
try {
|
|
23157
|
-
if (lstRow_1_1 && !lstRow_1_1.done && (
|
|
23157
|
+
if (lstRow_1_1 && !lstRow_1_1.done && (_h = lstRow_1.return)) _h.call(lstRow_1);
|
|
23158
23158
|
}
|
|
23159
23159
|
finally { if (e_8) throw e_8.error; }
|
|
23160
23160
|
}
|
|
@@ -23361,25 +23361,25 @@
|
|
|
23361
23361
|
};
|
|
23362
23362
|
ListComponentBase.prototype.showContextMenu = function (evt, rowData) {
|
|
23363
23363
|
return __awaiter(this, void 0, void 0, function () {
|
|
23364
|
-
var
|
|
23365
|
-
var
|
|
23366
|
-
return __generator(this, function (
|
|
23367
|
-
switch (
|
|
23364
|
+
var _h, _j, shareButtons, showWorkflowAttach;
|
|
23365
|
+
var _k;
|
|
23366
|
+
return __generator(this, function (_l) {
|
|
23367
|
+
switch (_l.label) {
|
|
23368
23368
|
case 0:
|
|
23369
23369
|
this.rowDataCurrent = rowData;
|
|
23370
|
-
|
|
23371
|
-
|
|
23370
|
+
_h = this;
|
|
23371
|
+
_j = this.getMenuButtonAuthorized;
|
|
23372
23372
|
return [4 /*yield*/, this.menuButtons(rowData)];
|
|
23373
|
-
case 1: return [4 /*yield*/,
|
|
23373
|
+
case 1: return [4 /*yield*/, _j.apply(this, [_l.sent()])];
|
|
23374
23374
|
case 2:
|
|
23375
|
-
|
|
23375
|
+
_h.buttonContexts = _l.sent();
|
|
23376
23376
|
if (!this.setting.disableShare) {
|
|
23377
23377
|
shareButtons = [
|
|
23378
23378
|
{ label: 'Chia sẻ', icon: 'pi pi-link', command: this.createShareLink.bind(this) },
|
|
23379
23379
|
{ label: 'Danh sách chia sẻ', icon: 'pi pi-list', command: this.showLinkSharing.bind(this) },
|
|
23380
23380
|
// { label: 'Danh sách nhìn thấy', icon: 'pi pi-list', command: this.showListPermissionByItem.bind(this) }
|
|
23381
23381
|
];
|
|
23382
|
-
(
|
|
23382
|
+
(_k = this.buttonContexts).push.apply(_k, __spreadArray([], __read(shareButtons)));
|
|
23383
23383
|
}
|
|
23384
23384
|
showWorkflowAttach = localStorage.getItem('__showWorkflowAttach');
|
|
23385
23385
|
if (showWorkflowAttach == 'true') {
|
|
@@ -23401,9 +23401,9 @@
|
|
|
23401
23401
|
ListComponentBase.prototype.getMenuButtonAuthorized = function (menuButtons) {
|
|
23402
23402
|
return __awaiter(this, void 0, void 0, function () {
|
|
23403
23403
|
var authorizedButtons, serviceCodeByBase, promises, _loop_2, this_2, menuButtons_1, menuButtons_1_1, item;
|
|
23404
|
-
var e_9,
|
|
23405
|
-
return __generator(this, function (
|
|
23406
|
-
switch (
|
|
23404
|
+
var e_9, _h;
|
|
23405
|
+
return __generator(this, function (_j) {
|
|
23406
|
+
switch (_j.label) {
|
|
23407
23407
|
case 0:
|
|
23408
23408
|
authorizedButtons = [];
|
|
23409
23409
|
serviceCodeByBase = this.setting.baseService != null ? this.setting.baseService.serviceCode.toUpperCase() : '';
|
|
@@ -23433,13 +23433,13 @@
|
|
|
23433
23433
|
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
23434
23434
|
finally {
|
|
23435
23435
|
try {
|
|
23436
|
-
if (menuButtons_1_1 && !menuButtons_1_1.done && (
|
|
23436
|
+
if (menuButtons_1_1 && !menuButtons_1_1.done && (_h = menuButtons_1.return)) _h.call(menuButtons_1);
|
|
23437
23437
|
}
|
|
23438
23438
|
finally { if (e_9) throw e_9.error; }
|
|
23439
23439
|
}
|
|
23440
23440
|
return [4 /*yield*/, Promise.all(promises)];
|
|
23441
23441
|
case 1:
|
|
23442
|
-
|
|
23442
|
+
_j.sent();
|
|
23443
23443
|
return [2 /*return*/, authorizedButtons];
|
|
23444
23444
|
}
|
|
23445
23445
|
});
|
|
@@ -24056,10 +24056,10 @@
|
|
|
24056
24056
|
clearTimeout(this.timeout);
|
|
24057
24057
|
};
|
|
24058
24058
|
ListComponentBase.prototype.disableMultipleDelete = function () {
|
|
24059
|
-
var e_10,
|
|
24059
|
+
var e_10, _h;
|
|
24060
24060
|
try {
|
|
24061
|
-
for (var
|
|
24062
|
-
var item =
|
|
24061
|
+
for (var _j = __values(this.model.selectedItems), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
24062
|
+
var item = _k.value;
|
|
24063
24063
|
if (this.disableDelete(item)) {
|
|
24064
24064
|
return true;
|
|
24065
24065
|
}
|
|
@@ -24068,7 +24068,7 @@
|
|
|
24068
24068
|
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
24069
24069
|
finally {
|
|
24070
24070
|
try {
|
|
24071
|
-
if (
|
|
24071
|
+
if (_k && !_k.done && (_h = _j.return)) _h.call(_j);
|
|
24072
24072
|
}
|
|
24073
24073
|
finally { if (e_10) throw e_10.error; }
|
|
24074
24074
|
}
|
|
@@ -24139,11 +24139,11 @@
|
|
|
24139
24139
|
};
|
|
24140
24140
|
ListComponentBase.prototype.processBaseData = function () {
|
|
24141
24141
|
return __awaiter(this, void 0, void 0, function () {
|
|
24142
|
-
return __generator(this, function (
|
|
24143
|
-
switch (
|
|
24142
|
+
return __generator(this, function (_h) {
|
|
24143
|
+
switch (_h.label) {
|
|
24144
24144
|
case 0: return [4 /*yield*/, this.preProcessData(this._rawDataSource)];
|
|
24145
24145
|
case 1:
|
|
24146
|
-
|
|
24146
|
+
_h.sent();
|
|
24147
24147
|
return [2 /*return*/];
|
|
24148
24148
|
}
|
|
24149
24149
|
});
|
|
@@ -24152,11 +24152,11 @@
|
|
|
24152
24152
|
ListComponentBase.prototype.preProcessData = function (dataSource) {
|
|
24153
24153
|
return __awaiter(this, void 0, void 0, function () {
|
|
24154
24154
|
var colHasPipe, _loop_3, this_3, colHasPipe_1, colHasPipe_1_1, col;
|
|
24155
|
-
var e_11,
|
|
24156
|
-
return __generator(this, function (
|
|
24155
|
+
var e_11, _h;
|
|
24156
|
+
return __generator(this, function (_j) {
|
|
24157
24157
|
colHasPipe = this.setting.cols.filter(function (x) { return x.pipe; });
|
|
24158
24158
|
_loop_3 = function (col) {
|
|
24159
|
-
var e_12,
|
|
24159
|
+
var e_12, _k;
|
|
24160
24160
|
var _loop_4 = function (item) {
|
|
24161
24161
|
this_3.transform(col.pipe, col.asyncPipe, item[col.field]).then(function (rs) {
|
|
24162
24162
|
item["pipe__" + col.field + " "] = rs;
|
|
@@ -24171,7 +24171,7 @@
|
|
|
24171
24171
|
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
24172
24172
|
finally {
|
|
24173
24173
|
try {
|
|
24174
|
-
if (dataSource_1_1 && !dataSource_1_1.done && (
|
|
24174
|
+
if (dataSource_1_1 && !dataSource_1_1.done && (_k = dataSource_1.return)) _k.call(dataSource_1);
|
|
24175
24175
|
}
|
|
24176
24176
|
finally { if (e_12) throw e_12.error; }
|
|
24177
24177
|
}
|
|
@@ -24186,7 +24186,7 @@
|
|
|
24186
24186
|
catch (e_11_1) { e_11 = { error: e_11_1 }; }
|
|
24187
24187
|
finally {
|
|
24188
24188
|
try {
|
|
24189
|
-
if (colHasPipe_1_1 && !colHasPipe_1_1.done && (
|
|
24189
|
+
if (colHasPipe_1_1 && !colHasPipe_1_1.done && (_h = colHasPipe_1.return)) _h.call(colHasPipe_1);
|
|
24190
24190
|
}
|
|
24191
24191
|
finally { if (e_11) throw e_11.error; }
|
|
24192
24192
|
}
|
|
@@ -24197,8 +24197,8 @@
|
|
|
24197
24197
|
ListComponentBase.prototype.transform = function (pipe, asyncPipe, value) {
|
|
24198
24198
|
return __awaiter(this, void 0, void 0, function () {
|
|
24199
24199
|
var val, val;
|
|
24200
|
-
return __generator(this, function (
|
|
24201
|
-
switch (
|
|
24200
|
+
return __generator(this, function (_h) {
|
|
24201
|
+
switch (_h.label) {
|
|
24202
24202
|
case 0:
|
|
24203
24203
|
if (this.cachedTransforms[value]) {
|
|
24204
24204
|
return [2 /*return*/, this.cachedTransforms[value]];
|
|
@@ -24206,7 +24206,7 @@
|
|
|
24206
24206
|
if (!asyncPipe) return [3 /*break*/, 2];
|
|
24207
24207
|
return [4 /*yield*/, pipe.transform(value)];
|
|
24208
24208
|
case 1:
|
|
24209
|
-
val =
|
|
24209
|
+
val = _h.sent();
|
|
24210
24210
|
this.cachedTransforms[value] = val;
|
|
24211
24211
|
return [2 /*return*/, val];
|
|
24212
24212
|
case 2:
|
|
@@ -24362,7 +24362,7 @@
|
|
|
24362
24362
|
}
|
|
24363
24363
|
};
|
|
24364
24364
|
ListComponentBase.prototype.getMinimizeData = function (model) {
|
|
24365
|
-
var e_13,
|
|
24365
|
+
var e_13, _h;
|
|
24366
24366
|
if (isLiteralObject(model)) {
|
|
24367
24367
|
if (model._dropdownvalue != null && model._dropdownvalue !== '') {
|
|
24368
24368
|
return model[model._dropdownvalue];
|
|
@@ -24388,7 +24388,7 @@
|
|
|
24388
24388
|
catch (e_13_1) { e_13 = { error: e_13_1 }; }
|
|
24389
24389
|
finally {
|
|
24390
24390
|
try {
|
|
24391
|
-
if (model_1_1 && !model_1_1.done && (
|
|
24391
|
+
if (model_1_1 && !model_1_1.done && (_h = model_1.return)) _h.call(model_1);
|
|
24392
24392
|
}
|
|
24393
24393
|
finally { if (e_13) throw e_13.error; }
|
|
24394
24394
|
}
|
|
@@ -24523,8 +24523,8 @@
|
|
|
24523
24523
|
};
|
|
24524
24524
|
ListComponentBase.prototype.handleTableRendered = function () {
|
|
24525
24525
|
return __awaiter(this, void 0, void 0, function () {
|
|
24526
|
-
return __generator(this, function (
|
|
24527
|
-
switch (
|
|
24526
|
+
return __generator(this, function (_h) {
|
|
24527
|
+
switch (_h.label) {
|
|
24528
24528
|
case 0:
|
|
24529
24529
|
if (this.table) {
|
|
24530
24530
|
this._processAfterRendered(this.table.el.nativeElement);
|
|
@@ -24534,7 +24534,7 @@
|
|
|
24534
24534
|
}
|
|
24535
24535
|
return [4 /*yield*/, this.modifyButtonFunctionInRow()];
|
|
24536
24536
|
case 1:
|
|
24537
|
-
|
|
24537
|
+
_h.sent();
|
|
24538
24538
|
this.onReloaded.emit(true);
|
|
24539
24539
|
return [2 /*return*/];
|
|
24540
24540
|
}
|
|
@@ -24567,42 +24567,42 @@
|
|
|
24567
24567
|
ListComponentBase.prototype.modifyButtonFunctionInRow = function () {
|
|
24568
24568
|
var _a;
|
|
24569
24569
|
return __awaiter(this, void 0, void 0, function () {
|
|
24570
|
-
var
|
|
24571
|
-
var e_14,
|
|
24572
|
-
return __generator(this, function (
|
|
24573
|
-
switch (
|
|
24570
|
+
var _h, _j, rowData, total, _k, ex_1, e_14_1;
|
|
24571
|
+
var e_14, _l;
|
|
24572
|
+
return __generator(this, function (_m) {
|
|
24573
|
+
switch (_m.label) {
|
|
24574
24574
|
case 0:
|
|
24575
|
-
|
|
24576
|
-
|
|
24577
|
-
|
|
24575
|
+
_m.trys.push([0, 8, 9, 10]);
|
|
24576
|
+
_h = __values(this.model.dataSource), _j = _h.next();
|
|
24577
|
+
_m.label = 1;
|
|
24578
24578
|
case 1:
|
|
24579
|
-
if (!!
|
|
24580
|
-
rowData =
|
|
24581
|
-
|
|
24579
|
+
if (!!_j.done) return [3 /*break*/, 7];
|
|
24580
|
+
rowData = _j.value;
|
|
24581
|
+
_m.label = 2;
|
|
24582
24582
|
case 2:
|
|
24583
|
-
|
|
24584
|
-
|
|
24583
|
+
_m.trys.push([2, 5, , 6]);
|
|
24584
|
+
_k = this.getMenuButtonAuthorized;
|
|
24585
24585
|
return [4 /*yield*/, this.menuButtons(rowData)];
|
|
24586
|
-
case 3: return [4 /*yield*/,
|
|
24586
|
+
case 3: return [4 /*yield*/, _k.apply(this, [(_a = _m.sent()) !== null && _a !== void 0 ? _a : []])];
|
|
24587
24587
|
case 4:
|
|
24588
|
-
total = (
|
|
24588
|
+
total = (_m.sent());
|
|
24589
24589
|
rowData.disableFunctionRow = total.length < 1 && this.setting.disableShare;
|
|
24590
24590
|
return [3 /*break*/, 6];
|
|
24591
24591
|
case 5:
|
|
24592
|
-
ex_1 =
|
|
24592
|
+
ex_1 = _m.sent();
|
|
24593
24593
|
this.hiddenBtnFunction = true;
|
|
24594
24594
|
return [2 /*return*/];
|
|
24595
24595
|
case 6:
|
|
24596
|
-
|
|
24596
|
+
_j = _h.next();
|
|
24597
24597
|
return [3 /*break*/, 1];
|
|
24598
24598
|
case 7: return [3 /*break*/, 10];
|
|
24599
24599
|
case 8:
|
|
24600
|
-
e_14_1 =
|
|
24600
|
+
e_14_1 = _m.sent();
|
|
24601
24601
|
e_14 = { error: e_14_1 };
|
|
24602
24602
|
return [3 /*break*/, 10];
|
|
24603
24603
|
case 9:
|
|
24604
24604
|
try {
|
|
24605
|
-
if (
|
|
24605
|
+
if (_j && !_j.done && (_l = _h.return)) _l.call(_h);
|
|
24606
24606
|
}
|
|
24607
24607
|
finally { if (e_14) throw e_14.error; }
|
|
24608
24608
|
return [7 /*endfinally*/];
|
|
@@ -24632,10 +24632,10 @@
|
|
|
24632
24632
|
};
|
|
24633
24633
|
ListComponentBase.prototype.createSearchSchema = function () {
|
|
24634
24634
|
return __awaiter(this, void 0, void 0, function () {
|
|
24635
|
-
var searchInfo,
|
|
24636
|
-
var e_15,
|
|
24637
|
-
return __generator(this, function (
|
|
24638
|
-
switch (
|
|
24635
|
+
var searchInfo, _h, _j, col, control, e_15_1, _loop_5, this_4, _k, _l, field;
|
|
24636
|
+
var e_15, _m, _o, e_16, _p;
|
|
24637
|
+
return __generator(this, function (_q) {
|
|
24638
|
+
switch (_q.label) {
|
|
24639
24639
|
case 0:
|
|
24640
24640
|
if (this.setting.cols == null) {
|
|
24641
24641
|
return [2 /*return*/, this._notifierService.showWarning('Bạn chưa cấu hình cột cho danh sách')];
|
|
@@ -24645,14 +24645,14 @@
|
|
|
24645
24645
|
searchInfo.schema = [];
|
|
24646
24646
|
searchInfo.fieldDropdown = {};
|
|
24647
24647
|
searchInfo.fieldSearchText = [];
|
|
24648
|
-
|
|
24648
|
+
_q.label = 1;
|
|
24649
24649
|
case 1:
|
|
24650
|
-
|
|
24651
|
-
|
|
24652
|
-
|
|
24650
|
+
_q.trys.push([1, 6, 7, 8]);
|
|
24651
|
+
_h = __values(this.setting.cols), _j = _h.next();
|
|
24652
|
+
_q.label = 2;
|
|
24653
24653
|
case 2:
|
|
24654
|
-
if (!!
|
|
24655
|
-
col =
|
|
24654
|
+
if (!!_j.done) return [3 /*break*/, 5];
|
|
24655
|
+
col = _j.value;
|
|
24656
24656
|
if (!(col.allowFilter != false && col.rawColumn == null)) return [3 /*break*/, 4];
|
|
24657
24657
|
if (col.fullTextSearch) {
|
|
24658
24658
|
if (searchInfo.fieldSearchText.indexOf(col.field) == -1) {
|
|
@@ -24665,9 +24665,9 @@
|
|
|
24665
24665
|
}
|
|
24666
24666
|
return [4 /*yield*/, this.setting.function.getSearchControl(col.field)];
|
|
24667
24667
|
case 3:
|
|
24668
|
-
control =
|
|
24668
|
+
control = _q.sent();
|
|
24669
24669
|
if (control != null) {
|
|
24670
|
-
(
|
|
24670
|
+
(_o = searchInfo.schema).push.apply(_o, __spreadArray([], __read(control)));
|
|
24671
24671
|
}
|
|
24672
24672
|
else {
|
|
24673
24673
|
if (col.baseService || (col.dataSource && col.dataSource.length > 0)) {
|
|
@@ -24721,18 +24721,18 @@
|
|
|
24721
24721
|
}
|
|
24722
24722
|
}
|
|
24723
24723
|
}
|
|
24724
|
-
|
|
24724
|
+
_q.label = 4;
|
|
24725
24725
|
case 4:
|
|
24726
|
-
|
|
24726
|
+
_j = _h.next();
|
|
24727
24727
|
return [3 /*break*/, 2];
|
|
24728
24728
|
case 5: return [3 /*break*/, 8];
|
|
24729
24729
|
case 6:
|
|
24730
|
-
e_15_1 =
|
|
24730
|
+
e_15_1 = _q.sent();
|
|
24731
24731
|
e_15 = { error: e_15_1 };
|
|
24732
24732
|
return [3 /*break*/, 8];
|
|
24733
24733
|
case 7:
|
|
24734
24734
|
try {
|
|
24735
|
-
if (
|
|
24735
|
+
if (_j && !_j.done && (_m = _h.return)) _m.call(_h);
|
|
24736
24736
|
}
|
|
24737
24737
|
finally { if (e_15) throw e_15.error; }
|
|
24738
24738
|
return [7 /*endfinally*/];
|
|
@@ -24752,15 +24752,15 @@
|
|
|
24752
24752
|
};
|
|
24753
24753
|
this_4 = this;
|
|
24754
24754
|
try {
|
|
24755
|
-
for (
|
|
24756
|
-
field =
|
|
24755
|
+
for (_k = __values(searchInfo.fieldSearchText), _l = _k.next(); !_l.done; _l = _k.next()) {
|
|
24756
|
+
field = _l.value;
|
|
24757
24757
|
_loop_5(field);
|
|
24758
24758
|
}
|
|
24759
24759
|
}
|
|
24760
24760
|
catch (e_16_1) { e_16 = { error: e_16_1 }; }
|
|
24761
24761
|
finally {
|
|
24762
24762
|
try {
|
|
24763
|
-
if (
|
|
24763
|
+
if (_l && !_l.done && (_p = _k.return)) _p.call(_k);
|
|
24764
24764
|
}
|
|
24765
24765
|
finally { if (e_16) throw e_16.error; }
|
|
24766
24766
|
}
|
|
@@ -24798,8 +24798,8 @@
|
|
|
24798
24798
|
ListComponentBase.prototype.getItemWorkflowSetting = function (setting, rowData) {
|
|
24799
24799
|
return __awaiter(this, void 0, void 0, function () {
|
|
24800
24800
|
var workflowSetting;
|
|
24801
|
-
return __generator(this, function (
|
|
24802
|
-
switch (
|
|
24801
|
+
return __generator(this, function (_h) {
|
|
24802
|
+
switch (_h.label) {
|
|
24803
24803
|
case 0:
|
|
24804
24804
|
workflowSetting = setting.workflowSettingNew;
|
|
24805
24805
|
if (!(setting.isWorkflowTree
|
|
@@ -24807,8 +24807,8 @@
|
|
|
24807
24807
|
&& setting.workflowConfigAdvance.getWorkflowSetting)) return [3 /*break*/, 2];
|
|
24808
24808
|
return [4 /*yield*/, setting.workflowConfigAdvance.getWorkflowSetting(rowData)];
|
|
24809
24809
|
case 1:
|
|
24810
|
-
workflowSetting =
|
|
24811
|
-
|
|
24810
|
+
workflowSetting = _h.sent();
|
|
24811
|
+
_h.label = 2;
|
|
24812
24812
|
case 2:
|
|
24813
24813
|
if (!workflowSetting || workflowSetting.workflows.length == 0) {
|
|
24814
24814
|
return [2 /*return*/, this._notifierService.showWarning('Đối tượng chưa được cấu hình quy trình nghiệp vụ')];
|
|
@@ -24822,13 +24822,13 @@
|
|
|
24822
24822
|
return __awaiter(this, void 0, void 0, function () {
|
|
24823
24823
|
var workflowSetting, resultCheckExist, modelTask, contentLink, modelEntity, taskWorkflowSetting, compRef;
|
|
24824
24824
|
var _this = this;
|
|
24825
|
-
return __generator(this, function (
|
|
24826
|
-
switch (
|
|
24825
|
+
return __generator(this, function (_h) {
|
|
24826
|
+
switch (_h.label) {
|
|
24827
24827
|
case 0:
|
|
24828
24828
|
rowData.__startingWorkflow = true;
|
|
24829
24829
|
return [4 /*yield*/, this.getItemWorkflowSetting(this.setting, rowData)];
|
|
24830
24830
|
case 1:
|
|
24831
|
-
workflowSetting =
|
|
24831
|
+
workflowSetting = _h.sent();
|
|
24832
24832
|
if (!workflowSetting) {
|
|
24833
24833
|
rowData.__startingWorkflow = false;
|
|
24834
24834
|
return [2 /*return*/];
|
|
@@ -24840,7 +24840,7 @@
|
|
|
24840
24840
|
this.newFilter('entityKey', exports.Operator.equal, rowData.id)
|
|
24841
24841
|
])];
|
|
24842
24842
|
case 2:
|
|
24843
|
-
resultCheckExist = (
|
|
24843
|
+
resultCheckExist = (_h.sent());
|
|
24844
24844
|
if (!resultCheckExist.success) {
|
|
24845
24845
|
rowData.__startingWorkflow = false;
|
|
24846
24846
|
return [2 /*return*/, this._notifierService.showWarning('Có lỗi xảy ra khi kiểm tra trạng thái đã tạo công việc hay chưa')];
|
|
@@ -24852,8 +24852,8 @@
|
|
|
24852
24852
|
if (!this.setting.modifyRowDataForTask) return [3 /*break*/, 4];
|
|
24853
24853
|
return [4 /*yield*/, this.setting.modifyRowDataForTask(rowData)];
|
|
24854
24854
|
case 3:
|
|
24855
|
-
|
|
24856
|
-
|
|
24855
|
+
_h.sent();
|
|
24856
|
+
_h.label = 4;
|
|
24857
24857
|
case 4:
|
|
24858
24858
|
modelTask = {
|
|
24859
24859
|
id: this._commonService.guid(),
|
|
@@ -24868,7 +24868,7 @@
|
|
|
24868
24868
|
};
|
|
24869
24869
|
return [4 /*yield*/, this.getCopyPath(this.setting, rowData)];
|
|
24870
24870
|
case 5:
|
|
24871
|
-
contentLink =
|
|
24871
|
+
contentLink = _h.sent();
|
|
24872
24872
|
if (contentLink) {
|
|
24873
24873
|
modelEntity = this.parseAttachLink(contentLink);
|
|
24874
24874
|
modelTask.dinhKemNghiepVuDtos = modelEntity;
|
|
@@ -24876,27 +24876,27 @@
|
|
|
24876
24876
|
if (!this.setting.modifyItemTask) return [3 /*break*/, 7];
|
|
24877
24877
|
return [4 /*yield*/, this.setting.modifyItemTask(modelTask, rowData)];
|
|
24878
24878
|
case 6:
|
|
24879
|
-
|
|
24880
|
-
|
|
24879
|
+
_h.sent();
|
|
24880
|
+
_h.label = 7;
|
|
24881
24881
|
case 7:
|
|
24882
24882
|
if (!(workflowSetting.autoStartTask
|
|
24883
24883
|
&& workflowSetting.idLoaiCongViecDefault)) return [3 /*break*/, 9];
|
|
24884
24884
|
return [4 /*yield*/, this._dmLoaiCongViecService.getWorkflowSettingByIdLoaiCongViec(workflowSetting.idLoaiCongViecDefault)];
|
|
24885
24885
|
case 8:
|
|
24886
|
-
taskWorkflowSetting =
|
|
24886
|
+
taskWorkflowSetting = _h.sent();
|
|
24887
24887
|
if (taskWorkflowSetting != null && taskWorkflowSetting.workflowCode) {
|
|
24888
24888
|
modelTask[FieldWorkflowCodeInCrudForm] = taskWorkflowSetting.workflowCode;
|
|
24889
24889
|
this.insertTaskAndReload(modelTask, rowData, taskWorkflowSetting);
|
|
24890
24890
|
rowData.__startingWorkflow = false;
|
|
24891
24891
|
return [2 /*return*/];
|
|
24892
24892
|
}
|
|
24893
|
-
|
|
24893
|
+
_h.label = 9;
|
|
24894
24894
|
case 9: return [3 /*break*/, 14];
|
|
24895
24895
|
case 10:
|
|
24896
24896
|
if (!(workflowSetting.workflows.length == 1)) return [3 /*break*/, 12];
|
|
24897
24897
|
return [4 /*yield*/, this.startWorkflow(rowData, workflowSetting.workflows[0])];
|
|
24898
24898
|
case 11:
|
|
24899
|
-
|
|
24899
|
+
_h.sent();
|
|
24900
24900
|
rowData.__startingWorkflow = false;
|
|
24901
24901
|
return [2 /*return*/];
|
|
24902
24902
|
case 12:
|
|
@@ -24905,7 +24905,7 @@
|
|
|
24905
24905
|
rowData.__startingWorkflow = false;
|
|
24906
24906
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'StartWorkflowComponent', this.startWorkflowViewContainer)];
|
|
24907
24907
|
case 13:
|
|
24908
|
-
compRef =
|
|
24908
|
+
compRef = _h.sent();
|
|
24909
24909
|
if (dialog) {
|
|
24910
24910
|
dialog.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
24911
24911
|
}
|
|
@@ -24913,7 +24913,7 @@
|
|
|
24913
24913
|
compRef.defaultWorkflow = workflowSetting.workflowCode;
|
|
24914
24914
|
compRef.instance.onSaved.subscribe(function (event) { return _this.handleStartWorkflowFromDialog(event); });
|
|
24915
24915
|
compRef.instance.onCancel.subscribe(function (event) { return _this.startWorkflowModel.showEditForm = false; });
|
|
24916
|
-
|
|
24916
|
+
_h.label = 14;
|
|
24917
24917
|
case 14: return [2 /*return*/];
|
|
24918
24918
|
}
|
|
24919
24919
|
});
|
|
@@ -24959,25 +24959,25 @@
|
|
|
24959
24959
|
};
|
|
24960
24960
|
ListComponentBase.prototype.insertTaskAndReload = function (modelTask, rowData, workflowSetting) {
|
|
24961
24961
|
return __awaiter(this, void 0, void 0, function () {
|
|
24962
|
-
var
|
|
24962
|
+
var _h;
|
|
24963
24963
|
var _this = this;
|
|
24964
|
-
return __generator(this, function (
|
|
24965
|
-
switch (
|
|
24964
|
+
return __generator(this, function (_j) {
|
|
24965
|
+
switch (_j.label) {
|
|
24966
24966
|
case 0:
|
|
24967
24967
|
if (!this.setting.getDataForNextFirstStepTask) return [3 /*break*/, 2];
|
|
24968
|
-
|
|
24968
|
+
_h = modelTask;
|
|
24969
24969
|
return [4 /*yield*/, this.setting.getDataForNextFirstStepTask(rowData)];
|
|
24970
24970
|
case 1:
|
|
24971
|
-
|
|
24971
|
+
_h.itemWorkflowHistory = _j.sent();
|
|
24972
24972
|
modelTask.itemWorkflowHistory = this.tongHopWorkflowHistoryForNextFirstStep(modelTask.itemWorkflowHistory, modelTask, workflowSetting, modelTask[FieldWorkflowCodeInCrudForm]);
|
|
24973
|
-
|
|
24973
|
+
_j.label = 2;
|
|
24974
24974
|
case 2: return [4 /*yield*/, this._congViecService.post(modelTask)
|
|
24975
24975
|
.then(function (res) { return _this.handleResponse(res, '', function (f) {
|
|
24976
24976
|
_this.onStartedWorkflow.emit(rowData.id);
|
|
24977
24977
|
_this.getData();
|
|
24978
24978
|
}); })];
|
|
24979
24979
|
case 3:
|
|
24980
|
-
|
|
24980
|
+
_j.sent();
|
|
24981
24981
|
return [2 /*return*/];
|
|
24982
24982
|
}
|
|
24983
24983
|
});
|
|
@@ -24997,9 +24997,9 @@
|
|
|
24997
24997
|
if (dialogDetailTask === void 0) { dialogDetailTask = null; }
|
|
24998
24998
|
if (dialogChoYKienForm === void 0) { dialogChoYKienForm = null; }
|
|
24999
24999
|
return __awaiter(this, void 0, void 0, function () {
|
|
25000
|
-
var
|
|
25001
|
-
return __generator(this, function (
|
|
25002
|
-
switch (
|
|
25000
|
+
var _h;
|
|
25001
|
+
return __generator(this, function (_j) {
|
|
25002
|
+
switch (_j.label) {
|
|
25003
25003
|
case 0:
|
|
25004
25004
|
if (this.showingActionWorkflow)
|
|
25005
25005
|
return [2 /*return*/];
|
|
@@ -25008,10 +25008,10 @@
|
|
|
25008
25008
|
this.dialogProcessWorkflowForm = dialogProcessWorkflowForm;
|
|
25009
25009
|
this.dialogDetailTask = dialogDetailTask;
|
|
25010
25010
|
this.dialogChoYKienForm = dialogChoYKienForm;
|
|
25011
|
-
|
|
25011
|
+
_h = this;
|
|
25012
25012
|
return [4 /*yield*/, this.getButtonContext(rowData)];
|
|
25013
25013
|
case 1:
|
|
25014
|
-
|
|
25014
|
+
_h.buttonContexts = _j.sent();
|
|
25015
25015
|
if (this.buttonContexts.length === 0) {
|
|
25016
25016
|
return [2 /*return*/];
|
|
25017
25017
|
}
|
|
@@ -25025,20 +25025,20 @@
|
|
|
25025
25025
|
return __awaiter(this, void 0, void 0, function () {
|
|
25026
25026
|
var resultGetActionWorkflow, buttonContexts;
|
|
25027
25027
|
var _this = this;
|
|
25028
|
-
return __generator(this, function (
|
|
25029
|
-
switch (
|
|
25028
|
+
return __generator(this, function (_h) {
|
|
25029
|
+
switch (_h.label) {
|
|
25030
25030
|
case 0:
|
|
25031
25031
|
this.showingActionWorkflow = true;
|
|
25032
25032
|
resultGetActionWorkflow = null;
|
|
25033
25033
|
if (!(!this.setting.isWorkflowTree && this.setting.workflowSettingNew.createTaskInstead)) return [3 /*break*/, 2];
|
|
25034
25034
|
return [4 /*yield*/, this.getActionWorkflowByTask(rowData, rowData.dialogHistory)];
|
|
25035
25035
|
case 1:
|
|
25036
|
-
resultGetActionWorkflow =
|
|
25036
|
+
resultGetActionWorkflow = _h.sent();
|
|
25037
25037
|
return [3 /*break*/, 4];
|
|
25038
25038
|
case 2: return [4 /*yield*/, this.getActionWorkflow(rowData)];
|
|
25039
25039
|
case 3:
|
|
25040
|
-
resultGetActionWorkflow =
|
|
25041
|
-
|
|
25040
|
+
resultGetActionWorkflow = _h.sent();
|
|
25041
|
+
_h.label = 4;
|
|
25042
25042
|
case 4:
|
|
25043
25043
|
this.showingActionWorkflow = false;
|
|
25044
25044
|
if (!Array.isArray(resultGetActionWorkflow)) {
|
|
@@ -25062,11 +25062,11 @@
|
|
|
25062
25062
|
ListComponentBase.prototype.getActionWorkflow = function (rowData) {
|
|
25063
25063
|
return __awaiter(this, void 0, void 0, function () {
|
|
25064
25064
|
var workflowSetting;
|
|
25065
|
-
return __generator(this, function (
|
|
25066
|
-
switch (
|
|
25065
|
+
return __generator(this, function (_h) {
|
|
25066
|
+
switch (_h.label) {
|
|
25067
25067
|
case 0: return [4 /*yield*/, this.getItemWorkflowSetting(this.setting, rowData)];
|
|
25068
25068
|
case 1:
|
|
25069
|
-
workflowSetting =
|
|
25069
|
+
workflowSetting = _h.sent();
|
|
25070
25070
|
if (!workflowSetting)
|
|
25071
25071
|
return [2 /*return*/];
|
|
25072
25072
|
return [2 /*return*/, this._getActionWorkflowBase(this.setting, rowData, workflowSetting)];
|
|
@@ -25076,21 +25076,21 @@
|
|
|
25076
25076
|
};
|
|
25077
25077
|
ListComponentBase.prototype.getActionWorkflowByTask = function (rowData, dialog) {
|
|
25078
25078
|
return __awaiter(this, void 0, void 0, function () {
|
|
25079
|
-
var
|
|
25080
|
-
return __generator(this, function (
|
|
25081
|
-
switch (
|
|
25079
|
+
var _h, workflowPermissionDetailService, userService, result, workflowSetting, crudListSetting;
|
|
25080
|
+
return __generator(this, function (_j) {
|
|
25081
|
+
switch (_j.label) {
|
|
25082
25082
|
case 0:
|
|
25083
25083
|
if (!!rowData.__isGotCongViec) return [3 /*break*/, 2];
|
|
25084
|
-
|
|
25084
|
+
_h = rowData;
|
|
25085
25085
|
return [4 /*yield*/, this._congViecService.getDetailByFilter([
|
|
25086
25086
|
this.newFilter('serviceCode', exports.Operator.equal, this.setting.baseService.serviceCode),
|
|
25087
25087
|
this.newFilter('entity', exports.Operator.equal, this.setting.baseService.entityName),
|
|
25088
25088
|
this.newFilter('entityKey', exports.Operator.equal, rowData.id)
|
|
25089
25089
|
])];
|
|
25090
25090
|
case 1:
|
|
25091
|
-
|
|
25091
|
+
_h.__itemCongViec = (_j.sent()).data;
|
|
25092
25092
|
rowData.__isGotCongViec = true;
|
|
25093
|
-
|
|
25093
|
+
_j.label = 2;
|
|
25094
25094
|
case 2:
|
|
25095
25095
|
rowData = rowData.__itemCongViec;
|
|
25096
25096
|
if (!rowData) {
|
|
@@ -25103,12 +25103,12 @@
|
|
|
25103
25103
|
return [4 /*yield*/, workflowPermissionDetailService.changeEndpoint(this._congViecService)
|
|
25104
25104
|
.appendInfoForWorkflow(userService.getUserIdCombine(), [rowData], 'id', this.setting.ignoreWorkflow)];
|
|
25105
25105
|
case 3:
|
|
25106
|
-
result =
|
|
25106
|
+
result = _j.sent();
|
|
25107
25107
|
if (result !== true)
|
|
25108
25108
|
return [2 /*return*/];
|
|
25109
25109
|
return [4 /*yield*/, this._dmLoaiCongViecService.getWorkflowSettingByIdLoaiCongViec(rowData.idLoaiCongViec)];
|
|
25110
25110
|
case 4:
|
|
25111
|
-
workflowSetting =
|
|
25111
|
+
workflowSetting = _j.sent();
|
|
25112
25112
|
if (workflowSetting == null)
|
|
25113
25113
|
return [2 /*return*/];
|
|
25114
25114
|
crudListSetting = new CrudListSetting();
|
|
@@ -25122,8 +25122,8 @@
|
|
|
25122
25122
|
return __awaiter(this, void 0, void 0, function () {
|
|
25123
25123
|
var buttonContexts, itemWorkflowSetting_1, actions_1, actionAllows, workflowHistoryService, userService, userId, userIdStringUpper, itemWorkflowHistoryLast;
|
|
25124
25124
|
var _this = this;
|
|
25125
|
-
return __generator(this, function (
|
|
25126
|
-
switch (
|
|
25125
|
+
return __generator(this, function (_h) {
|
|
25126
|
+
switch (_h.label) {
|
|
25127
25127
|
case 0:
|
|
25128
25128
|
this.currentItem = rowData;
|
|
25129
25129
|
this.buttonContexts = [];
|
|
@@ -25138,7 +25138,7 @@
|
|
|
25138
25138
|
actions_1 = itemWorkflowSetting_1.data.actions[rowData.__trangThai];
|
|
25139
25139
|
return [4 /*yield*/, crudListSetting.baseService.getActionAllow(rowData.id)];
|
|
25140
25140
|
case 2:
|
|
25141
|
-
actionAllows = (
|
|
25141
|
+
actionAllows = (_h.sent()).data;
|
|
25142
25142
|
if (actionAllows) {
|
|
25143
25143
|
actionAllows.forEach(function (actionCode) {
|
|
25144
25144
|
var action = actions_1.find(function (q) { return q.code == actionCode; });
|
|
@@ -25167,7 +25167,7 @@
|
|
|
25167
25167
|
}
|
|
25168
25168
|
return [4 /*yield*/, workflowHistoryService.changeEndpoint(crudListSetting.baseService).getLastByItemId(rowData.id)];
|
|
25169
25169
|
case 3:
|
|
25170
|
-
itemWorkflowHistoryLast = (
|
|
25170
|
+
itemWorkflowHistoryLast = (_h.sent()).data;
|
|
25171
25171
|
if (itemWorkflowHistoryLast
|
|
25172
25172
|
&& itemWorkflowHistoryLast.actionCode != MaActionBatDauQuyTrinh
|
|
25173
25173
|
&& itemWorkflowHistoryLast.userIdCreated.toUpperCase() == userIdStringUpper
|
|
@@ -25187,7 +25187,7 @@
|
|
|
25187
25187
|
label: exports.ButtonTextActionCongViec.XEM_LICH_SU,
|
|
25188
25188
|
command: function () { return _this.viewHistoryWorkflow(crudListSetting, rowData); }
|
|
25189
25189
|
});
|
|
25190
|
-
|
|
25190
|
+
_h.label = 4;
|
|
25191
25191
|
case 4: return [2 /*return*/, buttonContexts];
|
|
25192
25192
|
}
|
|
25193
25193
|
});
|
|
@@ -25197,13 +25197,13 @@
|
|
|
25197
25197
|
return __awaiter(this, void 0, void 0, function () {
|
|
25198
25198
|
var itemTask, taskFormModel, compRef;
|
|
25199
25199
|
var _this = this;
|
|
25200
|
-
return __generator(this, function (
|
|
25201
|
-
switch (
|
|
25200
|
+
return __generator(this, function (_h) {
|
|
25201
|
+
switch (_h.label) {
|
|
25202
25202
|
case 0: return [4 /*yield*/, this._congViecService.getDetailByFilter([
|
|
25203
25203
|
this.newFilter('entityKey', exports.Operator.equal, rowData.id)
|
|
25204
25204
|
])];
|
|
25205
25205
|
case 1:
|
|
25206
|
-
itemTask = (
|
|
25206
|
+
itemTask = (_h.sent()).data;
|
|
25207
25207
|
if (itemTask == null) {
|
|
25208
25208
|
return [2 /*return*/, this._notifierService.showWarning('Không tìm thấy công việc gắn với bản ghi')];
|
|
25209
25209
|
}
|
|
@@ -25214,7 +25214,7 @@
|
|
|
25214
25214
|
this.detailTaskModel.showEditForm = true;
|
|
25215
25215
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('congviec', 'BaseCongViecFormComponent', this.detailTaskViewContainer)];
|
|
25216
25216
|
case 2:
|
|
25217
|
-
compRef =
|
|
25217
|
+
compRef = _h.sent();
|
|
25218
25218
|
if (this.dialogDetailTask) {
|
|
25219
25219
|
this.dialogDetailTask.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
25220
25220
|
}
|
|
@@ -25250,11 +25250,11 @@
|
|
|
25250
25250
|
ListComponentBase.prototype.viewHistoryWorkflow = function (crudListSetting, rowData) {
|
|
25251
25251
|
return __awaiter(this, void 0, void 0, function () {
|
|
25252
25252
|
var workflowSetting, compRef;
|
|
25253
|
-
return __generator(this, function (
|
|
25254
|
-
switch (
|
|
25253
|
+
return __generator(this, function (_h) {
|
|
25254
|
+
switch (_h.label) {
|
|
25255
25255
|
case 0: return [4 /*yield*/, this.getItemWorkflowSetting(crudListSetting, rowData)];
|
|
25256
25256
|
case 1:
|
|
25257
|
-
workflowSetting =
|
|
25257
|
+
workflowSetting = _h.sent();
|
|
25258
25258
|
if (!workflowSetting)
|
|
25259
25259
|
return [2 /*return*/];
|
|
25260
25260
|
this.currentItem = rowData;
|
|
@@ -25264,7 +25264,7 @@
|
|
|
25264
25264
|
this.workflowHistoryModel.showEditForm = true;
|
|
25265
25265
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'WorkflowHistoryNewComponent', this.workflowHistoryNewViewContainer)];
|
|
25266
25266
|
case 2:
|
|
25267
|
-
compRef =
|
|
25267
|
+
compRef = _h.sent();
|
|
25268
25268
|
compRef.instance.businessSetting = crudListSetting;
|
|
25269
25269
|
compRef.instance.tableName = this.workflowHistoryModel.data.tableName;
|
|
25270
25270
|
compRef.instance.item = rowData;
|
|
@@ -25281,8 +25281,8 @@
|
|
|
25281
25281
|
return __awaiter(this, void 0, void 0, function () {
|
|
25282
25282
|
var domainNewTab, compRef;
|
|
25283
25283
|
var _this = this;
|
|
25284
|
-
return __generator(this, function (
|
|
25285
|
-
switch (
|
|
25284
|
+
return __generator(this, function (_h) {
|
|
25285
|
+
switch (_h.label) {
|
|
25286
25286
|
case 0:
|
|
25287
25287
|
if (workflowAction.openNewTab) {
|
|
25288
25288
|
domainNewTab = workflowAction.domainNewTab;
|
|
@@ -25304,7 +25304,7 @@
|
|
|
25304
25304
|
this.processWorkflowModel.header = workflowAction.name;
|
|
25305
25305
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'ProcessWorkflowFormComponent', this.processWorkflowFormViewContainer)];
|
|
25306
25306
|
case 1:
|
|
25307
|
-
compRef =
|
|
25307
|
+
compRef = _h.sent();
|
|
25308
25308
|
if (this.dialogProcessWorkflowForm) {
|
|
25309
25309
|
this.dialogProcessWorkflowForm.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
25310
25310
|
}
|
|
@@ -25323,15 +25323,15 @@
|
|
|
25323
25323
|
return __awaiter(this, void 0, void 0, function () {
|
|
25324
25324
|
var compRef;
|
|
25325
25325
|
var _this = this;
|
|
25326
|
-
return __generator(this, function (
|
|
25327
|
-
switch (
|
|
25326
|
+
return __generator(this, function (_h) {
|
|
25327
|
+
switch (_h.label) {
|
|
25328
25328
|
case 0:
|
|
25329
25329
|
this.choYKienModel.data.rowData = rowData;
|
|
25330
25330
|
this.choYKienModel.data.setting = crudListSetting;
|
|
25331
25331
|
this.choYKienModel.showEditForm = true;
|
|
25332
25332
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'ChoYKienFormComponent', this.choYKienFormViewContainer)];
|
|
25333
25333
|
case 1:
|
|
25334
|
-
compRef =
|
|
25334
|
+
compRef = _h.sent();
|
|
25335
25335
|
if (this.dialogChoYKienForm) {
|
|
25336
25336
|
this.dialogChoYKienForm.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
25337
25337
|
}
|
|
@@ -25347,8 +25347,8 @@
|
|
|
25347
25347
|
ListComponentBase.prototype.startWorkflow = function (rowData, workflow) {
|
|
25348
25348
|
return __awaiter(this, void 0, void 0, function () {
|
|
25349
25349
|
var _this = this;
|
|
25350
|
-
return __generator(this, function (
|
|
25351
|
-
switch (
|
|
25350
|
+
return __generator(this, function (_h) {
|
|
25351
|
+
switch (_h.label) {
|
|
25352
25352
|
case 0: return [4 /*yield*/, this.setting.baseService.startWorkflow(rowData.id, workflow.code)
|
|
25353
25353
|
.then(function (res) { return _this.handleResponse(res, 'Chạy quy trình thành công', function (f) {
|
|
25354
25354
|
_this.onStartedWorkflow.emit(rowData.id);
|
|
@@ -25356,7 +25356,7 @@
|
|
|
25356
25356
|
_this.getData();
|
|
25357
25357
|
}); })];
|
|
25358
25358
|
case 1:
|
|
25359
|
-
|
|
25359
|
+
_h.sent();
|
|
25360
25360
|
return [2 /*return*/];
|
|
25361
25361
|
}
|
|
25362
25362
|
});
|
|
@@ -25381,7 +25381,7 @@
|
|
|
25381
25381
|
ListComponentBase.prototype.createShareLink = function () {
|
|
25382
25382
|
return __awaiter(this, void 0, void 0, function () {
|
|
25383
25383
|
var rowData;
|
|
25384
|
-
return __generator(this, function (
|
|
25384
|
+
return __generator(this, function (_h) {
|
|
25385
25385
|
if (!this.setting.checkReadyToTrinhKy()) {
|
|
25386
25386
|
return [2 /*return*/, this._notifierService.showWarning('Đang tải dữ liệu danh sách, chờ một lúc rồi thử lại')];
|
|
25387
25387
|
}
|
|
@@ -25393,17 +25393,17 @@
|
|
|
25393
25393
|
};
|
|
25394
25394
|
ListComponentBase.prototype.createShareLinkMultiple = function () {
|
|
25395
25395
|
return __awaiter(this, void 0, void 0, function () {
|
|
25396
|
-
return __generator(this, function (
|
|
25396
|
+
return __generator(this, function (_h) {
|
|
25397
25397
|
this.showShareLinkForm(this.model.selectedItems);
|
|
25398
25398
|
return [2 /*return*/];
|
|
25399
25399
|
});
|
|
25400
25400
|
});
|
|
25401
25401
|
};
|
|
25402
25402
|
ListComponentBase.prototype.disableMultipleCopyLink = function () {
|
|
25403
|
-
var e_17,
|
|
25403
|
+
var e_17, _h;
|
|
25404
25404
|
try {
|
|
25405
|
-
for (var
|
|
25406
|
-
var item =
|
|
25405
|
+
for (var _j = __values(this.model.selectedItems), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
25406
|
+
var item = _k.value;
|
|
25407
25407
|
if (this.disableCopyLink(item)) {
|
|
25408
25408
|
return true;
|
|
25409
25409
|
}
|
|
@@ -25412,7 +25412,7 @@
|
|
|
25412
25412
|
catch (e_17_1) { e_17 = { error: e_17_1 }; }
|
|
25413
25413
|
finally {
|
|
25414
25414
|
try {
|
|
25415
|
-
if (
|
|
25415
|
+
if (_k && !_k.done && (_h = _j.return)) _h.call(_j);
|
|
25416
25416
|
}
|
|
25417
25417
|
finally { if (e_17) throw e_17.error; }
|
|
25418
25418
|
}
|
|
@@ -25432,7 +25432,7 @@
|
|
|
25432
25432
|
};
|
|
25433
25433
|
ListComponentBase.prototype.showSettingsPermission = function () {
|
|
25434
25434
|
return __awaiter(this, void 0, void 0, function () {
|
|
25435
|
-
return __generator(this, function (
|
|
25435
|
+
return __generator(this, function (_h) {
|
|
25436
25436
|
if (this.creatingSearchInfo)
|
|
25437
25437
|
return [2 /*return*/];
|
|
25438
25438
|
this._showSettingsPermission = true;
|
|
@@ -25444,13 +25444,13 @@
|
|
|
25444
25444
|
return __awaiter(this, void 0, void 0, function () {
|
|
25445
25445
|
var compRef;
|
|
25446
25446
|
var _this = this;
|
|
25447
|
-
return __generator(this, function (
|
|
25448
|
-
switch (
|
|
25447
|
+
return __generator(this, function (_h) {
|
|
25448
|
+
switch (_h.label) {
|
|
25449
25449
|
case 0:
|
|
25450
25450
|
this._showSettingsWorkflow = true;
|
|
25451
25451
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'WorkflowSettingDialogComponent', this.workflowSettingDialogViewContainer)];
|
|
25452
25452
|
case 1:
|
|
25453
|
-
compRef =
|
|
25453
|
+
compRef = _h.sent();
|
|
25454
25454
|
compRef.instance.parentSetting = this.setting;
|
|
25455
25455
|
compRef.instance.parentContext = this.context;
|
|
25456
25456
|
compRef.instance.parentModel = this.model;
|
|
@@ -25466,13 +25466,13 @@
|
|
|
25466
25466
|
return __awaiter(this, void 0, void 0, function () {
|
|
25467
25467
|
var compRef;
|
|
25468
25468
|
var _this = this;
|
|
25469
|
-
return __generator(this, function (
|
|
25470
|
-
switch (
|
|
25469
|
+
return __generator(this, function (_h) {
|
|
25470
|
+
switch (_h.label) {
|
|
25471
25471
|
case 0:
|
|
25472
25472
|
this.workflowSettingModel.showEditForm = true;
|
|
25473
25473
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'WorkflowSettingNewComponent', this.workflowsettingnewViewContainer)];
|
|
25474
25474
|
case 1:
|
|
25475
|
-
compRef =
|
|
25475
|
+
compRef = _h.sent();
|
|
25476
25476
|
dialog.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
25477
25477
|
compRef.instance.parentSetting = this.setting;
|
|
25478
25478
|
compRef.instance.onSaved.subscribe(function (event) { return _this.onSaveWorkflowSettingsNew(null); });
|
|
@@ -25486,13 +25486,13 @@
|
|
|
25486
25486
|
return __awaiter(this, void 0, void 0, function () {
|
|
25487
25487
|
var compRef;
|
|
25488
25488
|
var _this = this;
|
|
25489
|
-
return __generator(this, function (
|
|
25490
|
-
switch (
|
|
25489
|
+
return __generator(this, function (_h) {
|
|
25490
|
+
switch (_h.label) {
|
|
25491
25491
|
case 0:
|
|
25492
25492
|
this.permissionSharingModel.showEditForm = true;
|
|
25493
25493
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'PermissionSharingComponent', this.permissionSharingViewContainer)];
|
|
25494
25494
|
case 1:
|
|
25495
|
-
compRef =
|
|
25495
|
+
compRef = _h.sent();
|
|
25496
25496
|
compRef.instance.item = this.rowDataCurrent;
|
|
25497
25497
|
compRef.instance.baseService = this.setting.baseService;
|
|
25498
25498
|
compRef.instance.onCancel.subscribe(function (event) { return _this.permissionSharingModel.showEditForm = false; });
|
|
@@ -25504,13 +25504,13 @@
|
|
|
25504
25504
|
ListComponentBase.prototype.showAttachedTask = function () {
|
|
25505
25505
|
return __awaiter(this, void 0, void 0, function () {
|
|
25506
25506
|
var compRef;
|
|
25507
|
-
return __generator(this, function (
|
|
25508
|
-
switch (
|
|
25507
|
+
return __generator(this, function (_h) {
|
|
25508
|
+
switch (_h.label) {
|
|
25509
25509
|
case 0:
|
|
25510
25510
|
this.attachedTaskModel.showEditForm = true;
|
|
25511
25511
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('congviec', 'BaseCongViecComponent', this.baseCongViecViewContainer)];
|
|
25512
25512
|
case 1:
|
|
25513
|
-
compRef =
|
|
25513
|
+
compRef = _h.sent();
|
|
25514
25514
|
compRef.instance.serviceCode = this.setting.baseService.serviceCode;
|
|
25515
25515
|
compRef.instance.entity = this.setting.baseService.entityName;
|
|
25516
25516
|
compRef.instance.itemIdAttach = this.rowDataCurrent.id;
|
|
@@ -25523,13 +25523,13 @@
|
|
|
25523
25523
|
return __awaiter(this, void 0, void 0, function () {
|
|
25524
25524
|
var compRef;
|
|
25525
25525
|
var _this = this;
|
|
25526
|
-
return __generator(this, function (
|
|
25527
|
-
switch (
|
|
25526
|
+
return __generator(this, function (_h) {
|
|
25527
|
+
switch (_h.label) {
|
|
25528
25528
|
case 0:
|
|
25529
25529
|
this.permissionListModel.showEditForm = true;
|
|
25530
25530
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'WorkflowPermissionComponent', this.workflowPermissionViewContainer)];
|
|
25531
25531
|
case 1:
|
|
25532
|
-
compRef =
|
|
25532
|
+
compRef = _h.sent();
|
|
25533
25533
|
// this.dialogWorkflowPermission.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
25534
25534
|
compRef.instance.item = this.rowDataCurrent;
|
|
25535
25535
|
compRef.instance.businessSetting = this.setting;
|
|
@@ -25592,11 +25592,11 @@
|
|
|
25592
25592
|
ListComponentBase.prototype.handleShowFormSettingButton = function () {
|
|
25593
25593
|
var _a, _b, _c, _d, _e, _f;
|
|
25594
25594
|
return __awaiter(this, void 0, void 0, function () {
|
|
25595
|
-
var lstBtnCustom, lstBtnAction, _loop_6, this_5, lstBtnCustom_1, lstBtnCustom_1_1, item, lstMenuButtons, buttonSetting;
|
|
25596
|
-
var e_18,
|
|
25595
|
+
var lstBtnCustom, lstBtnAction, _loop_6, this_5, lstBtnCustom_1, lstBtnCustom_1_1, item, lstMenuButtons, _g_1, buttonSetting;
|
|
25596
|
+
var e_18, _h;
|
|
25597
25597
|
var _this = this;
|
|
25598
|
-
return __generator(this, function (
|
|
25599
|
-
switch (
|
|
25598
|
+
return __generator(this, function (_j) {
|
|
25599
|
+
switch (_j.label) {
|
|
25600
25600
|
case 0:
|
|
25601
25601
|
// Tổng hợp dữ liệu các nút từ ngTemplate + base + menuButton
|
|
25602
25602
|
this.onReloaded.emit(exports.EnumProperties.RETRIEVE_BUTTON_TEMPLATE);
|
|
@@ -25620,13 +25620,22 @@
|
|
|
25620
25620
|
catch (e_18_1) { e_18 = { error: e_18_1 }; }
|
|
25621
25621
|
finally {
|
|
25622
25622
|
try {
|
|
25623
|
-
if (lstBtnCustom_1_1 && !lstBtnCustom_1_1.done && (
|
|
25623
|
+
if (lstBtnCustom_1_1 && !lstBtnCustom_1_1.done && (_h = lstBtnCustom_1.return)) _h.call(lstBtnCustom_1);
|
|
25624
25624
|
}
|
|
25625
25625
|
finally { if (e_18) throw e_18.error; }
|
|
25626
25626
|
}
|
|
25627
|
-
|
|
25627
|
+
_j.label = 1;
|
|
25628
25628
|
case 1:
|
|
25629
|
-
|
|
25629
|
+
_j.trys.push([1, 3, , 4]);
|
|
25630
|
+
return [4 /*yield*/, this.menuButtons({})];
|
|
25631
|
+
case 2:
|
|
25632
|
+
lstMenuButtons = (_e = _j.sent()) !== null && _e !== void 0 ? _e : [];
|
|
25633
|
+
return [3 /*break*/, 4];
|
|
25634
|
+
case 3:
|
|
25635
|
+
_g_1 = _j.sent();
|
|
25636
|
+
lstMenuButtons = [];
|
|
25637
|
+
return [3 /*break*/, 4];
|
|
25638
|
+
case 4:
|
|
25630
25639
|
if (lstMenuButtons.length) {
|
|
25631
25640
|
lstMenuButtons.forEach(function (item) { return _this.addButtonAction(lstBtnAction, item.label); });
|
|
25632
25641
|
}
|
|
@@ -25651,7 +25660,7 @@
|
|
|
25651
25660
|
ListComponentBase.prototype.onShowFormSettingButton = function () {
|
|
25652
25661
|
return __awaiter(this, void 0, void 0, function () {
|
|
25653
25662
|
var _this = this;
|
|
25654
|
-
return __generator(this, function (
|
|
25663
|
+
return __generator(this, function (_h) {
|
|
25655
25664
|
this.checkedAll = true;
|
|
25656
25665
|
this.handleCheckAll();
|
|
25657
25666
|
setTimeout(function () {
|
|
@@ -25676,10 +25685,10 @@
|
|
|
25676
25685
|
ListComponentBase.prototype.setAuthorizeButton = function (lstButtonTemplate) {
|
|
25677
25686
|
var _a, _b;
|
|
25678
25687
|
return __awaiter(this, void 0, void 0, function () {
|
|
25679
|
-
var filterPermission, lstPermissionCode, buttonSetting, lstMenuButton, lstMenuButtons;
|
|
25688
|
+
var filterPermission, lstPermissionCode, buttonSetting, lstMenuButton, lstMenuButtons, _c_1;
|
|
25680
25689
|
var _this = this;
|
|
25681
|
-
return __generator(this, function (
|
|
25682
|
-
switch (
|
|
25690
|
+
return __generator(this, function (_h) {
|
|
25691
|
+
switch (_h.label) {
|
|
25683
25692
|
case 0:
|
|
25684
25693
|
this.authorizeButtonKey = window.location.pathname.substring(1).toUpperCase().replace(/\//g, '_');
|
|
25685
25694
|
if (i0.isDevMode()) {
|
|
@@ -25688,7 +25697,7 @@
|
|
|
25688
25697
|
filterPermission = [this.newFilter('code', exports.Operator.contain, "[" + this.authorizeButtonKey + "]")];
|
|
25689
25698
|
return [4 /*yield*/, this._basePermissionService.getAllWithIgnore(filterPermission, 'code,id')];
|
|
25690
25699
|
case 1:
|
|
25691
|
-
lstPermissionCode = (_a = (
|
|
25700
|
+
lstPermissionCode = (_a = (_h.sent()).data) !== null && _a !== void 0 ? _a : [];
|
|
25692
25701
|
buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');
|
|
25693
25702
|
buttonSetting[this.authorizeButtonKey] = lstPermissionCode;
|
|
25694
25703
|
this.lstButtonTemplate = lstButtonTemplate;
|
|
@@ -25698,9 +25707,18 @@
|
|
|
25698
25707
|
}
|
|
25699
25708
|
sessionStorage.setItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE, JSON.stringify(buttonSetting));
|
|
25700
25709
|
lstMenuButton = [];
|
|
25701
|
-
|
|
25710
|
+
_h.label = 2;
|
|
25702
25711
|
case 2:
|
|
25703
|
-
|
|
25712
|
+
_h.trys.push([2, 4, , 5]);
|
|
25713
|
+
return [4 /*yield*/, this.menuButtons({})];
|
|
25714
|
+
case 3:
|
|
25715
|
+
lstMenuButtons = (_b = _h.sent()) !== null && _b !== void 0 ? _b : [];
|
|
25716
|
+
return [3 /*break*/, 5];
|
|
25717
|
+
case 4:
|
|
25718
|
+
_c_1 = _h.sent();
|
|
25719
|
+
lstMenuButtons = [];
|
|
25720
|
+
return [3 /*break*/, 5];
|
|
25721
|
+
case 5:
|
|
25704
25722
|
if (!lstMenuButtons.length) {
|
|
25705
25723
|
this.isBtnReady = true;
|
|
25706
25724
|
return [2 /*return*/];
|