tnx-shared 5.3.342 → 5.3.343
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 +75 -4
- 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 +1 -0
- package/classes/base/list-component-base.d.ts.map +1 -1
- package/classes/constants.d.ts +2 -0
- package/classes/constants.d.ts.map +1 -1
- package/esm2015/classes/base/list-component-base.js +43 -2
- package/esm2015/classes/constants.js +3 -1
- package/esm2015/services/base.service.js +12 -1
- package/esm2015/services/workflow-permission-detail.service.js +7 -5
- package/fesm2015/tnx-shared.js +61 -5
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/base.service.d.ts +1 -0
- package/services/base.service.d.ts.map +1 -1
- package/services/workflow-permission-detail.service.d.ts +1 -0
- package/services/workflow-permission-detail.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
|
@@ -1038,6 +1038,8 @@
|
|
|
1038
1038
|
var ActionThuHoiBase = '__THU_HOI';
|
|
1039
1039
|
var ActionChoYKienBase = '__CHO_Y_KIEN';
|
|
1040
1040
|
var ActionUpdateModel = '__UPDATE_MODEL';
|
|
1041
|
+
var ActionChuyenXuLyBase = '__CHUYEN_XU_LY';
|
|
1042
|
+
var TextActionChuyenXuLyBase = 'Chuyển xử lý';
|
|
1041
1043
|
var FieldDefineHasTask = '__idTask';
|
|
1042
1044
|
|
|
1043
1045
|
function mapProperty(init, toMap) {
|
|
@@ -9184,6 +9186,17 @@
|
|
|
9184
9186
|
}
|
|
9185
9187
|
return this.defaultPost(this.serviceUri + "/ChangeStateBase", itemWorkflowHistory);
|
|
9186
9188
|
};
|
|
9189
|
+
BaseService.prototype.chuyenXuLyBase = function (itemWorkflowHistory) {
|
|
9190
|
+
if (itemWorkflowHistory) {
|
|
9191
|
+
if (itemWorkflowHistory.departmentIds) {
|
|
9192
|
+
itemWorkflowHistory.donViIds = itemWorkflowHistory.departmentIds;
|
|
9193
|
+
}
|
|
9194
|
+
if (itemWorkflowHistory.departmentViewIds) {
|
|
9195
|
+
itemWorkflowHistory.donViViewIds = itemWorkflowHistory.departmentViewIds;
|
|
9196
|
+
}
|
|
9197
|
+
}
|
|
9198
|
+
return this.defaultPost(this.serviceUri + "/ChuyenXuLyBase", itemWorkflowHistory);
|
|
9199
|
+
};
|
|
9187
9200
|
BaseService.prototype.choYKien = function (itemWorkflowHistory) {
|
|
9188
9201
|
return this.defaultPost(this.serviceUri + "/ChoYKienBase", itemWorkflowHistory);
|
|
9189
9202
|
};
|
|
@@ -22134,6 +22147,7 @@
|
|
|
22134
22147
|
_this.serviceManagers = {};
|
|
22135
22148
|
_this.entityName = 'WorkflowPermissionDetail';
|
|
22136
22149
|
_this.tableName = '';
|
|
22150
|
+
_this.guidEmpty = '00000000-0000-0000-0000-000000000000';
|
|
22137
22151
|
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.workflowEndpoint;
|
|
22138
22152
|
_this._moduleConfig = _moduleConfigService.getConfig();
|
|
22139
22153
|
return _this;
|
|
@@ -22180,9 +22194,9 @@
|
|
|
22180
22194
|
filters.push(this.newFilter('userId', exports.Operator.equal, userIdCurrent));
|
|
22181
22195
|
}
|
|
22182
22196
|
else {
|
|
22183
|
-
sorts.push(new Sort({ field: 'permission', dir: -1 }), new Sort({ field: 'inComing', dir: -1 }));
|
|
22197
|
+
sorts.push(new Sort({ field: 'permission', dir: -1 }), new Sort({ field: 'inComing', dir: -1 }), new Sort({ field: 'isCOEdit', dir: -1 }));
|
|
22184
22198
|
}
|
|
22185
|
-
return [4 /*yield*/, this.getAll(filters, 'itemId,userId,trangThai,textTrangThai,workflowCode,permission', sorts, 'ForCrudList')];
|
|
22199
|
+
return [4 /*yield*/, this.getAll(filters, 'itemId,userId,trangThai,textTrangThai,workflowCode,permission,isCOEdit', sorts, 'ForCrudList')];
|
|
22186
22200
|
case 1:
|
|
22187
22201
|
dataStatus = (_a.sent()).data;
|
|
22188
22202
|
if (dataStatus == null) {
|
|
@@ -22196,6 +22210,7 @@
|
|
|
22196
22210
|
});
|
|
22197
22211
|
};
|
|
22198
22212
|
WorkflowPermissionDetailService.prototype.appendWorkflowInfoToItem = function (data, itemId, userIdCurrent, ignoreWorkflow, dataStatus, callBackWhenNotHaveStatus) {
|
|
22213
|
+
var _this = this;
|
|
22199
22214
|
if (callBackWhenNotHaveStatus === void 0) { callBackWhenNotHaveStatus = null; }
|
|
22200
22215
|
var itemStatus = {
|
|
22201
22216
|
textTrangThai: 'Chưa chạy quy trình'
|
|
@@ -22219,6 +22234,7 @@
|
|
|
22219
22234
|
if (!itemStatus.trangThai) {
|
|
22220
22235
|
callBackWhenNotHaveStatus(itemStatus, data);
|
|
22221
22236
|
}
|
|
22237
|
+
data.__isCoEdit = dataStatus.some(function (x) { return x.itemId === itemId && x.userId != _this.guidEmpty && x.isCOEdit; });
|
|
22222
22238
|
data.__trangThai = itemStatus.trangThai;
|
|
22223
22239
|
data.__textTrangThai = itemStatus.textTrangThai;
|
|
22224
22240
|
if (itemStatus.workflowCode == DummyWorkflowCode) {
|
|
@@ -22280,8 +22296,8 @@
|
|
|
22280
22296
|
// if (!ignoreWorkflow) {
|
|
22281
22297
|
// filters.push(this.newFilter('userId', Operator.equal, userIdCurrent));
|
|
22282
22298
|
// }
|
|
22283
|
-
sorts.push(new Sort({ field: 'permission', dir: -1 }), new Sort({ field: 'inComing', dir: -1 }));
|
|
22284
|
-
return [4 /*yield*/, this.getAll(filters, 'itemId,userId,trangThai,textTrangThai,workflowCode,permission', sorts, 'ForCrudList')];
|
|
22299
|
+
sorts.push(new Sort({ field: 'permission', dir: -1 }), new Sort({ field: 'inComing', dir: -1 }), new Sort({ field: 'isCOEdit', dir: -1 }));
|
|
22300
|
+
return [4 /*yield*/, this.getAll(filters, 'itemId,userId,trangThai,textTrangThai,workflowCode,permission,isCOEdit', sorts, 'ForCrudList')];
|
|
22285
22301
|
case 1:
|
|
22286
22302
|
dataStatus = (_a.sent()).data;
|
|
22287
22303
|
if (dataStatus == null) {
|
|
@@ -25820,6 +25836,14 @@
|
|
|
25820
25836
|
if (userId) {
|
|
25821
25837
|
userIdStringUpper = userId.toUpperCase();
|
|
25822
25838
|
}
|
|
25839
|
+
if (rowData.__isCoEdit) {
|
|
25840
|
+
buttonContexts.push({
|
|
25841
|
+
icon: 'pi pi-backward',
|
|
25842
|
+
label: TextActionChuyenXuLyBase,
|
|
25843
|
+
actionCode: ActionChuyenXuLyBase,
|
|
25844
|
+
command: function () { return _this.showFormChuyenXuLy(crudListSetting, itemWorkflowSetting_1, rowData); }
|
|
25845
|
+
});
|
|
25846
|
+
}
|
|
25823
25847
|
return [4 /*yield*/, workflowHistoryService.changeEndpoint(crudListSetting.baseService).getLastByItemId(rowData.id)];
|
|
25824
25848
|
case 3:
|
|
25825
25849
|
itemWorkflowHistoryLast = (_h.sent()).data;
|
|
@@ -26011,6 +26035,51 @@
|
|
|
26011
26035
|
});
|
|
26012
26036
|
});
|
|
26013
26037
|
};
|
|
26038
|
+
ListComponentBase.prototype.showFormChuyenXuLy = function (crudListSetting, itemWorkflowSetting, rowData) {
|
|
26039
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
26040
|
+
var workflowHistoryService, itemWorkflowHistoryLast, currentState, compRef, action;
|
|
26041
|
+
var _this = this;
|
|
26042
|
+
return __generator(this, function (_h) {
|
|
26043
|
+
switch (_h.label) {
|
|
26044
|
+
case 0:
|
|
26045
|
+
workflowHistoryService = this._injector.get(WorkflowHistoryService);
|
|
26046
|
+
workflowHistoryService.changeEndpoint(this.setting.baseService);
|
|
26047
|
+
return [4 /*yield*/, workflowHistoryService.changeEndpoint(crudListSetting.baseService).getLastByItemId(rowData.id)];
|
|
26048
|
+
case 1:
|
|
26049
|
+
itemWorkflowHistoryLast = (_h.sent()).data;
|
|
26050
|
+
if (!itemWorkflowHistoryLast) {
|
|
26051
|
+
return [2 /*return*/, this._notifierService.showWarning('Không tìm thấy bước thực hiện gần nhất của bảng ghi!')];
|
|
26052
|
+
}
|
|
26053
|
+
currentState = itemWorkflowSetting.data.machines.find(function (x) { return x.code == rowData.__trangThai; });
|
|
26054
|
+
this.processWorkflowModel.showEditForm = true;
|
|
26055
|
+
this.processWorkflowModel.header = TextActionChuyenXuLyBase;
|
|
26056
|
+
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'ProcessWorkflowFormComponent', this.processWorkflowFormViewContainer)];
|
|
26057
|
+
case 2:
|
|
26058
|
+
compRef = _h.sent();
|
|
26059
|
+
if (this.dialogProcessWorkflowForm) {
|
|
26060
|
+
this.dialogProcessWorkflowForm.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
26061
|
+
}
|
|
26062
|
+
compRef.instance.item = this.currentItem;
|
|
26063
|
+
compRef.instance.businessSetting = crudListSetting;
|
|
26064
|
+
compRef.instance.workflow = itemWorkflowSetting;
|
|
26065
|
+
action = new WfAction();
|
|
26066
|
+
action.code = ActionChuyenXuLyBase;
|
|
26067
|
+
action.name = TextActionChuyenXuLyBase;
|
|
26068
|
+
action.data = {};
|
|
26069
|
+
action.openPopup = true;
|
|
26070
|
+
action.target = currentState.id || this.guidEmpty;
|
|
26071
|
+
action.source = currentState.id || this.guidEmpty;
|
|
26072
|
+
compRef.instance.action = action;
|
|
26073
|
+
compRef.instance.onSaved.subscribe(function (event) {
|
|
26074
|
+
_this.processWorkflowModel.showEditForm = false;
|
|
26075
|
+
_this.getData();
|
|
26076
|
+
});
|
|
26077
|
+
compRef.instance.onCancel.subscribe(function (event) { return _this.processWorkflowModel.showEditForm = false; });
|
|
26078
|
+
return [2 /*return*/];
|
|
26079
|
+
}
|
|
26080
|
+
});
|
|
26081
|
+
});
|
|
26082
|
+
};
|
|
26014
26083
|
ListComponentBase.prototype.startWorkflow = function (rowData, workflow) {
|
|
26015
26084
|
return __awaiter(this, void 0, void 0, function () {
|
|
26016
26085
|
var _this = this;
|
|
@@ -56864,6 +56933,7 @@
|
|
|
56864
56933
|
exports.AccessDeniedComponent = AccessDeniedComponent;
|
|
56865
56934
|
exports.Action = Action;
|
|
56866
56935
|
exports.ActionChoYKienBase = ActionChoYKienBase;
|
|
56936
|
+
exports.ActionChuyenXuLyBase = ActionChuyenXuLyBase;
|
|
56867
56937
|
exports.ActionThuHoiBase = ActionThuHoiBase;
|
|
56868
56938
|
exports.ActionUpdateModel = ActionUpdateModel;
|
|
56869
56939
|
exports.AddressControlSchema = AddressControlSchema;
|
|
@@ -57186,6 +57256,7 @@
|
|
|
57186
57256
|
exports.TemplateTextV4Service = TemplateTextV4Service;
|
|
57187
57257
|
exports.TemplateV4Service = TemplateV4Service;
|
|
57188
57258
|
exports.TenContainer = TenContainer;
|
|
57259
|
+
exports.TextActionChuyenXuLyBase = TextActionChuyenXuLyBase;
|
|
57189
57260
|
exports.TextAreaControlSchema = TextAreaControlSchema;
|
|
57190
57261
|
exports.TextControlSchema = TextControlSchema;
|
|
57191
57262
|
exports.TextControlSchemaWithService = TextControlSchemaWithService;
|