tnx-shared 5.3.162 → 5.3.164
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 +0 -4
- package/app-context/component-context.service.d.ts.map +1 -1
- package/bundles/tnx-shared.umd.js +954 -512
- 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/component-base.d.ts.map +1 -1
- package/classes/base/i-list-component.d.ts +3 -0
- package/classes/base/i-list-component.d.ts.map +1 -1
- package/classes/base/list-base.d.ts +5 -2
- package/classes/base/list-base.d.ts.map +1 -1
- package/classes/base/list-component-base.d.ts +21 -5
- package/classes/base/list-component-base.d.ts.map +1 -1
- package/classes/form-schema.d.ts +10 -0
- package/classes/form-schema.d.ts.map +1 -1
- package/components/report-queue/report-queue.component.d.ts.map +1 -1
- package/components/settings/settings-authorize-button/settings-authorize-button.component.d.ts +20 -0
- package/components/settings/settings-authorize-button/settings-authorize-button.component.d.ts.map +1 -0
- package/components/settings/settings-authorize-button/settings-authorize-button.component.ngfactory.d.ts.map +1 -0
- package/components/settings/settings-authorize-button/settings-authorize-button.component.scss.shim.ngstyle.d.ts.map +1 -0
- package/configs/component-context.constant.d.ts +8 -0
- package/configs/component-context.constant.d.ts.map +1 -1
- package/const/common.d.ts +2 -2
- package/const/common.d.ts.map +1 -1
- package/directives/authorize.directive.d.ts +8 -3
- package/directives/authorize.directive.d.ts.map +1 -1
- package/enums/common.d.ts +16 -0
- package/enums/common.d.ts.map +1 -1
- package/esm2015/app-context/component-context.service.js +4 -6
- package/esm2015/classes/base/component-base.js +5 -1
- package/esm2015/classes/base/i-list-component.js +1 -1
- package/esm2015/classes/base/list-base.js +20 -6
- package/esm2015/classes/base/list-component-base.js +121 -11
- package/esm2015/classes/form-schema.js +12 -1
- package/esm2015/components/crud/crud-list/crud-list.component.js +2 -2
- package/esm2015/components/report-queue/report-queue.component.js +1 -1
- package/esm2015/components/settings/settings-authorize-button/settings-authorize-button.component.js +142 -0
- package/esm2015/configs/component-context.constant.js +10 -2
- package/esm2015/const/common.js +5 -5
- package/esm2015/directives/authorize.directive.js +37 -6
- package/esm2015/enums/common.js +19 -1
- package/esm2015/services/authen.service.js +3 -1
- package/esm2015/services/basepermission.service.js +28 -0
- package/esm2015/services/common.service.js +1 -1
- package/esm2015/services/module-config.service.js +12 -2
- package/esm2015/tnx-shared.js +4 -2
- package/esm2015/tnx-shared.module.js +3 -1
- package/fesm2015/tnx-shared.js +630 -269
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/authen.service.d.ts.map +1 -1
- package/services/basepermission.service.d.ts +11 -0
- package/services/basepermission.service.d.ts.map +1 -0
- package/services/basepermission.service.ngfactory.d.ts.map +1 -0
- package/services/common.service.d.ts.map +1 -1
- package/services/module-config.service.d.ts.map +1 -1
- package/tnx-shared.d.ts +3 -1
- package/tnx-shared.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
- package/tnx-shared.module.d.ts +2 -1
- package/tnx-shared.module.d.ts.map +1 -1
- package/tnx-shared.module.ngfactory.d.ts.map +1 -1
|
@@ -115,7 +115,15 @@
|
|
|
115
115
|
COLUMN_SETTING: 'COLUMN_SETTING',
|
|
116
116
|
COLOR_SETTING: 'COLOR_SETTING',
|
|
117
117
|
DEFAULT_DATA: 'DEFAULT_DATA',
|
|
118
|
-
ADVANCE_FILTER: 'ADVANCE_FILTER'
|
|
118
|
+
ADVANCE_FILTER: 'ADVANCE_FILTER',
|
|
119
|
+
BUTTON_AUTHORIZE: 'BUTTON_AUTHORIZE',
|
|
120
|
+
BUTTON_SETTING: 'BUTTON_SETTING'
|
|
121
|
+
};
|
|
122
|
+
ComCtxConstants.COMMON_VN = {
|
|
123
|
+
ADD: 'THEM_MOI',
|
|
124
|
+
EDIT: 'SUA',
|
|
125
|
+
DELETE: 'XOA',
|
|
126
|
+
DELETE_MULTIPLE: 'XOA_CAC_MUC_DA_CHON',
|
|
119
127
|
};
|
|
120
128
|
ComCtxConstants.COMMON = {
|
|
121
129
|
ADD: 'ADD',
|
|
@@ -1081,6 +1089,7 @@
|
|
|
1081
1089
|
this.useCommonSearch = false;
|
|
1082
1090
|
this.useCommonFullTextSearch = true;
|
|
1083
1091
|
this.hiddenSearch = false;
|
|
1092
|
+
this.hiddenAuthorizeButton = false;
|
|
1084
1093
|
this.hiddenHeader = false;
|
|
1085
1094
|
this.hiddenPageSetting = false;
|
|
1086
1095
|
this.hiddenTextPage = false;
|
|
@@ -2036,6 +2045,7 @@
|
|
|
2036
2045
|
_this.searchMultiple = true;
|
|
2037
2046
|
_this.disableDisplayFieldServerSearch = false;
|
|
2038
2047
|
_this.loadOnInit = false;
|
|
2048
|
+
_this.isLazyLoad = false;
|
|
2039
2049
|
_this.allowLoadDataWhenParentNull = false;
|
|
2040
2050
|
_this.disabledParentItem = true;
|
|
2041
2051
|
for (var key in init) {
|
|
@@ -2389,6 +2399,16 @@
|
|
|
2389
2399
|
}
|
|
2390
2400
|
return PopupSize;
|
|
2391
2401
|
}());
|
|
2402
|
+
var ButtonAction = /** @class */ (function () {
|
|
2403
|
+
function ButtonAction(init) {
|
|
2404
|
+
this.lstElement = [];
|
|
2405
|
+
this.isAuthorize = false;
|
|
2406
|
+
for (var key in init) {
|
|
2407
|
+
this[key] = init[key];
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
return ButtonAction;
|
|
2411
|
+
}());
|
|
2392
2412
|
var EventData = /** @class */ (function () {
|
|
2393
2413
|
function EventData(init) {
|
|
2394
2414
|
for (var key in init) {
|
|
@@ -2795,7 +2815,17 @@
|
|
|
2795
2815
|
var ModuleConfigService = /** @class */ (function () {
|
|
2796
2816
|
function ModuleConfigService(moduleConfigVal) {
|
|
2797
2817
|
if (moduleConfigVal === void 0) { moduleConfigVal = null; }
|
|
2798
|
-
|
|
2818
|
+
if (moduleConfigVal) {
|
|
2819
|
+
this._config = moduleConfigVal();
|
|
2820
|
+
window['appCode'] = this._config.appCode;
|
|
2821
|
+
window['environment'] = this._config.environment;
|
|
2822
|
+
}
|
|
2823
|
+
else {
|
|
2824
|
+
this._config = {
|
|
2825
|
+
environment: window['environment'],
|
|
2826
|
+
appCode: window['appCode']
|
|
2827
|
+
};
|
|
2828
|
+
}
|
|
2799
2829
|
}
|
|
2800
2830
|
ModuleConfigService.prototype.getConfig = function () {
|
|
2801
2831
|
return this._config;
|
|
@@ -2875,6 +2905,7 @@
|
|
|
2875
2905
|
Object.keys(sessionStorage).filter(function (item) { return /^AUTHORIZATION/.test(item) || /^V4_AUTHORIZATION/.test(item); }).forEach(function (item) {
|
|
2876
2906
|
sessionStorage.removeItem(item);
|
|
2877
2907
|
});
|
|
2908
|
+
sessionStorage.removeItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE);
|
|
2878
2909
|
sessionStorage.removeItem('profiles');
|
|
2879
2910
|
sessionStorage.removeItem('v4_profiles');
|
|
2880
2911
|
};
|
|
@@ -4764,6 +4795,7 @@
|
|
|
4764
4795
|
function ComponentContextService(_commonService) {
|
|
4765
4796
|
this._commonService = _commonService;
|
|
4766
4797
|
this.data = {};
|
|
4798
|
+
// reportQueue: ReportQueueComponent;
|
|
4767
4799
|
this._unSubscribeAll = new rxjs.Subject();
|
|
4768
4800
|
this.promises = {};
|
|
4769
4801
|
this.subjects = {};
|
|
@@ -4978,11 +5010,6 @@
|
|
|
4978
5010
|
this.data = {};
|
|
4979
5011
|
this.root.fireEvent(ComCtxConstants.ROOT.DESTROY_COMPONENT, this);
|
|
4980
5012
|
};
|
|
4981
|
-
ComponentContextService.prototype.addExportJob = function (job) {
|
|
4982
|
-
if (this.root.reportQueue) {
|
|
4983
|
-
this.root.reportQueue.addJob(job);
|
|
4984
|
-
}
|
|
4985
|
-
};
|
|
4986
5013
|
return ComponentContextService;
|
|
4987
5014
|
}());
|
|
4988
5015
|
ComponentContextService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ComponentContextService_Factory() { return new ComponentContextService(i0__namespace.ɵɵinject(CommonService)); }, token: ComponentContextService, providedIn: "root" });
|
|
@@ -5389,6 +5416,24 @@
|
|
|
5389
5416
|
EnumCanBo[EnumCanBo["NGOAI_DON_VI"] = 2] = "NGOAI_DON_VI";
|
|
5390
5417
|
EnumCanBo[EnumCanBo["TRONG_DON_VI"] = 3] = "TRONG_DON_VI";
|
|
5391
5418
|
})(exports.EnumCanBo || (exports.EnumCanBo = {}));
|
|
5419
|
+
exports.PermissionName = void 0;
|
|
5420
|
+
(function (PermissionName) {
|
|
5421
|
+
PermissionName["WATCH"] = "Xem";
|
|
5422
|
+
PermissionName["ADD"] = "Th\u00EAm m\u1EDBi";
|
|
5423
|
+
PermissionName["EDIT"] = "S\u1EEDa";
|
|
5424
|
+
PermissionName["DELETE"] = "X\u00F3a";
|
|
5425
|
+
PermissionName["DELETE_MULTIPLE"] = "X\u00F3a c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn";
|
|
5426
|
+
})(exports.PermissionName || (exports.PermissionName = {}));
|
|
5427
|
+
exports.EnumProperties = void 0;
|
|
5428
|
+
(function (EnumProperties) {
|
|
5429
|
+
EnumProperties["NG_REFLECT_TEXT"] = "ng-reflect-text";
|
|
5430
|
+
EnumProperties["NG_REFLECT_LABEL"] = "ng-reflect-label";
|
|
5431
|
+
EnumProperties["CRUD_LIST"] = "crud-list";
|
|
5432
|
+
EnumProperties["LABEL"] = "label";
|
|
5433
|
+
EnumProperties["TAG_NAME"] = "tagName";
|
|
5434
|
+
EnumProperties["TOOLTIP"] = "ptooltip";
|
|
5435
|
+
EnumProperties["RESULTS"] = "_results";
|
|
5436
|
+
})(exports.EnumProperties || (exports.EnumProperties = {}));
|
|
5392
5437
|
|
|
5393
5438
|
var ExportItem = /** @class */ (function () {
|
|
5394
5439
|
function ExportItem(init) {
|
|
@@ -10349,6 +10394,10 @@
|
|
|
10349
10394
|
this._crudService = injector.get(CrudService);
|
|
10350
10395
|
this._commonService = injector.get(CommonService);
|
|
10351
10396
|
this._datePipe = injector.get(i3.DatePipe);
|
|
10397
|
+
var root = this._appContext.getRootContext();
|
|
10398
|
+
if (!root) {
|
|
10399
|
+
this._appContext.addRootContext(this._componentContext, this._activatedRoute);
|
|
10400
|
+
}
|
|
10352
10401
|
this._componentContext = this._appContext.addComponentContext(this._componentContext, this._activatedRoute, this.getComponentId());
|
|
10353
10402
|
if (this._componentContext) {
|
|
10354
10403
|
this.model = this._componentContext.data;
|
|
@@ -11172,9 +11221,9 @@
|
|
|
11172
11221
|
var FieldWorkflowCodeInCrudForm = '_WorkflowCode';
|
|
11173
11222
|
var ɵ0$2 = exports.PermissionBase.READ, ɵ1$1 = exports.PermissionBase.EDIT, ɵ2$1 = exports.PermissionBase.DELETE;
|
|
11174
11223
|
var DataSourcePermissionBase = [
|
|
11175
|
-
{ id: ɵ0$2, ten:
|
|
11176
|
-
{ id: ɵ1$1, ten:
|
|
11177
|
-
{ id: ɵ2$1, ten:
|
|
11224
|
+
{ id: ɵ0$2, ten: exports.PermissionName.WATCH },
|
|
11225
|
+
{ id: ɵ1$1, ten: exports.PermissionName.EDIT },
|
|
11226
|
+
{ id: ɵ2$1, ten: exports.PermissionName.DELETE }
|
|
11178
11227
|
];
|
|
11179
11228
|
var ɵ3 = exports.EnumGioiTinh.NAM, ɵ4 = exports.EnumGioiTinh.NU;
|
|
11180
11229
|
var DataSourceGioiTinh = [
|
|
@@ -19094,307 +19143,6 @@
|
|
|
19094
19143
|
onDataBinded: [{ type: i0.Output }]
|
|
19095
19144
|
};
|
|
19096
19145
|
|
|
19097
|
-
var CauHinhWorkflowService = /** @class */ (function (_super) {
|
|
19098
|
-
__extends(CauHinhWorkflowService, _super);
|
|
19099
|
-
function CauHinhWorkflowService(http, injector, _moduleConfigService) {
|
|
19100
|
-
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.congviecEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/CauHinhWorkflow") || this;
|
|
19101
|
-
_this._moduleConfigService = _moduleConfigService;
|
|
19102
|
-
_this.serviceCode = 'congviec';
|
|
19103
|
-
_this.entityName = 'CauHinhWorkflow';
|
|
19104
|
-
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.congviecEndpoint;
|
|
19105
|
-
return _this;
|
|
19106
|
-
}
|
|
19107
|
-
return CauHinhWorkflowService;
|
|
19108
|
-
}(BaseService));
|
|
19109
|
-
CauHinhWorkflowService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CauHinhWorkflowService_Factory() { return new CauHinhWorkflowService(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(ModuleConfigService)); }, token: CauHinhWorkflowService, providedIn: "root" });
|
|
19110
|
-
CauHinhWorkflowService.decorators = [
|
|
19111
|
-
{ type: i0.Injectable, args: [{
|
|
19112
|
-
providedIn: 'root'
|
|
19113
|
-
},] }
|
|
19114
|
-
];
|
|
19115
|
-
CauHinhWorkflowService.ctorParameters = function () { return [
|
|
19116
|
-
{ type: i1$1.HttpClient },
|
|
19117
|
-
{ type: i0.Injector },
|
|
19118
|
-
{ type: ModuleConfigService }
|
|
19119
|
-
]; };
|
|
19120
|
-
|
|
19121
|
-
var StateMachinesService = /** @class */ (function (_super) {
|
|
19122
|
-
__extends(StateMachinesService, _super);
|
|
19123
|
-
function StateMachinesService(http, injector, _moduleConfigService) {
|
|
19124
|
-
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.workflowEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/StateMachines") || this;
|
|
19125
|
-
_this._moduleConfigService = _moduleConfigService;
|
|
19126
|
-
_this.entityName = 'StateMachines';
|
|
19127
|
-
_this.serviceCode = 'workflow';
|
|
19128
|
-
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.workflowEndpoint;
|
|
19129
|
-
return _this;
|
|
19130
|
-
}
|
|
19131
|
-
StateMachinesService.prototype.changeState = function (itemWorkflowHistory) {
|
|
19132
|
-
return this.defaultPost(this.serviceUri + "/ChangeState", itemWorkflowHistory);
|
|
19133
|
-
};
|
|
19134
|
-
StateMachinesService.prototype.rollback = function (rowData) {
|
|
19135
|
-
return this.defaultPost(this.serviceUri + "/Rollback/" + rowData.__workflowCode + "/" + rowData.id, {});
|
|
19136
|
-
};
|
|
19137
|
-
StateMachinesService.prototype.getUserInProcessForm = function (workflowCode, stateCode, actionCode, itemId) {
|
|
19138
|
-
return this.defaultPost(this.serviceUri + "/GetUserInProcessForm/" + workflowCode + "/" + stateCode + "/" + actionCode + "/" + itemId, {});
|
|
19139
|
-
};
|
|
19140
|
-
return StateMachinesService;
|
|
19141
|
-
}(BaseService));
|
|
19142
|
-
StateMachinesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function StateMachinesService_Factory() { return new StateMachinesService(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(ModuleConfigService)); }, token: StateMachinesService, providedIn: "root" });
|
|
19143
|
-
StateMachinesService.decorators = [
|
|
19144
|
-
{ type: i0.Injectable, args: [{
|
|
19145
|
-
providedIn: 'root'
|
|
19146
|
-
},] }
|
|
19147
|
-
];
|
|
19148
|
-
StateMachinesService.ctorParameters = function () { return [
|
|
19149
|
-
{ type: i1$1.HttpClient },
|
|
19150
|
-
{ type: i0.Injector },
|
|
19151
|
-
{ type: ModuleConfigService }
|
|
19152
|
-
]; };
|
|
19153
|
-
|
|
19154
|
-
var DmLoaiCongViecService = /** @class */ (function (_super) {
|
|
19155
|
-
__extends(DmLoaiCongViecService, _super);
|
|
19156
|
-
function DmLoaiCongViecService(http, injector, _moduleConfigService) {
|
|
19157
|
-
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.congviecEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/DM_LoaiCongViec") || this;
|
|
19158
|
-
_this._moduleConfigService = _moduleConfigService;
|
|
19159
|
-
_this.serviceCode = 'congviec';
|
|
19160
|
-
_this.entityName = 'DM_LoaiCongViec';
|
|
19161
|
-
_this.dicLoaiCongViec = {};
|
|
19162
|
-
_this.keyIdLoaiCongViecRoot = 'root';
|
|
19163
|
-
_this.getWorkflowSettingByIdLoaiCongViec = function (idLoaiCongViec) { return __awaiter(_this, void 0, void 0, function () {
|
|
19164
|
-
var result, idLoaiCongViecs, i;
|
|
19165
|
-
return __generator(this, function (_a) {
|
|
19166
|
-
switch (_a.label) {
|
|
19167
|
-
case 0:
|
|
19168
|
-
if (!!this.dicWorkflowByLoaiCongViec) return [3 /*break*/, 2];
|
|
19169
|
-
return [4 /*yield*/, this.getDatasourceWorkflowCongViec()];
|
|
19170
|
-
case 1:
|
|
19171
|
-
_a.sent();
|
|
19172
|
-
_a.label = 2;
|
|
19173
|
-
case 2:
|
|
19174
|
-
if (!idLoaiCongViec) {
|
|
19175
|
-
return [2 /*return*/, this.dicWorkflowByLoaiCongViec[this.keyIdLoaiCongViecRoot]];
|
|
19176
|
-
}
|
|
19177
|
-
result = this.dicWorkflowByLoaiCongViec[idLoaiCongViec];
|
|
19178
|
-
if (result)
|
|
19179
|
-
return [2 /*return*/, result];
|
|
19180
|
-
return [4 /*yield*/, this.getIdLoaiCongViecs(idLoaiCongViec)];
|
|
19181
|
-
case 3:
|
|
19182
|
-
idLoaiCongViecs = _a.sent();
|
|
19183
|
-
if (!Array.isArray(idLoaiCongViecs))
|
|
19184
|
-
return [2 /*return*/, null];
|
|
19185
|
-
if (idLoaiCongViecs.length > 1) {
|
|
19186
|
-
for (i = idLoaiCongViecs.length - 2; i >= 0; i--) {
|
|
19187
|
-
result = this.dicWorkflowByLoaiCongViec[idLoaiCongViecs[i]];
|
|
19188
|
-
if (result)
|
|
19189
|
-
return [2 /*return*/, result];
|
|
19190
|
-
}
|
|
19191
|
-
}
|
|
19192
|
-
if (!result) {
|
|
19193
|
-
result = this.dicWorkflowByLoaiCongViec[this.keyIdLoaiCongViecRoot];
|
|
19194
|
-
}
|
|
19195
|
-
return [2 /*return*/, result];
|
|
19196
|
-
}
|
|
19197
|
-
});
|
|
19198
|
-
}); };
|
|
19199
|
-
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.congviecEndpoint;
|
|
19200
|
-
return _this;
|
|
19201
|
-
}
|
|
19202
|
-
DmLoaiCongViecService.prototype.getDatasourceWorkflowCongViec = function () {
|
|
19203
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
19204
|
-
var cauHinhWorkflowService, cauHinhWorkflows, notifierService, workflowCodes, stateMachinesService, workflows;
|
|
19205
|
-
var _this = this;
|
|
19206
|
-
return __generator(this, function (_a) {
|
|
19207
|
-
switch (_a.label) {
|
|
19208
|
-
case 0:
|
|
19209
|
-
if (!this.dicWorkflowByLoaiCongViec) {
|
|
19210
|
-
this.dicWorkflowByLoaiCongViec = {};
|
|
19211
|
-
}
|
|
19212
|
-
cauHinhWorkflowService = this._injector.get(CauHinhWorkflowService);
|
|
19213
|
-
return [4 /*yield*/, cauHinhWorkflowService.getAll([], 'idLoaiCongViec,workflowCodes,workflowCode')];
|
|
19214
|
-
case 1:
|
|
19215
|
-
cauHinhWorkflows = (_a.sent()).data;
|
|
19216
|
-
notifierService = this._injector.get(NotifierService);
|
|
19217
|
-
if (cauHinhWorkflows == null) {
|
|
19218
|
-
notifierService.showWarning('Dịch vụ workflow không phản hồi');
|
|
19219
|
-
return [2 /*return*/, []];
|
|
19220
|
-
}
|
|
19221
|
-
workflowCodes = [];
|
|
19222
|
-
cauHinhWorkflows.forEach(function (itemWorkflowSetting) {
|
|
19223
|
-
if (itemWorkflowSetting.workflowCodes && !Array.isArray(itemWorkflowSetting.workflowCodes)) {
|
|
19224
|
-
itemWorkflowSetting.workflowCodes = itemWorkflowSetting.workflowCodes.split(',');
|
|
19225
|
-
}
|
|
19226
|
-
else {
|
|
19227
|
-
itemWorkflowSetting.workflowCodes = [];
|
|
19228
|
-
}
|
|
19229
|
-
itemWorkflowSetting.workflowCodes.forEach(function (workflowCode) {
|
|
19230
|
-
if (workflowCodes.indexOf(workflowCode) == -1) {
|
|
19231
|
-
workflowCodes.push(workflowCode);
|
|
19232
|
-
}
|
|
19233
|
-
});
|
|
19234
|
-
});
|
|
19235
|
-
stateMachinesService = this._injector.get(StateMachinesService);
|
|
19236
|
-
return [4 /*yield*/, stateMachinesService.getDataDropdownByFilter([
|
|
19237
|
-
this.newFilter('code', exports.Operator.in, workflowCodes)
|
|
19238
|
-
], new DropdownOptions({
|
|
19239
|
-
valueField: 'code',
|
|
19240
|
-
displayField: 'title',
|
|
19241
|
-
fieldPlus: 'data'
|
|
19242
|
-
}))];
|
|
19243
|
-
case 2:
|
|
19244
|
-
workflows = (_a.sent());
|
|
19245
|
-
workflows.forEach(function (item) {
|
|
19246
|
-
item.data = JSON.parse(item.data);
|
|
19247
|
-
var stateMachineData = item.data;
|
|
19248
|
-
stateMachineData.actions = {};
|
|
19249
|
-
stateMachineData.machines.forEach(function (machine) {
|
|
19250
|
-
stateMachineData.actions[machine.code] = [];
|
|
19251
|
-
stateMachineData.connections.forEach(function (conn) {
|
|
19252
|
-
if (conn.source == machine.id) {
|
|
19253
|
-
stateMachineData.actions[machine.code].push(conn);
|
|
19254
|
-
}
|
|
19255
|
-
});
|
|
19256
|
-
});
|
|
19257
|
-
});
|
|
19258
|
-
cauHinhWorkflows.forEach(function (itemWorkflowSetting) {
|
|
19259
|
-
itemWorkflowSetting.workflows = workflows.filter(function (q) { return itemWorkflowSetting.workflowCodes.indexOf(q.code) > -1; });
|
|
19260
|
-
if (!itemWorkflowSetting.idLoaiCongViec) {
|
|
19261
|
-
_this.dicWorkflowByLoaiCongViec[_this.keyIdLoaiCongViecRoot] = itemWorkflowSetting;
|
|
19262
|
-
}
|
|
19263
|
-
else {
|
|
19264
|
-
_this.dicWorkflowByLoaiCongViec[itemWorkflowSetting.idLoaiCongViec] = itemWorkflowSetting;
|
|
19265
|
-
}
|
|
19266
|
-
});
|
|
19267
|
-
return [2 /*return*/, workflows];
|
|
19268
|
-
}
|
|
19269
|
-
});
|
|
19270
|
-
});
|
|
19271
|
-
};
|
|
19272
|
-
DmLoaiCongViecService.prototype.getIdLoaiCongViecs = function (idLoaiCongViec) {
|
|
19273
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
19274
|
-
var notifierService, itemLoaiCongViec, idLoaiCongViecs;
|
|
19275
|
-
return __generator(this, function (_a) {
|
|
19276
|
-
switch (_a.label) {
|
|
19277
|
-
case 0:
|
|
19278
|
-
notifierService = this._injector.get(NotifierService);
|
|
19279
|
-
return [4 /*yield*/, this.getItemLoaiCongViec(idLoaiCongViec)];
|
|
19280
|
-
case 1:
|
|
19281
|
-
itemLoaiCongViec = _a.sent();
|
|
19282
|
-
if (itemLoaiCongViec == null) {
|
|
19283
|
-
notifierService.showWarning('Loại công việc không tồn tại');
|
|
19284
|
-
return [2 /*return*/, null];
|
|
19285
|
-
}
|
|
19286
|
-
idLoaiCongViecs = itemLoaiCongViec.idDuongDan.split(';').filter(function (q) { return !!q; });
|
|
19287
|
-
return [2 /*return*/, idLoaiCongViecs];
|
|
19288
|
-
}
|
|
19289
|
-
});
|
|
19290
|
-
});
|
|
19291
|
-
};
|
|
19292
|
-
DmLoaiCongViecService.prototype.getItemLoaiCongViec = function (idLoaiCongViec) {
|
|
19293
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
19294
|
-
var _a, _b;
|
|
19295
|
-
return __generator(this, function (_c) {
|
|
19296
|
-
switch (_c.label) {
|
|
19297
|
-
case 0:
|
|
19298
|
-
if (!!this.dicLoaiCongViec[idLoaiCongViec]) return [3 /*break*/, 2];
|
|
19299
|
-
_a = this.dicLoaiCongViec;
|
|
19300
|
-
_b = idLoaiCongViec;
|
|
19301
|
-
return [4 /*yield*/, this.getDetail(idLoaiCongViec)];
|
|
19302
|
-
case 1:
|
|
19303
|
-
_a[_b] = (_c.sent()).data;
|
|
19304
|
-
_c.label = 2;
|
|
19305
|
-
case 2: return [2 /*return*/, this.dicLoaiCongViec[idLoaiCongViec]];
|
|
19306
|
-
}
|
|
19307
|
-
});
|
|
19308
|
-
});
|
|
19309
|
-
};
|
|
19310
|
-
return DmLoaiCongViecService;
|
|
19311
|
-
}(BaseService));
|
|
19312
|
-
DmLoaiCongViecService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DmLoaiCongViecService_Factory() { return new DmLoaiCongViecService(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(ModuleConfigService)); }, token: DmLoaiCongViecService, providedIn: "root" });
|
|
19313
|
-
DmLoaiCongViecService.decorators = [
|
|
19314
|
-
{ type: i0.Injectable, args: [{
|
|
19315
|
-
providedIn: 'root'
|
|
19316
|
-
},] }
|
|
19317
|
-
];
|
|
19318
|
-
DmLoaiCongViecService.ctorParameters = function () { return [
|
|
19319
|
-
{ type: i1$1.HttpClient },
|
|
19320
|
-
{ type: i0.Injector },
|
|
19321
|
-
{ type: ModuleConfigService }
|
|
19322
|
-
]; };
|
|
19323
|
-
|
|
19324
|
-
var CongViecService = /** @class */ (function (_super) {
|
|
19325
|
-
__extends(CongViecService, _super);
|
|
19326
|
-
function CongViecService(http, injector, _moduleConfigService, _dmLoaiCongViecService) {
|
|
19327
|
-
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.vanbanEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/vanbanden") || this;
|
|
19328
|
-
_this._dmLoaiCongViecService = _dmLoaiCongViecService;
|
|
19329
|
-
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.vanbanEndpoint;
|
|
19330
|
-
_this._moduleConfig = _moduleConfigService.getConfig();
|
|
19331
|
-
return _this;
|
|
19332
|
-
}
|
|
19333
|
-
CongViecService.prototype.adjustSettingWorkflowForCrudList = function (setting) {
|
|
19334
|
-
this.useWorkflow = true;
|
|
19335
|
-
setting.isWorkflowTree = true;
|
|
19336
|
-
setting.baseService = this;
|
|
19337
|
-
setting.displayField = function (item) { return item.ten; };
|
|
19338
|
-
setting.baseService.useWorkflow = true;
|
|
19339
|
-
setting.workflowConfigAdvance = {
|
|
19340
|
-
getWorkflowSetting: this.getWorkflowConfig.bind(this)
|
|
19341
|
-
};
|
|
19342
|
-
};
|
|
19343
|
-
CongViecService.prototype.getWorkflowConfig = function (rowData) {
|
|
19344
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
19345
|
-
return __generator(this, function (_a) {
|
|
19346
|
-
switch (_a.label) {
|
|
19347
|
-
case 0: return [4 /*yield*/, this._dmLoaiCongViecService.getWorkflowSettingByIdLoaiCongViec(rowData.idLoaiCongViec)];
|
|
19348
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
19349
|
-
}
|
|
19350
|
-
});
|
|
19351
|
-
});
|
|
19352
|
-
};
|
|
19353
|
-
CongViecService.prototype.countByMenuState = function (data) {
|
|
19354
|
-
return this.defaultPost(this.serviceUri + "/CountByMenuState", data);
|
|
19355
|
-
};
|
|
19356
|
-
CongViecService.prototype.getDicIdByMenuState = function (data, tuNgay, denNgay) {
|
|
19357
|
-
return this.defaultPost(this.serviceUri + "/GetDicIdByMenuState", {
|
|
19358
|
-
lstTrangThai: data,
|
|
19359
|
-
tuNgay: tuNgay,
|
|
19360
|
-
denNgay: denNgay
|
|
19361
|
-
});
|
|
19362
|
-
};
|
|
19363
|
-
CongViecService.prototype.updateBulkIdCha = function (model) {
|
|
19364
|
-
var url = this.serviceUri + "/UpdateBulkIdCha";
|
|
19365
|
-
return this.defaultPost(url, model);
|
|
19366
|
-
};
|
|
19367
|
-
CongViecService.prototype.deleteBulkCongViecCon = function (ids) {
|
|
19368
|
-
var url = this.serviceUri + "/DeleteBulkCongViecCon";
|
|
19369
|
-
return this.defaultPost(url, ids);
|
|
19370
|
-
};
|
|
19371
|
-
CongViecService.prototype.getDataDashboardCaNhan = function (inputData) {
|
|
19372
|
-
var url = this.serviceUri + "/GetDataDashboardCaNhan";
|
|
19373
|
-
return this.defaultPost(url, inputData);
|
|
19374
|
-
};
|
|
19375
|
-
CongViecService.prototype.getDataDashboardByDonVi = function (inputData) {
|
|
19376
|
-
var url = this.serviceUri + "/GetDataDashboardByDonVi";
|
|
19377
|
-
return this.defaultPost(url, inputData);
|
|
19378
|
-
};
|
|
19379
|
-
CongViecService.prototype.getListTasksDashboard = function (dataFilter) {
|
|
19380
|
-
var url = this.serviceUri + "/getListTasksDashboard";
|
|
19381
|
-
return this.defaultPost(url, dataFilter);
|
|
19382
|
-
};
|
|
19383
|
-
return CongViecService;
|
|
19384
|
-
}(BaseService));
|
|
19385
|
-
CongViecService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CongViecService_Factory() { return new CongViecService(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(ModuleConfigService), i0__namespace.ɵɵinject(DmLoaiCongViecService)); }, token: CongViecService, providedIn: "root" });
|
|
19386
|
-
CongViecService.decorators = [
|
|
19387
|
-
{ type: i0.Injectable, args: [{
|
|
19388
|
-
providedIn: 'root'
|
|
19389
|
-
},] }
|
|
19390
|
-
];
|
|
19391
|
-
CongViecService.ctorParameters = function () { return [
|
|
19392
|
-
{ type: i1$1.HttpClient },
|
|
19393
|
-
{ type: i0.Injector },
|
|
19394
|
-
{ type: ModuleConfigService },
|
|
19395
|
-
{ type: DmLoaiCongViecService }
|
|
19396
|
-
]; };
|
|
19397
|
-
|
|
19398
19146
|
var SearchInfo = /** @class */ (function () {
|
|
19399
19147
|
function SearchInfo(init) {
|
|
19400
19148
|
this.fieldSearchText = [];
|
|
@@ -21207,6 +20955,307 @@
|
|
|
21207
20955
|
{ type: CrudService }
|
|
21208
20956
|
]; };
|
|
21209
20957
|
|
|
20958
|
+
var StateMachinesService = /** @class */ (function (_super) {
|
|
20959
|
+
__extends(StateMachinesService, _super);
|
|
20960
|
+
function StateMachinesService(http, injector, _moduleConfigService) {
|
|
20961
|
+
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.workflowEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/StateMachines") || this;
|
|
20962
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
20963
|
+
_this.entityName = 'StateMachines';
|
|
20964
|
+
_this.serviceCode = 'workflow';
|
|
20965
|
+
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.workflowEndpoint;
|
|
20966
|
+
return _this;
|
|
20967
|
+
}
|
|
20968
|
+
StateMachinesService.prototype.changeState = function (itemWorkflowHistory) {
|
|
20969
|
+
return this.defaultPost(this.serviceUri + "/ChangeState", itemWorkflowHistory);
|
|
20970
|
+
};
|
|
20971
|
+
StateMachinesService.prototype.rollback = function (rowData) {
|
|
20972
|
+
return this.defaultPost(this.serviceUri + "/Rollback/" + rowData.__workflowCode + "/" + rowData.id, {});
|
|
20973
|
+
};
|
|
20974
|
+
StateMachinesService.prototype.getUserInProcessForm = function (workflowCode, stateCode, actionCode, itemId) {
|
|
20975
|
+
return this.defaultPost(this.serviceUri + "/GetUserInProcessForm/" + workflowCode + "/" + stateCode + "/" + actionCode + "/" + itemId, {});
|
|
20976
|
+
};
|
|
20977
|
+
return StateMachinesService;
|
|
20978
|
+
}(BaseService));
|
|
20979
|
+
StateMachinesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function StateMachinesService_Factory() { return new StateMachinesService(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(ModuleConfigService)); }, token: StateMachinesService, providedIn: "root" });
|
|
20980
|
+
StateMachinesService.decorators = [
|
|
20981
|
+
{ type: i0.Injectable, args: [{
|
|
20982
|
+
providedIn: 'root'
|
|
20983
|
+
},] }
|
|
20984
|
+
];
|
|
20985
|
+
StateMachinesService.ctorParameters = function () { return [
|
|
20986
|
+
{ type: i1$1.HttpClient },
|
|
20987
|
+
{ type: i0.Injector },
|
|
20988
|
+
{ type: ModuleConfigService }
|
|
20989
|
+
]; };
|
|
20990
|
+
|
|
20991
|
+
var CauHinhWorkflowService = /** @class */ (function (_super) {
|
|
20992
|
+
__extends(CauHinhWorkflowService, _super);
|
|
20993
|
+
function CauHinhWorkflowService(http, injector, _moduleConfigService) {
|
|
20994
|
+
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.congviecEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/CauHinhWorkflow") || this;
|
|
20995
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
20996
|
+
_this.serviceCode = 'congviec';
|
|
20997
|
+
_this.entityName = 'CauHinhWorkflow';
|
|
20998
|
+
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.congviecEndpoint;
|
|
20999
|
+
return _this;
|
|
21000
|
+
}
|
|
21001
|
+
return CauHinhWorkflowService;
|
|
21002
|
+
}(BaseService));
|
|
21003
|
+
CauHinhWorkflowService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CauHinhWorkflowService_Factory() { return new CauHinhWorkflowService(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(ModuleConfigService)); }, token: CauHinhWorkflowService, providedIn: "root" });
|
|
21004
|
+
CauHinhWorkflowService.decorators = [
|
|
21005
|
+
{ type: i0.Injectable, args: [{
|
|
21006
|
+
providedIn: 'root'
|
|
21007
|
+
},] }
|
|
21008
|
+
];
|
|
21009
|
+
CauHinhWorkflowService.ctorParameters = function () { return [
|
|
21010
|
+
{ type: i1$1.HttpClient },
|
|
21011
|
+
{ type: i0.Injector },
|
|
21012
|
+
{ type: ModuleConfigService }
|
|
21013
|
+
]; };
|
|
21014
|
+
|
|
21015
|
+
var DmLoaiCongViecService = /** @class */ (function (_super) {
|
|
21016
|
+
__extends(DmLoaiCongViecService, _super);
|
|
21017
|
+
function DmLoaiCongViecService(http, injector, _moduleConfigService) {
|
|
21018
|
+
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.congviecEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/DM_LoaiCongViec") || this;
|
|
21019
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
21020
|
+
_this.serviceCode = 'congviec';
|
|
21021
|
+
_this.entityName = 'DM_LoaiCongViec';
|
|
21022
|
+
_this.dicLoaiCongViec = {};
|
|
21023
|
+
_this.keyIdLoaiCongViecRoot = 'root';
|
|
21024
|
+
_this.getWorkflowSettingByIdLoaiCongViec = function (idLoaiCongViec) { return __awaiter(_this, void 0, void 0, function () {
|
|
21025
|
+
var result, idLoaiCongViecs, i;
|
|
21026
|
+
return __generator(this, function (_a) {
|
|
21027
|
+
switch (_a.label) {
|
|
21028
|
+
case 0:
|
|
21029
|
+
if (!!this.dicWorkflowByLoaiCongViec) return [3 /*break*/, 2];
|
|
21030
|
+
return [4 /*yield*/, this.getDatasourceWorkflowCongViec()];
|
|
21031
|
+
case 1:
|
|
21032
|
+
_a.sent();
|
|
21033
|
+
_a.label = 2;
|
|
21034
|
+
case 2:
|
|
21035
|
+
if (!idLoaiCongViec) {
|
|
21036
|
+
return [2 /*return*/, this.dicWorkflowByLoaiCongViec[this.keyIdLoaiCongViecRoot]];
|
|
21037
|
+
}
|
|
21038
|
+
result = this.dicWorkflowByLoaiCongViec[idLoaiCongViec];
|
|
21039
|
+
if (result)
|
|
21040
|
+
return [2 /*return*/, result];
|
|
21041
|
+
return [4 /*yield*/, this.getIdLoaiCongViecs(idLoaiCongViec)];
|
|
21042
|
+
case 3:
|
|
21043
|
+
idLoaiCongViecs = _a.sent();
|
|
21044
|
+
if (!Array.isArray(idLoaiCongViecs))
|
|
21045
|
+
return [2 /*return*/, null];
|
|
21046
|
+
if (idLoaiCongViecs.length > 1) {
|
|
21047
|
+
for (i = idLoaiCongViecs.length - 2; i >= 0; i--) {
|
|
21048
|
+
result = this.dicWorkflowByLoaiCongViec[idLoaiCongViecs[i]];
|
|
21049
|
+
if (result)
|
|
21050
|
+
return [2 /*return*/, result];
|
|
21051
|
+
}
|
|
21052
|
+
}
|
|
21053
|
+
if (!result) {
|
|
21054
|
+
result = this.dicWorkflowByLoaiCongViec[this.keyIdLoaiCongViecRoot];
|
|
21055
|
+
}
|
|
21056
|
+
return [2 /*return*/, result];
|
|
21057
|
+
}
|
|
21058
|
+
});
|
|
21059
|
+
}); };
|
|
21060
|
+
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.congviecEndpoint;
|
|
21061
|
+
return _this;
|
|
21062
|
+
}
|
|
21063
|
+
DmLoaiCongViecService.prototype.getDatasourceWorkflowCongViec = function () {
|
|
21064
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
21065
|
+
var cauHinhWorkflowService, cauHinhWorkflows, notifierService, workflowCodes, stateMachinesService, workflows;
|
|
21066
|
+
var _this = this;
|
|
21067
|
+
return __generator(this, function (_a) {
|
|
21068
|
+
switch (_a.label) {
|
|
21069
|
+
case 0:
|
|
21070
|
+
if (!this.dicWorkflowByLoaiCongViec) {
|
|
21071
|
+
this.dicWorkflowByLoaiCongViec = {};
|
|
21072
|
+
}
|
|
21073
|
+
cauHinhWorkflowService = this._injector.get(CauHinhWorkflowService);
|
|
21074
|
+
return [4 /*yield*/, cauHinhWorkflowService.getAll([], 'idLoaiCongViec,workflowCodes,workflowCode')];
|
|
21075
|
+
case 1:
|
|
21076
|
+
cauHinhWorkflows = (_a.sent()).data;
|
|
21077
|
+
notifierService = this._injector.get(NotifierService);
|
|
21078
|
+
if (cauHinhWorkflows == null) {
|
|
21079
|
+
notifierService.showWarning('Dịch vụ workflow không phản hồi');
|
|
21080
|
+
return [2 /*return*/, []];
|
|
21081
|
+
}
|
|
21082
|
+
workflowCodes = [];
|
|
21083
|
+
cauHinhWorkflows.forEach(function (itemWorkflowSetting) {
|
|
21084
|
+
if (itemWorkflowSetting.workflowCodes && !Array.isArray(itemWorkflowSetting.workflowCodes)) {
|
|
21085
|
+
itemWorkflowSetting.workflowCodes = itemWorkflowSetting.workflowCodes.split(',');
|
|
21086
|
+
}
|
|
21087
|
+
else {
|
|
21088
|
+
itemWorkflowSetting.workflowCodes = [];
|
|
21089
|
+
}
|
|
21090
|
+
itemWorkflowSetting.workflowCodes.forEach(function (workflowCode) {
|
|
21091
|
+
if (workflowCodes.indexOf(workflowCode) == -1) {
|
|
21092
|
+
workflowCodes.push(workflowCode);
|
|
21093
|
+
}
|
|
21094
|
+
});
|
|
21095
|
+
});
|
|
21096
|
+
stateMachinesService = this._injector.get(StateMachinesService);
|
|
21097
|
+
return [4 /*yield*/, stateMachinesService.getDataDropdownByFilter([
|
|
21098
|
+
this.newFilter('code', exports.Operator.in, workflowCodes)
|
|
21099
|
+
], new DropdownOptions({
|
|
21100
|
+
valueField: 'code',
|
|
21101
|
+
displayField: 'title',
|
|
21102
|
+
fieldPlus: 'data'
|
|
21103
|
+
}))];
|
|
21104
|
+
case 2:
|
|
21105
|
+
workflows = (_a.sent());
|
|
21106
|
+
workflows.forEach(function (item) {
|
|
21107
|
+
item.data = JSON.parse(item.data);
|
|
21108
|
+
var stateMachineData = item.data;
|
|
21109
|
+
stateMachineData.actions = {};
|
|
21110
|
+
stateMachineData.machines.forEach(function (machine) {
|
|
21111
|
+
stateMachineData.actions[machine.code] = [];
|
|
21112
|
+
stateMachineData.connections.forEach(function (conn) {
|
|
21113
|
+
if (conn.source == machine.id) {
|
|
21114
|
+
stateMachineData.actions[machine.code].push(conn);
|
|
21115
|
+
}
|
|
21116
|
+
});
|
|
21117
|
+
});
|
|
21118
|
+
});
|
|
21119
|
+
cauHinhWorkflows.forEach(function (itemWorkflowSetting) {
|
|
21120
|
+
itemWorkflowSetting.workflows = workflows.filter(function (q) { return itemWorkflowSetting.workflowCodes.indexOf(q.code) > -1; });
|
|
21121
|
+
if (!itemWorkflowSetting.idLoaiCongViec) {
|
|
21122
|
+
_this.dicWorkflowByLoaiCongViec[_this.keyIdLoaiCongViecRoot] = itemWorkflowSetting;
|
|
21123
|
+
}
|
|
21124
|
+
else {
|
|
21125
|
+
_this.dicWorkflowByLoaiCongViec[itemWorkflowSetting.idLoaiCongViec] = itemWorkflowSetting;
|
|
21126
|
+
}
|
|
21127
|
+
});
|
|
21128
|
+
return [2 /*return*/, workflows];
|
|
21129
|
+
}
|
|
21130
|
+
});
|
|
21131
|
+
});
|
|
21132
|
+
};
|
|
21133
|
+
DmLoaiCongViecService.prototype.getIdLoaiCongViecs = function (idLoaiCongViec) {
|
|
21134
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
21135
|
+
var notifierService, itemLoaiCongViec, idLoaiCongViecs;
|
|
21136
|
+
return __generator(this, function (_a) {
|
|
21137
|
+
switch (_a.label) {
|
|
21138
|
+
case 0:
|
|
21139
|
+
notifierService = this._injector.get(NotifierService);
|
|
21140
|
+
return [4 /*yield*/, this.getItemLoaiCongViec(idLoaiCongViec)];
|
|
21141
|
+
case 1:
|
|
21142
|
+
itemLoaiCongViec = _a.sent();
|
|
21143
|
+
if (itemLoaiCongViec == null) {
|
|
21144
|
+
notifierService.showWarning('Loại công việc không tồn tại');
|
|
21145
|
+
return [2 /*return*/, null];
|
|
21146
|
+
}
|
|
21147
|
+
idLoaiCongViecs = itemLoaiCongViec.idDuongDan.split(';').filter(function (q) { return !!q; });
|
|
21148
|
+
return [2 /*return*/, idLoaiCongViecs];
|
|
21149
|
+
}
|
|
21150
|
+
});
|
|
21151
|
+
});
|
|
21152
|
+
};
|
|
21153
|
+
DmLoaiCongViecService.prototype.getItemLoaiCongViec = function (idLoaiCongViec) {
|
|
21154
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
21155
|
+
var _a, _b;
|
|
21156
|
+
return __generator(this, function (_c) {
|
|
21157
|
+
switch (_c.label) {
|
|
21158
|
+
case 0:
|
|
21159
|
+
if (!!this.dicLoaiCongViec[idLoaiCongViec]) return [3 /*break*/, 2];
|
|
21160
|
+
_a = this.dicLoaiCongViec;
|
|
21161
|
+
_b = idLoaiCongViec;
|
|
21162
|
+
return [4 /*yield*/, this.getDetail(idLoaiCongViec)];
|
|
21163
|
+
case 1:
|
|
21164
|
+
_a[_b] = (_c.sent()).data;
|
|
21165
|
+
_c.label = 2;
|
|
21166
|
+
case 2: return [2 /*return*/, this.dicLoaiCongViec[idLoaiCongViec]];
|
|
21167
|
+
}
|
|
21168
|
+
});
|
|
21169
|
+
});
|
|
21170
|
+
};
|
|
21171
|
+
return DmLoaiCongViecService;
|
|
21172
|
+
}(BaseService));
|
|
21173
|
+
DmLoaiCongViecService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DmLoaiCongViecService_Factory() { return new DmLoaiCongViecService(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(ModuleConfigService)); }, token: DmLoaiCongViecService, providedIn: "root" });
|
|
21174
|
+
DmLoaiCongViecService.decorators = [
|
|
21175
|
+
{ type: i0.Injectable, args: [{
|
|
21176
|
+
providedIn: 'root'
|
|
21177
|
+
},] }
|
|
21178
|
+
];
|
|
21179
|
+
DmLoaiCongViecService.ctorParameters = function () { return [
|
|
21180
|
+
{ type: i1$1.HttpClient },
|
|
21181
|
+
{ type: i0.Injector },
|
|
21182
|
+
{ type: ModuleConfigService }
|
|
21183
|
+
]; };
|
|
21184
|
+
|
|
21185
|
+
var CongViecService = /** @class */ (function (_super) {
|
|
21186
|
+
__extends(CongViecService, _super);
|
|
21187
|
+
function CongViecService(http, injector, _moduleConfigService, _dmLoaiCongViecService) {
|
|
21188
|
+
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.vanbanEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/vanbanden") || this;
|
|
21189
|
+
_this._dmLoaiCongViecService = _dmLoaiCongViecService;
|
|
21190
|
+
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.vanbanEndpoint;
|
|
21191
|
+
_this._moduleConfig = _moduleConfigService.getConfig();
|
|
21192
|
+
return _this;
|
|
21193
|
+
}
|
|
21194
|
+
CongViecService.prototype.adjustSettingWorkflowForCrudList = function (setting) {
|
|
21195
|
+
this.useWorkflow = true;
|
|
21196
|
+
setting.isWorkflowTree = true;
|
|
21197
|
+
setting.baseService = this;
|
|
21198
|
+
setting.displayField = function (item) { return item.ten; };
|
|
21199
|
+
setting.baseService.useWorkflow = true;
|
|
21200
|
+
setting.workflowConfigAdvance = {
|
|
21201
|
+
getWorkflowSetting: this.getWorkflowConfig.bind(this)
|
|
21202
|
+
};
|
|
21203
|
+
};
|
|
21204
|
+
CongViecService.prototype.getWorkflowConfig = function (rowData) {
|
|
21205
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
21206
|
+
return __generator(this, function (_a) {
|
|
21207
|
+
switch (_a.label) {
|
|
21208
|
+
case 0: return [4 /*yield*/, this._dmLoaiCongViecService.getWorkflowSettingByIdLoaiCongViec(rowData.idLoaiCongViec)];
|
|
21209
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
21210
|
+
}
|
|
21211
|
+
});
|
|
21212
|
+
});
|
|
21213
|
+
};
|
|
21214
|
+
CongViecService.prototype.countByMenuState = function (data) {
|
|
21215
|
+
return this.defaultPost(this.serviceUri + "/CountByMenuState", data);
|
|
21216
|
+
};
|
|
21217
|
+
CongViecService.prototype.getDicIdByMenuState = function (data, tuNgay, denNgay) {
|
|
21218
|
+
return this.defaultPost(this.serviceUri + "/GetDicIdByMenuState", {
|
|
21219
|
+
lstTrangThai: data,
|
|
21220
|
+
tuNgay: tuNgay,
|
|
21221
|
+
denNgay: denNgay
|
|
21222
|
+
});
|
|
21223
|
+
};
|
|
21224
|
+
CongViecService.prototype.updateBulkIdCha = function (model) {
|
|
21225
|
+
var url = this.serviceUri + "/UpdateBulkIdCha";
|
|
21226
|
+
return this.defaultPost(url, model);
|
|
21227
|
+
};
|
|
21228
|
+
CongViecService.prototype.deleteBulkCongViecCon = function (ids) {
|
|
21229
|
+
var url = this.serviceUri + "/DeleteBulkCongViecCon";
|
|
21230
|
+
return this.defaultPost(url, ids);
|
|
21231
|
+
};
|
|
21232
|
+
CongViecService.prototype.getDataDashboardCaNhan = function (inputData) {
|
|
21233
|
+
var url = this.serviceUri + "/GetDataDashboardCaNhan";
|
|
21234
|
+
return this.defaultPost(url, inputData);
|
|
21235
|
+
};
|
|
21236
|
+
CongViecService.prototype.getDataDashboardByDonVi = function (inputData) {
|
|
21237
|
+
var url = this.serviceUri + "/GetDataDashboardByDonVi";
|
|
21238
|
+
return this.defaultPost(url, inputData);
|
|
21239
|
+
};
|
|
21240
|
+
CongViecService.prototype.getListTasksDashboard = function (dataFilter) {
|
|
21241
|
+
var url = this.serviceUri + "/getListTasksDashboard";
|
|
21242
|
+
return this.defaultPost(url, dataFilter);
|
|
21243
|
+
};
|
|
21244
|
+
return CongViecService;
|
|
21245
|
+
}(BaseService));
|
|
21246
|
+
CongViecService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function CongViecService_Factory() { return new CongViecService(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(ModuleConfigService), i0__namespace.ɵɵinject(DmLoaiCongViecService)); }, token: CongViecService, providedIn: "root" });
|
|
21247
|
+
CongViecService.decorators = [
|
|
21248
|
+
{ type: i0.Injectable, args: [{
|
|
21249
|
+
providedIn: 'root'
|
|
21250
|
+
},] }
|
|
21251
|
+
];
|
|
21252
|
+
CongViecService.ctorParameters = function () { return [
|
|
21253
|
+
{ type: i1$1.HttpClient },
|
|
21254
|
+
{ type: i0.Injector },
|
|
21255
|
+
{ type: ModuleConfigService },
|
|
21256
|
+
{ type: DmLoaiCongViecService }
|
|
21257
|
+
]; };
|
|
21258
|
+
|
|
21210
21259
|
var EntityWorkflowHistoryService = /** @class */ (function (_super) {
|
|
21211
21260
|
__extends(EntityWorkflowHistoryService, _super);
|
|
21212
21261
|
function EntityWorkflowHistoryService(http, injector, _moduleConfigService) {
|
|
@@ -21484,6 +21533,30 @@
|
|
|
21484
21533
|
{ type: ModuleConfigService }
|
|
21485
21534
|
]; };
|
|
21486
21535
|
|
|
21536
|
+
var BasePermissionService = /** @class */ (function (_super) {
|
|
21537
|
+
__extends(BasePermissionService, _super);
|
|
21538
|
+
function BasePermissionService(http, injector, _moduleConfigService) {
|
|
21539
|
+
var _this = _super.call(this, http, injector, _moduleConfigService.getConfig().environment.apiDomain.authorizationEndpoint + "/" + _moduleConfigService.getConfig().environment.apiVersion + "/BasePermission") || this;
|
|
21540
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
21541
|
+
_this.entityName = 'BasePermission';
|
|
21542
|
+
_this.serviceCode = 'Authorization';
|
|
21543
|
+
_this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.authorizationEndpoint;
|
|
21544
|
+
return _this;
|
|
21545
|
+
}
|
|
21546
|
+
return BasePermissionService;
|
|
21547
|
+
}(BaseService));
|
|
21548
|
+
BasePermissionService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function BasePermissionService_Factory() { return new BasePermissionService(i0__namespace.ɵɵinject(i1__namespace$1.HttpClient), i0__namespace.ɵɵinject(i0__namespace.INJECTOR), i0__namespace.ɵɵinject(ModuleConfigService)); }, token: BasePermissionService, providedIn: "root" });
|
|
21549
|
+
BasePermissionService.decorators = [
|
|
21550
|
+
{ type: i0.Injectable, args: [{
|
|
21551
|
+
providedIn: 'root'
|
|
21552
|
+
},] }
|
|
21553
|
+
];
|
|
21554
|
+
BasePermissionService.ctorParameters = function () { return [
|
|
21555
|
+
{ type: i1$1.HttpClient },
|
|
21556
|
+
{ type: i0.Injector },
|
|
21557
|
+
{ type: ModuleConfigService }
|
|
21558
|
+
]; };
|
|
21559
|
+
|
|
21487
21560
|
var ListComponentBase = /** @class */ (function (_super) {
|
|
21488
21561
|
__extends(ListComponentBase, _super);
|
|
21489
21562
|
function ListComponentBase(_injector, _isTreeTable) {
|
|
@@ -21575,8 +21648,8 @@
|
|
|
21575
21648
|
_this.showingActionWorkflow = false;
|
|
21576
21649
|
_this.buttonContexts = [];
|
|
21577
21650
|
_this.authorizePaths = {};
|
|
21578
|
-
_this.buttonApplyAuthorize = {};
|
|
21579
21651
|
_this.commonConst = ComCtxConstants.COMMON;
|
|
21652
|
+
_this.buttonApplyAuthorize = {};
|
|
21580
21653
|
_this._defaultTableClass = 'new-table scr-table crud-list-table';
|
|
21581
21654
|
_this._tableClass = '';
|
|
21582
21655
|
_this._showSettingsRowColor = false;
|
|
@@ -21607,11 +21680,19 @@
|
|
|
21607
21680
|
_this.filter_column = [];
|
|
21608
21681
|
_this.dataAdvance = {};
|
|
21609
21682
|
_this.searchModel = {};
|
|
21683
|
+
_this.authorizeButtonKey = '';
|
|
21684
|
+
_this.lstButtonPermission = [];
|
|
21685
|
+
_this.lstButtonTemplate = [];
|
|
21686
|
+
_this.isBtnReady = false;
|
|
21687
|
+
_this.isSuperUser = false;
|
|
21610
21688
|
_this.showFormWorkflow = false;
|
|
21611
21689
|
_this.headerWorkflow = '';
|
|
21690
|
+
_this.lstBtnAuthorizeMenu = [];
|
|
21612
21691
|
_this.popupSizeWorkflow = new PopupSize({ width: 950, height: 540 });
|
|
21613
21692
|
_this.showHistoryWorkflow = false;
|
|
21693
|
+
_this.showAllButtons = false;
|
|
21614
21694
|
_this.hiddenBtnFunction = false;
|
|
21695
|
+
_this.lstButtonAction = [];
|
|
21615
21696
|
// Biến để kiểm tra lần click đầu tiên của user vào dòng trên grid
|
|
21616
21697
|
// Sử dụng để fix bug set selected row từ form cha, nhưng vào form con ấn sang row khác nó k bỏ selected row đã set từ bên ngoài
|
|
21617
21698
|
_this.firstRowClick = true;
|
|
@@ -21645,6 +21726,11 @@
|
|
|
21645
21726
|
_this.detailTaskModel = new DialogModel({
|
|
21646
21727
|
header: 'Chi tiết công việc'
|
|
21647
21728
|
});
|
|
21729
|
+
_this.buttonAuthorizeModel = new DialogModel({
|
|
21730
|
+
header: 'Phân quyền nút chức năng',
|
|
21731
|
+
popupSize: new PopupSize({ width: 1000, height: 700 }),
|
|
21732
|
+
data: { dataSouce: [] }
|
|
21733
|
+
});
|
|
21648
21734
|
_this.shareLinkModel = new DialogModel({
|
|
21649
21735
|
header: 'Chia sẻ quyền',
|
|
21650
21736
|
popupSize: new PopupSize({ width: 650, height: 310 })
|
|
@@ -21654,7 +21740,6 @@
|
|
|
21654
21740
|
});
|
|
21655
21741
|
_this.BUTTON_PHAN_QUYEN = ButtonPermission.BUTTON_PHAN_QUYEN;
|
|
21656
21742
|
_this.BUTTON_CAU_HINH_QUY_TRINH = ButtonPermission.BUTTON_CAU_HINH_QUY_TRINH;
|
|
21657
|
-
_this.lstButtonPermission = [];
|
|
21658
21743
|
_this.buttonPermissionMap = new Map();
|
|
21659
21744
|
_this.sourceIcon = {};
|
|
21660
21745
|
_this.stopCalculatingFunctionColumnWidth = false;
|
|
@@ -21900,6 +21985,7 @@
|
|
|
21900
21985
|
_this._templateInstanceService = _this._injector.get(TemplateInstanceService);
|
|
21901
21986
|
_this._printService = _this._injector.get(PrintService);
|
|
21902
21987
|
_this._federationService = _this._injector.get(FederationService);
|
|
21988
|
+
_this._basePermissionService = _this._injector.get(BasePermissionService);
|
|
21903
21989
|
_this.handleCheckAll = _this.handleCheckAll.bind(_this);
|
|
21904
21990
|
_this.handleCheckAll_Group = _this.handleCheckAll_Group.bind(_this);
|
|
21905
21991
|
_this.environment = _this._moduleConfigService.getConfig().environment;
|
|
@@ -21975,7 +22061,7 @@
|
|
|
21975
22061
|
configurable: true
|
|
21976
22062
|
});
|
|
21977
22063
|
ListComponentBase.prototype.ngOnInit = function () {
|
|
21978
|
-
var e_1,
|
|
22064
|
+
var e_1, _f;
|
|
21979
22065
|
var _this = this;
|
|
21980
22066
|
this.subscribe(ComCtxConstants.COMMON.ENTITY_METADATA_RELOADED, function (service) {
|
|
21981
22067
|
_this.entityMetadataService = service;
|
|
@@ -21998,7 +22084,7 @@
|
|
|
21998
22084
|
}
|
|
21999
22085
|
if (!this.setting.hiddenTrinhKy || !this.setting.disableShare) {
|
|
22000
22086
|
if (!this.menuButtons) {
|
|
22001
|
-
this.menuButtons = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (
|
|
22087
|
+
this.menuButtons = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_f) {
|
|
22002
22088
|
return [2 /*return*/, []];
|
|
22003
22089
|
}); }); };
|
|
22004
22090
|
}
|
|
@@ -22025,11 +22111,12 @@
|
|
|
22025
22111
|
var temp = userService.getCurrentUser();
|
|
22026
22112
|
if (temp != null) {
|
|
22027
22113
|
this.currentUser = new TnUser(userService.getCurrentUser());
|
|
22114
|
+
this.isSuperUser = this.currentUser.issuperuser.toLowerCase() === 'true';
|
|
22028
22115
|
}
|
|
22029
22116
|
if (this.currentUser == null) {
|
|
22030
22117
|
try {
|
|
22031
|
-
for (var
|
|
22032
|
-
var buttonPermissionCode =
|
|
22118
|
+
for (var _g = __values(this.lstButtonPermission), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
22119
|
+
var buttonPermissionCode = _h.value;
|
|
22033
22120
|
var buttonPermission = (this.setting.baseService.serviceCode + "/" + this.setting.baseService.entityName + "/" + buttonPermissionCode).toUpperCase();
|
|
22034
22121
|
this.buttonPermissionMap.set(buttonPermission, false);
|
|
22035
22122
|
}
|
|
@@ -22037,7 +22124,7 @@
|
|
|
22037
22124
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
22038
22125
|
finally {
|
|
22039
22126
|
try {
|
|
22040
|
-
if (
|
|
22127
|
+
if (_h && !_h.done && (_f = _g.return)) _f.call(_g);
|
|
22041
22128
|
}
|
|
22042
22129
|
finally { if (e_1) throw e_1.error; }
|
|
22043
22130
|
}
|
|
@@ -22048,13 +22135,13 @@
|
|
|
22048
22135
|
&& (this._moduleConfigService.getConfig().environment.ignoreAdmin === true
|
|
22049
22136
|
|| this.currentUser.isadmin.toLowerCase() !== 'true')) {
|
|
22050
22137
|
this._permissionService.getServicePermission(this.setting.baseService.serviceCode).then(function (result) {
|
|
22051
|
-
var e_2,
|
|
22138
|
+
var e_2, _f;
|
|
22052
22139
|
var _a;
|
|
22053
22140
|
var lstBasePermission = result;
|
|
22054
22141
|
_this.lstButtonPermission = (_a = _this._moduleConfigService.getConfig().environment.buttonPermissions) !== null && _a !== void 0 ? _a : [];
|
|
22055
22142
|
try {
|
|
22056
|
-
for (var
|
|
22057
|
-
var buttonPermissionCode =
|
|
22143
|
+
for (var _g = __values(_this.lstButtonPermission), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
22144
|
+
var buttonPermissionCode = _h.value;
|
|
22058
22145
|
var buttonPermission = (_this.setting.baseService.serviceCode + "/" + _this.setting.baseService.entityName + "/" + buttonPermissionCode).toUpperCase();
|
|
22059
22146
|
_this.buttonPermissionMap.set(buttonPermission, lstBasePermission.includes(buttonPermission));
|
|
22060
22147
|
}
|
|
@@ -22062,7 +22149,7 @@
|
|
|
22062
22149
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
22063
22150
|
finally {
|
|
22064
22151
|
try {
|
|
22065
|
-
if (
|
|
22152
|
+
if (_h && !_h.done && (_f = _g.return)) _f.call(_g);
|
|
22066
22153
|
}
|
|
22067
22154
|
finally { if (e_2) throw e_2.error; }
|
|
22068
22155
|
}
|
|
@@ -22130,7 +22217,7 @@
|
|
|
22130
22217
|
this.buildFilterColumn(this.setting.cols);
|
|
22131
22218
|
};
|
|
22132
22219
|
ListComponentBase.prototype.extendColumns = function (cols, appendCol) {
|
|
22133
|
-
var e_3,
|
|
22220
|
+
var e_3, _f;
|
|
22134
22221
|
var _this = this;
|
|
22135
22222
|
if (appendCol === void 0) { appendCol = true; }
|
|
22136
22223
|
this.setting.fieldNeedGetRef = [];
|
|
@@ -22217,7 +22304,8 @@
|
|
|
22217
22304
|
if (element.displayField == null) {
|
|
22218
22305
|
element.displayField = 'ten';
|
|
22219
22306
|
}
|
|
22220
|
-
tmpCol = new ColumnSchemaBase(Object.assign(Object.assign({}, element), { isRefField: true, rawColumn: element, controlType: exports.ControlType.dropdown, dataType: element.dataTypeRefField, field: 'str' + element.field, allowFilter: element.allowFilter, sort: false, visible:
|
|
22307
|
+
tmpCol = new ColumnSchemaBase(Object.assign(Object.assign({}, element), { isRefField: true, rawColumn: element, controlType: exports.ControlType.dropdown, dataType: element.dataTypeRefField, field: 'str' + element.field, allowFilter: element.allowFilter, sort: false, visible: !(this_1.setting.groupColumn
|
|
22308
|
+
&& element.field == this_1.setting.groupColumn.field) }));
|
|
22221
22309
|
var configRefField = this_1.setting.columnSetting.details.find(function (p) { return p.columnCode == tmpCol.field; });
|
|
22222
22310
|
if (configRefField && configRefField.visible != null) {
|
|
22223
22311
|
tmpCol.visible = configRefField.visible;
|
|
@@ -22275,7 +22363,7 @@
|
|
|
22275
22363
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
22276
22364
|
finally {
|
|
22277
22365
|
try {
|
|
22278
|
-
if (cols_1_1 && !cols_1_1.done && (
|
|
22366
|
+
if (cols_1_1 && !cols_1_1.done && (_f = cols_1.return)) _f.call(cols_1);
|
|
22279
22367
|
}
|
|
22280
22368
|
finally { if (e_3) throw e_3.error; }
|
|
22281
22369
|
}
|
|
@@ -22298,7 +22386,7 @@
|
|
|
22298
22386
|
});
|
|
22299
22387
|
};
|
|
22300
22388
|
ListComponentBase.prototype.formatColumns = function (cols) {
|
|
22301
|
-
var e_4,
|
|
22389
|
+
var e_4, _f;
|
|
22302
22390
|
try {
|
|
22303
22391
|
for (var cols_2 = __values(cols), cols_2_1 = cols_2.next(); !cols_2_1.done; cols_2_1 = cols_2.next()) {
|
|
22304
22392
|
var col = cols_2_1.value;
|
|
@@ -22314,13 +22402,13 @@
|
|
|
22314
22402
|
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
22315
22403
|
finally {
|
|
22316
22404
|
try {
|
|
22317
|
-
if (cols_2_1 && !cols_2_1.done && (
|
|
22405
|
+
if (cols_2_1 && !cols_2_1.done && (_f = cols_2.return)) _f.call(cols_2);
|
|
22318
22406
|
}
|
|
22319
22407
|
finally { if (e_4) throw e_4.error; }
|
|
22320
22408
|
}
|
|
22321
22409
|
};
|
|
22322
22410
|
ListComponentBase.prototype.getColumnSetting = function (colGroup) {
|
|
22323
|
-
var e_5,
|
|
22411
|
+
var e_5, _f;
|
|
22324
22412
|
this.setting.groupColumn = colGroup;
|
|
22325
22413
|
var dataSetting = localStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.COLUMN_SETTING);
|
|
22326
22414
|
if (dataSetting) {
|
|
@@ -22352,7 +22440,7 @@
|
|
|
22352
22440
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
22353
22441
|
finally {
|
|
22354
22442
|
try {
|
|
22355
|
-
if (settings_1_1 && !settings_1_1.done && (
|
|
22443
|
+
if (settings_1_1 && !settings_1_1.done && (_f = settings_1.return)) _f.call(settings_1);
|
|
22356
22444
|
}
|
|
22357
22445
|
finally { if (e_5) throw e_5.error; }
|
|
22358
22446
|
}
|
|
@@ -22607,14 +22695,14 @@
|
|
|
22607
22695
|
};
|
|
22608
22696
|
ListComponentBase.prototype.handleSearch = function (data) {
|
|
22609
22697
|
return __awaiter(this, void 0, void 0, function () {
|
|
22610
|
-
return __generator(this, function (
|
|
22611
|
-
switch (
|
|
22698
|
+
return __generator(this, function (_f) {
|
|
22699
|
+
switch (_f.label) {
|
|
22612
22700
|
case 0:
|
|
22613
22701
|
this.filter_commonSearch = data.filters;
|
|
22614
22702
|
this.dataSearchCommon = data.dataForm;
|
|
22615
22703
|
return [4 /*yield*/, this.onSearched.emit(data)];
|
|
22616
22704
|
case 1:
|
|
22617
|
-
|
|
22705
|
+
_f.sent();
|
|
22618
22706
|
this.setting.pageSetting.page = 1;
|
|
22619
22707
|
this.getData();
|
|
22620
22708
|
return [2 /*return*/];
|
|
@@ -22652,17 +22740,17 @@
|
|
|
22652
22740
|
if (isTree === void 0) { isTree = false; }
|
|
22653
22741
|
return __awaiter(this, void 0, void 0, function () {
|
|
22654
22742
|
var rs;
|
|
22655
|
-
return __generator(this, function (
|
|
22656
|
-
switch (
|
|
22743
|
+
return __generator(this, function (_f) {
|
|
22744
|
+
switch (_f.label) {
|
|
22657
22745
|
case 0:
|
|
22658
22746
|
if (!this.setting.showConfirmExport) return [3 /*break*/, 2];
|
|
22659
22747
|
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')];
|
|
22660
22748
|
case 1:
|
|
22661
|
-
rs =
|
|
22749
|
+
rs = _f.sent();
|
|
22662
22750
|
if (!rs) {
|
|
22663
22751
|
return [2 /*return*/];
|
|
22664
22752
|
}
|
|
22665
|
-
|
|
22753
|
+
_f.label = 2;
|
|
22666
22754
|
case 2:
|
|
22667
22755
|
switch (this.setting.exportItemsMode) {
|
|
22668
22756
|
case exports.ExportItemsMode.FromHtml:
|
|
@@ -22683,17 +22771,17 @@
|
|
|
22683
22771
|
if (isTree === void 0) { isTree = false; }
|
|
22684
22772
|
return __awaiter(this, void 0, void 0, function () {
|
|
22685
22773
|
var rs, header, element, tableEle, headEle, bodyEle, arrHeadEle, arrRowData, strHeadEle, strBodyEle, css, table;
|
|
22686
|
-
return __generator(this, function (
|
|
22687
|
-
switch (
|
|
22774
|
+
return __generator(this, function (_f) {
|
|
22775
|
+
switch (_f.label) {
|
|
22688
22776
|
case 0:
|
|
22689
22777
|
if (!this.setting.showConfirmExport) return [3 /*break*/, 2];
|
|
22690
22778
|
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')];
|
|
22691
22779
|
case 1:
|
|
22692
|
-
rs =
|
|
22780
|
+
rs = _f.sent();
|
|
22693
22781
|
if (!rs) {
|
|
22694
22782
|
return [2 /*return*/];
|
|
22695
22783
|
}
|
|
22696
|
-
|
|
22784
|
+
_f.label = 2;
|
|
22697
22785
|
case 2:
|
|
22698
22786
|
header = 'Danh sách ' + this.setting.objectName;
|
|
22699
22787
|
element = isTree ? this.treeTable.el.nativeElement : this.table.el.nativeElement;
|
|
@@ -22877,25 +22965,25 @@
|
|
|
22877
22965
|
};
|
|
22878
22966
|
ListComponentBase.prototype.showContextMenu = function (evt, rowData) {
|
|
22879
22967
|
return __awaiter(this, void 0, void 0, function () {
|
|
22880
|
-
var
|
|
22881
|
-
var
|
|
22882
|
-
return __generator(this, function (
|
|
22883
|
-
switch (
|
|
22968
|
+
var _f, _g, shareButtons, showWorkflowAttach;
|
|
22969
|
+
var _h;
|
|
22970
|
+
return __generator(this, function (_j) {
|
|
22971
|
+
switch (_j.label) {
|
|
22884
22972
|
case 0:
|
|
22885
22973
|
this.rowDataCurrent = rowData;
|
|
22886
|
-
|
|
22887
|
-
|
|
22974
|
+
_f = this;
|
|
22975
|
+
_g = this.getMenuButtonAuthorized;
|
|
22888
22976
|
return [4 /*yield*/, this.menuButtons(rowData)];
|
|
22889
|
-
case 1: return [4 /*yield*/,
|
|
22977
|
+
case 1: return [4 /*yield*/, _g.apply(this, [_j.sent()])];
|
|
22890
22978
|
case 2:
|
|
22891
|
-
|
|
22979
|
+
_f.buttonContexts = _j.sent();
|
|
22892
22980
|
if (!this.setting.disableShare) {
|
|
22893
22981
|
shareButtons = [
|
|
22894
22982
|
{ label: 'Chia sẻ', icon: 'pi pi-link', command: this.createShareLink.bind(this) },
|
|
22895
22983
|
{ label: 'Danh sách chia sẻ', icon: 'pi pi-list', command: this.showLinkSharing.bind(this) },
|
|
22896
22984
|
// { label: 'Danh sách nhìn thấy', icon: 'pi pi-list', command: this.showListPermissionByItem.bind(this) }
|
|
22897
22985
|
];
|
|
22898
|
-
(
|
|
22986
|
+
(_h = this.buttonContexts).push.apply(_h, __spreadArray([], __read(shareButtons)));
|
|
22899
22987
|
}
|
|
22900
22988
|
showWorkflowAttach = localStorage.getItem('__showWorkflowAttach');
|
|
22901
22989
|
if (showWorkflowAttach == 'true') {
|
|
@@ -22917,20 +23005,22 @@
|
|
|
22917
23005
|
ListComponentBase.prototype.getMenuButtonAuthorized = function (menuButtons) {
|
|
22918
23006
|
return __awaiter(this, void 0, void 0, function () {
|
|
22919
23007
|
var authorizedButtons, serviceCodeByBase, promises, _loop_3, this_2, menuButtons_1, menuButtons_1_1, item;
|
|
22920
|
-
var e_6,
|
|
22921
|
-
return __generator(this, function (
|
|
22922
|
-
switch (
|
|
23008
|
+
var e_6, _f;
|
|
23009
|
+
return __generator(this, function (_g) {
|
|
23010
|
+
switch (_g.label) {
|
|
22923
23011
|
case 0:
|
|
22924
23012
|
authorizedButtons = [];
|
|
22925
|
-
serviceCodeByBase = this.setting.baseService != null ? this.setting.baseService.serviceCode : '';
|
|
23013
|
+
serviceCodeByBase = this.setting.baseService != null ? this.setting.baseService.serviceCode.toUpperCase() : '';
|
|
22926
23014
|
promises = [];
|
|
22927
23015
|
_loop_3 = function (item) {
|
|
22928
|
-
|
|
23016
|
+
var permission = this_2.lstBtnAuthorizeMenu.find(function (p) { return p.rawText == item.label; });
|
|
23017
|
+
if (!item.authorizationPermission && !permission) {
|
|
22929
23018
|
authorizedButtons.push(item);
|
|
22930
23019
|
return "continue";
|
|
22931
23020
|
}
|
|
22932
23021
|
var serviceCode = item.authorizationServiceCode ? item.authorizationServiceCode : serviceCodeByBase;
|
|
22933
|
-
|
|
23022
|
+
var permissionCode = permission ? permission.permissionCode : item.authorizationPermission;
|
|
23023
|
+
promises.push(this_2._permissionService.isAuthorized(serviceCode, permissionCode, true).then(function (authorized) {
|
|
22934
23024
|
if (authorized !== true) {
|
|
22935
23025
|
return;
|
|
22936
23026
|
}
|
|
@@ -22947,13 +23037,13 @@
|
|
|
22947
23037
|
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
22948
23038
|
finally {
|
|
22949
23039
|
try {
|
|
22950
|
-
if (menuButtons_1_1 && !menuButtons_1_1.done && (
|
|
23040
|
+
if (menuButtons_1_1 && !menuButtons_1_1.done && (_f = menuButtons_1.return)) _f.call(menuButtons_1);
|
|
22951
23041
|
}
|
|
22952
23042
|
finally { if (e_6) throw e_6.error; }
|
|
22953
23043
|
}
|
|
22954
23044
|
return [4 /*yield*/, Promise.all(promises)];
|
|
22955
23045
|
case 1:
|
|
22956
|
-
|
|
23046
|
+
_g.sent();
|
|
22957
23047
|
return [2 /*return*/, authorizedButtons];
|
|
22958
23048
|
}
|
|
22959
23049
|
});
|
|
@@ -23568,10 +23658,10 @@
|
|
|
23568
23658
|
clearTimeout(this.timeout);
|
|
23569
23659
|
};
|
|
23570
23660
|
ListComponentBase.prototype.disableMultipleDelete = function () {
|
|
23571
|
-
var e_7,
|
|
23661
|
+
var e_7, _f;
|
|
23572
23662
|
try {
|
|
23573
|
-
for (var
|
|
23574
|
-
var item =
|
|
23663
|
+
for (var _g = __values(this.model.selectedItems), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
23664
|
+
var item = _h.value;
|
|
23575
23665
|
if (this.disableDelete(item)) {
|
|
23576
23666
|
return true;
|
|
23577
23667
|
}
|
|
@@ -23580,7 +23670,7 @@
|
|
|
23580
23670
|
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
23581
23671
|
finally {
|
|
23582
23672
|
try {
|
|
23583
|
-
if (
|
|
23673
|
+
if (_h && !_h.done && (_f = _g.return)) _f.call(_g);
|
|
23584
23674
|
}
|
|
23585
23675
|
finally { if (e_7) throw e_7.error; }
|
|
23586
23676
|
}
|
|
@@ -23651,11 +23741,11 @@
|
|
|
23651
23741
|
};
|
|
23652
23742
|
ListComponentBase.prototype.processBaseData = function () {
|
|
23653
23743
|
return __awaiter(this, void 0, void 0, function () {
|
|
23654
|
-
return __generator(this, function (
|
|
23655
|
-
switch (
|
|
23744
|
+
return __generator(this, function (_f) {
|
|
23745
|
+
switch (_f.label) {
|
|
23656
23746
|
case 0: return [4 /*yield*/, this.preProcessData(this._rawDataSource)];
|
|
23657
23747
|
case 1:
|
|
23658
|
-
|
|
23748
|
+
_f.sent();
|
|
23659
23749
|
return [2 /*return*/];
|
|
23660
23750
|
}
|
|
23661
23751
|
});
|
|
@@ -23664,11 +23754,11 @@
|
|
|
23664
23754
|
ListComponentBase.prototype.preProcessData = function (dataSource) {
|
|
23665
23755
|
return __awaiter(this, void 0, void 0, function () {
|
|
23666
23756
|
var colHasPipe, _loop_4, this_3, colHasPipe_1, colHasPipe_1_1, col;
|
|
23667
|
-
var e_8,
|
|
23668
|
-
return __generator(this, function (
|
|
23757
|
+
var e_8, _f;
|
|
23758
|
+
return __generator(this, function (_g) {
|
|
23669
23759
|
colHasPipe = this.setting.cols.filter(function (x) { return x.pipe; });
|
|
23670
23760
|
_loop_4 = function (col) {
|
|
23671
|
-
var e_9,
|
|
23761
|
+
var e_9, _h;
|
|
23672
23762
|
var _loop_5 = function (item) {
|
|
23673
23763
|
this_3.transform(col.pipe, col.asyncPipe, item[col.field]).then(function (rs) {
|
|
23674
23764
|
item["pipe__" + col.field + " "] = rs;
|
|
@@ -23683,7 +23773,7 @@
|
|
|
23683
23773
|
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
23684
23774
|
finally {
|
|
23685
23775
|
try {
|
|
23686
|
-
if (dataSource_1_1 && !dataSource_1_1.done && (
|
|
23776
|
+
if (dataSource_1_1 && !dataSource_1_1.done && (_h = dataSource_1.return)) _h.call(dataSource_1);
|
|
23687
23777
|
}
|
|
23688
23778
|
finally { if (e_9) throw e_9.error; }
|
|
23689
23779
|
}
|
|
@@ -23698,7 +23788,7 @@
|
|
|
23698
23788
|
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
23699
23789
|
finally {
|
|
23700
23790
|
try {
|
|
23701
|
-
if (colHasPipe_1_1 && !colHasPipe_1_1.done && (
|
|
23791
|
+
if (colHasPipe_1_1 && !colHasPipe_1_1.done && (_f = colHasPipe_1.return)) _f.call(colHasPipe_1);
|
|
23702
23792
|
}
|
|
23703
23793
|
finally { if (e_8) throw e_8.error; }
|
|
23704
23794
|
}
|
|
@@ -23709,8 +23799,8 @@
|
|
|
23709
23799
|
ListComponentBase.prototype.transform = function (pipe, asyncPipe, value) {
|
|
23710
23800
|
return __awaiter(this, void 0, void 0, function () {
|
|
23711
23801
|
var val, val;
|
|
23712
|
-
return __generator(this, function (
|
|
23713
|
-
switch (
|
|
23802
|
+
return __generator(this, function (_f) {
|
|
23803
|
+
switch (_f.label) {
|
|
23714
23804
|
case 0:
|
|
23715
23805
|
if (this.cachedTransforms[value]) {
|
|
23716
23806
|
return [2 /*return*/, this.cachedTransforms[value]];
|
|
@@ -23718,7 +23808,7 @@
|
|
|
23718
23808
|
if (!asyncPipe) return [3 /*break*/, 2];
|
|
23719
23809
|
return [4 /*yield*/, pipe.transform(value)];
|
|
23720
23810
|
case 1:
|
|
23721
|
-
val =
|
|
23811
|
+
val = _f.sent();
|
|
23722
23812
|
this.cachedTransforms[value] = val;
|
|
23723
23813
|
return [2 /*return*/, val];
|
|
23724
23814
|
case 2:
|
|
@@ -23874,7 +23964,7 @@
|
|
|
23874
23964
|
}
|
|
23875
23965
|
};
|
|
23876
23966
|
ListComponentBase.prototype.getMinimizeData = function (model) {
|
|
23877
|
-
var e_10,
|
|
23967
|
+
var e_10, _f;
|
|
23878
23968
|
if (isLiteralObject(model)) {
|
|
23879
23969
|
if (model._dropdownvalue != null && model._dropdownvalue !== '') {
|
|
23880
23970
|
return model[model._dropdownvalue];
|
|
@@ -23900,7 +23990,7 @@
|
|
|
23900
23990
|
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
23901
23991
|
finally {
|
|
23902
23992
|
try {
|
|
23903
|
-
if (model_1_1 && !model_1_1.done && (
|
|
23993
|
+
if (model_1_1 && !model_1_1.done && (_f = model_1.return)) _f.call(model_1);
|
|
23904
23994
|
}
|
|
23905
23995
|
finally { if (e_10) throw e_10.error; }
|
|
23906
23996
|
}
|
|
@@ -24035,8 +24125,8 @@
|
|
|
24035
24125
|
};
|
|
24036
24126
|
ListComponentBase.prototype.handleTableRendered = function () {
|
|
24037
24127
|
return __awaiter(this, void 0, void 0, function () {
|
|
24038
|
-
return __generator(this, function (
|
|
24039
|
-
switch (
|
|
24128
|
+
return __generator(this, function (_f) {
|
|
24129
|
+
switch (_f.label) {
|
|
24040
24130
|
case 0:
|
|
24041
24131
|
if (this.table) {
|
|
24042
24132
|
this._processAfterRendered(this.table.el.nativeElement);
|
|
@@ -24046,7 +24136,7 @@
|
|
|
24046
24136
|
}
|
|
24047
24137
|
return [4 /*yield*/, this.modifyButtonFunctionInRow()];
|
|
24048
24138
|
case 1:
|
|
24049
|
-
|
|
24139
|
+
_f.sent();
|
|
24050
24140
|
this.onReloaded.emit(true);
|
|
24051
24141
|
return [2 /*return*/];
|
|
24052
24142
|
}
|
|
@@ -24079,42 +24169,42 @@
|
|
|
24079
24169
|
ListComponentBase.prototype.modifyButtonFunctionInRow = function () {
|
|
24080
24170
|
var _a;
|
|
24081
24171
|
return __awaiter(this, void 0, void 0, function () {
|
|
24082
|
-
var
|
|
24083
|
-
var e_11,
|
|
24084
|
-
return __generator(this, function (
|
|
24085
|
-
switch (
|
|
24172
|
+
var _f, _g, rowData, total, _h, ex_1, e_11_1;
|
|
24173
|
+
var e_11, _j;
|
|
24174
|
+
return __generator(this, function (_k) {
|
|
24175
|
+
switch (_k.label) {
|
|
24086
24176
|
case 0:
|
|
24087
|
-
|
|
24088
|
-
|
|
24089
|
-
|
|
24177
|
+
_k.trys.push([0, 8, 9, 10]);
|
|
24178
|
+
_f = __values(this.model.dataSource), _g = _f.next();
|
|
24179
|
+
_k.label = 1;
|
|
24090
24180
|
case 1:
|
|
24091
|
-
if (!!
|
|
24092
|
-
rowData =
|
|
24093
|
-
|
|
24181
|
+
if (!!_g.done) return [3 /*break*/, 7];
|
|
24182
|
+
rowData = _g.value;
|
|
24183
|
+
_k.label = 2;
|
|
24094
24184
|
case 2:
|
|
24095
|
-
|
|
24096
|
-
|
|
24097
|
-
_e = this.getMenuButtonAuthorized;
|
|
24185
|
+
_k.trys.push([2, 5, , 6]);
|
|
24186
|
+
_h = this.getMenuButtonAuthorized;
|
|
24098
24187
|
return [4 /*yield*/, this.menuButtons(rowData)];
|
|
24099
|
-
case 3: return [4 /*yield*/,
|
|
24188
|
+
case 3: return [4 /*yield*/, _h.apply(this, [(_a = _k.sent()) !== null && _a !== void 0 ? _a : []])];
|
|
24100
24189
|
case 4:
|
|
24101
|
-
|
|
24190
|
+
total = (_k.sent());
|
|
24191
|
+
rowData.disableFunctionRow = total.length < 1 && this.setting.disableShare;
|
|
24102
24192
|
return [3 /*break*/, 6];
|
|
24103
24193
|
case 5:
|
|
24104
|
-
ex_1 =
|
|
24194
|
+
ex_1 = _k.sent();
|
|
24105
24195
|
this.hiddenBtnFunction = true;
|
|
24106
24196
|
return [2 /*return*/];
|
|
24107
24197
|
case 6:
|
|
24108
|
-
|
|
24198
|
+
_g = _f.next();
|
|
24109
24199
|
return [3 /*break*/, 1];
|
|
24110
24200
|
case 7: return [3 /*break*/, 10];
|
|
24111
24201
|
case 8:
|
|
24112
|
-
e_11_1 =
|
|
24202
|
+
e_11_1 = _k.sent();
|
|
24113
24203
|
e_11 = { error: e_11_1 };
|
|
24114
24204
|
return [3 /*break*/, 10];
|
|
24115
24205
|
case 9:
|
|
24116
24206
|
try {
|
|
24117
|
-
if (
|
|
24207
|
+
if (_g && !_g.done && (_j = _f.return)) _j.call(_f);
|
|
24118
24208
|
}
|
|
24119
24209
|
finally { if (e_11) throw e_11.error; }
|
|
24120
24210
|
return [7 /*endfinally*/];
|
|
@@ -24144,10 +24234,10 @@
|
|
|
24144
24234
|
};
|
|
24145
24235
|
ListComponentBase.prototype.createSearchSchema = function () {
|
|
24146
24236
|
return __awaiter(this, void 0, void 0, function () {
|
|
24147
|
-
var searchInfo,
|
|
24148
|
-
var e_12,
|
|
24149
|
-
return __generator(this, function (
|
|
24150
|
-
switch (
|
|
24237
|
+
var searchInfo, _f, _g, col, control, e_12_1, _loop_6, this_4, _h, _j, field;
|
|
24238
|
+
var e_12, _k, _l, e_13, _m;
|
|
24239
|
+
return __generator(this, function (_o) {
|
|
24240
|
+
switch (_o.label) {
|
|
24151
24241
|
case 0:
|
|
24152
24242
|
if (this.setting.cols == null) {
|
|
24153
24243
|
return [2 /*return*/, this._notifierService.showWarning('Bạn chưa cấu hình cột cho danh sách')];
|
|
@@ -24157,14 +24247,14 @@
|
|
|
24157
24247
|
searchInfo.schema = [];
|
|
24158
24248
|
searchInfo.fieldDropdown = {};
|
|
24159
24249
|
searchInfo.fieldSearchText = [];
|
|
24160
|
-
|
|
24250
|
+
_o.label = 1;
|
|
24161
24251
|
case 1:
|
|
24162
|
-
|
|
24163
|
-
|
|
24164
|
-
|
|
24252
|
+
_o.trys.push([1, 6, 7, 8]);
|
|
24253
|
+
_f = __values(this.setting.cols), _g = _f.next();
|
|
24254
|
+
_o.label = 2;
|
|
24165
24255
|
case 2:
|
|
24166
|
-
if (!!
|
|
24167
|
-
col =
|
|
24256
|
+
if (!!_g.done) return [3 /*break*/, 5];
|
|
24257
|
+
col = _g.value;
|
|
24168
24258
|
if (!(col.allowFilter != false && col.rawColumn == null)) return [3 /*break*/, 4];
|
|
24169
24259
|
if (col.fullTextSearch) {
|
|
24170
24260
|
if (searchInfo.fieldSearchText.indexOf(col.field) == -1) {
|
|
@@ -24177,9 +24267,9 @@
|
|
|
24177
24267
|
}
|
|
24178
24268
|
return [4 /*yield*/, this.setting.function.getSearchControl(col.field)];
|
|
24179
24269
|
case 3:
|
|
24180
|
-
control =
|
|
24270
|
+
control = _o.sent();
|
|
24181
24271
|
if (control != null) {
|
|
24182
|
-
(
|
|
24272
|
+
(_l = searchInfo.schema).push.apply(_l, __spreadArray([], __read(control)));
|
|
24183
24273
|
}
|
|
24184
24274
|
else {
|
|
24185
24275
|
if (col.baseService || (col.dataSource && col.dataSource.length > 0)) {
|
|
@@ -24233,18 +24323,18 @@
|
|
|
24233
24323
|
}
|
|
24234
24324
|
}
|
|
24235
24325
|
}
|
|
24236
|
-
|
|
24326
|
+
_o.label = 4;
|
|
24237
24327
|
case 4:
|
|
24238
|
-
|
|
24328
|
+
_g = _f.next();
|
|
24239
24329
|
return [3 /*break*/, 2];
|
|
24240
24330
|
case 5: return [3 /*break*/, 8];
|
|
24241
24331
|
case 6:
|
|
24242
|
-
e_12_1 =
|
|
24332
|
+
e_12_1 = _o.sent();
|
|
24243
24333
|
e_12 = { error: e_12_1 };
|
|
24244
24334
|
return [3 /*break*/, 8];
|
|
24245
24335
|
case 7:
|
|
24246
24336
|
try {
|
|
24247
|
-
if (
|
|
24337
|
+
if (_g && !_g.done && (_k = _f.return)) _k.call(_f);
|
|
24248
24338
|
}
|
|
24249
24339
|
finally { if (e_12) throw e_12.error; }
|
|
24250
24340
|
return [7 /*endfinally*/];
|
|
@@ -24264,15 +24354,15 @@
|
|
|
24264
24354
|
};
|
|
24265
24355
|
this_4 = this;
|
|
24266
24356
|
try {
|
|
24267
|
-
for (
|
|
24268
|
-
field =
|
|
24357
|
+
for (_h = __values(searchInfo.fieldSearchText), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
24358
|
+
field = _j.value;
|
|
24269
24359
|
_loop_6(field);
|
|
24270
24360
|
}
|
|
24271
24361
|
}
|
|
24272
24362
|
catch (e_13_1) { e_13 = { error: e_13_1 }; }
|
|
24273
24363
|
finally {
|
|
24274
24364
|
try {
|
|
24275
|
-
if (
|
|
24365
|
+
if (_j && !_j.done && (_m = _h.return)) _m.call(_h);
|
|
24276
24366
|
}
|
|
24277
24367
|
finally { if (e_13) throw e_13.error; }
|
|
24278
24368
|
}
|
|
@@ -24310,8 +24400,8 @@
|
|
|
24310
24400
|
ListComponentBase.prototype.getItemWorkflowSetting = function (setting, rowData) {
|
|
24311
24401
|
return __awaiter(this, void 0, void 0, function () {
|
|
24312
24402
|
var workflowSetting;
|
|
24313
|
-
return __generator(this, function (
|
|
24314
|
-
switch (
|
|
24403
|
+
return __generator(this, function (_f) {
|
|
24404
|
+
switch (_f.label) {
|
|
24315
24405
|
case 0:
|
|
24316
24406
|
workflowSetting = setting.workflowSettingNew;
|
|
24317
24407
|
if (!(setting.isWorkflowTree
|
|
@@ -24319,8 +24409,8 @@
|
|
|
24319
24409
|
&& setting.workflowConfigAdvance.getWorkflowSetting)) return [3 /*break*/, 2];
|
|
24320
24410
|
return [4 /*yield*/, setting.workflowConfigAdvance.getWorkflowSetting(rowData)];
|
|
24321
24411
|
case 1:
|
|
24322
|
-
workflowSetting =
|
|
24323
|
-
|
|
24412
|
+
workflowSetting = _f.sent();
|
|
24413
|
+
_f.label = 2;
|
|
24324
24414
|
case 2:
|
|
24325
24415
|
if (!workflowSetting || workflowSetting.workflows.length == 0) {
|
|
24326
24416
|
return [2 /*return*/, this._notifierService.showWarning('Đối tượng chưa được cấu hình quy trình nghiệp vụ')];
|
|
@@ -24334,13 +24424,13 @@
|
|
|
24334
24424
|
return __awaiter(this, void 0, void 0, function () {
|
|
24335
24425
|
var workflowSetting, resultCheckExist, modelTask, contentLink, modelEntity, taskWorkflowSetting, compRef;
|
|
24336
24426
|
var _this = this;
|
|
24337
|
-
return __generator(this, function (
|
|
24338
|
-
switch (
|
|
24427
|
+
return __generator(this, function (_f) {
|
|
24428
|
+
switch (_f.label) {
|
|
24339
24429
|
case 0:
|
|
24340
24430
|
rowData.__startingWorkflow = true;
|
|
24341
24431
|
return [4 /*yield*/, this.getItemWorkflowSetting(this.setting, rowData)];
|
|
24342
24432
|
case 1:
|
|
24343
|
-
workflowSetting =
|
|
24433
|
+
workflowSetting = _f.sent();
|
|
24344
24434
|
if (!workflowSetting) {
|
|
24345
24435
|
rowData.__startingWorkflow = false;
|
|
24346
24436
|
return [2 /*return*/];
|
|
@@ -24352,7 +24442,7 @@
|
|
|
24352
24442
|
this.newFilter('entityKey', exports.Operator.equal, rowData.id)
|
|
24353
24443
|
])];
|
|
24354
24444
|
case 2:
|
|
24355
|
-
resultCheckExist = (
|
|
24445
|
+
resultCheckExist = (_f.sent());
|
|
24356
24446
|
if (!resultCheckExist.success) {
|
|
24357
24447
|
rowData.__startingWorkflow = false;
|
|
24358
24448
|
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')];
|
|
@@ -24364,8 +24454,8 @@
|
|
|
24364
24454
|
if (!this.setting.modifyRowDataForTask) return [3 /*break*/, 4];
|
|
24365
24455
|
return [4 /*yield*/, this.setting.modifyRowDataForTask(rowData)];
|
|
24366
24456
|
case 3:
|
|
24367
|
-
|
|
24368
|
-
|
|
24457
|
+
_f.sent();
|
|
24458
|
+
_f.label = 4;
|
|
24369
24459
|
case 4:
|
|
24370
24460
|
modelTask = {
|
|
24371
24461
|
id: this._commonService.guid(),
|
|
@@ -24380,7 +24470,7 @@
|
|
|
24380
24470
|
};
|
|
24381
24471
|
return [4 /*yield*/, this.getCopyPath(this.setting, rowData)];
|
|
24382
24472
|
case 5:
|
|
24383
|
-
contentLink =
|
|
24473
|
+
contentLink = _f.sent();
|
|
24384
24474
|
if (contentLink) {
|
|
24385
24475
|
modelEntity = this.parseAttachLink(contentLink);
|
|
24386
24476
|
modelTask.dinhKemNghiepVuDtos = modelEntity;
|
|
@@ -24388,27 +24478,27 @@
|
|
|
24388
24478
|
if (!this.setting.modifyItemTask) return [3 /*break*/, 7];
|
|
24389
24479
|
return [4 /*yield*/, this.setting.modifyItemTask(modelTask, rowData)];
|
|
24390
24480
|
case 6:
|
|
24391
|
-
|
|
24392
|
-
|
|
24481
|
+
_f.sent();
|
|
24482
|
+
_f.label = 7;
|
|
24393
24483
|
case 7:
|
|
24394
24484
|
if (!(workflowSetting.autoStartTask
|
|
24395
24485
|
&& workflowSetting.idLoaiCongViecDefault)) return [3 /*break*/, 9];
|
|
24396
24486
|
return [4 /*yield*/, this._dmLoaiCongViecService.getWorkflowSettingByIdLoaiCongViec(workflowSetting.idLoaiCongViecDefault)];
|
|
24397
24487
|
case 8:
|
|
24398
|
-
taskWorkflowSetting =
|
|
24488
|
+
taskWorkflowSetting = _f.sent();
|
|
24399
24489
|
if (taskWorkflowSetting != null && taskWorkflowSetting.workflowCode) {
|
|
24400
24490
|
modelTask[FieldWorkflowCodeInCrudForm] = taskWorkflowSetting.workflowCode;
|
|
24401
24491
|
this.insertTaskAndReload(modelTask, rowData, taskWorkflowSetting);
|
|
24402
24492
|
rowData.__startingWorkflow = false;
|
|
24403
24493
|
return [2 /*return*/];
|
|
24404
24494
|
}
|
|
24405
|
-
|
|
24495
|
+
_f.label = 9;
|
|
24406
24496
|
case 9: return [3 /*break*/, 14];
|
|
24407
24497
|
case 10:
|
|
24408
24498
|
if (!(workflowSetting.workflows.length == 1)) return [3 /*break*/, 12];
|
|
24409
24499
|
return [4 /*yield*/, this.startWorkflow(rowData, workflowSetting.workflows[0])];
|
|
24410
24500
|
case 11:
|
|
24411
|
-
|
|
24501
|
+
_f.sent();
|
|
24412
24502
|
rowData.__startingWorkflow = false;
|
|
24413
24503
|
return [2 /*return*/];
|
|
24414
24504
|
case 12:
|
|
@@ -24417,13 +24507,13 @@
|
|
|
24417
24507
|
rowData.__startingWorkflow = false;
|
|
24418
24508
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'StartWorkflowComponent', this.startWorkflowViewContainer)];
|
|
24419
24509
|
case 13:
|
|
24420
|
-
compRef =
|
|
24510
|
+
compRef = _f.sent();
|
|
24421
24511
|
dialog.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
24422
24512
|
compRef.workflows = workflowSetting.workflows;
|
|
24423
24513
|
compRef.defaultWorkflow = workflowSetting.workflowCode;
|
|
24424
24514
|
compRef.instance.onSaved.subscribe(function (event) { return _this.handleStartWorkflowFromDialog(event); });
|
|
24425
24515
|
compRef.instance.onCancel.subscribe(function (event) { return _this.startWorkflowModel.showEditForm = false; });
|
|
24426
|
-
|
|
24516
|
+
_f.label = 14;
|
|
24427
24517
|
case 14: return [2 /*return*/];
|
|
24428
24518
|
}
|
|
24429
24519
|
});
|
|
@@ -24469,25 +24559,25 @@
|
|
|
24469
24559
|
};
|
|
24470
24560
|
ListComponentBase.prototype.insertTaskAndReload = function (modelTask, rowData, workflowSetting) {
|
|
24471
24561
|
return __awaiter(this, void 0, void 0, function () {
|
|
24472
|
-
var
|
|
24562
|
+
var _f;
|
|
24473
24563
|
var _this = this;
|
|
24474
|
-
return __generator(this, function (
|
|
24475
|
-
switch (
|
|
24564
|
+
return __generator(this, function (_g) {
|
|
24565
|
+
switch (_g.label) {
|
|
24476
24566
|
case 0:
|
|
24477
24567
|
if (!this.setting.getDataForNextFirstStepTask) return [3 /*break*/, 2];
|
|
24478
|
-
|
|
24568
|
+
_f = modelTask;
|
|
24479
24569
|
return [4 /*yield*/, this.setting.getDataForNextFirstStepTask(rowData)];
|
|
24480
24570
|
case 1:
|
|
24481
|
-
|
|
24571
|
+
_f.itemWorkflowHistory = _g.sent();
|
|
24482
24572
|
modelTask.itemWorkflowHistory = this.tongHopWorkflowHistoryForNextFirstStep(modelTask.itemWorkflowHistory, modelTask, workflowSetting, modelTask[FieldWorkflowCodeInCrudForm]);
|
|
24483
|
-
|
|
24573
|
+
_g.label = 2;
|
|
24484
24574
|
case 2: return [4 /*yield*/, this._congViecService.post(modelTask)
|
|
24485
24575
|
.then(function (res) { return _this.handleResponse(res, '', function (f) {
|
|
24486
24576
|
_this.onStartedWorkflow.emit(rowData.id);
|
|
24487
24577
|
_this.getData();
|
|
24488
24578
|
}); })];
|
|
24489
24579
|
case 3:
|
|
24490
|
-
|
|
24580
|
+
_g.sent();
|
|
24491
24581
|
return [2 /*return*/];
|
|
24492
24582
|
}
|
|
24493
24583
|
});
|
|
@@ -24507,9 +24597,9 @@
|
|
|
24507
24597
|
if (dialogDetailTask === void 0) { dialogDetailTask = null; }
|
|
24508
24598
|
if (dialogChoYKienForm === void 0) { dialogChoYKienForm = null; }
|
|
24509
24599
|
return __awaiter(this, void 0, void 0, function () {
|
|
24510
|
-
var
|
|
24511
|
-
return __generator(this, function (
|
|
24512
|
-
switch (
|
|
24600
|
+
var _f;
|
|
24601
|
+
return __generator(this, function (_g) {
|
|
24602
|
+
switch (_g.label) {
|
|
24513
24603
|
case 0:
|
|
24514
24604
|
if (this.showingActionWorkflow)
|
|
24515
24605
|
return [2 /*return*/];
|
|
@@ -24518,10 +24608,10 @@
|
|
|
24518
24608
|
this.dialogProcessWorkflowForm = dialogProcessWorkflowForm;
|
|
24519
24609
|
this.dialogDetailTask = dialogDetailTask;
|
|
24520
24610
|
this.dialogChoYKienForm = dialogChoYKienForm;
|
|
24521
|
-
|
|
24611
|
+
_f = this;
|
|
24522
24612
|
return [4 /*yield*/, this.getButtonContext(rowData)];
|
|
24523
24613
|
case 1:
|
|
24524
|
-
|
|
24614
|
+
_f.buttonContexts = _g.sent();
|
|
24525
24615
|
if (this.buttonContexts.length === 0) {
|
|
24526
24616
|
return [2 /*return*/];
|
|
24527
24617
|
}
|
|
@@ -24535,20 +24625,20 @@
|
|
|
24535
24625
|
return __awaiter(this, void 0, void 0, function () {
|
|
24536
24626
|
var resultGetActionWorkflow, buttonContexts;
|
|
24537
24627
|
var _this = this;
|
|
24538
|
-
return __generator(this, function (
|
|
24539
|
-
switch (
|
|
24628
|
+
return __generator(this, function (_f) {
|
|
24629
|
+
switch (_f.label) {
|
|
24540
24630
|
case 0:
|
|
24541
24631
|
this.showingActionWorkflow = true;
|
|
24542
24632
|
resultGetActionWorkflow = null;
|
|
24543
24633
|
if (!(!this.setting.isWorkflowTree && this.setting.workflowSettingNew.createTaskInstead)) return [3 /*break*/, 2];
|
|
24544
24634
|
return [4 /*yield*/, this.getActionWorkflowByTask(rowData, rowData.dialogHistory)];
|
|
24545
24635
|
case 1:
|
|
24546
|
-
resultGetActionWorkflow =
|
|
24636
|
+
resultGetActionWorkflow = _f.sent();
|
|
24547
24637
|
return [3 /*break*/, 4];
|
|
24548
24638
|
case 2: return [4 /*yield*/, this.getActionWorkflow(rowData)];
|
|
24549
24639
|
case 3:
|
|
24550
|
-
resultGetActionWorkflow =
|
|
24551
|
-
|
|
24640
|
+
resultGetActionWorkflow = _f.sent();
|
|
24641
|
+
_f.label = 4;
|
|
24552
24642
|
case 4:
|
|
24553
24643
|
this.showingActionWorkflow = false;
|
|
24554
24644
|
if (!Array.isArray(resultGetActionWorkflow)) {
|
|
@@ -24572,11 +24662,11 @@
|
|
|
24572
24662
|
ListComponentBase.prototype.getActionWorkflow = function (rowData) {
|
|
24573
24663
|
return __awaiter(this, void 0, void 0, function () {
|
|
24574
24664
|
var workflowSetting;
|
|
24575
|
-
return __generator(this, function (
|
|
24576
|
-
switch (
|
|
24665
|
+
return __generator(this, function (_f) {
|
|
24666
|
+
switch (_f.label) {
|
|
24577
24667
|
case 0: return [4 /*yield*/, this.getItemWorkflowSetting(this.setting, rowData)];
|
|
24578
24668
|
case 1:
|
|
24579
|
-
workflowSetting =
|
|
24669
|
+
workflowSetting = _f.sent();
|
|
24580
24670
|
if (!workflowSetting)
|
|
24581
24671
|
return [2 /*return*/];
|
|
24582
24672
|
return [2 /*return*/, this._getActionWorkflowBase(this.setting, rowData, workflowSetting)];
|
|
@@ -24586,21 +24676,21 @@
|
|
|
24586
24676
|
};
|
|
24587
24677
|
ListComponentBase.prototype.getActionWorkflowByTask = function (rowData, dialog) {
|
|
24588
24678
|
return __awaiter(this, void 0, void 0, function () {
|
|
24589
|
-
var
|
|
24590
|
-
return __generator(this, function (
|
|
24591
|
-
switch (
|
|
24679
|
+
var _f, workflowPermissionDetailService, userService, result, workflowSetting, crudListSetting;
|
|
24680
|
+
return __generator(this, function (_g) {
|
|
24681
|
+
switch (_g.label) {
|
|
24592
24682
|
case 0:
|
|
24593
24683
|
if (!!rowData.__isGotCongViec) return [3 /*break*/, 2];
|
|
24594
|
-
|
|
24684
|
+
_f = rowData;
|
|
24595
24685
|
return [4 /*yield*/, this._congViecService.getDetailByFilter([
|
|
24596
24686
|
this.newFilter('serviceCode', exports.Operator.equal, this.setting.baseService.serviceCode),
|
|
24597
24687
|
this.newFilter('entity', exports.Operator.equal, this.setting.baseService.entityName),
|
|
24598
24688
|
this.newFilter('entityKey', exports.Operator.equal, rowData.id)
|
|
24599
24689
|
])];
|
|
24600
24690
|
case 1:
|
|
24601
|
-
|
|
24691
|
+
_f.__itemCongViec = (_g.sent()).data;
|
|
24602
24692
|
rowData.__isGotCongViec = true;
|
|
24603
|
-
|
|
24693
|
+
_g.label = 2;
|
|
24604
24694
|
case 2:
|
|
24605
24695
|
rowData = rowData.__itemCongViec;
|
|
24606
24696
|
if (!rowData) {
|
|
@@ -24613,12 +24703,12 @@
|
|
|
24613
24703
|
return [4 /*yield*/, workflowPermissionDetailService.changeEndpoint(this._congViecService)
|
|
24614
24704
|
.appendInfoForWorkflow(userService.getUserIdCombine(), [rowData], 'id', this.setting.ignoreWorkflow)];
|
|
24615
24705
|
case 3:
|
|
24616
|
-
result =
|
|
24706
|
+
result = _g.sent();
|
|
24617
24707
|
if (result !== true)
|
|
24618
24708
|
return [2 /*return*/];
|
|
24619
24709
|
return [4 /*yield*/, this._dmLoaiCongViecService.getWorkflowSettingByIdLoaiCongViec(rowData.idLoaiCongViec)];
|
|
24620
24710
|
case 4:
|
|
24621
|
-
workflowSetting =
|
|
24711
|
+
workflowSetting = _g.sent();
|
|
24622
24712
|
if (workflowSetting == null)
|
|
24623
24713
|
return [2 /*return*/];
|
|
24624
24714
|
crudListSetting = new CrudListSetting();
|
|
@@ -24632,8 +24722,8 @@
|
|
|
24632
24722
|
return __awaiter(this, void 0, void 0, function () {
|
|
24633
24723
|
var buttonContexts, itemWorkflowSetting_1, actions_1, actionAllows, workflowHistoryService, userService, userId, userIdStringUpper, itemWorkflowHistoryLast;
|
|
24634
24724
|
var _this = this;
|
|
24635
|
-
return __generator(this, function (
|
|
24636
|
-
switch (
|
|
24725
|
+
return __generator(this, function (_f) {
|
|
24726
|
+
switch (_f.label) {
|
|
24637
24727
|
case 0:
|
|
24638
24728
|
this.currentItem = rowData;
|
|
24639
24729
|
this.buttonContexts = [];
|
|
@@ -24648,7 +24738,7 @@
|
|
|
24648
24738
|
actions_1 = itemWorkflowSetting_1.data.actions[rowData.__trangThai];
|
|
24649
24739
|
return [4 /*yield*/, crudListSetting.baseService.getActionAllow(rowData.id)];
|
|
24650
24740
|
case 2:
|
|
24651
|
-
actionAllows = (
|
|
24741
|
+
actionAllows = (_f.sent()).data;
|
|
24652
24742
|
if (actionAllows) {
|
|
24653
24743
|
actionAllows.forEach(function (actionCode) {
|
|
24654
24744
|
var action = actions_1.find(function (q) { return q.code == actionCode; });
|
|
@@ -24677,7 +24767,7 @@
|
|
|
24677
24767
|
}
|
|
24678
24768
|
return [4 /*yield*/, workflowHistoryService.changeEndpoint(crudListSetting.baseService).getLastByItemId(rowData.id)];
|
|
24679
24769
|
case 3:
|
|
24680
|
-
itemWorkflowHistoryLast = (
|
|
24770
|
+
itemWorkflowHistoryLast = (_f.sent()).data;
|
|
24681
24771
|
if (itemWorkflowHistoryLast
|
|
24682
24772
|
&& itemWorkflowHistoryLast.actionCode != MaActionBatDauQuyTrinh
|
|
24683
24773
|
&& itemWorkflowHistoryLast.userIdCreated.toUpperCase() == userIdStringUpper
|
|
@@ -24697,7 +24787,7 @@
|
|
|
24697
24787
|
label: exports.ButtonTextActionCongViec.XEM_LICH_SU,
|
|
24698
24788
|
command: function () { return _this.viewHistoryWorkflow(crudListSetting, rowData); }
|
|
24699
24789
|
});
|
|
24700
|
-
|
|
24790
|
+
_f.label = 4;
|
|
24701
24791
|
case 4: return [2 /*return*/, buttonContexts];
|
|
24702
24792
|
}
|
|
24703
24793
|
});
|
|
@@ -24707,13 +24797,13 @@
|
|
|
24707
24797
|
return __awaiter(this, void 0, void 0, function () {
|
|
24708
24798
|
var itemTask, taskFormModel, compRef;
|
|
24709
24799
|
var _this = this;
|
|
24710
|
-
return __generator(this, function (
|
|
24711
|
-
switch (
|
|
24800
|
+
return __generator(this, function (_f) {
|
|
24801
|
+
switch (_f.label) {
|
|
24712
24802
|
case 0: return [4 /*yield*/, this._congViecService.getDetailByFilter([
|
|
24713
24803
|
this.newFilter('entityKey', exports.Operator.equal, rowData.id)
|
|
24714
24804
|
])];
|
|
24715
24805
|
case 1:
|
|
24716
|
-
itemTask = (
|
|
24806
|
+
itemTask = (_f.sent()).data;
|
|
24717
24807
|
if (itemTask == null) {
|
|
24718
24808
|
return [2 /*return*/, this._notifierService.showWarning('Không tìm thấy công việc gắn với bản ghi')];
|
|
24719
24809
|
}
|
|
@@ -24724,7 +24814,7 @@
|
|
|
24724
24814
|
this.detailTaskModel.showEditForm = true;
|
|
24725
24815
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('congviec', 'BaseCongViecFormComponent', this.detailTaskViewContainer)];
|
|
24726
24816
|
case 2:
|
|
24727
|
-
compRef =
|
|
24817
|
+
compRef = _f.sent();
|
|
24728
24818
|
if (this.dialogDetailTask) {
|
|
24729
24819
|
this.dialogDetailTask.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
24730
24820
|
}
|
|
@@ -24761,11 +24851,11 @@
|
|
|
24761
24851
|
return __awaiter(this, void 0, void 0, function () {
|
|
24762
24852
|
var workflowSetting, compRef;
|
|
24763
24853
|
var _this = this;
|
|
24764
|
-
return __generator(this, function (
|
|
24765
|
-
switch (
|
|
24854
|
+
return __generator(this, function (_f) {
|
|
24855
|
+
switch (_f.label) {
|
|
24766
24856
|
case 0: return [4 /*yield*/, this.getItemWorkflowSetting(crudListSetting, rowData)];
|
|
24767
24857
|
case 1:
|
|
24768
|
-
workflowSetting =
|
|
24858
|
+
workflowSetting = _f.sent();
|
|
24769
24859
|
if (!workflowSetting)
|
|
24770
24860
|
return [2 /*return*/];
|
|
24771
24861
|
this.currentItem = rowData;
|
|
@@ -24775,7 +24865,7 @@
|
|
|
24775
24865
|
this.workflowHistoryModel.showEditForm = true;
|
|
24776
24866
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'WorkflowHistoryNewComponent', this.workflowHistoryNewViewContainer)];
|
|
24777
24867
|
case 2:
|
|
24778
|
-
compRef =
|
|
24868
|
+
compRef = _f.sent();
|
|
24779
24869
|
compRef.instance.businessSetting = crudListSetting;
|
|
24780
24870
|
compRef.instance.tableName = this.workflowHistoryModel.data.tableName;
|
|
24781
24871
|
compRef.instance.item = rowData;
|
|
@@ -24793,8 +24883,8 @@
|
|
|
24793
24883
|
return __awaiter(this, void 0, void 0, function () {
|
|
24794
24884
|
var domainNewTab, compRef;
|
|
24795
24885
|
var _this = this;
|
|
24796
|
-
return __generator(this, function (
|
|
24797
|
-
switch (
|
|
24886
|
+
return __generator(this, function (_f) {
|
|
24887
|
+
switch (_f.label) {
|
|
24798
24888
|
case 0:
|
|
24799
24889
|
if (workflowAction.openNewTab) {
|
|
24800
24890
|
domainNewTab = workflowAction.domainNewTab;
|
|
@@ -24816,7 +24906,7 @@
|
|
|
24816
24906
|
this.processWorkflowModel.header = workflowAction.name;
|
|
24817
24907
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'ProcessWorkflowFormComponent', this.processWorkflowFormViewContainer)];
|
|
24818
24908
|
case 1:
|
|
24819
|
-
compRef =
|
|
24909
|
+
compRef = _f.sent();
|
|
24820
24910
|
if (this.dialogProcessWorkflowForm) {
|
|
24821
24911
|
this.dialogProcessWorkflowForm.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
24822
24912
|
}
|
|
@@ -24835,15 +24925,15 @@
|
|
|
24835
24925
|
return __awaiter(this, void 0, void 0, function () {
|
|
24836
24926
|
var compRef;
|
|
24837
24927
|
var _this = this;
|
|
24838
|
-
return __generator(this, function (
|
|
24839
|
-
switch (
|
|
24928
|
+
return __generator(this, function (_f) {
|
|
24929
|
+
switch (_f.label) {
|
|
24840
24930
|
case 0:
|
|
24841
24931
|
this.choYKienModel.data.rowData = rowData;
|
|
24842
24932
|
this.choYKienModel.data.setting = crudListSetting;
|
|
24843
24933
|
this.choYKienModel.showEditForm = true;
|
|
24844
24934
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'ChoYKienFormComponent', this.choYKienFormViewContainer)];
|
|
24845
24935
|
case 1:
|
|
24846
|
-
compRef =
|
|
24936
|
+
compRef = _f.sent();
|
|
24847
24937
|
if (this.dialogChoYKienForm) {
|
|
24848
24938
|
this.dialogChoYKienForm.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
24849
24939
|
}
|
|
@@ -24859,8 +24949,8 @@
|
|
|
24859
24949
|
ListComponentBase.prototype.startWorkflow = function (rowData, workflow) {
|
|
24860
24950
|
return __awaiter(this, void 0, void 0, function () {
|
|
24861
24951
|
var _this = this;
|
|
24862
|
-
return __generator(this, function (
|
|
24863
|
-
switch (
|
|
24952
|
+
return __generator(this, function (_f) {
|
|
24953
|
+
switch (_f.label) {
|
|
24864
24954
|
case 0: return [4 /*yield*/, this.setting.baseService.startWorkflow(rowData.id, workflow.code)
|
|
24865
24955
|
.then(function (res) { return _this.handleResponse(res, 'Chạy quy trình thành công', function (f) {
|
|
24866
24956
|
_this.onStartedWorkflow.emit(rowData.id);
|
|
@@ -24868,7 +24958,7 @@
|
|
|
24868
24958
|
_this.getData();
|
|
24869
24959
|
}); })];
|
|
24870
24960
|
case 1:
|
|
24871
|
-
|
|
24961
|
+
_f.sent();
|
|
24872
24962
|
return [2 /*return*/];
|
|
24873
24963
|
}
|
|
24874
24964
|
});
|
|
@@ -24893,7 +24983,7 @@
|
|
|
24893
24983
|
ListComponentBase.prototype.createShareLink = function () {
|
|
24894
24984
|
return __awaiter(this, void 0, void 0, function () {
|
|
24895
24985
|
var rowData;
|
|
24896
|
-
return __generator(this, function (
|
|
24986
|
+
return __generator(this, function (_f) {
|
|
24897
24987
|
if (!this.setting.checkReadyToTrinhKy()) {
|
|
24898
24988
|
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')];
|
|
24899
24989
|
}
|
|
@@ -24905,17 +24995,17 @@
|
|
|
24905
24995
|
};
|
|
24906
24996
|
ListComponentBase.prototype.createShareLinkMultiple = function () {
|
|
24907
24997
|
return __awaiter(this, void 0, void 0, function () {
|
|
24908
|
-
return __generator(this, function (
|
|
24998
|
+
return __generator(this, function (_f) {
|
|
24909
24999
|
this.showShareLinkForm(this.model.selectedItems);
|
|
24910
25000
|
return [2 /*return*/];
|
|
24911
25001
|
});
|
|
24912
25002
|
});
|
|
24913
25003
|
};
|
|
24914
25004
|
ListComponentBase.prototype.disableMultipleCopyLink = function () {
|
|
24915
|
-
var e_14,
|
|
25005
|
+
var e_14, _f;
|
|
24916
25006
|
try {
|
|
24917
|
-
for (var
|
|
24918
|
-
var item =
|
|
25007
|
+
for (var _g = __values(this.model.selectedItems), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
25008
|
+
var item = _h.value;
|
|
24919
25009
|
if (this.disableCopyLink(item)) {
|
|
24920
25010
|
return true;
|
|
24921
25011
|
}
|
|
@@ -24924,7 +25014,7 @@
|
|
|
24924
25014
|
catch (e_14_1) { e_14 = { error: e_14_1 }; }
|
|
24925
25015
|
finally {
|
|
24926
25016
|
try {
|
|
24927
|
-
if (
|
|
25017
|
+
if (_h && !_h.done && (_f = _g.return)) _f.call(_g);
|
|
24928
25018
|
}
|
|
24929
25019
|
finally { if (e_14) throw e_14.error; }
|
|
24930
25020
|
}
|
|
@@ -24944,7 +25034,7 @@
|
|
|
24944
25034
|
};
|
|
24945
25035
|
ListComponentBase.prototype.showSettingsPermission = function () {
|
|
24946
25036
|
return __awaiter(this, void 0, void 0, function () {
|
|
24947
|
-
return __generator(this, function (
|
|
25037
|
+
return __generator(this, function (_f) {
|
|
24948
25038
|
if (this.creatingSearchInfo)
|
|
24949
25039
|
return [2 /*return*/];
|
|
24950
25040
|
this._showSettingsPermission = true;
|
|
@@ -24956,13 +25046,13 @@
|
|
|
24956
25046
|
return __awaiter(this, void 0, void 0, function () {
|
|
24957
25047
|
var compRef;
|
|
24958
25048
|
var _this = this;
|
|
24959
|
-
return __generator(this, function (
|
|
24960
|
-
switch (
|
|
25049
|
+
return __generator(this, function (_f) {
|
|
25050
|
+
switch (_f.label) {
|
|
24961
25051
|
case 0:
|
|
24962
25052
|
this._showSettingsWorkflow = true;
|
|
24963
25053
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'WorkflowSettingDialogComponent', this.workflowSettingDialogViewContainer)];
|
|
24964
25054
|
case 1:
|
|
24965
|
-
compRef =
|
|
25055
|
+
compRef = _f.sent();
|
|
24966
25056
|
compRef.instance.parentSetting = this.setting;
|
|
24967
25057
|
compRef.instance.parentContext = this.context;
|
|
24968
25058
|
compRef.instance.parentModel = this.model;
|
|
@@ -24978,13 +25068,13 @@
|
|
|
24978
25068
|
return __awaiter(this, void 0, void 0, function () {
|
|
24979
25069
|
var compRef;
|
|
24980
25070
|
var _this = this;
|
|
24981
|
-
return __generator(this, function (
|
|
24982
|
-
switch (
|
|
25071
|
+
return __generator(this, function (_f) {
|
|
25072
|
+
switch (_f.label) {
|
|
24983
25073
|
case 0:
|
|
24984
25074
|
this.workflowSettingModel.showEditForm = true;
|
|
24985
25075
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'WorkflowSettingNewComponent', this.workflowsettingnewViewContainer)];
|
|
24986
25076
|
case 1:
|
|
24987
|
-
compRef =
|
|
25077
|
+
compRef = _f.sent();
|
|
24988
25078
|
dialog.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
24989
25079
|
compRef.instance.parentSetting = this.setting;
|
|
24990
25080
|
compRef.instance.onSaved.subscribe(function (event) { return _this.onSaveWorkflowSettingsNew(null); });
|
|
@@ -24998,13 +25088,13 @@
|
|
|
24998
25088
|
return __awaiter(this, void 0, void 0, function () {
|
|
24999
25089
|
var compRef;
|
|
25000
25090
|
var _this = this;
|
|
25001
|
-
return __generator(this, function (
|
|
25002
|
-
switch (
|
|
25091
|
+
return __generator(this, function (_f) {
|
|
25092
|
+
switch (_f.label) {
|
|
25003
25093
|
case 0:
|
|
25004
25094
|
this.permissionSharingModel.showEditForm = true;
|
|
25005
25095
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'PermissionSharingComponent', this.permissionSharingViewContainer)];
|
|
25006
25096
|
case 1:
|
|
25007
|
-
compRef =
|
|
25097
|
+
compRef = _f.sent();
|
|
25008
25098
|
compRef.instance.item = this.rowDataCurrent;
|
|
25009
25099
|
compRef.instance.baseService = this.setting.baseService;
|
|
25010
25100
|
compRef.instance.onCancel.subscribe(function (event) { return _this.permissionSharingModel.showEditForm = false; });
|
|
@@ -25016,13 +25106,13 @@
|
|
|
25016
25106
|
ListComponentBase.prototype.showAttachedTask = function () {
|
|
25017
25107
|
return __awaiter(this, void 0, void 0, function () {
|
|
25018
25108
|
var compRef;
|
|
25019
|
-
return __generator(this, function (
|
|
25020
|
-
switch (
|
|
25109
|
+
return __generator(this, function (_f) {
|
|
25110
|
+
switch (_f.label) {
|
|
25021
25111
|
case 0:
|
|
25022
25112
|
this.attachedTaskModel.showEditForm = true;
|
|
25023
25113
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('congviec', 'BaseCongViecComponent', this.baseCongViecViewContainer)];
|
|
25024
25114
|
case 1:
|
|
25025
|
-
compRef =
|
|
25115
|
+
compRef = _f.sent();
|
|
25026
25116
|
compRef.instance.serviceCode = this.setting.baseService.serviceCode;
|
|
25027
25117
|
compRef.instance.entity = this.setting.baseService.entityName;
|
|
25028
25118
|
compRef.instance.itemIdAttach = this.rowDataCurrent.id;
|
|
@@ -25035,13 +25125,13 @@
|
|
|
25035
25125
|
return __awaiter(this, void 0, void 0, function () {
|
|
25036
25126
|
var compRef;
|
|
25037
25127
|
var _this = this;
|
|
25038
|
-
return __generator(this, function (
|
|
25039
|
-
switch (
|
|
25128
|
+
return __generator(this, function (_f) {
|
|
25129
|
+
switch (_f.label) {
|
|
25040
25130
|
case 0:
|
|
25041
25131
|
this.permissionListModel.showEditForm = true;
|
|
25042
25132
|
return [4 /*yield*/, this._federationService.loadRemoteNewComponent('commonapp', 'WorkflowPermissionComponent', this.workflowPermissionViewContainer)];
|
|
25043
25133
|
case 1:
|
|
25044
|
-
compRef =
|
|
25134
|
+
compRef = _f.sent();
|
|
25045
25135
|
// this.dialogWorkflowPermission.buttonTemplateInput = compRef.instance.buttonTemplate;
|
|
25046
25136
|
compRef.instance.item = this.rowDataCurrent;
|
|
25047
25137
|
compRef.instance.businessSetting = this.setting;
|
|
@@ -25098,6 +25188,137 @@
|
|
|
25098
25188
|
});
|
|
25099
25189
|
});
|
|
25100
25190
|
};
|
|
25191
|
+
ListComponentBase.prototype.handleShowFormSettingButton = function () {
|
|
25192
|
+
var _a, _b, _c, _d, _e;
|
|
25193
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25194
|
+
var lstBtnCustom, lstBtnAction, _loop_7, this_5, lstBtnCustom_1, lstBtnCustom_1_1, item, lstMenuButtons, buttonSetting;
|
|
25195
|
+
var e_15, _f;
|
|
25196
|
+
var _this = this;
|
|
25197
|
+
return __generator(this, function (_g) {
|
|
25198
|
+
switch (_g.label) {
|
|
25199
|
+
case 0:
|
|
25200
|
+
// Tổng hợp dữ liệu các nút từ ngTemplate + base + menuButton
|
|
25201
|
+
this.buttonAuthorizeModel.data.dataSource = [];
|
|
25202
|
+
lstBtnCustom = this.lstButtonElement[exports.EnumProperties.RESULTS].concat(this.lstButtonTemplate);
|
|
25203
|
+
lstBtnAction = [];
|
|
25204
|
+
_loop_7 = function (item) {
|
|
25205
|
+
var buttonText = (_c = (_b = (_a = item.nativeElement.getAttribute(exports.EnumProperties.LABEL)) !== null && _a !== void 0 ? _a : item.nativeElement.getAttribute(exports.EnumProperties.NG_REFLECT_TEXT)) !== null && _b !== void 0 ? _b : item.nativeElement.getAttribute(exports.EnumProperties.NG_REFLECT_LABEL)) !== null && _c !== void 0 ? _c : item.nativeElement.innerText;
|
|
25206
|
+
if (!buttonText || lstBtnAction.some(function (p) { return p.rawText === buttonText; })) {
|
|
25207
|
+
return "continue";
|
|
25208
|
+
}
|
|
25209
|
+
this_5.addButtonAction(lstBtnAction, this_5.authorizeButtonKey, buttonText);
|
|
25210
|
+
};
|
|
25211
|
+
this_5 = this;
|
|
25212
|
+
try {
|
|
25213
|
+
for (lstBtnCustom_1 = __values(lstBtnCustom), lstBtnCustom_1_1 = lstBtnCustom_1.next(); !lstBtnCustom_1_1.done; lstBtnCustom_1_1 = lstBtnCustom_1.next()) {
|
|
25214
|
+
item = lstBtnCustom_1_1.value;
|
|
25215
|
+
_loop_7(item);
|
|
25216
|
+
}
|
|
25217
|
+
}
|
|
25218
|
+
catch (e_15_1) { e_15 = { error: e_15_1 }; }
|
|
25219
|
+
finally {
|
|
25220
|
+
try {
|
|
25221
|
+
if (lstBtnCustom_1_1 && !lstBtnCustom_1_1.done && (_f = lstBtnCustom_1.return)) _f.call(lstBtnCustom_1);
|
|
25222
|
+
}
|
|
25223
|
+
finally { if (e_15) throw e_15.error; }
|
|
25224
|
+
}
|
|
25225
|
+
return [4 /*yield*/, this.menuButtons({})];
|
|
25226
|
+
case 1:
|
|
25227
|
+
lstMenuButtons = (_d = _g.sent()) !== null && _d !== void 0 ? _d : [];
|
|
25228
|
+
if (lstMenuButtons.length) {
|
|
25229
|
+
lstMenuButtons.forEach(function (item) { return _this.addButtonAction(lstBtnAction, _this.authorizeButtonKey, item.label); });
|
|
25230
|
+
}
|
|
25231
|
+
buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');
|
|
25232
|
+
((_e = buttonSetting[this.authorizeButtonKey]) === null || _e === void 0 ? void 0 : _e.length) && buttonSetting[this.authorizeButtonKey].forEach(function (item) {
|
|
25233
|
+
var permissionItem = lstBtnAction.find(function (p) { return p.permissionCode == item.code; });
|
|
25234
|
+
if (permissionItem) {
|
|
25235
|
+
permissionItem.isAuthorize = true;
|
|
25236
|
+
permissionItem.id = item.id;
|
|
25237
|
+
}
|
|
25238
|
+
});
|
|
25239
|
+
this.buttonAuthorizeModel.data.dataSource = lstBtnAction;
|
|
25240
|
+
this.buttonAuthorizeModel.showEditForm = true;
|
|
25241
|
+
return [2 /*return*/];
|
|
25242
|
+
}
|
|
25243
|
+
});
|
|
25244
|
+
});
|
|
25245
|
+
};
|
|
25246
|
+
ListComponentBase.prototype.onShowFormSettingButton = function () {
|
|
25247
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25248
|
+
var _this = this;
|
|
25249
|
+
return __generator(this, function (_f) {
|
|
25250
|
+
this.checkedAll = true;
|
|
25251
|
+
this.handleCheckAll();
|
|
25252
|
+
setTimeout(function () {
|
|
25253
|
+
_this.handleShowFormSettingButton();
|
|
25254
|
+
}, 100);
|
|
25255
|
+
return [2 /*return*/];
|
|
25256
|
+
});
|
|
25257
|
+
});
|
|
25258
|
+
};
|
|
25259
|
+
ListComponentBase.prototype.setBtnReady = function (isReady) {
|
|
25260
|
+
this.isBtnReady = isReady;
|
|
25261
|
+
};
|
|
25262
|
+
ListComponentBase.prototype.addButtonAction = function (lstBtnAction, key, rawText, id) {
|
|
25263
|
+
id !== null && id !== void 0 ? id : (id = this._commonService.guid());
|
|
25264
|
+
var permissionCode = this._commonService.convertStringToUnSign(rawText).replace(/ /g, '_').toUpperCase();
|
|
25265
|
+
lstBtnAction.push(new ButtonAction({
|
|
25266
|
+
id: id,
|
|
25267
|
+
rawText: rawText,
|
|
25268
|
+
permissionCode: "[" + key + "]_[" + permissionCode + "]"
|
|
25269
|
+
}));
|
|
25270
|
+
};
|
|
25271
|
+
ListComponentBase.prototype.setAuthorizeButton = function (lstButtonTemplate) {
|
|
25272
|
+
var _a, _b;
|
|
25273
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
25274
|
+
var filterPermission, lstPermissionCode, buttonSetting, lstMenuButton, lstMenuButtons;
|
|
25275
|
+
var _this = this;
|
|
25276
|
+
return __generator(this, function (_f) {
|
|
25277
|
+
switch (_f.label) {
|
|
25278
|
+
case 0:
|
|
25279
|
+
this.authorizeButtonKey = window.location.pathname.substring(1).toUpperCase().replace(/\//g, '_');
|
|
25280
|
+
if (i0.isDevMode()) {
|
|
25281
|
+
this.authorizeButtonKey = this.serviceCode.toUpperCase() + "_" + window.location.pathname.substring(1).toUpperCase();
|
|
25282
|
+
}
|
|
25283
|
+
filterPermission = [this.newFilter('code', exports.Operator.contain, "[" + this.authorizeButtonKey + "]")];
|
|
25284
|
+
return [4 /*yield*/, this._basePermissionService.getAllWithIgnore(filterPermission, 'code,id')];
|
|
25285
|
+
case 1:
|
|
25286
|
+
lstPermissionCode = (_a = (_f.sent()).data) !== null && _a !== void 0 ? _a : [];
|
|
25287
|
+
buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');
|
|
25288
|
+
buttonSetting[this.authorizeButtonKey] = lstPermissionCode;
|
|
25289
|
+
this.lstButtonTemplate = lstButtonTemplate;
|
|
25290
|
+
if (!buttonSetting[this.authorizeButtonKey].length) {
|
|
25291
|
+
this.isBtnReady = true;
|
|
25292
|
+
return [2 /*return*/];
|
|
25293
|
+
}
|
|
25294
|
+
sessionStorage.setItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE, JSON.stringify(buttonSetting));
|
|
25295
|
+
lstMenuButton = [];
|
|
25296
|
+
return [4 /*yield*/, this.menuButtons({})];
|
|
25297
|
+
case 2:
|
|
25298
|
+
lstMenuButtons = (_b = _f.sent()) !== null && _b !== void 0 ? _b : [];
|
|
25299
|
+
if (!lstMenuButtons.length) {
|
|
25300
|
+
this.isBtnReady = true;
|
|
25301
|
+
return [2 /*return*/];
|
|
25302
|
+
}
|
|
25303
|
+
lstMenuButtons.forEach(function (item) { return _this.addButtonAction(lstMenuButton, _this.authorizeButtonKey, item.label); });
|
|
25304
|
+
buttonSetting[this.authorizeButtonKey].forEach(function (item) {
|
|
25305
|
+
var itemBtnMenu = lstMenuButton.find(function (p) { return p.permissionCode == item.code; });
|
|
25306
|
+
if (itemBtnMenu) {
|
|
25307
|
+
_this.lstBtnAuthorizeMenu.push(itemBtnMenu);
|
|
25308
|
+
}
|
|
25309
|
+
});
|
|
25310
|
+
this.isBtnReady = true;
|
|
25311
|
+
this.handleTableRendered();
|
|
25312
|
+
return [2 /*return*/];
|
|
25313
|
+
}
|
|
25314
|
+
});
|
|
25315
|
+
});
|
|
25316
|
+
};
|
|
25317
|
+
ListComponentBase.prototype.handleCloseAuthorizeButtonForm = function () {
|
|
25318
|
+
this.checkedAll = false;
|
|
25319
|
+
this.handleCheckAll();
|
|
25320
|
+
this.buttonAuthorizeModel.showEditForm = false;
|
|
25321
|
+
};
|
|
25101
25322
|
return ListComponentBase;
|
|
25102
25323
|
}(ComponentBase));
|
|
25103
25324
|
ListComponentBase.decorators = [
|
|
@@ -25110,6 +25331,7 @@
|
|
|
25110
25331
|
ListComponentBase.propDecorators = {
|
|
25111
25332
|
treeTable: [{ type: i0.ViewChild, args: ['treetable',] }],
|
|
25112
25333
|
_table: [{ type: i0.ViewChild, args: [table.Table, { static: false },] }],
|
|
25334
|
+
lstButtonElement: [{ type: i0.ViewChildren, args: ['buttonBase',] }],
|
|
25113
25335
|
container: [{ type: i0.ViewChild, args: ['container', { static: true },] }],
|
|
25114
25336
|
iconToggleRowGroup: [{ type: i0.ViewChild, args: ['iconToggleRowGroup', { static: true },] }],
|
|
25115
25337
|
iconToggleRowData: [{ type: i0.ViewChild, args: ['iconToggleRowData', { static: true },] }],
|
|
@@ -25373,7 +25595,7 @@
|
|
|
25373
25595
|
{ type: i0.Component, args: [{
|
|
25374
25596
|
// tslint:disable-next-line: component-selector
|
|
25375
25597
|
selector: 'crud-list',
|
|
25376
|
-
template: "<div #container class=\"custom-card card card-w-title flex-container-fit-child\" [attr.height-type]=\"setting.heightType\"\n [ngStyle]=\"_style\">\n <div class=\"ui-helper-clearfix crud-list-header-area\">\n <div *ngIf=\"!setting.hiddenSearch\">\n <div *ngIf=\"searchCustom\" class=\"p-grid ui-fluid custom-p-col custom-search-area\">\n <div class=\"p-col-12 main-container-search\">\n <div class=\"p-grid main-container-search-inner\">\n <ng-container *ngIf=\"!setting.useCommonSearch\">\n <ng-container *ngTemplateOutlet=\"searchCustom; context: {$implicit: this}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n <div *ngIf=\"setting.useCommonSearch && !hasTemplate('searchCustom')\"\n class=\"p-grid ui-fluid custom-p-col custom-search-area\">\n <div class=\"p-col-12 main-container-search\">\n <div class=\"p-grid main-container-search-inner\">\n <div style=\"width: 100%;\">\n <common-search-form #commonSearch [parentSetting]=\"setting\" [parentModel]=\"model\"\n [templateFilter]=\"templateFilter\" [parentContext]=\"context\"\n [searchBoxTooltip]=\"setting.toolTipSearhBoxCommon\"\n (onClickSearch)=\"handleSearch($event)\"></common-search-form>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"!setting.hiddenHeader\" class=\"p-grid ui-fluid custom-p-col page-title-area\">\n <div *ngIf=\"!setting.hiddenPageTitle\" class=\"main-title\">\n <h1 *ngIf=\"!hasTemplate('customTitle')\">\n {{setting.title != null ? setting.title : 'Danh s\u00E1ch ' + setting.objectName}}\n </h1>\n\n <ng-container *ngIf=\"hasTemplate('customTitle')\" [ngTemplateOutlet]=\"getTemplate('customTitle')\"\n [ngTemplateOutletContext]=\"{\n crudList: this,\n buttonAdd: buttonAdd, buttonExport: buttonExport, buttonDelete: buttonDelete\n }\">\n </ng-container>\n </div>\n\n <div *ngIf=\"!setting.hiddenPageSetting\" class=\"paginator-table\">\n <ng-container *ngIf=\"!paginationTemplate\">\n <paging-next-back-only [model]=\"model\" [setting]=\"setting\" (onChanged)=\"getData()\"\n (onChangeLimitPage)=\"savePageSize()\">\n </paging-next-back-only>\n </ng-container>\n <ng-container *ngIf=\"paginationTemplate\">\n <ng-container [ngTemplateOutlet]=\"paginationTemplate\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n <div *ngIf=\"hasTemplate('topGrid')\" class=\"extend-content-top-grid\">\n <ng-container [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\n [ngTemplateOutlet]=\"getTemplate('topGrid')\"></ng-container>\n </div>\n <div class=\"fit-content crud-list-body-area\">\n <div class=\"crud-list-body-area-inner\" style=\"overflow: unset;\">\n <div class=\"flex-container-fit-child\" style=\"overflow: unset;\">\n <div *ngIf=\"!setting.hiddenToolbar\" class=\"p-grid crudListToolbar\">\n <ng-container>\n <div *ngIf=\"!setting.hiddenButtons && hasTemplate('toolbar')\"\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\n class=\"p-col-12 button-group function-topbar custom-toolbar\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('toolbar')\" [ngTemplateOutletContext]=\"{\n selectedItems: model.selectedItems, crudList: this,\n buttonAdd: buttonAdd, buttonExport: buttonExport, buttonDelete: buttonDelete\n }\">\n </ng-container>\n </div>\n <div *ngIf=\"!setting.hiddenButtons && !hasTemplate('toolbar')\"\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\n class=\"p-col-12 button-group function-topbar\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('buttonBeforeToolbar')\"\n [ngTemplateOutletContext]=\"{crudList: this}\"></ng-container>\n <button type=\"button\" pButton label=\"\u0110\u00E1nh STT\" class=\"p-button-text\" style=\"display: none\"\n (click)=\"danhSoThuTuGroupLastest()\"></button>\n <ng-container *ngIf=\"!hiddenAdd\" [ngTemplateOutlet]=\"buttonAdd\"></ng-container>\n <ng-container *ngIf=\"setting.showExportSelectedItems\" [ngTemplateOutlet]=\"buttonExport\">\n </ng-container>\n <ng-container *ngIf=\"setting.showExportWordSelectedItems\"\n [ngTemplateOutlet]=\"buttonExportWord\">\n </ng-container>\n <ng-container *ngIf=\"!hiddenDelete\" [ngTemplateOutlet]=\"buttonDelete\">\n </ng-container>\n <ng-container *ngIf=\"!hiddenReorder\" [ngTemplateOutlet]=\"buttonReorder\">\n </ng-container>\n <button *ngIf=\"!setting.disableShare && model.selectedItems.length > 0\"\n label=\"Chia s\u1EBB li\u00EAn k\u1EBFt\" type=\"button\" pButton pRipple\n [pTooltip]=\"'Chia s\u1EBB li\u00EAn k\u1EBFt' | translate\" tooltipPosition=\"top\"\n class=\"p-button-text p-button-info link-or-action\" icon=\"pi pi-link\"\n (click)=\"createShareLinkMultiple()\"></button>\n <ng-container [ngTemplateOutlet]=\"getTemplate('buttonAfterToolbar')\"\n [ngTemplateOutletContext]=\"{crudList: this}\"></ng-container>\n </div>\n </ng-container>\n <div *ngIf=\"!setting.hiddenAdvanceSearch && !setting.useCommonSearch\"\n class=\"p-col-12 advance-search-container\"\n [ngClass]=\"setting.hiddenButtons ? 'p-md-12 p-lg-12' : 'p-md-5 p-lg-4'\">\n <advance-search #advanceSearch [parentSetting]=\"setting\" [searchInfo]=\"searchInfo\"\n [loading]=\"model.loading\" (onSearch)=\"handleSearchAdvs($event)\"\n (onInit)=\"handleInitAdvanceSearch($event)\">\n </advance-search>\n </div>\n </div>\n <div *ngIf=\"hasTemplate('topGrid')\" class=\"extend-content-top-grid\">\n <ng-container [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\n [ngTemplateOutlet]=\"getTemplate('topGrid')\"></ng-container>\n </div>\n <div class=\"container-table fit-content\" [class.--table-responsive]=\"responsive\">\n <div class=\"container-table-inner\">\n <ng-container *ngIf=\"!_groupField\">\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\n [showScrollHorizontal]=\"showScrollHorizontal\">\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('afterCrudList')\"></ng-container>\n </ng-container>\n </tn-custom-scrollbar>\n <div *ngIf=\"!showScrollBar\">\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"_groupField\">\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\n [showScrollHorizontal]=\"showScrollHorizontal\">\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('afterCrudList')\"></ng-container>\n </ng-container>\n </tn-custom-scrollbar>\n <div *ngIf=\"!showScrollBar\">\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"table-border-line --top\"></div>\n <div class=\"table-border-line --right\"></div>\n <div class=\"table-border-line --bottom\"></div>\n <div class=\"table-border-line --left\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n<after-view-checked (loaded)=\"handleReady()\"></after-view-checked>\n<settings *ngIf=\"_showSettings && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveSettings($event)\"\n (onDelete)=\"onDeleteSettings()\" (onCancel)=\"_showSettings = false\">\n</settings>\n<settings-row *ngIf=\"_showSettingsRowColor && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveColorSettings($event)\"\n (onCancel)=\"_showSettingsRowColor = false\">\n</settings-row>\n<!-- <workflow-setting-dialog *ngIf=\"_showSettingsWorkflow && !setting.hiddenSettingWorkflow\" [parentSetting]=\"setting\"\n [parentContext]=\"context\" [parentModel]=\"model\" (onSaved)=\"onSaveWorkflowSettings($event)\"\n (onRemoved)=\"onRemoveWorkflowSettings($event)\" (onCancel)=\"_showSettingsWorkflow = false\">\n</workflow-setting-dialog> -->\n<div #workflowSettingDialog *ngIf=\"_showSettingsWorkflow && !setting.hiddenSettingWorkflow\"></div>\n<tn-dialog #dialogWfSettingNew [visible]=\"workflowSettingModel.showEditForm\" [header]=\"'C\u1EA5u h\u00ECnh quy tr\u00ECnh nghi\u1EC7p v\u1EE5' | translate\"\n [popupSize]=\"workflowSettingModel.popupSize\" (onHide)=\"workflowSettingModel.showEditForm = false\">\n <!-- <workflow-setting-new #formBase [parentSetting]=\"setting\" (onSaved)=\"onSaveWorkflowSettingsNew($event)\"\n (onCancel)=\"workflowSettingModel.showEditForm = false\"></workflow-setting-new> -->\n <div #workflowsettingnew></div>\n</tn-dialog>\n<entity-permission *ngIf=\"_showSettingsPermission && !setting.hiddenSettingPermission\" [parentSetting]=\"setting\"\n [parentContext]=\"context\" [parentModel]=\"model\" [searchInfo]=\"searchInfo\"\n (onCancel)=\"_showSettingsPermission = false\">\n</entity-permission>\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [styleClass]=\"'allow-selected'\" [model]=\"buttonContexts\">\n</p-contextMenu>\n<tn-dialog #dialogProcessWorkflowForm [visible]=\"processWorkflowModel.showEditForm\" [header]=\"processWorkflowModel.header | translate\"\n [popupSize]=\"processWorkflowModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\n (onHide)=\"processWorkflowModel.showEditForm = false\">\n <div style=\"height: 100%; padding: 1rem\">\n <!-- <process-workflow-form #formBase [businessSetting]=\"processWorkflowModel.data.setting\" [item]=\"currentItem\"\n [workflow]=\"processWorkflowModel.data.workflow\" [action]=\"processWorkflowModel.data.action\"\n (onSaved)=\"handleProcessedWorkflowBase()\" (onCancel)=\"processWorkflowModel.showEditForm = false\">\n </process-workflow-form> -->\n <div #processWorkflowForm></div>\n </div>\n</tn-dialog>\n<tn-dialog #dialogChoYKienForm [visible]=\"choYKienModel.showEditForm\" [header]=\"choYKienModel.header | translate\"\n [popupSize]=\"choYKienModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\n (onHide)=\"choYKienModel.showEditForm = false\">\n <div style=\"height: 100%\">\n <!-- <cho-y-kien-form #formBase [bussinessSetting]=\"choYKienModel.data.setting\"\n [rowItem]=\"choYKienModel.data.rowData\" (onSaved)=\"choYKienModel.showEditForm = false\"\n (onCancel)=\"choYKienModel.showEditForm = false\">\n </cho-y-kien-form> -->\n <div #choYKienForm></div>\n </div>\n</tn-dialog>\n<tn-dialog [visible]=\"workflowHistoryModel.showEditForm\" [header]=\"workflowHistoryModel.header | translate\"\n [popupSize]=\"workflowHistoryModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\n (onHide)=\"workflowHistoryModel.showEditForm = false\">\n <div style=\"height: 100%\">\n <!-- <workflow-history-new #formBase [businessSetting]=\"workflowHistoryModel.data.setting\"\n [tableName]=\"workflowHistoryModel.data.tableName\" [item]=\"currentItem\"\n [workflowSetting]=\"workflowHistoryModel.data.workflowSetting\"\n (onCancel)=\"workflowHistoryModel.showEditForm = false\">\n </workflow-history-new> -->\n <div #workflowHistoryNew></div>\n </div>\n</tn-dialog>\n<tn-dialog #dialogDetailTask [visible]=\"detailTaskModel.showEditForm\" [header]=\"detailTaskModel.header | translate\"\n [popupSize]=\"detailTaskModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\n (onHide)=\"detailTaskModel.showEditForm = false\">\n <!-- <base-congviec-form #formBase [model]=\"detailTaskModel.data.taskFormModel\" [forceOnlyView]=\"true\"\n (onCancel)=\"detailTaskModel.showEditForm = false\">\n </base-congviec-form> -->\n <div #detailTask></div>\n</tn-dialog>\n\n<tn-dialog #dialogPermissionSharing [visible]=\"permissionSharingModel.showEditForm\" [header]=\"permissionSharingModel.header | translate\"\n [popupSize]=\"permissionSharingModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\n (onHide)=\"permissionSharingModel.showEditForm = false\">\n <div style=\"height: 100%\">\n <!-- <permission-sharing #formBase [item]=\"rowDataCurrent\" [baseService]=\"setting.baseService\"\n (onCancel)=\"permissionSharingModel.showEditForm = false\">\n </permission-sharing> -->\n <div #permissionSharing></div>\n </div>\n</tn-dialog>\n<tn-dialog #dialogWorkflowPermission [visible]=\"permissionListModel.showEditForm\" [header]=\"permissionListModel.header | translate\"\n [popupSize]=\"permissionListModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\" [useDefaultScrollBar]=\"true\"\n (onHide)=\"permissionListModel.showEditForm = false\">\n <div style=\"height: 100%\">\n <!-- <workflow-permission #formBase [item]=\"rowDataCurrent\" [businessSetting]=\"setting\"\n (onCancel)=\"permissionListModel.showEditForm = false\">\n </workflow-permission> -->\n <div #workflowPermission></div>\n </div>\n</tn-dialog>\n<!-- <workflow-history-dialog *ngIf=\"showHistoryWorkflow\" [baseService]=\"setting.baseService\" [item]=\"currentItem\"\n [workflowSetting]=\"setting.workflowSetting\" (onHide)=\"handleHideHistoryWorkflow()\">\n</workflow-history-dialog> -->\n<div #workflowPermission *ngIf=\"showHistoryWorkflow\"></div>\n<tn-dialog #dialogstartWorkflow [visible]=\"startWorkflowModel.showEditForm\" [header]=\"startWorkflowModel.header | translate\"\n [popupSize]=\"startWorkflowModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\n (onHide)=\"startWorkflowModel.showEditForm = false\">\n <div style=\"height: 100%\">\n <!-- <start-workflow #formBase [workflows]=\"startWorkflowModel.data.workflows\"\n [defaultWorkflow]=\"startWorkflowModel.data.defaultWorkflow\"\n (onCancel)=\"startWorkflowModel.showEditForm = false\" (onSaved)=\"handleStartWorkflowFromDialog($event)\">\n </start-workflow> -->\n <div #startWorkflow></div>\n </div>\n</tn-dialog>\n<tn-dialog #dialogBaseCongViecForm [visible]=\"congViecModel.showEditForm\" [styleClass]=\"'congviec-form tn-form-dialog'\"\n [header]=\"congViecModel.header | translate\" [popupSize]=\"congViecModel.popupSize\"\n (onHide)=\"congViecModel.showEditForm = false\">\n <!-- <base-congviec-form #formBase [parentSetting]=\"congViecModel.data.congViecSetting\"\n [model]=\"congViecModel.data.model\" (onSaved)=\"congViecModel.showEditForm = false;getData()\"\n (onCancel)=\"congViecModel.showEditForm = false\">\n </base-congviec-form> -->\n <div #baseCongViecForm></div>\n</tn-dialog>\n<tn-dialog #dialog *ngIf=\"shareLinkModel.showEditForm\" [styleClass]=\"'congviec-form tn-form-dialog'\"\n [header]=\"shareLinkModel.header | translate\" [popupSize]=\"shareLinkModel.popupSize\" [useDefaultScrollBar]=\"true\"\n (onHide)=\"shareLinkModel.showEditForm = false\">\n <share-link-by-permission #formBase [setting]=\"setting\" [lstItem]=\"shareLinkModel.data.lstItem\"\n (onCancel)=\"congViecModel.showEditForm = false\">\n </share-link-by-permission>\n</tn-dialog>\n<tn-dialog #dialogBaseCongViec [visible]=\"attachedTaskModel.showEditForm\" [header]=\"attachedTaskModel.header | translate\"\n [popupSize]=\"attachedTaskModel.popupSize\" [useDefaultScrollBar]=\"true\"\n (onHide)=\"attachedTaskModel.showEditForm = false\">\n <!-- <base-congviec [serviceCode]=\"setting.baseService.serviceCode\" [entity]=\"setting.baseService.entityName\"\n [itemIdAttach]=\"rowDataCurrent.id\"></base-congviec> -->\n <div #baseCongViec></div>\n</tn-dialog>\n<ng-template #tableGetGroupFieldFalse>\n <p-table #table [dataKey]=\"'id'\" [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\"\n [columns]=\"setting.cols\" [paginator]=\"false\" [value]=\"_dataSource\" (onSort)=\"onSort($event, table)\"\n [class]=\"_tableClass\" [responsive]=\"responsive\" [lazy]=\"lazy\" [loading]=\"model.loading\"\n [expandedRowKeys]=\"model.expandedRowKeys\" [(selection)]=\"model.selectedItems\"\n (onRowReorder)=\"handleRowOrdered($event)\">\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"!colgroup\" pTemplate=\"colgroup\" let-columns>\n <ng-container *ngTemplateOutlet=\"baseColgroup; context: {$implicit: columns}\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\n <ng-container\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll}\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\n <ng-container *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll}\">\n </ng-container>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-index=\"rowIndex\" let-expanded=\"expanded\">\n <ng-container\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: expanded, eventSelectRow: handleSelectRow, eventChecked: handleCheckRowData}\">\n </ng-container>\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\n (loaded)=\"handleTableRendered()\">\n </after-view-checked>\n </ng-template>\n <ng-template *ngIf=\"rowExpansion\" pTemplate=\"rowexpansion\" let-rowData let-expanded=\"expanded\">\n <ng-container\n *ngTemplateOutlet=\"rowExpansion; context: {$implicit: rowData, expanded: expanded, getColSpanGroup: getColSpanGroup}\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\n </ng-template>\n </p-table>\n</ng-template>\n<ng-template #tableGetGroupFieldTrue>\n <p-table #tableGroup [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\" [columns]=\"setting.cols\"\n [paginator]=\"false\" [value]=\"_dataSource\" [metaKeySelection]=\"false\" (onSort)=\"onSort($event, tableGroup)\"\n [class]=\"_tableClass\" [customSort]=\"true\" [responsive]=\"responsive\" [lazy]=\"true\" [loading]=\"model.loading\"\n [(selection)]=\"model.selectedItems\" [expandedRowKeys]=\"model.expandedRowKeys\" [dataKey]=\"_groupField\">\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"!colgroup\" pTemplate=\"colgroup\" let-columns>\n <ng-container *ngTemplateOutlet=\"baseColgroup; context: {$implicit: columns}\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\n <ng-container\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll_Group}\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\n <ng-container\n *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll_Group}\">\n </ng-container>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\" let-expanded=\"expanded\" let-columns=\"columns\">\n <tr *ngIf=\"rowGroupMetadata[rowData[_groupField]] && rowGroupMetadata[rowData[_groupField]].index == rowIndex\"\n class=\"p-widget-header group-row\" style=\"border: 0px; border-bottom: 1px solid #eee\">\n <td *ngIf=\"!setting.hiddenCheckbox\" class=\"center chkbox\" [class.sticky]=\"setting.stickyColumn\">\n <p-checkbox [(ngModel)]=\"rowGroupChecked[rowData[_groupField]]\" binary=\"true\"\n (onChange)=\"handleCheckRowGroup(rowData)\">\n </p-checkbox>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n <ng-container *ngIf=\"!rowGroup\">\n <td [colSpan]=\"getColSpanGroup()\" [class]=\"_classRowGroup\">\n <div class=\"container-row-group\">\n <a href=\"javascript:;\" [pRowToggler]=\"rowData\" class=\"container-row-group-toggle\"\n [class.sticky]=\"setting.stickyColumn\">\n <i style=\"margin-right:5px\"\n [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\n <div class=\"content-row-group\">\n <ng-container *ngIf=\"!contentRowGroup\">\n <ng-container [ngTemplateOutlet]=\"_contentRowGroup\"\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"contentRowGroup\">\n <ng-container [ngTemplateOutlet]=\"contentRowGroup\"\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\n </ng-container>\n </ng-container>\n </div>\n </a>\n </div>\n </td>\n </ng-container>\n <ng-container *ngIf=\"rowGroup\">\n <ng-container [ngTemplateOutlet]=\"rowGroup\"\n [ngTemplateOutletContext]=\"getContextRowGroupRoot(rowData, expanded)\">\n </ng-container>\n </ng-container>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" let-columns=\"columns\" let-rowData let-index=\"rowIndex\">\n <ng-container\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: false, eventSelectRow: handleSelectRowGroup, eventChecked: handleCheckRowData_Group}\">\n </ng-container>\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\n (loaded)=\"handleTableRendered()\">\n </after-view-checked>\n </ng-template>\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\n </ng-template>\n </p-table>\n <after-view-checked></after-view-checked>\n</ng-template>\n<ng-template #baseColgroup let-columns>\n <colgroup>\n <col *ngIf=\"!setting.hiddenCheckbox\" [style.width]=\"widthCheckbox\" />\n <col *ngIf=\"!setting.hiddenOrderColumn\" [style.width]=\"widthOrderColumn\" />\n <col *ngIf=\"rowExpansion\" style=\"width: 2.5rem\" />\n <ng-container *ngFor=\"let col of columns; let i = index\">\n <col *ngIf=\"col && col.visible && col.field!='function'\" [style.width]=\"col.width\" />\n </ng-container>\n <col *ngIf=\"enableReorderRow\" style=\"width: 30px\" />\n <col *ngIf=\"!setting.hiddenFunctionColumn\" [style.width]=\"widthFunctionColumn || _widthFunctionColumn\" />\n </colgroup>\n</ng-template>\n<ng-template #buttonAdd>\n <span [appAuthorize]=\"serviceCode\" [permission]=\"authorizePaths[commonConst.ADD]\"\n [enableAuthorize]=\"buttonApplyAuthorize[commonConst.ADD]\">\n <button type=\"button\" pButton pRipple label=\"Th\u00EAm m\u1EDBi\" icon=\"pi pi-plus\" class=\"p-button-text\"\n [disabled]=\"!model.baseReady\" (click)=\"add()\"></button>\n </span>\n</ng-template>\n<ng-template #buttonExport>\n <button *ngIf=\"model.selectedItems.length > 0\" [appAuthorize]=\"serviceCode\"\n [permission]=\"authorizePaths[commonConst.EXPORT_EXCEL]\"\n [enableAuthorize]=\"buttonApplyAuthorize[commonConst.EXPORT_EXCEL]\" type=\"button\" pButton pRipple\n label=\"Xu\u1EA5t c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{model.selectedItems.length}})\" icon=\"fas fa-file-excel\"\n class=\"p-button-text p-button-success\" (click)=\"xuatCacMucDaChon()\"></button>\n</ng-template>\n<ng-template #buttonExportWord>\n <button *ngIf=\"model.selectedItems.length > 0\" [appAuthorize]=\"serviceCode\"\n [permission]=\"authorizePaths[commonConst.EXPORT_EXCEL]\"\n [enableAuthorize]=\"buttonApplyAuthorize[commonConst.EXPORT_EXCEL]\" type=\"button\" pButton pRipple\n label=\"In c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn ({{model.selectedItems.length}})\" icon=\"fas fa-file-word\"\n class=\"p-button-text p-button-success\" (click)=\"printByReadingHtml()\"></button>\n</ng-template>\n<ng-template #buttonDelete>\n <button *ngIf=\"!hiddenDelete && model.selectedItems.length > 0 && !disableMultipleDelete()\"\n [appAuthorize]=\"serviceCode\" [permission]=\"authorizePaths[commonConst.DELETE_MULTIPLE]\"\n [enableAuthorize]=\"buttonApplyAuthorize[commonConst.DELETE_MULTIPLE]\" type=\"button\" pButton pRipple\n [label]=\"'X\u00F3a ' + (model.selectedItems.length) | translate\" icon=\"pi pi-trash\"\n class=\"p-button-text p-button-danger\" (click)=\"deleteMutiple()\"></button>\n</ng-template>\n<ng-template #buttonReorder>\n <button\n *ngIf=\"showSaveReorder && enableReorderRow && (_sortField == setting.columnSetting.sortField || _sortDir == 0)\"\n [appAuthorize]=\"serviceCode\" [permission]=\"authorizePaths[commonConst.REORDER_SAVE]\"\n [enableAuthorize]=\"buttonApplyAuthorize[commonConst.REORDER_SAVE]\" type=\"button\" pButton pRipple\n [label]=\"'L\u01B0u s\u1EAFp x\u1EBFp' | translate\" icon=\"pi pi-save\" class=\"p-button-text p-button-success\"\n (click)=\"saveReorder()\"></button>\n</ng-template>\n<ng-template #trHeader let-columns let-funcCheckAll=\"funcCheckAll\">\n <tr class=\"title-row\">\n <ng-container *ngIf=\"!setting.hiddenCheckbox\">\n <th class=\"chkbox link-or-action cell-checkbox\" [class.sticky]=\"setting.stickyColumn\">\n <button *ngIf=\"!hasTemplate('headerCheckbox') && !setting.useCommonSearch\" type=\"button\" pButton pRipple\n icon=\"pi pi-refresh\" class=\"p-button-rounded p-button-text btnReload\" pTooltip=\"L\u00E0m m\u1EDBi d\u1EEF li\u1EC7u\"\n tooltipPosition=\"top\" [disabled]=\"model.loading\" (click)=\"reload()\"></button>\n <p-triStateCheckbox *ngIf=\"setting.useCommonSearch\" [(ngModel)]=\"checkedAll\" binary=\"true\"\n (onChange)=\"funcCheckAll()\">\n </p-triStateCheckbox>\n <ng-container *ngIf=\"hasTemplate('headerCheckbox')\">\n <ng-container [ngTemplateOutletContext]=\"{crudList: this}\"\n [ngTemplateOutlet]=\"getTemplate('headerCheckbox')\"></ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"!setting.hiddenOrderColumn\" class=\"stt nopad center\" [class.sticky]=\"setting.stickyColumn\"\n (dblclick)=\"reload()\">\n {{ 'TT' |translate}}\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <th *ngIf=\"rowExpansion\" class=\"nopad row-expansion-toggle center\" style=\"width: 2.5rem\"\n [class.sticky]=\"setting.stickyColumn\">\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <ng-container *ngIf=\"hasTemplate('trHeaderBefore')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('trHeaderBefore')\"\n [ngTemplateOutletContext]=\"{$implicit: columns}\"></ng-container>\n </ng-container>\n <ng-container *ngFor=\"let col of columns; let i = index\">\n <th *ngIf=\"col && col.visible && col.field!='function'\" [ngStyle]=\"col.extendData.headerStyle\"\n [style.left]=\"col.isPinned && col.left ? (col.left + 'px') : ''\" [pTooltip]=\"col.fullLabel\"\n tooltipStyleClass=\"unset-width\" [class]=\"col.extendData.headerClass\"\n [className]=\"col.isPinned && col.width ? col.class : ''\" [class.first-th]=\"i==0\" [escape]=\"false\"\n tooltipPosition=\"top\" [tnSortableColumn]=\"col.field\" [tnSortableColumnDisabled]=\"!col.sort\">\n <ng-container *ngTemplateOutlet=\"contentTh; context: {$implicit: col}\"></ng-container>\n <ng-container *ngIf=\"col.sort || col.sortClient\">\n <ng-container *ngTemplateOutlet=\"sortIcon; context: {field: col.field}\"></ng-container>\n </ng-container>\n </th>\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('trHeaderAfter')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('trHeaderAfter')\"\n [ngTemplateOutletContext]=\"{$implicit: columns}\"></ng-container>\n </ng-container>\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <ng-container *ngTemplateOutlet=\"colFunctionHeader\"></ng-container>\n </tr>\n <ng-container *ngTemplateOutlet=\"rowHeaderFilter; context: {columns: columns, funcCheckAll: funcCheckAll}\">\n </ng-container>\n</ng-template>\n<ng-template #rowHeaderFilter let-columns=\"columns\" let-funcCheckAll=\"funcCheckAll\">\n <tr class=\"filter-row\" *ngIf=\"!setting.hiddenFilterRow\">\n <th *ngIf=\"!setting.hiddenCheckbox\" class=\"chkbox nopad center\" [class.sticky]=\"setting.stickyColumn\"\n [class.tricheckbox-custom-false]=\"checkedAll === false\">\n <p-triStateCheckbox [(ngModel)]=\"checkedAll\" binary=\"true\" (onChange)=\"funcCheckAll()\">\n </p-triStateCheckbox>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <th *ngIf=\"!setting.hiddenOrderColumn\" class=\"stt center v-top\" [class.sticky]=\"setting.stickyColumn\">\n <div *ngIf=\"!setting.hiddenSetting\" class=\"pick-color-row\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB m\u00E0u\"\n tooltipPosition=\"top\" (click)=\"showSettingRowColor()\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <th *ngIf=\"rowExpansion\" class=\"nopad center row-expansion-toggle\" [class.sticky]=\"setting.stickyColumn\">\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <ng-container *ngFor=\"let col of columns; let i = index\">\n <th *ngIf=\"col.visible && col.field != 'function'\" class=\"cell-header-filter center\"\n [style.left]=\"col.isPinned && col.left ? (col.left + 'px') : ''\"\n [className]=\"col.isPinned && col.width ? col.class + ' cell-header-filter center': 'cell-header-filter center'\">\n <ng-container *ngIf=\"col.allowFilter\">\n <ng-container *ngIf=\"col.templateFilter\">\n <ng-container [ngTemplateOutlet]=\"col.templateFilter\"\n [ngTemplateOutletContext]=\"{col: col, filterData: filterData, onSearch: onSearch, onShowFilterDropdownPanel: onShowFilterDropdownPanel, onHideFilterDropdownPanel: onHideFilterDropdownPanel}\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!col.templateFilter\" [ngSwitch]=\"col.controlType\">\n <ng-container *ngSwitchCase=\"'dropdown'\">\n <ng-container [ngTemplateOutlet]=\"filterDropdown\"\n [ngTemplateOutletContext]=\"{col: col.rawColumn}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'number'\">\n <ng-container [ngTemplateOutlet]=\"filterNumber\" [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <ng-container [ngTemplateOutlet]=\"filterDate\"\n [ngTemplateOutletContext]=\"{col: col, control: filterSchema.dateRange}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'datetime'\">\n <ng-container [ngTemplateOutlet]=\"filterDate\"\n [ngTemplateOutletContext]=\"{col: col, control: filterSchema.dateTimeRange}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container [ngSwitch]=\"col.dataType\">\n <ng-container *ngSwitchCase=\"'int'\">\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'intWithoutMask'\">\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'decimal'\">\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'currency'\">\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <ng-container [ngTemplateOutlet]=\"filterDate\"\n [ngTemplateOutletContext]=\"{col: col, control: filterSchema.dateRange}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'datetime'\">\n <ng-container [ngTemplateOutlet]=\"filterDate\"\n [ngTemplateOutletContext]=\"{col: col, control: filterSchema.dateTimeRange}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'boolean'\">\n <ng-container [ngTemplateOutlet]=\"filterBoolean\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container [ngTemplateOutlet]=\"filterText\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <ng-container *ngTemplateOutlet=\"buttonBaseSetting\"></ng-container>\n </tr>\n</ng-template>\n<ng-template #buttonBaseSetting>\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\n <th class=\"center setting-cell column-function\" [class.sticky]=\"setting.stickyColumn\">\n <button *ngIf=\"!setting.hiddenSetting\" type=\"button\" pButton pRipple icon=\"pi pi-cog\"\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB\" tooltipPosition=\"top\"\n (click)=\"showSettings()\"></button>\n <button *ngIf=\"!setting.hiddenSettingPermission\" type=\"button\" pButton pRipple icon=\"pi pi-users\"\n class=\"p-button-rounded p-button-text\" pTooltip=\"Ph\u00E2n quy\u1EC1n d\u1EEF li\u1EC7u\" tooltipPosition=\"left\"\n [disabled]=\"!checkPermissionToUseButton(BUTTON_PHAN_QUYEN)\" (click)=\"showSettingsPermission()\"></button>\n <button *ngIf=\"!setting.hiddenSettingWorkflow\" type=\"button\" pButton pRipple icon=\"pi pi-sitemap\"\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh quy tr\u00ECnh\" tooltipPosition=\"left\"\n [disabled]=\"!checkPermissionToUseButton(BUTTON_CAU_HINH_QUY_TRINH)\"\n (click)=\"showSettingsWorkflowNew(dialogWfSettingNew)\"></button>\n <div *ngIf=\"setting.hiddenSetting && setting.hiddenSettingPermission && setting.hiddenSettingWorkflow\"\n class=\"cell-header-function\">\n <span>{{'GRID.FUNCTION'| translate}}</span>\n </div>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n </ng-container>\n\n</ng-template>\n<ng-template #colFunctionHeader>\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\n <ng-container *ngIf=\"setting.hiddenFilterRow\">\n <ng-container *ngTemplateOutlet=\"buttonBaseSetting\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!setting.hiddenFilterRow\">\n <th class=\"column-function\" [class.sticky]=\"setting.stickyColumn\">\n <div class=\"cell-header-function\">\n <span>{{'GRID.FUNCTION'| translate}}</span>\n </div>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n</ng-template>\n<ng-template #contentTh let-col>\n <ng-container *ngIf=\"templateHeaderContent[col.field]\">\n <ng-container *ngTemplateOutlet=\"templateHeaderContent[col.field]\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!templateHeaderContent[col.field]\">\n {{col.label}}\n </ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n</ng-template>\n<ng-template #trBody let-rowData let-columns=\"columns\" let-index=\"index\" let-expanded=\"expanded\"\n let-eventSelectRow=\"eventSelectRow\" let-eventChecked=\"eventChecked\">\n <tr *ngIf=\"!rowData.template\" [tnReorderableRow]=\"index\" [attr.rowIndex]=\"index\" [ngClass]=\"rowData.objStyleClass\"\n [class.ui-state-highlight]=\"rowData._checked\" [pTooltip]=\"rowData.tooltip\" tooltipPosition=\"top\"\n [tooltipStyleClass]=\"rowData.tooltipClass\" [escape]=\"escape\" (click)=\"eventSelectRow($event, rowData)\">\n <ng-container *ngIf=\"!setting.hiddenCheckbox && !rowData.hidden[fieldCheckbox]\">\n <td class=\"chkbox link-or-action cell-checkbox\" [class.sticky]=\"setting.stickyColumn\"\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldCheckbox]\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldCheckbox]\">\n <ng-container *ngIf=\"!rowData.hiddenCheckBox\">\n <ng-container *ngIf=\"!hasTemplate('checkbox')\">\n <p-checkbox [(ngModel)]=\"rowData._checked\" binary=\"true\" (onChange)=\"eventChecked(rowData)\">\n </p-checkbox>\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('checkbox')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('checkbox')\"\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n </ng-container>\n <td *ngIf=\"!setting.hiddenOrderColumn && !rowData.hidden[fieldOrder]\" class=\"stt\" style=\"text-align: center;\"\n [class.sticky]=\"setting.stickyColumn\" [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldOrder]\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldOrder]\">\n <span class=\"row-card\" [ngStyle]=\"rowData.bookmarkStyle\"></span>\n {{rowData[fieldOrder]}}\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n <td *ngIf=\"rowExpansion && !rowData.hidden[fieldColExpand]\" class=\"no-padding center row-expansion-toggle\"\n [class.sticky]=\"setting.stickyColumn\" [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldColExpand]\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldColExpand]\">\n <ng-container *ngTemplateOutlet=\"iconToggleRowData; context: {rowData: rowData, expanded: expanded}\">\n </ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n <ng-container *ngIf=\"!hasTemplate('dynamicColBodys')\">\n <ng-container *ngIf=\"hasTemplate('dynamicColBodysBefore')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('dynamicColBodysBefore')\"\n [ngTemplateOutletContext]=\"{$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\n </ng-container>\n </ng-container>\n <ng-container\n *ngTemplateOutlet=\"dynamicColBodys; context: {$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('dynamicColBodysAfter')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('dynamicColBodysAfter')\"\n [ngTemplateOutletContext]=\"{$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('dynamicColBodys')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('dynamicColBodys')\"\n [ngTemplateOutletContext]=\"{$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\n </ng-container>\n </ng-container>\n <td *ngIf=\"enableReorderRow && !rowData.hidden[fieldColReorder]\" class=\"no-padding center\"\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldColReorder]\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldColReorder]\">\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\" pReorderableRowHandle></i>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn && !rowData.hidden[fieldFunction]\">\n <td class=\"text-center column-function\" style=\"text-align: center;\" [class.sticky]=\"setting.stickyColumn\"\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldFunction]\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldFunction]\">\n <div *ngIf=\"hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('function')\"\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </div>\n <div *ngIf=\"!hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\n [ngTemplateOutlet]=\"getTemplate('buttonBefore')\"></ng-container>\n <button *ngIf=\"setting.showVersionButton\" type=\"button\" pButton pRipple icon=\"pi pi-calendar\"\n class=\"p-button-rounded p-button-text p-button-success link-or-action\"\n pTooltip=\"Xem l\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\" tooltipPosition=\"top\"\n (click)=\"showListVersion(rowData)\"></button>\n <button *ngIf=\"!rowData.hiddenEdit\" [appAuthorize]=\"serviceCode\"\n [permission]=\"authorizePaths[commonConst.EDIT]\"\n [enableAuthorize]=\"buttonApplyAuthorize[commonConst.EDIT]\" type=\"button\" pButton pRipple\n [disabled]=\"disableEdit(rowData)\" [pTooltip]=\"'FORM.EDIT' | translate\" tooltipPosition=\"top\"\n class=\"p-button-rounded p-button-text p-button-info link-or-action\" icon=\"pi pi-pencil\"\n (click)=\"edit(rowData)\"></button>\n <button *ngIf=\"!rowData.hiddenDelete\" [appAuthorize]=\"serviceCode\"\n [permission]=\"authorizePaths[commonConst.DELETE]\"\n [enableAuthorize]=\"buttonApplyAuthorize[commonConst.DELETE]\" type=\"button\" pButton pRipple\n [disabled]=\"disableDelete(rowData)\" [pTooltip]=\"'FORM.DELETE' | translate\" tooltipPosition=\"top\"\n class=\"p-button-rounded p-button-text p-button-danger link-or-action\" icon=\"pi pi-trash\"\n (click)=\"delete(rowData)\"></button>\n <ng-container *ngIf=\"!hiddenBtnFunction\">\n <button *ngIf=\"showMenuButtons && menuButtons\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\n class=\"link-or-action p-button-text p-button-info p-button-rounded\"\n pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\" tooltipPosition=\"top\" [disabled]=\"rowData.disableFunctionRow\"\n (click)=\"showContextMenu($event, rowData)\"></button>\n </ng-container>\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\n [ngTemplateOutlet]=\"getTemplate('buttonAfter')\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n </ng-container>\n </tr>\n <ng-container *ngIf=\"rowData.template\">\n <ng-container *ngTemplateOutlet=\"rowData.template; context: {\n $implicit: rowData, columns: columns, index: index, expanded: expanded, eventSelectRow: eventSelectRow, eventChecked: eventChecked\n }\"></ng-container>\n </ng-container>\n</ng-template>\n<ng-template #dynamicColBodys let-columns let-rowData=\"rowData\" let-index=\"index\" let-expanded=\"expanded\">\n <ng-container *ngFor=\"let col of columns; let i = index\">\n <ng-container\n *ngTemplateOutlet=\"contentTd; context: {$implicit: rowData, col: col, index: index, i: i, expanded: expanded}\">\n </ng-container>\n </ng-container>\n</ng-template>\n<ng-template #contentTd let-rowData let-col=\"col\" let-index=\"index\" let-expanded=\"expanded\" let-i=\"i\">\n <td *ngIf=\"col && col.visible && col.field != 'function' && !rowData.hidden[col.field]\"\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[col.field]\"\n [style.left]=\"col.isPinned && col.left ? (col.left + 'px') : ''\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[col.field]\" [ngStyle]=\"col.extendData.style\"\n [class]=\"col.cellClass\" [class.first-td]=\"i == 0\">\n <span *ngIf=\"col.pipe\">\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\n tooltipPosition=\"top\">{{col.label}}</span>\n {{rowData['pipe__' + col.field]}}\n </span>\n <span *ngIf=\"!col.pipe\" class=\"contentTd\">\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\n tooltipPosition=\"top\">{{col.label}}</span>\n <span *ngIf=\"setting.showEditLink && col.showEditLink\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\"\n class=\"link-or-action\">\n <ng-container *ngIf=\"col.click\">\n <a href=\"javascript:;\" (click)=\"col.click(rowData)\" [pTooltip]=\"config.tooltipView\"\n tooltipPosition=\"top\">\n <ng-container [ngTemplateOutlet]=\"contentCell\"\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\n </ng-container>\n </a>\n </ng-container>\n <ng-container *ngIf=\"!col.click\">\n <a href=\"javascript:;\" (click)=\"view(rowData)\" [pTooltip]=\"config.tooltipView\"\n tooltipPosition=\"top\">\n <ng-container [ngTemplateOutlet]=\"contentCell\"\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\n </ng-container>\n </a>\n </ng-container>\n </span>\n <span *ngIf=\"!setting.showEditLink || !col.showEditLink\" class=\"\">\n <ng-container [ngTemplateOutlet]=\"contentCell\"\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\n </ng-container>\n </span>\n </span>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n</ng-template>\n<ng-template #contentCell let-col=\"col\" let-rowData=\"rowData\" let-rowIndex=\"rowIndex\" let-field=\"field\"\n let-expanded=\"expanded\">\n <ng-container *ngIf=\"col.template\">\n <ng-container [ngTemplateOutlet]=\"col.template\"\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded,this)\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!col.template\">\n <ng-container [ngSwitch]=\"col.dataType\">\n <span *ngSwitchCase=\"'color'\" style=\"display:block;text-align:center;\">\n <div [pTooltip]=\"rowData[field]\" tooltipPosition=\"top\" [ngStyle]=\"{'background-color':rowData[field]}\"\n style=\"width:30px;height:30px;margin:0 auto;\"></div>\n </span>\n <span *ngSwitchCase=\"'icon'\" style=\"display:block;text-align:center;\">\n <i [pTooltip]=\"rowData[field]\" tooltipPosition=\"top\" style=\"text-align: center;\"\n [ngClass]=\"rowData[field]\"></i>\n </span>\n <span *ngSwitchCase=\"'date'\" [pTooltip]=\"rowData[field] | date:'dd/MM/yyyy'\" tooltipPosition=\"top\">\n {{rowData[field] | tnDate:col.dataType:col.format}}\n </span>\n <span *ngSwitchCase=\"'datetime'\" [pTooltip]=\"rowData[field] | date:'dd/MM/yyyy HH:mm'\"\n tooltipPosition=\"top\">\n {{rowData[field] | tnDate:col.dataType:col.format}}\n </span>\n <span *ngSwitchCase=\"'int'\">\n {{rowData[field] | number}}\n </span>\n <span *ngSwitchCase=\"'intWithoutMask'\">\n {{rowData[field]}}\n </span>\n <span *ngSwitchCase=\"'currency'\">\n {{rowData[field] | currency:\"VND\"}}\n </span>\n <span *ngSwitchCase=\"'decimal'\">\n {{rowData[field] | number}}\n </span>\n <span *ngSwitchCase=\"'boolean'\">\n <p-checkbox class=\"boolean-data-type\" [(ngModel)]=\"rowData[field]\" binary=\"true\"\n [disabled]=\"col.disableCheckBox\">\n </p-checkbox>\n </span>\n <span *ngSwitchCase=\"'html'\">\n <div *ngIf=\"rowData[field]==null?'':rowData[field]\" [innerHTML]=\"rowData[field] | safeHtml\"></div>\n </span>\n <span *ngSwitchCase=\"'metadataStatus'\">\n <span *ngIf=\"rowData['rejectReason']\" class=\"label-danger\" [pTooltip]=\"rowData['rejectReason']\"\n tooltipStyleClass=\"unset-width\" [escape]=\"false\" tooltipPosition=\"top\">T\u1EEB ch\u1ED1i</span>\n <span *ngIf=\"rowData[field] == '0' && !rowData['rejectReason']\" class=\"label-secondary\">Ch\u01B0a\n duy\u1EC7t</span>\n <span *ngIf=\"rowData[field] == '1' && !rowData['rejectReason']\" class=\"label-warning\">Ch\u1EDD duy\u1EC7t</span>\n <span *ngIf=\"rowData[field] == '2'\" class=\"label-primary\">\u0110\u00E3 duy\u1EC7t</span>\n </span>\n <ng-container *ngSwitchCase=\"'fileUpload'\">\n <ng-container\n *ngTemplateOutlet=\"fileUploadColumn; context: {$implicit: rowData, field: col.field, fileSetting: col.fileSetting}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'fileManager'\">\n <ng-container\n *ngTemplateOutlet=\"fileManagerColumn; context: {$implicit: rowData, field: col.field, fileSetting: col.fileSetting}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'string'\">\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"null\">\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container [ngTemplateOutlet]=\"getComponentByType(col.dataType)\"\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded, this)\">\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n<ng-template #contentCellString let-rowData let-field=\"field\">\n <span>\n <!-- __sv: Short Value -->\n <ng-container *ngIf=\"rowData[field + '__sv']\">\n <ng-container *ngIf=\"!rowData[field + '__showFull']\">\n {{rowData[field + '__sv']}}\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\" pTooltip=\"B\u1EA5m \u0111\u1EC3 xem th\u00EAm\"\n tooltipPosition=\"top\">[...]</span>\n </ng-container>\n <ng-container *ngIf=\"rowData[field + '__showFull']\">\n {{rowData[field]}}\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\">Thu g\u1ECDn</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!rowData[field + '__sv']\">\n {{rowData[field]}}\n </ng-container>\n </span>\n</ng-template>\n<ng-template #iconToggleRowGroup let-rowData=\"rowData\" let-expanded=\"expanded\">\n <a href=\"javascript:;\" (click)=\"handleToggleRow(rowData, $event)\">\n <i style=\"margin-right:5px\" [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\n </a>\n</ng-template>\n<ng-template #iconToggleRowData let-rowData=\"rowData\" let-expanded=\"expanded\">\n <button type=\"button\" pButton pRipple class=\"link-or-action p-button-text p-button-rounded p-button-plain\"\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\n (click)=\"handleToggleRow(rowData, $event)\"></button>\n</ng-template>\n<ng-template #_contentRowGroup let-rowData=\"rowData\" let-groupCol=\"groupCol\" let-groupField=\"_groupField\">\n <ng-container [ngTemplateOutlet]=\"contentCell\"\n [ngTemplateOutletContext]=\"{rowData: rowData, col: groupCol, field: _groupField}\">\n </ng-container>\n <span *ngIf=\"setting.columnSetting.showGroupSize\">\n ({{rowGroupMetadata[rowData[_groupField]].size}})</span>\n</ng-template>\n<ng-template #trangThaiV5 let-rowData=\"rowData\">\n <div class=\"container-text-workflow\">\n <button *ngIf=\"!rowData.__workflowCode && !rowData.hiddenWorkflowAction && !rowData.hiddenStartWorkflow\" pButton\n class=\"p-button-text link-or-action\" label=\"B\u1EAFt \u0111\u1EA7u\" style=\"border: 1px solid #7ca9cd;\"\n pTooltip=\"B\u1EAFt \u0111\u1EA7u ch\u1EA1y quy tr\u00ECnh\" tooltipPosition=\"top\"\n [disabled]=\"rowData.__startingWorkflow && !rowData.__notReadyForStart\"\n (click)=\"showFormStartWorkflow(rowData, dialogstartWorkflow)\"></button>\n <ng-container *ngIf=\"rowData.__workflowCode\">\n <span class=\"content\">{{rowData.__textTrangThai}}</span>\n <button *ngIf=\"!rowData.hiddenWorkflowAction\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"H\u00E0nh \u0111\u1ED9ng\" tooltipPosition=\"top\"\n [disabled]=\"showingActionWorkflow\" (click)=\"showActionWorkflow($event, rowData, dialogProcessWorkflowForm, dialogDetailTask, dialogChoYKienForm)\"></button>\n </ng-container>\n </div>\n</ng-template>\n<ng-template #viewHistory let-rowData=\"rowData\">\n <button pButton icon=\"pi pi-calendar\" class=\"p-button-text p-button-rounded link-or-action\" pTooltip=\"Xem l\u1ECBch s\u1EED\"\n tooltipPosition=\"top\" (click)=\"viewHistoryWorkflow(setting, rowData)\"></button>\n</ng-template>\n<ng-template #containerSticky>\n <span class=\"fix-sticky top\"></span>\n <span class=\"fix-sticky right\"></span>\n <!-- <span class=\"fix-sticky bottom\"></span> -->\n <span class=\"fix-sticky left\"></span>\n</ng-template>\n<ng-template #sortIcon let-field=\"field\">\n <i class=\"p-sortable-column-icon pi\" style=\"font-size: 0.8em;\"\n [ngClass]=\"{'pi-sort-amount-up-alt': field == _sortField && _sortDir === 1, 'pi-sort-amount-down': field == _sortField && _sortDir === -1, 'pi-sort-alt': field != _sortField || _sortDir === 0}\"></i>\n</ng-template>\n<ng-template #filterDropdown let-col=\"col\">\n <div #filterBox style=\"width: 100%; border-radius: 4px;\">\n <dropdown *ngIf=\"col && filterSchema.dropdown[col.field]\" [control]=\"filterSchema.dropdown[col.field]\"\n [dataSource]=\"filterSchema.dropdown[col.field].dataSource\" [(value)]=\"filterData[col.field]\"\n (onChanged)=\"prepareSearch(col)\" (onHideSmartEvent)=\"onSearch()\"\n (onShow)=\"onShowFilterDropdownPanel($event)\" (onHide)=\"onHideFilterDropdownPanel($event)\"\n (mousedown)=\"initFilterBoxFocus(filterBox)\"></dropdown>\n </div>\n</ng-template>\n<ng-template #filterText let-col=\"col\">\n <div #filterBox class=\"text-filter filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\n <div tabindex=\"-1\">\n <input pInputText type=\"text\" class=\"input-search\" [placeholder]=\"col.label\"\n [(ngModel)]=\"filterData[col.field]\" (change)=\"onSearch()\"\n (keyup.esc)=\"onClearSearch(filterBox, col.field)\">\n </div>\n <span [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] != null && filterData[col.field] !== ''}\"\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearSearch(filterBox, col.field)\"\n tabindex=\"-1\"><i class=\"pi pi-filter-slash\"></i></span>\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\n </after-view-checked>\n </div>\n</ng-template>\n<ng-template #filterNumber let-col=\"col\">\n <div #filterBox class=\"number-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\n <div tabindex=\"-1\">\n <tn-number-picker-range #numberRange [maskType]=\"col.dataType\" [(ngModel)]=\"filterData[col.field]\"\n [min]=\"col.min\" [max]=\"col.max\" [placeholder]=\"col.placeholder\" (change)=\"onSearch()\">\n </tn-number-picker-range>\n </div>\n <span\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearNumberSearch(filterBox, numberRange)\"\n tabindex=\"-1\">\n <i class=\"pi pi-filter-slash\"></i></span>\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\n </after-view-checked>\n </div>\n</ng-template>\n<ng-template #filterDate let-col=\"col\" let-control=\"control\">\n <div #filterBox class=\"date-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\n <div tabindex=\"-1\">\n <tn-datetime-picker-range #dateRange [control]=\"control\" (onChanged)=\"onChangeDateTime($event, col.field)\">\n </tn-datetime-picker-range>\n </div>\n <span\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\"\n (mousedown)=\"onClearDateSearch(filterBox, dateRange, col.field)\" tabindex=\"-1\"><i\n class=\"pi pi-filter-slash\"></i></span>\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\n </after-view-checked>\n </div>\n</ng-template>\n<ng-template #filterBoolean let-col=\"col\">\n <div class=\"filter-boolean-box\">\n <p-selectButton *ngIf=\"!col.minimizeFilter\"\n [options]=\"[{value: true, label: 'C\u00F3', icon: 'pi pi-check'}, {value: false, label: 'Kh\u00F4ng', icon: 'pi pi-times'}]\"\n [multiple]=\"true\" [(ngModel)]=\"filterData[col.field]\" (onChange)=\"onChangeBoolean($event, col.field)\">\n <ng-template let-item>\n <i style=\"padding: 3px 0;\" [class]=\"item.icon\"></i>\n </ng-template>\n </p-selectButton>\n <ng-container *ngIf=\"col.minimizeFilter\">\n <button *ngIf=\"!filterData[col.field]\" type=\"button\" pButton icon=\"pi pi-filter-slash\"\n class=\"btn-filter-boolean\" (click)=\"showCheckBoxFilterMenu($event, col.field)\"></button>\n <button *ngIf=\"filterData[col.field]\" type=\"button\" pButton icon=\"pi pi-filter\"\n class=\"btn-filter-boolean p-button-primary\"\n (click)=\"showCheckBoxFilterMenu($event, col.field)\"></button>\n </ng-container>\n </div>\n</ng-template>\n<ng-template #fileUploadColumn let-field=\"field\" let-rowData let-fileSetting=\"fileSetting\">\n <file-upload *ngIf=\"fileSetting.control.mode == FileUploadMode.usingFileInstanceId\"\n [sharedFolderType]=\"fileSetting.control.sharedFolderType\" [readonly]=\"fileSetting.control.readonly\"\n [accept]=\"fileSetting.control.accept\" [(ngModel)]=\"rowData[field]\"\n (onChanged)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.CHANGE)\"\n (onInit)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.INIT)\"\n (onSelect)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.SELECT)\"\n (onRemove)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.DELETED)\">\n </file-upload>\n\n <service-file-upload *ngIf=\"fileSetting.control.mode == FileUploadMode.usingServiceFile\"\n [serviceCode]=\"fileSetting.control.serviceCode\" [parentContext]=\"context\" [entity]=\"fileSetting.control.entity\"\n [entityKey]=\"rowData[fileSetting.control.entityKeyField]\" [control]=\"fileSetting.control\"\n [fileDataService]=\"fileSetting.control.fileDataService\" [(ngModel)]=\"rowData.field\"\n (onChanged)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.CHANGE)\"\n (onInit)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.INIT)\"\n (onSelect)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.SELECT)\"\n (onRemove)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.DELETED)\">\n </service-file-upload>\n</ng-template>\n<ng-template #fileManagerColumn let-rowData let-fileSetting=\"fileSetting\" let-field=\"field\">\n <file-manager [control]=\"fileSetting.control\" [serviceCode]=\"fileSetting.control.serviceCode\"\n [entity]=\"fileSetting.control.entity\" [entityKey]=\"rowData[fileSetting.control.entityKeyField]\"\n [readonly]=\"fileSetting.control.readonly\" [layout]=\"fileSetting.control.layout\"\n [fileDataService]=\"fileSetting.control.fileDataService\" [maxFileSize]=\"fileSetting.control.maxFileSize\"\n [inTaiLieu]=\"fileSetting.control.inTaiLieu\" [(value)]=\"rowData[field]\" [disabled]=\"fileSetting.control.disabled\"\n (onChanged)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.CHANGE)\"\n (onInit)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.INIT)\"\n (onSelect)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.SELECT)\"\n (onRemove)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.DELETED)\"\n (uploaded)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.UPLOADED)\">\n </file-manager>\n</ng-template>",
|
|
25598
|
+
template: "<div #container class=\"custom-card card card-w-title flex-container-fit-child\" [attr.height-type]=\"setting.heightType\"\n [ngStyle]=\"_style\">\n <div class=\"ui-helper-clearfix crud-list-header-area\">\n <div *ngIf=\"!setting.hiddenSearch\">\n <div *ngIf=\"searchCustom\" class=\"p-grid ui-fluid custom-p-col custom-search-area\">\n <div class=\"p-col-12 main-container-search\">\n <div class=\"p-grid main-container-search-inner\">\n <ng-container *ngIf=\"!setting.useCommonSearch\">\n <ng-container *ngTemplateOutlet=\"searchCustom; context: {$implicit: this}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n <div *ngIf=\"setting.useCommonSearch && !hasTemplate('searchCustom')\"\n class=\"p-grid ui-fluid custom-p-col custom-search-area\">\n <div class=\"p-col-12 main-container-search\">\n <div class=\"p-grid main-container-search-inner\">\n <div style=\"width: 100%;\">\n <common-search-form #commonSearch [parentSetting]=\"setting\" [parentModel]=\"model\"\n [templateFilter]=\"templateFilter\" [parentContext]=\"context\"\n [searchBoxTooltip]=\"setting.toolTipSearhBoxCommon\"\n (onClickSearch)=\"handleSearch($event)\"></common-search-form>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"!setting.hiddenHeader\" class=\"p-grid ui-fluid custom-p-col page-title-area\">\n <div *ngIf=\"!setting.hiddenPageTitle\" class=\"main-title\">\n <h1 *ngIf=\"!hasTemplate('customTitle')\">\n {{setting.title != null ? setting.title : 'Danh s\u00E1ch ' + setting.objectName}}\n </h1>\n\n <ng-container *ngIf=\"hasTemplate('customTitle')\" [ngTemplateOutlet]=\"getTemplate('customTitle')\"\n [ngTemplateOutletContext]=\"{\n crudList: this,\n buttonAdd: buttonAdd, buttonExport: buttonExport, buttonDelete: buttonDelete\n }\">\n </ng-container>\n </div>\n\n <div *ngIf=\"!setting.hiddenPageSetting\" class=\"paginator-table\">\n <ng-container *ngIf=\"!paginationTemplate\">\n <paging-next-back-only [model]=\"model\" [setting]=\"setting\" (onChanged)=\"getData()\"\n (onChangeLimitPage)=\"savePageSize()\">\n </paging-next-back-only>\n </ng-container>\n <ng-container *ngIf=\"paginationTemplate\">\n <ng-container [ngTemplateOutlet]=\"paginationTemplate\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n <div *ngIf=\"hasTemplate('topGrid')\" class=\"extend-content-top-grid\">\n <ng-container [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\n [ngTemplateOutlet]=\"getTemplate('topGrid')\"></ng-container>\n </div>\n <div class=\"fit-content crud-list-body-area\">\n <div class=\"crud-list-body-area-inner\" style=\"overflow: unset;\">\n <div class=\"flex-container-fit-child\" style=\"overflow: unset;\">\n <div *ngIf=\"!setting.hiddenToolbar && isBtnReady\" class=\"p-grid crudListToolbar\">\n <ng-container>\n <div *ngIf=\"!setting.hiddenButtons && hasTemplate('toolbar')\"\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\n class=\"p-col-12 button-group function-topbar custom-toolbar\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('toolbar')\" [ngTemplateOutletContext]=\"{\n selectedItems: model.selectedItems, crudList: this,\n buttonAdd: buttonAdd, buttonExport: buttonExport, buttonDelete: buttonDelete\n }\">\n </ng-container>\n </div>\n <div *ngIf=\"!setting.hiddenButtons && !hasTemplate('toolbar')\"\n [ngClass]=\"setting.hiddenAdvanceSearch ? 'p-md-12 p-lg-12' : 'p-md-7 p-lg-8'\"\n class=\"p-col-12 button-group function-topbar\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('buttonBeforeToolbar')\"\n [ngTemplateOutletContext]=\"{crudList: this}\"></ng-container>\n <button type=\"button\" pButton label=\"\u0110\u00E1nh STT\" class=\"p-button-text\" style=\"display: none\"\n (click)=\"danhSoThuTuGroupLastest()\"></button>\n <ng-container *ngIf=\"!hiddenAdd\" [ngTemplateOutlet]=\"buttonAdd\"></ng-container>\n <ng-container *ngIf=\"setting.showExportSelectedItems\" [ngTemplateOutlet]=\"buttonExport\">\n </ng-container>\n <ng-container *ngIf=\"setting.showExportWordSelectedItems\"\n [ngTemplateOutlet]=\"buttonExportWord\">\n </ng-container>\n <ng-container *ngIf=\"!hiddenDelete\" [ngTemplateOutlet]=\"buttonDelete\">\n </ng-container>\n <ng-container *ngIf=\"!hiddenReorder\" [ngTemplateOutlet]=\"buttonReorder\">\n </ng-container>\n <button *ngIf=\"!setting.disableShare && model.selectedItems.length > 0\"\n label=\"Chia s\u1EBB li\u00EAn k\u1EBFt\" type=\"button\" pButton pRipple\n [pTooltip]=\"'Chia s\u1EBB li\u00EAn k\u1EBFt' | translate\" tooltipPosition=\"top\"\n class=\"p-button-text p-button-info link-or-action\" icon=\"pi pi-link\"\n (click)=\"createShareLinkMultiple()\"></button>\n <ng-container [ngTemplateOutlet]=\"getTemplate('buttonAfterToolbar')\"\n [ngTemplateOutletContext]=\"{crudList: this}\"></ng-container>\n\n <ng-container *ngIf=\"isSuperUser\" [ngTemplateOutlet]=\"buttonAuthorize\">\n </ng-container>\n </div>\n </ng-container>\n <div *ngIf=\"!setting.hiddenAdvanceSearch && !setting.useCommonSearch\"\n class=\"p-col-12 advance-search-container\"\n [ngClass]=\"setting.hiddenButtons ? 'p-md-12 p-lg-12' : 'p-md-5 p-lg-4'\">\n <advance-search #advanceSearch [parentSetting]=\"setting\" [searchInfo]=\"searchInfo\"\n [loading]=\"model.loading\" (onSearch)=\"handleSearchAdvs($event)\"\n (onInit)=\"handleInitAdvanceSearch($event)\">\n </advance-search>\n </div>\n </div>\n <div *ngIf=\"hasTemplate('topGrid')\" class=\"extend-content-top-grid\">\n <ng-container [ngTemplateOutletContext]=\"{selectedItems: model.selectedItems, crudList: this}\"\n [ngTemplateOutlet]=\"getTemplate('topGrid')\"></ng-container>\n </div>\n <div class=\"container-table fit-content\" [class.--table-responsive]=\"responsive\">\n <div class=\"container-table-inner\">\n <ng-container *ngIf=\"!_groupField\">\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\n [showScrollHorizontal]=\"showScrollHorizontal\">\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('afterCrudList')\"></ng-container>\n </ng-container>\n </tn-custom-scrollbar>\n <div *ngIf=\"!showScrollBar\">\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldFalse\">\n </ng-container>\n </div>\n </ng-container>\n <ng-container *ngIf=\"_groupField\">\n <tn-custom-scrollbar *ngIf=\"showScrollBar\" #scrollbar [config]=\"configScrollBar\"\n [showScrollHorizontal]=\"showScrollHorizontal\">\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('afterCrudList')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('afterCrudList')\"></ng-container>\n </ng-container>\n </tn-custom-scrollbar>\n <div *ngIf=\"!showScrollBar\">\n <ng-container *ngTemplateOutlet=\"tableGetGroupFieldTrue\">\n </ng-container>\n </div>\n </ng-container>\n\n <div class=\"table-border-line --top\"></div>\n <div class=\"table-border-line --right\"></div>\n <div class=\"table-border-line --bottom\"></div>\n <div class=\"table-border-line --left\"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n<after-view-checked (loaded)=\"handleReady()\"></after-view-checked>\n<settings *ngIf=\"_showSettings && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveSettings($event)\"\n (onDelete)=\"onDeleteSettings()\" (onCancel)=\"_showSettings = false\">\n</settings>\n<settings-row *ngIf=\"_showSettingsRowColor && !setting.hiddenSetting\" [entityMetadataService]=\"entityMetadataService\"\n [parentContext]=\"context\" [parentSetting]=\"setting\" [parentModel]=\"model\" (onSave)=\"onSaveColorSettings($event)\"\n (onCancel)=\"_showSettingsRowColor = false\">\n</settings-row>\n<!-- <workflow-setting-dialog *ngIf=\"_showSettingsWorkflow && !setting.hiddenSettingWorkflow\" [parentSetting]=\"setting\"\n [parentContext]=\"context\" [parentModel]=\"model\" (onSaved)=\"onSaveWorkflowSettings($event)\"\n (onRemoved)=\"onRemoveWorkflowSettings($event)\" (onCancel)=\"_showSettingsWorkflow = false\">\n</workflow-setting-dialog> -->\n<div #workflowSettingDialog *ngIf=\"_showSettingsWorkflow && !setting.hiddenSettingWorkflow\"></div>\n<tn-dialog #dialogWfSettingNew [visible]=\"workflowSettingModel.showEditForm\"\n [header]=\"'C\u1EA5u h\u00ECnh quy tr\u00ECnh nghi\u1EC7p v\u1EE5' | translate\" [popupSize]=\"workflowSettingModel.popupSize\"\n (onHide)=\"workflowSettingModel.showEditForm = false\">\n <!-- <workflow-setting-new #formBase [parentSetting]=\"setting\" (onSaved)=\"onSaveWorkflowSettingsNew($event)\"\n (onCancel)=\"workflowSettingModel.showEditForm = false\"></workflow-setting-new> -->\n <div #workflowsettingnew></div>\n</tn-dialog>\n<entity-permission *ngIf=\"_showSettingsPermission && !setting.hiddenSettingPermission\" [parentSetting]=\"setting\"\n [parentContext]=\"context\" [parentModel]=\"model\" [searchInfo]=\"searchInfo\"\n (onCancel)=\"_showSettingsPermission = false\">\n</entity-permission>\n<p-contextMenu #contextMenu [appendTo]=\"'body'\" [styleClass]=\"'allow-selected'\" [model]=\"buttonContexts\">\n</p-contextMenu>\n<tn-dialog #dialogProcessWorkflowForm [visible]=\"processWorkflowModel.showEditForm\"\n [header]=\"processWorkflowModel.header | translate\" [popupSize]=\"processWorkflowModel.popupSize\"\n [scrollBarStyleClass]=\"'fit-content'\" (onHide)=\"processWorkflowModel.showEditForm = false\">\n <div style=\"height: 100%; padding: 1rem\">\n <!-- <process-workflow-form #formBase [businessSetting]=\"processWorkflowModel.data.setting\" [item]=\"currentItem\"\n [workflow]=\"processWorkflowModel.data.workflow\" [action]=\"processWorkflowModel.data.action\"\n (onSaved)=\"handleProcessedWorkflowBase()\" (onCancel)=\"processWorkflowModel.showEditForm = false\">\n </process-workflow-form> -->\n <div #processWorkflowForm></div>\n </div>\n</tn-dialog>\n<tn-dialog #dialogChoYKienForm [visible]=\"choYKienModel.showEditForm\" [header]=\"choYKienModel.header | translate\"\n [popupSize]=\"choYKienModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\n (onHide)=\"choYKienModel.showEditForm = false\">\n <div style=\"height: 100%\">\n <!-- <cho-y-kien-form #formBase [bussinessSetting]=\"choYKienModel.data.setting\"\n [rowItem]=\"choYKienModel.data.rowData\" (onSaved)=\"choYKienModel.showEditForm = false\"\n (onCancel)=\"choYKienModel.showEditForm = false\">\n </cho-y-kien-form> -->\n <div #choYKienForm></div>\n </div>\n</tn-dialog>\n<tn-dialog *ngIf=\"buttonAuthorizeModel.showEditForm\" #dialog [header]=\"buttonAuthorizeModel.header | translate\"\n [popupSize]=\"buttonAuthorizeModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\n (onHide)=\"handleCloseAuthorizeButtonForm()\">\n <settings-authorize-button [authorizeButtonKey]=\"authorizeButtonKey\"\n [dataSource]=\"buttonAuthorizeModel.data.dataSource\"></settings-authorize-button>\n</tn-dialog>\n\n<tn-dialog [visible]=\"workflowHistoryModel.showEditForm\" [header]=\"workflowHistoryModel.header | translate\"\n [popupSize]=\"workflowHistoryModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\n (onHide)=\"workflowHistoryModel.showEditForm = false\">\n <div style=\"height: 100%\">\n <!-- <workflow-history-new #formBase [businessSetting]=\"workflowHistoryModel.data.setting\"\n [tableName]=\"workflowHistoryModel.data.tableName\" [item]=\"currentItem\"\n [workflowSetting]=\"workflowHistoryModel.data.workflowSetting\"\n (onCancel)=\"workflowHistoryModel.showEditForm = false\">\n </workflow-history-new> -->\n <div #workflowHistoryNew></div>\n </div>\n</tn-dialog>\n<tn-dialog #dialogDetailTask [visible]=\"detailTaskModel.showEditForm\" [header]=\"detailTaskModel.header | translate\"\n [popupSize]=\"detailTaskModel.popupSize\" [scrollBarStyleClass]=\"'fit-content'\"\n (onHide)=\"detailTaskModel.showEditForm = false\">\n <!-- <base-congviec-form #formBase [model]=\"detailTaskModel.data.taskFormModel\" [forceOnlyView]=\"true\"\n (onCancel)=\"detailTaskModel.showEditForm = false\">\n </base-congviec-form> -->\n <div #detailTask></div>\n</tn-dialog>\n\n<tn-dialog #dialogPermissionSharing [visible]=\"permissionSharingModel.showEditForm\"\n [header]=\"permissionSharingModel.header | translate\" [popupSize]=\"permissionSharingModel.popupSize\"\n [scrollBarStyleClass]=\"'fit-content'\" (onHide)=\"permissionSharingModel.showEditForm = false\">\n <div style=\"height: 100%\">\n <!-- <permission-sharing #formBase [item]=\"rowDataCurrent\" [baseService]=\"setting.baseService\"\n (onCancel)=\"permissionSharingModel.showEditForm = false\">\n </permission-sharing> -->\n <div #permissionSharing></div>\n </div>\n</tn-dialog>\n<tn-dialog #dialogWorkflowPermission [visible]=\"permissionListModel.showEditForm\"\n [header]=\"permissionListModel.header | translate\" [popupSize]=\"permissionListModel.popupSize\"\n [scrollBarStyleClass]=\"'fit-content'\" [useDefaultScrollBar]=\"true\"\n (onHide)=\"permissionListModel.showEditForm = false\">\n <div style=\"height: 100%\">\n <!-- <workflow-permission #formBase [item]=\"rowDataCurrent\" [businessSetting]=\"setting\"\n (onCancel)=\"permissionListModel.showEditForm = false\">\n </workflow-permission> -->\n <div #workflowPermission></div>\n </div>\n</tn-dialog>\n<!-- <workflow-history-dialog *ngIf=\"showHistoryWorkflow\" [baseService]=\"setting.baseService\" [item]=\"currentItem\"\n [workflowSetting]=\"setting.workflowSetting\" (onHide)=\"handleHideHistoryWorkflow()\">\n</workflow-history-dialog> -->\n<div #workflowPermission *ngIf=\"showHistoryWorkflow\"></div>\n<tn-dialog #dialogstartWorkflow [visible]=\"startWorkflowModel.showEditForm\"\n [header]=\"startWorkflowModel.header | translate\" [popupSize]=\"startWorkflowModel.popupSize\"\n [scrollBarStyleClass]=\"'fit-content'\" (onHide)=\"startWorkflowModel.showEditForm = false\">\n <div style=\"height: 100%\">\n <!-- <start-workflow #formBase [workflows]=\"startWorkflowModel.data.workflows\"\n [defaultWorkflow]=\"startWorkflowModel.data.defaultWorkflow\"\n (onCancel)=\"startWorkflowModel.showEditForm = false\" (onSaved)=\"handleStartWorkflowFromDialog($event)\">\n </start-workflow> -->\n <div #startWorkflow></div>\n </div>\n</tn-dialog>\n<tn-dialog #dialogBaseCongViecForm [visible]=\"congViecModel.showEditForm\" [styleClass]=\"'congviec-form tn-form-dialog'\"\n [header]=\"congViecModel.header | translate\" [popupSize]=\"congViecModel.popupSize\"\n (onHide)=\"congViecModel.showEditForm = false\">\n <!-- <base-congviec-form #formBase [parentSetting]=\"congViecModel.data.congViecSetting\"\n [model]=\"congViecModel.data.model\" (onSaved)=\"congViecModel.showEditForm = false;getData()\"\n (onCancel)=\"congViecModel.showEditForm = false\">\n </base-congviec-form> -->\n <div #baseCongViecForm></div>\n</tn-dialog>\n<tn-dialog #dialog *ngIf=\"shareLinkModel.showEditForm\" [styleClass]=\"'congviec-form tn-form-dialog'\"\n [header]=\"shareLinkModel.header | translate\" [popupSize]=\"shareLinkModel.popupSize\" [useDefaultScrollBar]=\"true\"\n (onHide)=\"shareLinkModel.showEditForm = false\">\n <share-link-by-permission #formBase [setting]=\"setting\" [lstItem]=\"shareLinkModel.data.lstItem\"\n (onCancel)=\"congViecModel.showEditForm = false\">\n </share-link-by-permission>\n</tn-dialog>\n<tn-dialog #dialogBaseCongViec [visible]=\"attachedTaskModel.showEditForm\"\n [header]=\"attachedTaskModel.header | translate\" [popupSize]=\"attachedTaskModel.popupSize\"\n [useDefaultScrollBar]=\"true\" (onHide)=\"attachedTaskModel.showEditForm = false\">\n <!-- <base-congviec [serviceCode]=\"setting.baseService.serviceCode\" [entity]=\"setting.baseService.entityName\"\n [itemIdAttach]=\"rowDataCurrent.id\"></base-congviec> -->\n <div #baseCongViec></div>\n</tn-dialog>\n<ng-template #tableGetGroupFieldFalse>\n <p-table #table [dataKey]=\"'id'\" [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\"\n [columns]=\"setting.cols\" [paginator]=\"false\" [value]=\"_dataSource\" (onSort)=\"onSort($event, table)\"\n [class]=\"_tableClass\" [responsive]=\"responsive\" [lazy]=\"lazy\" [loading]=\"model.loading\"\n [expandedRowKeys]=\"model.expandedRowKeys\" [(selection)]=\"model.selectedItems\"\n (onRowReorder)=\"handleRowOrdered($event)\">\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"!colgroup\" pTemplate=\"colgroup\" let-columns>\n <ng-container *ngTemplateOutlet=\"baseColgroup; context: {$implicit: columns}\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\n <ng-container\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll}\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\n <ng-container *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll}\">\n </ng-container>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-index=\"rowIndex\" let-expanded=\"expanded\">\n <ng-container\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: expanded, eventSelectRow: handleSelectRow, eventChecked: handleCheckRowData}\">\n </ng-container>\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\n (loaded)=\"handleTableRendered()\">\n </after-view-checked>\n </ng-template>\n <ng-template *ngIf=\"rowExpansion\" pTemplate=\"rowexpansion\" let-rowData let-expanded=\"expanded\">\n <ng-container\n *ngTemplateOutlet=\"rowExpansion; context: {$implicit: rowData, expanded: expanded, getColSpanGroup: getColSpanGroup}\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\n </ng-template>\n </p-table>\n</ng-template>\n<ng-template #tableGetGroupFieldTrue>\n <p-table #tableGroup [scrollable]=\"pTableScrollable\" [scrollHeight]=\"pTableScrollHeight\" [columns]=\"setting.cols\"\n [paginator]=\"false\" [value]=\"_dataSource\" [metaKeySelection]=\"false\" (onSort)=\"onSort($event, tableGroup)\"\n [class]=\"_tableClass\" [customSort]=\"true\" [responsive]=\"responsive\" [lazy]=\"true\" [loading]=\"model.loading\"\n [(selection)]=\"model.selectedItems\" [expandedRowKeys]=\"model.expandedRowKeys\" [dataKey]=\"_groupField\">\n <ng-template *ngIf=\"colgroup\" pTemplate=\"colgroup\" let-columns>\n <ng-container *ngTemplateOutlet=\"colgroup; context: {$implicit: columns}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"!colgroup\" pTemplate=\"colgroup\" let-columns>\n <ng-container *ngTemplateOutlet=\"baseColgroup; context: {$implicit: columns}\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"header\" pTemplate=\"header\" let-columns>\n <ng-container\n *ngTemplateOutlet=\"header, context: {$implicit: columns, crudList: this, rowHeaderFilter: rowHeaderFilter, contentTh: contentTh, containerSticky: containerSticky, funcCheckAll: handleCheckAll_Group}\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"!header\" pTemplate=\"header\" let-columns>\n <ng-container\n *ngTemplateOutlet=\"trHeader; context: {$implicit: columns, funcCheckAll: handleCheckAll_Group}\">\n </ng-container>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-rowIndex=\"rowIndex\" let-expanded=\"expanded\" let-columns=\"columns\">\n <tr *ngIf=\"rowGroupMetadata[rowData[_groupField]] && rowGroupMetadata[rowData[_groupField]].index == rowIndex\"\n class=\"p-widget-header group-row\" style=\"border: 0px; border-bottom: 1px solid #eee\">\n <td *ngIf=\"!setting.hiddenCheckbox\" class=\"center chkbox\" [class.sticky]=\"setting.stickyColumn\">\n <p-checkbox [(ngModel)]=\"rowGroupChecked[rowData[_groupField]]\" binary=\"true\"\n (onChange)=\"handleCheckRowGroup(rowData)\">\n </p-checkbox>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n <ng-container *ngIf=\"!rowGroup\">\n <td [colSpan]=\"getColSpanGroup()\" [class]=\"_classRowGroup\">\n <div class=\"container-row-group\">\n <a href=\"javascript:;\" [pRowToggler]=\"rowData\" class=\"container-row-group-toggle\"\n [class.sticky]=\"setting.stickyColumn\">\n <i style=\"margin-right:5px\"\n [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\n <div class=\"content-row-group\">\n <ng-container *ngIf=\"!contentRowGroup\">\n <ng-container [ngTemplateOutlet]=\"_contentRowGroup\"\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"contentRowGroup\">\n <ng-container [ngTemplateOutlet]=\"contentRowGroup\"\n [ngTemplateOutletContext]=\"getContextRowGroup(rowData)\">\n </ng-container>\n </ng-container>\n </div>\n </a>\n </div>\n </td>\n </ng-container>\n <ng-container *ngIf=\"rowGroup\">\n <ng-container [ngTemplateOutlet]=\"rowGroup\"\n [ngTemplateOutletContext]=\"getContextRowGroupRoot(rowData, expanded)\">\n </ng-container>\n </ng-container>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" let-columns=\"columns\" let-rowData let-index=\"rowIndex\">\n <ng-container\n *ngTemplateOutlet=\"trBody; context: {$implicit: rowData, columns: columns, index: index, expanded: false, eventSelectRow: handleSelectRowGroup, eventChecked: handleCheckRowData_Group}\">\n </ng-container>\n <after-view-checked *ngIf=\"index == _dataSource.length - 1\" style=\"display: none;\" [renderKey]=\"_dataSource\"\n (loaded)=\"handleTableRendered()\">\n </after-view-checked>\n </ng-template>\n <ng-template *ngIf=\"summary\" pTemplate=\"summary\">\n <ng-container *ngTemplateOutlet=\"summary\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"footer\" pTemplate=\"footer\" let-columns>\n <ng-container *ngTemplateOutlet=\"footer; context: {$implicit: columns}\"></ng-container>\n </ng-template>\n </p-table>\n <after-view-checked></after-view-checked>\n</ng-template>\n<ng-template #baseColgroup let-columns>\n <colgroup>\n <col *ngIf=\"!setting.hiddenCheckbox\" [style.width]=\"widthCheckbox\" />\n <col *ngIf=\"!setting.hiddenOrderColumn\" [style.width]=\"widthOrderColumn\" />\n <col *ngIf=\"rowExpansion\" style=\"width: 2.5rem\" />\n <ng-container *ngFor=\"let col of columns; let i = index\">\n <col *ngIf=\"col && col.visible && col.field!='function'\" [style.width]=\"col.width\" />\n </ng-container>\n <col *ngIf=\"enableReorderRow\" style=\"width: 30px\" />\n <col *ngIf=\"!setting.hiddenFunctionColumn\" [style.width]=\"widthFunctionColumn || _widthFunctionColumn\" />\n </colgroup>\n</ng-template>\n<ng-template #buttonAdd>\n <button #buttonBase appAuthorize type=\"button\" pButton pRipple label=\"Th\u00EAm m\u1EDBi\" icon=\"pi pi-plus\"\n class=\"p-button-text\" [disabled]=\"!model.baseReady\" (click)=\"add()\"></button>\n</ng-template>\n<ng-template #buttonExport>\n <button #buttonBase appAuthorize *ngIf=\"model.selectedItems.length > 0\" type=\"button\" pButton pRipple\n label=\"Xu\u1EA5t c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn\" icon=\"fas fa-file-excel\" class=\"p-button-text p-button-success\"\n (click)=\"xuatCacMucDaChon()\"></button>\n</ng-template>\n<ng-template #buttonAuthorize>\n <button *ngIf=\"!setting.hiddenAuthorizeButton && authorizeButtonKey\" type=\"button\" pButton\n pRipple label=\"Ph\u00E2n quy\u1EC1n n\u00FAt\" icon=\"fas fa-tools\" class=\"p-button-text\"\n (click)=\"onShowFormSettingButton()\"></button>\n</ng-template>\n\n<ng-template #buttonExportWord>\n <button #buttonBase appAuthorize *ngIf=\"model.selectedItems.length > 0\" type=\"button\" pButton pRipple label=\"In c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn\"\n icon=\"fas fa-file-word\" class=\"p-button-text p-button-success\" (click)=\"printByReadingHtml()\"></button>\n</ng-template>\n<ng-template #buttonDelete>\n <button #buttonBase *ngIf=\"(!hiddenDelete && model.selectedItems.length > 0 && !disableMultipleDelete())\"\n appAuthorize type=\"button\" pButton pRipple label=\"X\u00F3a c\u00E1c m\u1EE5c \u0111\u00E3 ch\u1ECDn\" icon=\"pi pi-trash\"\n class=\"p-button-text p-button-danger\" (click)=\"deleteMutiple()\"></button>\n</ng-template>\n<ng-template #buttonReorder>\n <button #buttonBase\n *ngIf=\"showSaveReorder && enableReorderRow && (_sortField == setting.columnSetting.sortField || _sortDir == 0)\"\n appAuthorize type=\"button\" pButton pRipple label=\"L\u01B0u s\u1EAFp x\u1EBFp\" icon=\"pi pi-save\"\n class=\"p-button-text p-button-success\" (click)=\"saveReorder()\"></button>\n</ng-template>\n<ng-template #trHeader let-columns let-funcCheckAll=\"funcCheckAll\">\n <tr class=\"title-row\">\n <ng-container *ngIf=\"!setting.hiddenCheckbox\">\n <th class=\"chkbox link-or-action cell-checkbox\" [class.sticky]=\"setting.stickyColumn\">\n <button *ngIf=\"!hasTemplate('headerCheckbox') && !setting.useCommonSearch\" type=\"button\" pButton pRipple\n icon=\"pi pi-refresh\" class=\"p-button-rounded p-button-text btnReload\" pTooltip=\"L\u00E0m m\u1EDBi d\u1EEF li\u1EC7u\"\n tooltipPosition=\"top\" [disabled]=\"model.loading\" (click)=\"reload()\"></button>\n <p-triStateCheckbox *ngIf=\"setting.useCommonSearch\" [(ngModel)]=\"checkedAll\" binary=\"true\"\n (onChange)=\"funcCheckAll()\">\n </p-triStateCheckbox>\n <ng-container *ngIf=\"hasTemplate('headerCheckbox')\">\n <ng-container [ngTemplateOutletContext]=\"{crudList: this}\"\n [ngTemplateOutlet]=\"getTemplate('headerCheckbox')\"></ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"!setting.hiddenOrderColumn\" class=\"stt nopad center\" [class.sticky]=\"setting.stickyColumn\"\n (dblclick)=\"reload()\">\n {{ 'TT' |translate}}\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <th *ngIf=\"rowExpansion\" class=\"nopad row-expansion-toggle center\" style=\"width: 2.5rem\"\n [class.sticky]=\"setting.stickyColumn\">\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <ng-container *ngIf=\"hasTemplate('trHeaderBefore')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('trHeaderBefore')\"\n [ngTemplateOutletContext]=\"{$implicit: columns}\"></ng-container>\n </ng-container>\n <ng-container *ngFor=\"let col of columns; let i = index\">\n <th *ngIf=\"col && col.visible && col.field!='function'\" [ngStyle]=\"col.extendData.headerStyle\"\n [style.left]=\"col.isPinned && col.left ? (col.left + 'px') : ''\" [pTooltip]=\"col.fullLabel\"\n tooltipStyleClass=\"unset-width\" [class]=\"col.extendData.headerClass\"\n [className]=\"col.isPinned && col.width ? col.class : ''\" [class.first-th]=\"i==0\" [escape]=\"false\"\n tooltipPosition=\"top\" [tnSortableColumn]=\"col.field\" [tnSortableColumnDisabled]=\"!col.sort\">\n <ng-container *ngTemplateOutlet=\"contentTh; context: {$implicit: col}\"></ng-container>\n <ng-container *ngIf=\"col.sort || col.sortClient\">\n <ng-container *ngTemplateOutlet=\"sortIcon; context: {field: col.field}\"></ng-container>\n </ng-container>\n </th>\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('trHeaderAfter')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('trHeaderAfter')\"\n [ngTemplateOutletContext]=\"{$implicit: columns}\"></ng-container>\n </ng-container>\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <ng-container *ngTemplateOutlet=\"colFunctionHeader\"></ng-container>\n </tr>\n <ng-container *ngTemplateOutlet=\"rowHeaderFilter; context: {columns: columns, funcCheckAll: funcCheckAll}\">\n </ng-container>\n</ng-template>\n<ng-template #rowHeaderFilter let-columns=\"columns\" let-funcCheckAll=\"funcCheckAll\">\n <tr class=\"filter-row\" *ngIf=\"!setting.hiddenFilterRow\">\n <th *ngIf=\"!setting.hiddenCheckbox\" class=\"chkbox nopad center\" [class.sticky]=\"setting.stickyColumn\"\n [class.tricheckbox-custom-false]=\"checkedAll === false\">\n <p-triStateCheckbox [(ngModel)]=\"checkedAll\" binary=\"true\" (onChange)=\"funcCheckAll()\">\n </p-triStateCheckbox>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <th *ngIf=\"!setting.hiddenOrderColumn\" class=\"stt center v-top\" [class.sticky]=\"setting.stickyColumn\">\n <div *ngIf=\"!setting.hiddenSetting\" class=\"pick-color-row\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB m\u00E0u\"\n tooltipPosition=\"top\" (click)=\"showSettingRowColor()\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n </div>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <th *ngIf=\"rowExpansion\" class=\"nopad center row-expansion-toggle\" [class.sticky]=\"setting.stickyColumn\">\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <ng-container *ngFor=\"let col of columns; let i = index\">\n <th *ngIf=\"col.visible && col.field != 'function'\" class=\"cell-header-filter center\"\n [style.left]=\"col.isPinned && col.left ? (col.left + 'px') : ''\"\n [className]=\"col.isPinned && col.width ? col.class + ' cell-header-filter center': 'cell-header-filter center'\">\n <ng-container *ngIf=\"col.allowFilter\">\n <ng-container *ngIf=\"col.templateFilter\">\n <ng-container [ngTemplateOutlet]=\"col.templateFilter\"\n [ngTemplateOutletContext]=\"{col: col, filterData: filterData, onSearch: onSearch, onShowFilterDropdownPanel: onShowFilterDropdownPanel, onHideFilterDropdownPanel: onHideFilterDropdownPanel}\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!col.templateFilter\" [ngSwitch]=\"col.controlType\">\n <ng-container *ngSwitchCase=\"'dropdown'\">\n <ng-container [ngTemplateOutlet]=\"filterDropdown\"\n [ngTemplateOutletContext]=\"{col: col.rawColumn}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'number'\">\n <ng-container [ngTemplateOutlet]=\"filterNumber\" [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <ng-container [ngTemplateOutlet]=\"filterDate\"\n [ngTemplateOutletContext]=\"{col: col, control: filterSchema.dateRange}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'datetime'\">\n <ng-container [ngTemplateOutlet]=\"filterDate\"\n [ngTemplateOutletContext]=\"{col: col, control: filterSchema.dateTimeRange}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container [ngSwitch]=\"col.dataType\">\n <ng-container *ngSwitchCase=\"'int'\">\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'intWithoutMask'\">\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'decimal'\">\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'currency'\">\n <ng-container [ngTemplateOutlet]=\"filterNumber\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'date'\">\n <ng-container [ngTemplateOutlet]=\"filterDate\"\n [ngTemplateOutletContext]=\"{col: col, control: filterSchema.dateRange}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'datetime'\">\n <ng-container [ngTemplateOutlet]=\"filterDate\"\n [ngTemplateOutletContext]=\"{col: col, control: filterSchema.dateTimeRange}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'boolean'\">\n <ng-container [ngTemplateOutlet]=\"filterBoolean\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container [ngTemplateOutlet]=\"filterText\"\n [ngTemplateOutletContext]=\"{col: col}\">\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n </ng-container>\n <th *ngIf=\"enableReorderRow\" style=\"width: 30px\">\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n <ng-container *ngTemplateOutlet=\"buttonBaseSetting\"></ng-container>\n </tr>\n</ng-template>\n<ng-template #buttonBaseSetting>\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\n <th class=\"center setting-cell column-function\" [class.sticky]=\"setting.stickyColumn\">\n <button *ngIf=\"!setting.hiddenSetting\" type=\"button\" pButton pRipple icon=\"pi pi-cog\"\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh hi\u1EC3n th\u1ECB\" tooltipPosition=\"top\"\n (click)=\"showSettings()\"></button>\n <button *ngIf=\"!setting.hiddenSettingPermission\" type=\"button\" pButton pRipple icon=\"pi pi-users\"\n class=\"p-button-rounded p-button-text\" pTooltip=\"Ph\u00E2n quy\u1EC1n d\u1EEF li\u1EC7u\" tooltipPosition=\"left\"\n [disabled]=\"!checkPermissionToUseButton(BUTTON_PHAN_QUYEN)\" (click)=\"showSettingsPermission()\"></button>\n <button *ngIf=\"!setting.hiddenSettingWorkflow\" type=\"button\" pButton pRipple icon=\"pi pi-sitemap\"\n class=\"p-button-rounded p-button-text\" pTooltip=\"C\u1EA5u h\u00ECnh quy tr\u00ECnh\" tooltipPosition=\"left\"\n [disabled]=\"!checkPermissionToUseButton(BUTTON_CAU_HINH_QUY_TRINH)\"\n (click)=\"showSettingsWorkflowNew(dialogWfSettingNew)\"></button>\n <div *ngIf=\"setting.hiddenSetting && setting.hiddenSettingPermission && setting.hiddenSettingWorkflow\"\n class=\"cell-header-function\">\n <span>{{'GRID.FUNCTION'| translate}}</span>\n </div>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n </ng-container>\n\n</ng-template>\n<ng-template #colFunctionHeader>\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn\">\n <ng-container *ngIf=\"setting.hiddenFilterRow\">\n <ng-container *ngTemplateOutlet=\"buttonBaseSetting\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!setting.hiddenFilterRow\">\n <th class=\"column-function\" [class.sticky]=\"setting.stickyColumn\">\n <div class=\"cell-header-function\">\n <span>{{'GRID.FUNCTION'| translate}}</span>\n </div>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </th>\n </ng-container>\n </ng-container>\n</ng-template>\n<ng-template #contentTh let-col>\n <ng-container *ngIf=\"templateHeaderContent[col.field]\">\n <ng-container *ngTemplateOutlet=\"templateHeaderContent[col.field]\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"!templateHeaderContent[col.field]\">\n {{col.label}}\n </ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n</ng-template>\n<ng-template #trBody let-rowData let-columns=\"columns\" let-index=\"index\" let-expanded=\"expanded\"\n let-eventSelectRow=\"eventSelectRow\" let-eventChecked=\"eventChecked\">\n <tr *ngIf=\"!rowData.template\" [tnReorderableRow]=\"index\" [attr.rowIndex]=\"index\" [ngClass]=\"rowData.objStyleClass\"\n [class.ui-state-highlight]=\"rowData._checked\" [pTooltip]=\"rowData.tooltip\" tooltipPosition=\"top\"\n [tooltipStyleClass]=\"rowData.tooltipClass\" [escape]=\"escape\" (click)=\"eventSelectRow($event, rowData)\">\n <ng-container *ngIf=\"!setting.hiddenCheckbox && !rowData.hidden[fieldCheckbox]\">\n <td class=\"chkbox link-or-action cell-checkbox\" [class.sticky]=\"setting.stickyColumn\"\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldCheckbox]\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldCheckbox]\">\n <ng-container *ngIf=\"!rowData.hiddenCheckBox\">\n <ng-container *ngIf=\"!hasTemplate('checkbox')\">\n <p-checkbox [(ngModel)]=\"rowData._checked\" binary=\"true\" (onChange)=\"eventChecked(rowData)\">\n </p-checkbox>\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('checkbox')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('checkbox')\"\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n </ng-container>\n <td *ngIf=\"!setting.hiddenOrderColumn && !rowData.hidden[fieldOrder]\" class=\"stt\" style=\"text-align: center;\"\n [class.sticky]=\"setting.stickyColumn\" [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldOrder]\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldOrder]\">\n <span class=\"row-card\" [ngStyle]=\"rowData.bookmarkStyle\"></span>\n {{rowData[fieldOrder]}}\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n <td *ngIf=\"rowExpansion && !rowData.hidden[fieldColExpand]\" class=\"no-padding center row-expansion-toggle\"\n [class.sticky]=\"setting.stickyColumn\" [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldColExpand]\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldColExpand]\">\n <ng-container *ngTemplateOutlet=\"iconToggleRowData; context: {rowData: rowData, expanded: expanded}\">\n </ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n <ng-container *ngIf=\"!hasTemplate('dynamicColBodys')\">\n <ng-container *ngIf=\"hasTemplate('dynamicColBodysBefore')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('dynamicColBodysBefore')\"\n [ngTemplateOutletContext]=\"{$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\n </ng-container>\n </ng-container>\n <ng-container\n *ngTemplateOutlet=\"dynamicColBodys; context: {$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('dynamicColBodysAfter')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('dynamicColBodysAfter')\"\n [ngTemplateOutletContext]=\"{$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\n </ng-container>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasTemplate('dynamicColBodys')\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('dynamicColBodys')\"\n [ngTemplateOutletContext]=\"{$implicit: columns, rowData: rowData, index: index, expanded: expanded}\">\n </ng-container>\n </ng-container>\n <td *ngIf=\"enableReorderRow && !rowData.hidden[fieldColReorder]\" class=\"no-padding center\"\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldColReorder]\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldColReorder]\">\n <i class=\"fas fa-arrows-alt\" style=\"cursor:pointer; padding: 8px; color: #555;\" pReorderableRowHandle></i>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n <ng-container *ngIf=\"!setting.hiddenFunctionColumn && !rowData.hidden[fieldFunction]\">\n <td class=\"text-center column-function\" style=\"text-align: center;\" [class.sticky]=\"setting.stickyColumn\"\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[fieldFunction]\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[fieldFunction]\">\n <div *ngIf=\"hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\n <ng-container [ngTemplateOutlet]=\"getTemplate('function')\"\n [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"></ng-container>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </div>\n <div *ngIf=\"!hasTemplate('function')\" class=\"p-toolbar-group-center button-group\">\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\n [ngTemplateOutlet]=\"getTemplate('buttonBefore')\"></ng-container>\n <button *ngIf=\"setting.showVersionButton\" type=\"button\" pButton pRipple icon=\"pi pi-calendar\"\n class=\"p-button-rounded p-button-text p-button-success link-or-action\"\n pTooltip=\"Xem l\u1ECBch s\u1EED phi\u00EAn b\u1EA3n\" tooltipPosition=\"top\"\n (click)=\"showListVersion(rowData)\"></button>\n <button #buttonBase *ngIf=\"!rowData.hiddenEdit\" appAuthorize type=\"button\" pButton pRipple\n [disabled]=\"disableEdit(rowData)\" [pTooltip]=\"'FORM.EDIT' | translate\" tooltipPosition=\"top\"\n class=\"p-button-rounded p-button-text p-button-info link-or-action\" icon=\"pi pi-pencil\"\n (click)=\"edit(rowData)\"></button>\n <button #buttonBase *ngIf=\"!rowData.hiddenDelete\" appAuthorize type=\"button\" pButton pRipple\n [disabled]=\"disableDelete(rowData)\" [pTooltip]=\"'FORM.DELETE' | translate\" tooltipPosition=\"top\"\n class=\"p-button-rounded p-button-text p-button-danger link-or-action\" icon=\"pi pi-trash\"\n (click)=\"delete(rowData)\"></button>\n <ng-container *ngIf=\"!hiddenBtnFunction\">\n <button *ngIf=\"showMenuButtons && menuButtons\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\n class=\"link-or-action p-button-text p-button-info p-button-rounded\"\n pTooltip=\"Ch\u1EE9c n\u0103ng kh\u00E1c\" tooltipPosition=\"top\" [disabled]=\"rowData.disableFunctionRow\"\n (click)=\"showContextMenu($event, rowData)\"></button>\n </ng-container>\n <ng-container [ngTemplateOutletContext]=\"{rowData: rowData, rowIndex: index}\"\n [ngTemplateOutlet]=\"getTemplate('buttonAfter')\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n </ng-container>\n </tr>\n <ng-container *ngIf=\"rowData.template\">\n <ng-container *ngTemplateOutlet=\"rowData.template; context: {\n $implicit: rowData, columns: columns, index: index, expanded: expanded, eventSelectRow: eventSelectRow, eventChecked: eventChecked\n }\"></ng-container>\n </ng-container>\n</ng-template>\n<ng-template #dynamicColBodys let-columns let-rowData=\"rowData\" let-index=\"index\" let-expanded=\"expanded\">\n <ng-container *ngFor=\"let col of columns; let i = index\">\n <ng-container\n *ngTemplateOutlet=\"contentTd; context: {$implicit: rowData, col: col, index: index, i: i, expanded: expanded}\">\n </ng-container>\n </ng-container>\n</ng-template>\n<ng-template #contentTd let-rowData let-col=\"col\" let-index=\"index\" let-expanded=\"expanded\" let-i=\"i\">\n <td *ngIf=\"col && col.visible && col.field != 'function' && !rowData.hidden[col.field]\"\n [attr.colSpan]=\"rowData.colSpan && rowData.colSpan[col.field]\"\n [style.left]=\"col.isPinned && col.left ? (col.left + 'px') : ''\"\n [attr.rowSpan]=\"rowData.rowSpan && rowData.rowSpan[col.field]\" [ngStyle]=\"col.extendData.style\"\n [class]=\"col.cellClass\" [class.first-td]=\"i == 0\">\n <span *ngIf=\"col.pipe\">\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\n tooltipPosition=\"top\">{{col.label}}</span>\n {{rowData['pipe__' + col.field]}}\n </span>\n <span *ngIf=\"!col.pipe\" class=\"contentTd\">\n <span class=\"p-column-title\" [pTooltip]=\"col.fullLabel\" [escape]=\"false\"\n tooltipPosition=\"top\">{{col.label}}</span>\n <span *ngIf=\"setting.showEditLink && col.showEditLink\" [pTooltip]=\"config.tooltipView\" tooltipPosition=\"top\"\n class=\"link-or-action\">\n <ng-container *ngIf=\"col.click\">\n <a href=\"javascript:;\" (click)=\"col.click(rowData)\" [pTooltip]=\"config.tooltipView\"\n tooltipPosition=\"top\">\n <ng-container [ngTemplateOutlet]=\"contentCell\"\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\n </ng-container>\n </a>\n </ng-container>\n <ng-container *ngIf=\"!col.click\">\n <a href=\"javascript:;\" (click)=\"view(rowData)\" [pTooltip]=\"config.tooltipView\"\n tooltipPosition=\"top\">\n <ng-container [ngTemplateOutlet]=\"contentCell\"\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\n </ng-container>\n </a>\n </ng-container>\n </span>\n <span *ngIf=\"!setting.showEditLink || !col.showEditLink\" class=\"\">\n <ng-container [ngTemplateOutlet]=\"contentCell\"\n [ngTemplateOutletContext]=\"getContextCell(rowData, index, col, expanded, this)\">\n </ng-container>\n </span>\n </span>\n <ng-container *ngTemplateOutlet=\"containerSticky\"></ng-container>\n </td>\n</ng-template>\n<ng-template #contentCell let-col=\"col\" let-rowData=\"rowData\" let-rowIndex=\"rowIndex\" let-field=\"field\"\n let-expanded=\"expanded\">\n <ng-container *ngIf=\"col.template\">\n <ng-container [ngTemplateOutlet]=\"col.template\"\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded,this)\">\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!col.template\">\n <ng-container [ngSwitch]=\"col.dataType\">\n <span *ngSwitchCase=\"'color'\" style=\"display:block;text-align:center;\">\n <div [pTooltip]=\"rowData[field]\" tooltipPosition=\"top\" [ngStyle]=\"{'background-color':rowData[field]}\"\n style=\"width:30px;height:30px;margin:0 auto;\"></div>\n </span>\n <span *ngSwitchCase=\"'icon'\" style=\"display:block;text-align:center;\">\n <i [pTooltip]=\"rowData[field]\" tooltipPosition=\"top\" style=\"text-align: center;\"\n [ngClass]=\"rowData[field]\"></i>\n </span>\n <span *ngSwitchCase=\"'date'\" [pTooltip]=\"rowData[field] | date:'dd/MM/yyyy'\" tooltipPosition=\"top\">\n {{rowData[field] | tnDate:col.dataType:col.format}}\n </span>\n <span *ngSwitchCase=\"'datetime'\" [pTooltip]=\"rowData[field] | date:'dd/MM/yyyy HH:mm'\"\n tooltipPosition=\"top\">\n {{rowData[field] | tnDate:col.dataType:col.format}}\n </span>\n <span *ngSwitchCase=\"'int'\">\n {{rowData[field] | number}}\n </span>\n <span *ngSwitchCase=\"'intWithoutMask'\">\n {{rowData[field]}}\n </span>\n <span *ngSwitchCase=\"'currency'\">\n {{rowData[field] | currency:\"VND\"}}\n </span>\n <span *ngSwitchCase=\"'decimal'\">\n {{rowData[field] | number}}\n </span>\n <span *ngSwitchCase=\"'boolean'\">\n <p-checkbox class=\"boolean-data-type\" [(ngModel)]=\"rowData[field]\" binary=\"true\"\n [disabled]=\"col.disableCheckBox\">\n </p-checkbox>\n </span>\n <span *ngSwitchCase=\"'html'\">\n <div *ngIf=\"rowData[field]==null?'':rowData[field]\" [innerHTML]=\"rowData[field] | safeHtml\"></div>\n </span>\n <span *ngSwitchCase=\"'metadataStatus'\">\n <span *ngIf=\"rowData['rejectReason']\" class=\"label-danger\" [pTooltip]=\"rowData['rejectReason']\"\n tooltipStyleClass=\"unset-width\" [escape]=\"false\" tooltipPosition=\"top\">T\u1EEB ch\u1ED1i</span>\n <span *ngIf=\"rowData[field] == '0' && !rowData['rejectReason']\" class=\"label-secondary\">Ch\u01B0a\n duy\u1EC7t</span>\n <span *ngIf=\"rowData[field] == '1' && !rowData['rejectReason']\" class=\"label-warning\">Ch\u1EDD duy\u1EC7t</span>\n <span *ngIf=\"rowData[field] == '2'\" class=\"label-primary\">\u0110\u00E3 duy\u1EC7t</span>\n </span>\n <ng-container *ngSwitchCase=\"'fileUpload'\">\n <ng-container\n *ngTemplateOutlet=\"fileUploadColumn; context: {$implicit: rowData, field: col.field, fileSetting: col.fileSetting}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'fileManager'\">\n <ng-container\n *ngTemplateOutlet=\"fileManagerColumn; context: {$implicit: rowData, field: col.field, fileSetting: col.fileSetting}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"'string'\">\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchCase=\"null\">\n <ng-container *ngTemplateOutlet=\"contentCellString; context: {$implicit: rowData, field: col.field}\">\n </ng-container>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <ng-container [ngTemplateOutlet]=\"getComponentByType(col.dataType)\"\n [ngTemplateOutletContext]=\"getContextCell(rowData, rowIndex, col, expanded, this)\">\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n</ng-template>\n<ng-template #contentCellString let-rowData let-field=\"field\">\n <span>\n <!-- __sv: Short Value -->\n <ng-container *ngIf=\"rowData[field + '__sv']\">\n <ng-container *ngIf=\"!rowData[field + '__showFull']\">\n {{rowData[field + '__sv']}}\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\" pTooltip=\"B\u1EA5m \u0111\u1EC3 xem th\u00EAm\"\n tooltipPosition=\"top\">[...]</span>\n </ng-container>\n <ng-container *ngIf=\"rowData[field + '__showFull']\">\n {{rowData[field]}}\n <span class=\"toggle-showfull\" (click)=\"toggleShowFull(rowData, field)\">Thu g\u1ECDn</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!rowData[field + '__sv']\">\n {{rowData[field]}}\n </ng-container>\n </span>\n</ng-template>\n<ng-template #iconToggleRowGroup let-rowData=\"rowData\" let-expanded=\"expanded\">\n <a href=\"javascript:;\" (click)=\"handleToggleRow(rowData, $event)\">\n <i style=\"margin-right:5px\" [ngClass]=\"expanded ? 'fas fa-fw fa-caret-down' : 'fas fa-fw fa-caret-right'\"></i>\n </a>\n</ng-template>\n<ng-template #iconToggleRowData let-rowData=\"rowData\" let-expanded=\"expanded\">\n <button type=\"button\" pButton pRipple class=\"link-or-action p-button-text p-button-rounded p-button-plain\"\n [icon]=\"expanded ? 'pi pi-chevron-down' : 'pi pi-chevron-right'\"\n (click)=\"handleToggleRow(rowData, $event)\"></button>\n</ng-template>\n<ng-template #_contentRowGroup let-rowData=\"rowData\" let-groupCol=\"groupCol\" let-groupField=\"_groupField\">\n <ng-container [ngTemplateOutlet]=\"contentCell\"\n [ngTemplateOutletContext]=\"{rowData: rowData, col: groupCol, field: _groupField}\">\n </ng-container>\n <span *ngIf=\"setting.columnSetting.showGroupSize\">\n ({{rowGroupMetadata[rowData[_groupField]].size}})</span>\n</ng-template>\n<ng-template #trangThaiV5 let-rowData=\"rowData\">\n <div class=\"container-text-workflow\">\n <button *ngIf=\"!rowData.__workflowCode && !rowData.hiddenWorkflowAction && !rowData.hiddenStartWorkflow\" pButton\n class=\"p-button-text link-or-action\" label=\"B\u1EAFt \u0111\u1EA7u\" style=\"border: 1px solid #7ca9cd;\"\n pTooltip=\"B\u1EAFt \u0111\u1EA7u ch\u1EA1y quy tr\u00ECnh\" tooltipPosition=\"top\"\n [disabled]=\"rowData.__startingWorkflow && !rowData.__notReadyForStart\"\n (click)=\"showFormStartWorkflow(rowData, dialogstartWorkflow)\"></button>\n <ng-container *ngIf=\"rowData.__workflowCode\">\n <span class=\"content\">{{rowData.__textTrangThai}}</span>\n <button *ngIf=\"!rowData.hiddenWorkflowAction\" type=\"button\" pButton icon=\"pi pi-ellipsis-v\"\n class=\"link-or-action p-button-text p-button-rounded\" pTooltip=\"H\u00E0nh \u0111\u1ED9ng\" tooltipPosition=\"top\"\n [disabled]=\"showingActionWorkflow\"\n (click)=\"showActionWorkflow($event, rowData, dialogProcessWorkflowForm, dialogDetailTask, dialogChoYKienForm)\"></button>\n </ng-container>\n </div>\n</ng-template>\n<ng-template #viewHistory let-rowData=\"rowData\">\n <button pButton icon=\"pi pi-calendar\" class=\"p-button-text p-button-rounded link-or-action\" pTooltip=\"Xem l\u1ECBch s\u1EED\"\n tooltipPosition=\"top\" (click)=\"viewHistoryWorkflow(setting, rowData)\"></button>\n</ng-template>\n<ng-template #containerSticky>\n <span class=\"fix-sticky top\"></span>\n <span class=\"fix-sticky right\"></span>\n <!-- <span class=\"fix-sticky bottom\"></span> -->\n <span class=\"fix-sticky left\"></span>\n</ng-template>\n<ng-template #sortIcon let-field=\"field\">\n <i class=\"p-sortable-column-icon pi\" style=\"font-size: 0.8em;\"\n [ngClass]=\"{'pi-sort-amount-up-alt': field == _sortField && _sortDir === 1, 'pi-sort-amount-down': field == _sortField && _sortDir === -1, 'pi-sort-alt': field != _sortField || _sortDir === 0}\"></i>\n</ng-template>\n<ng-template #filterDropdown let-col=\"col\">\n <div #filterBox style=\"width: 100%; border-radius: 4px;\">\n <dropdown *ngIf=\"col && filterSchema.dropdown[col.field]\" [control]=\"filterSchema.dropdown[col.field]\"\n [dataSource]=\"filterSchema.dropdown[col.field].dataSource\" [(value)]=\"filterData[col.field]\"\n (onChanged)=\"prepareSearch(col)\" (onHideSmartEvent)=\"onSearch()\"\n (onShow)=\"onShowFilterDropdownPanel($event)\" (onHide)=\"onHideFilterDropdownPanel($event)\"\n (mousedown)=\"initFilterBoxFocus(filterBox)\"></dropdown>\n </div>\n</ng-template>\n<ng-template #filterText let-col=\"col\">\n <div #filterBox class=\"text-filter filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\n <div tabindex=\"-1\">\n <input pInputText type=\"text\" class=\"input-search\" [placeholder]=\"col.label\"\n [(ngModel)]=\"filterData[col.field]\" (change)=\"onSearch()\"\n (keyup.esc)=\"onClearSearch(filterBox, col.field)\">\n </div>\n <span [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] != null && filterData[col.field] !== ''}\"\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearSearch(filterBox, col.field)\"\n tabindex=\"-1\"><i class=\"pi pi-filter-slash\"></i></span>\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\n </after-view-checked>\n </div>\n</ng-template>\n<ng-template #filterNumber let-col=\"col\">\n <div #filterBox class=\"number-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\n <div tabindex=\"-1\">\n <tn-number-picker-range #numberRange [maskType]=\"col.dataType\" [(ngModel)]=\"filterData[col.field]\"\n [min]=\"col.min\" [max]=\"col.max\" [placeholder]=\"col.placeholder\" (change)=\"onSearch()\">\n </tn-number-picker-range>\n </div>\n <span\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\" (mousedown)=\"onClearNumberSearch(filterBox, numberRange)\"\n tabindex=\"-1\">\n <i class=\"pi pi-filter-slash\"></i></span>\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\n </after-view-checked>\n </div>\n</ng-template>\n<ng-template #filterDate let-col=\"col\" let-control=\"control\">\n <div #filterBox class=\"date-picker-range filter-box\" tabindex=\"-1\" (mousedown)=\"initFilterBoxFocus(filterBox)\">\n <div tabindex=\"-1\">\n <tn-datetime-picker-range #dateRange [control]=\"control\" (onChanged)=\"onChangeDateTime($event, col.field)\">\n </tn-datetime-picker-range>\n </div>\n <span\n [ngClass]=\"{'action-clear': true, 'dirty': filterData[col.field] && ((filterData[col.field][0] != null && filterData[col.field][0] !== '') || (filterData[col.field][1] != null && filterData[col.field][1] !== ''))}\"\n [pTooltip]=\"'B\u1ECF filter'\" tooltipPosition=\"top\"\n (mousedown)=\"onClearDateSearch(filterBox, dateRange, col.field)\" tabindex=\"-1\"><i\n class=\"pi pi-filter-slash\"></i></span>\n <after-view-checked style=\"display: none;\" (loaded)=\"initFilterBoxFocus(filterBox)\">\n </after-view-checked>\n </div>\n</ng-template>\n<ng-template #filterBoolean let-col=\"col\">\n <div class=\"filter-boolean-box\">\n <p-selectButton *ngIf=\"!col.minimizeFilter\"\n [options]=\"[{value: true, label: 'C\u00F3', icon: 'pi pi-check'}, {value: false, label: 'Kh\u00F4ng', icon: 'pi pi-times'}]\"\n [multiple]=\"true\" [(ngModel)]=\"filterData[col.field]\" (onChange)=\"onChangeBoolean($event, col.field)\">\n <ng-template let-item>\n <i style=\"padding: 3px 0;\" [class]=\"item.icon\"></i>\n </ng-template>\n </p-selectButton>\n <ng-container *ngIf=\"col.minimizeFilter\">\n <button *ngIf=\"!filterData[col.field]\" type=\"button\" pButton icon=\"pi pi-filter-slash\"\n class=\"btn-filter-boolean\" (click)=\"showCheckBoxFilterMenu($event, col.field)\"></button>\n <button *ngIf=\"filterData[col.field]\" type=\"button\" pButton icon=\"pi pi-filter\"\n class=\"btn-filter-boolean p-button-primary\"\n (click)=\"showCheckBoxFilterMenu($event, col.field)\"></button>\n </ng-container>\n </div>\n</ng-template>\n<ng-template #fileUploadColumn let-field=\"field\" let-rowData let-fileSetting=\"fileSetting\">\n <file-upload *ngIf=\"fileSetting.control.mode == FileUploadMode.usingFileInstanceId\"\n [sharedFolderType]=\"fileSetting.control.sharedFolderType\" [readonly]=\"fileSetting.control.readonly\"\n [accept]=\"fileSetting.control.accept\" [(ngModel)]=\"rowData[field]\"\n (onChanged)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.CHANGE)\"\n (onInit)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.INIT)\"\n (onSelect)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.SELECT)\"\n (onRemove)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.DELETED)\">\n </file-upload>\n\n <service-file-upload *ngIf=\"fileSetting.control.mode == FileUploadMode.usingServiceFile\"\n [serviceCode]=\"fileSetting.control.serviceCode\" [parentContext]=\"context\" [entity]=\"fileSetting.control.entity\"\n [entityKey]=\"rowData[fileSetting.control.entityKeyField]\" [control]=\"fileSetting.control\"\n [fileDataService]=\"fileSetting.control.fileDataService\" [(ngModel)]=\"rowData.field\"\n (onChanged)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.CHANGE)\"\n (onInit)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.INIT)\"\n (onSelect)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.SELECT)\"\n (onRemove)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.DELETED)\">\n </service-file-upload>\n</ng-template>\n<ng-template #fileManagerColumn let-rowData let-fileSetting=\"fileSetting\" let-field=\"field\">\n <file-manager [control]=\"fileSetting.control\" [serviceCode]=\"fileSetting.control.serviceCode\"\n [entity]=\"fileSetting.control.entity\" [entityKey]=\"rowData[fileSetting.control.entityKeyField]\"\n [readonly]=\"fileSetting.control.readonly\" [layout]=\"fileSetting.control.layout\"\n [fileDataService]=\"fileSetting.control.fileDataService\" [maxFileSize]=\"fileSetting.control.maxFileSize\"\n [inTaiLieu]=\"fileSetting.control.inTaiLieu\" [(value)]=\"rowData[field]\" [disabled]=\"fileSetting.control.disabled\"\n (onChanged)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.CHANGE)\"\n (onInit)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.INIT)\"\n (onSelect)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.SELECT)\"\n (onRemove)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.DELETED)\"\n (uploaded)=\"handleFieldValueChange(fileSetting, $event, rowData, eventType.UPLOADED)\">\n </file-manager>\n</ng-template>",
|
|
25377
25599
|
providers: [i3.DecimalPipe, i3.DatePipe],
|
|
25378
25600
|
styles: [".container-table{display:flex;overflow:hidden;flex-direction:column}.container-table .container-table-inner{display:flex;position:relative;height:auto;max-height:100%;min-height:60px}.container-table-inner>tn-custom-scrollbar{width:100%}.cell-checkbox{text-align:center}.pick-color-row{top:0;left:0;right:0;bottom:0;margin:auto;position:absolute;display:flex;flex-wrap:wrap;width:1.4em;height:1.4em;border:1px solid #d1d1d1;border-radius:2px;cursor:pointer}.pick-color-row>div{flex:0 0 50%;background:#84d140;border:1px solid #fff}.pick-color-row>div:nth-child(2){background:#fc6868}.pick-color-row>div:nth-child(3){background:#fbc02d}.pick-color-row>div:nth-child(4){background:#7dc5ff}.cell-header-function{display:flex;align-items:center}.cell-header-function>span{text-align:center;flex:1 1}.cell-header-function button{width:24px;height:24px;padding:0;margin:0}.group-icon{font-weight:400;color:#256aa2}.group-icon i{font-size:.8em;margin-right:5px}.center{text-align:center!important}.row-card{position:absolute;left:0;top:0;width:5px;height:100%}.column-function{min-width:100px;padding:0}.custom-search-area{margin:-.5em -1em .5em;padding-left:.5em;padding-right:.5em;background-color:#f2f2f2}.main-title>h1{font-size:1.2em}.filter-row>th:not(.sticky):not(.chkbox){padding:3px!important}.container-text-workflow{display:flex;align-items:center;justify-content:center}.container-text-workflow .link-or-action{color:#2196f3;cursor:pointer}.container-text-workflow .content{flex:1 1}.btnReload{height:2rem!important;width:2rem;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.toggle-showfull{color:#00f;cursor:pointer;font-size:.8rem;white-space:nowrap;font-weight:700}.col-share-permission>div:not(:last-child){margin-bottom:5px}.advance-search-container{display:flex;justify-content:flex-end}.btn-filter-boolean{width:26px;height:26px}.btn-filter-boolean:not(.p-button-primary),.btn-filter-boolean:not(.p-button-primary):hover{background:#f5f6f8;color:#6c757d;border-color:#ced4da}::ng-deep crud-list advance-search{display:block;flex:1;max-width:400px}::ng-deep crud-list .ps__rail-x,::ng-deep crud-list .ps__rail-y{z-index:5}::ng-deep crud-list .main-title>*>h1{font-size:1.2em}::ng-deep crud-list .p-datatable .p-datatable-thead>tr>th.cell-fixed-filter{z-index:999}::ng-deep crud-list .p-datatable .p-datatable-thead>tr>th.cell-fixed-filter .fixed-filter{z-index:10;position:fixed;min-width:200px}::ng-deep crud-list .p-datatable .p-datatable-thead>tr>th .container-icon-loading{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}::ng-deep crud-list .check-all-custom{position:absolute;width:0;height:0}::ng-deep crud-list .cell-header-filter{position:relative}::ng-deep crud-list .cell-header-filter .tn-dropdown{height:32px}::ng-deep crud-list .cell-header-filter tn-mask .p-inputtext{width:100%}::ng-deep crud-list .cell-header-filter .filter-box{display:flex;min-width:0;background-color:#fff;border-radius:3px}::ng-deep crud-list .cell-header-filter .filter-box>div{flex:1;border:1px solid #ced4da;border-right:none;border-radius:3px 0 0 3px;outline:none;overflow:hidden}::ng-deep crud-list .cell-header-filter .filter-box>span{cursor:pointer;min-width:unset;flex-basis:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;background:#f5f6f8;color:#6c757d;border:1px solid #ced4da;outline:none}::ng-deep crud-list .cell-header-filter .filter-box>span.action-clear{border-radius:0 3px 3px 0}::ng-deep crud-list .cell-header-filter .filter-box>span.action-clear.dirty{color:#008eff}::ng-deep crud-list .cell-header-filter .filter-box input{padding-left:5px;padding-right:5px;border:none;box-shadow:none!important}::ng-deep crud-list .cell-header-filter .filter-box:not(.no-transition){transition:min-width .1s}::ng-deep crud-list .cell-header-filter .filter-box.boolean-filter>div{flex:0 0 109px;width:109px}::ng-deep crud-list .cell-header-filter .p-multiselect-label.p-placeholder{padding-left:.5rem;padding-right:.5rem}::ng-deep crud-list .cell-header-filter.focus-within,::ng-deep crud-list .cell-header-filter:focus-within{z-index:10!important}::ng-deep crud-list .cell-header-filter.focus-within .filter-boolean-box .p-button,::ng-deep crud-list .cell-header-filter:focus-within .filter-boolean-box .p-button{z-index:10}::ng-deep crud-list .cell-header-filter.focus-within .filter-box>div,::ng-deep crud-list .cell-header-filter:focus-within .filter-box>div{box-shadow:0 0 0 .2rem #a6d5fa;border-color:#2196f3;z-index:0}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box{position:absolute;top:calc(50% - 16px);min-width:250px;z-index:2;box-shadow:5px 0 15px 1px rgba(0,0,0,.27058823529411763)}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box>div,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box>div{flex:1;box-shadow:0 0 0 .2rem #a6d5fa;border-color:#2196f3;z-index:0}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box>span.action-clear,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box>span.action-clear{display:flex}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box.boolean-filter,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box.boolean-filter{min-width:140px}::ng-deep crud-list .cell-header-filter.focus-within .short-filter-box.boolean-filter>div,::ng-deep crud-list .cell-header-filter:focus-within .short-filter-box.boolean-filter>div{flex:0 0 109px;width:109px}::ng-deep crud-list .cell-header-filter.focus-within:nth-last-child(2) .short-filter-box,::ng-deep crud-list .cell-header-filter:focus-within:nth-last-child(2) .short-filter-box{left:50%;transform:translateX(-50%)}::ng-deep crud-list .cell-header-filter:last-child .filter-box{right:3px}::ng-deep crud-list .table-border-line{position:absolute;z-index:5;background-color:#eee}::ng-deep crud-list .table-border-line.--left,::ng-deep crud-list .table-border-line.--right{top:0;bottom:0;width:1px}::ng-deep crud-list .table-border-line.--bottom,::ng-deep crud-list .table-border-line.--top{left:0;right:0;height:1px}::ng-deep crud-list .table-border-line.--left{left:0}::ng-deep crud-list .table-border-line.--right{right:0}::ng-deep crud-list .table-border-line.--top{top:0}::ng-deep crud-list .table-border-line.--bottom{bottom:0}::ng-deep crud-list .filter-boolean-box{text-align:center}::ng-deep crud-list .filter-boolean-box .p-selectbutton{white-space:nowrap}::ng-deep crud-list .custom-search-area crud-form{width:100%}::ng-deep crud-list .custom-search-area .main-container-search-inner .container-control{overflow:hidden;padding-bottom:0}::ng-deep crud-list>p-contextmenu{display:none}::ng-deep crud-list .contentTd{overflow:hidden;display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical}@media (max-width:640px){::ng-deep crud-list .--table-responsive .p-datatable-wrapper{padding:1px}}"]
|
|
25379
25601
|
},] }
|
|
@@ -25686,6 +25908,7 @@
|
|
|
25686
25908
|
_this.hasCrudList = true;
|
|
25687
25909
|
_this.customGetData = false;
|
|
25688
25910
|
_this.readyToTrinhKy = false;
|
|
25911
|
+
_this.showAllButtons = false;
|
|
25689
25912
|
_this.plusUrl = '';
|
|
25690
25913
|
_this.dataSearchCommon = {};
|
|
25691
25914
|
_this.popupSizeMax = new PopupSize({ maximize: true });
|
|
@@ -25784,7 +26007,7 @@
|
|
|
25784
26007
|
};
|
|
25785
26008
|
ListBase.prototype.mergeInfoToColumnSchema = function () {
|
|
25786
26009
|
var _this = this;
|
|
25787
|
-
var i = 0, constWidth = 83, sumWidth = 0, widthColBefore = 0; // 83 tổng chiều dài checkbox + stt crud-list
|
|
26010
|
+
var i = 0, constWidth = 83, sumWidth = 0, widthColBefore = 0; // 83 tổng chiều dài checkbox + stt crud-list
|
|
25788
26011
|
if (this.setting.hiddenCheckbox)
|
|
25789
26012
|
constWidth -= 35;
|
|
25790
26013
|
if (this.setting.hiddenOrderColumn)
|
|
@@ -26112,6 +26335,7 @@
|
|
|
26112
26335
|
ListBase.prototype.processGetData = function (response) {
|
|
26113
26336
|
return __awaiter(this, void 0, void 0, function () {
|
|
26114
26337
|
var _a, dataSource, rawDataSource, resetSelectedItems;
|
|
26338
|
+
var _this = this;
|
|
26115
26339
|
return __generator(this, function (_b) {
|
|
26116
26340
|
switch (_b.label) {
|
|
26117
26341
|
case 0:
|
|
@@ -26147,11 +26371,26 @@
|
|
|
26147
26371
|
// this._getRefDataDropdown(this.model.dataSource);
|
|
26148
26372
|
// K dùng hàm ở trên vì đối với tree list thì model.dataSource đã bị tái cấu trúc
|
|
26149
26373
|
this._getRefDataDropdown(rawDataSource);
|
|
26374
|
+
setTimeout(function () {
|
|
26375
|
+
_this.setAuthorizeButtons();
|
|
26376
|
+
}, 10);
|
|
26150
26377
|
return [2 /*return*/];
|
|
26151
26378
|
}
|
|
26152
26379
|
});
|
|
26153
26380
|
});
|
|
26154
26381
|
};
|
|
26382
|
+
ListBase.prototype.setAuthorizeButtons = function () {
|
|
26383
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
26384
|
+
return __generator(this, function (_a) {
|
|
26385
|
+
if (this.setting.hiddenAuthorizeButton) {
|
|
26386
|
+
this.crudList.setBtnReady(true);
|
|
26387
|
+
return [2 /*return*/];
|
|
26388
|
+
}
|
|
26389
|
+
this.crudList.setAuthorizeButton(this.lstButtonElement['_results']);
|
|
26390
|
+
return [2 /*return*/];
|
|
26391
|
+
});
|
|
26392
|
+
});
|
|
26393
|
+
};
|
|
26155
26394
|
ListBase.prototype.beforeRenderDataSource = function (datasource) {
|
|
26156
26395
|
return datasource;
|
|
26157
26396
|
};
|
|
@@ -26869,6 +27108,7 @@
|
|
|
26869
27108
|
{ type: Boolean }
|
|
26870
27109
|
]; };
|
|
26871
27110
|
ListBase.propDecorators = {
|
|
27111
|
+
lstButtonElement: [{ type: i0.ViewChildren, args: ['button',] }],
|
|
26872
27112
|
contentCrudList: [{ type: i0.ViewChild, args: [CrudListComponent,] }],
|
|
26873
27113
|
contentTreeTable: [{ type: i0.ViewChild, args: [TreeTableComponent,] }],
|
|
26874
27114
|
parentModel: [{ type: i0.Input }],
|
|
@@ -38344,10 +38584,11 @@
|
|
|
38344
38584
|
]; };
|
|
38345
38585
|
|
|
38346
38586
|
var AuthorizeDirective = /** @class */ (function () {
|
|
38347
|
-
function AuthorizeDirective(_el, _permissionService, _userService, _moduleConfigService) {
|
|
38587
|
+
function AuthorizeDirective(_el, _permissionService, _userService, _commonService, _moduleConfigService) {
|
|
38348
38588
|
this._el = _el;
|
|
38349
38589
|
this._permissionService = _permissionService;
|
|
38350
38590
|
this._userService = _userService;
|
|
38591
|
+
this._commonService = _commonService;
|
|
38351
38592
|
this._moduleConfigService = _moduleConfigService;
|
|
38352
38593
|
this._permissionTypes = exports.PermissionTypes.CONTROL;
|
|
38353
38594
|
this.ignoreAdmin = false;
|
|
@@ -38375,13 +38616,16 @@
|
|
|
38375
38616
|
configurable: true
|
|
38376
38617
|
});
|
|
38377
38618
|
AuthorizeDirective.prototype.ngOnInit = function () {
|
|
38619
|
+
};
|
|
38620
|
+
AuthorizeDirective.prototype.ngAfterViewInit = function () {
|
|
38378
38621
|
var _this = this;
|
|
38379
|
-
|
|
38380
|
-
return;
|
|
38381
|
-
}
|
|
38622
|
+
this.setAuthorizeButton();
|
|
38382
38623
|
if (this._moduleCode) {
|
|
38383
38624
|
this.appCode = this._moduleCode;
|
|
38384
38625
|
}
|
|
38626
|
+
if (!this.enableAuthorize) {
|
|
38627
|
+
return;
|
|
38628
|
+
}
|
|
38385
38629
|
var currentUser = this._userService.getCurrentUser();
|
|
38386
38630
|
if (!currentUser || !(this.appCode)) {
|
|
38387
38631
|
console.log('Không đọc được user hoặc appCode');
|
|
@@ -38413,6 +38657,31 @@
|
|
|
38413
38657
|
}
|
|
38414
38658
|
});
|
|
38415
38659
|
};
|
|
38660
|
+
AuthorizeDirective.prototype.setAuthorizeButton = function () {
|
|
38661
|
+
var _a, _b, _c;
|
|
38662
|
+
var key = window.location.pathname.substring(1).toUpperCase().replace(/\//g, '_');
|
|
38663
|
+
if (i0.isDevMode()) {
|
|
38664
|
+
key = this.appCode + "_" + window.location.pathname.substring(1).toUpperCase();
|
|
38665
|
+
}
|
|
38666
|
+
// const componentName = this._element.closest(EnumProperties.CRUD_LIST)?.parentNode[EnumProperties.TAG_NAME];
|
|
38667
|
+
// if (componentName && !key.endsWith(componentName)) {
|
|
38668
|
+
// key += `_${componentName}`;
|
|
38669
|
+
// }
|
|
38670
|
+
var buttonText = (_b = (_a = this._element.getAttribute(exports.EnumProperties.LABEL)) !== null && _a !== void 0 ? _a : this._element.getAttribute(exports.EnumProperties.NG_REFLECT_TEXT)) !== null && _b !== void 0 ? _b : this._element.getAttribute(exports.EnumProperties.NG_REFLECT_LABEL);
|
|
38671
|
+
if (!buttonText) {
|
|
38672
|
+
this.enableAuthorize = false;
|
|
38673
|
+
return;
|
|
38674
|
+
}
|
|
38675
|
+
this.buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');
|
|
38676
|
+
var permissionCode = "[" + key + "]_[" + this._commonService.convertStringToUnSign(buttonText).replace(/ /g, '_').toUpperCase() + "]";
|
|
38677
|
+
var isSetAuthorize = (_c = this.buttonSetting[key]) === null || _c === void 0 ? void 0 : _c.find(function (p) { return p.code == permissionCode; });
|
|
38678
|
+
if (isSetAuthorize) {
|
|
38679
|
+
this.permission = permissionCode;
|
|
38680
|
+
}
|
|
38681
|
+
else {
|
|
38682
|
+
this.enableAuthorize = false;
|
|
38683
|
+
}
|
|
38684
|
+
};
|
|
38416
38685
|
AuthorizeDirective.prototype.ngAfterContentChecked = function () {
|
|
38417
38686
|
if (this._label && !this._bind && this._element.innerHTML !== '' && this.keepHTML) {
|
|
38418
38687
|
this._label.innerHTML = this._element.innerHTML;
|
|
@@ -38431,6 +38700,7 @@
|
|
|
38431
38700
|
{ type: i0.ElementRef },
|
|
38432
38701
|
{ type: PermissionService },
|
|
38433
38702
|
{ type: UserService },
|
|
38703
|
+
{ type: CommonService },
|
|
38434
38704
|
{ type: ModuleConfigService }
|
|
38435
38705
|
]; };
|
|
38436
38706
|
AuthorizeDirective.propDecorators = {
|
|
@@ -49742,6 +50012,174 @@
|
|
|
49742
50012
|
parentSetting: [{ type: i0.Input }]
|
|
49743
50013
|
};
|
|
49744
50014
|
|
|
50015
|
+
var SettingAuthorizeButtonComponent = /** @class */ (function (_super) {
|
|
50016
|
+
__extends(SettingAuthorizeButtonComponent, _super);
|
|
50017
|
+
function SettingAuthorizeButtonComponent(_injector, _basePermissionService, _moduleConfigService) {
|
|
50018
|
+
var _this = _super.call(this, _injector) || this;
|
|
50019
|
+
_this._injector = _injector;
|
|
50020
|
+
_this._basePermissionService = _basePermissionService;
|
|
50021
|
+
_this._moduleConfigService = _moduleConfigService;
|
|
50022
|
+
_this.authorizeButtonKey = '';
|
|
50023
|
+
_this.dataSource = [];
|
|
50024
|
+
_this.appCode = '';
|
|
50025
|
+
return _this;
|
|
50026
|
+
}
|
|
50027
|
+
SettingAuthorizeButtonComponent.prototype.ngOnInit = function () {
|
|
50028
|
+
this.appCode = this._moduleConfigService.getConfig().appCode;
|
|
50029
|
+
this.setting.baseService = this._basePermissionService;
|
|
50030
|
+
this.customGetData = true;
|
|
50031
|
+
this.setting.hiddenAdvanceSearch = true;
|
|
50032
|
+
this.setting.hiddenHeader = true;
|
|
50033
|
+
this.setting.heightType = exports.HeightType.dynamic;
|
|
50034
|
+
this.setting.hiddenOrderColumn = true;
|
|
50035
|
+
this.setting.hiddenFilterRow = true;
|
|
50036
|
+
this.setting.hiddenSettingWorkflow = true;
|
|
50037
|
+
this.setting.hiddenAuthorizeButton = true;
|
|
50038
|
+
this.setting.hiddenSettingPermission = true;
|
|
50039
|
+
this.setting.fixHeightTypeInDialog = false;
|
|
50040
|
+
this.setting.hiddenCheckbox = false;
|
|
50041
|
+
this.setting.showEditLink = false;
|
|
50042
|
+
this.setting.modelSchemas = [
|
|
50043
|
+
new ModelSchema({
|
|
50044
|
+
field: 'permissionCode',
|
|
50045
|
+
name: 'Mã',
|
|
50046
|
+
}),
|
|
50047
|
+
new ModelSchema({
|
|
50048
|
+
field: 'rawText',
|
|
50049
|
+
name: 'Tên',
|
|
50050
|
+
}),
|
|
50051
|
+
new ModelSchema({
|
|
50052
|
+
field: 'isAuthorize',
|
|
50053
|
+
name: 'Đã tạo quyền',
|
|
50054
|
+
}),
|
|
50055
|
+
new ModelSchema({
|
|
50056
|
+
field: 'ma1',
|
|
50057
|
+
name: 'Mã',
|
|
50058
|
+
}),
|
|
50059
|
+
];
|
|
50060
|
+
this.setting.cols = [
|
|
50061
|
+
new ColumnSchemaBase({ field: 'permissionCode', sort: false, showEditLink: false }),
|
|
50062
|
+
new ColumnSchemaBase({ field: 'rawText', width: '230px', sort: false }),
|
|
50063
|
+
new ColumnSchemaBase({ field: 'isAuthorize', dataType: exports.DataType.boolean, width: '100px', sort: false }),
|
|
50064
|
+
];
|
|
50065
|
+
_super.prototype.ngOnInit.call(this);
|
|
50066
|
+
};
|
|
50067
|
+
SettingAuthorizeButtonComponent.prototype.getDataCustom = function (gridInfo) {
|
|
50068
|
+
this.model.dataSource = this.dataSource;
|
|
50069
|
+
this.afterGetData();
|
|
50070
|
+
};
|
|
50071
|
+
SettingAuthorizeButtonComponent.prototype.addBasePermission = function (rowData) {
|
|
50072
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
50073
|
+
var insertRes;
|
|
50074
|
+
return __generator(this, function (_a) {
|
|
50075
|
+
switch (_a.label) {
|
|
50076
|
+
case 0: return [4 /*yield*/, this._basePermissionService.post(rowData)];
|
|
50077
|
+
case 1:
|
|
50078
|
+
insertRes = _a.sent();
|
|
50079
|
+
if (insertRes.success) {
|
|
50080
|
+
this._notifierService.showSuccess('Thêm quyền thành công');
|
|
50081
|
+
this.updateDataSource(insertRes.data);
|
|
50082
|
+
return [2 /*return*/];
|
|
50083
|
+
}
|
|
50084
|
+
this._notifierService.showWarning('Có lỗi trong quá trình xử lý, vui lòng thử lại');
|
|
50085
|
+
return [2 /*return*/];
|
|
50086
|
+
}
|
|
50087
|
+
});
|
|
50088
|
+
});
|
|
50089
|
+
};
|
|
50090
|
+
SettingAuthorizeButtonComponent.prototype.deleteBasePermission = function (rowData) {
|
|
50091
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
50092
|
+
var _this = this;
|
|
50093
|
+
return __generator(this, function (_a) {
|
|
50094
|
+
this._notifierService.showConfirm('Xác nhận xóa quyền').then(function (res) { return __awaiter(_this, void 0, void 0, function () {
|
|
50095
|
+
var deleteRes;
|
|
50096
|
+
return __generator(this, function (_a) {
|
|
50097
|
+
switch (_a.label) {
|
|
50098
|
+
case 0:
|
|
50099
|
+
if (!res)
|
|
50100
|
+
return [2 /*return*/];
|
|
50101
|
+
return [4 /*yield*/, this._basePermissionService.delete(rowData.id)];
|
|
50102
|
+
case 1:
|
|
50103
|
+
deleteRes = _a.sent();
|
|
50104
|
+
if (deleteRes.success) {
|
|
50105
|
+
this._notifierService.showSuccess('Xóa quyền thành công');
|
|
50106
|
+
this.updateDataSource(rowData.id, true);
|
|
50107
|
+
return [2 /*return*/];
|
|
50108
|
+
}
|
|
50109
|
+
this._notifierService.showWarning(deleteRes.message);
|
|
50110
|
+
return [2 /*return*/];
|
|
50111
|
+
}
|
|
50112
|
+
});
|
|
50113
|
+
}); });
|
|
50114
|
+
return [2 /*return*/];
|
|
50115
|
+
});
|
|
50116
|
+
});
|
|
50117
|
+
};
|
|
50118
|
+
SettingAuthorizeButtonComponent.prototype.updateDataSource = function (id, isDeleted) {
|
|
50119
|
+
if (isDeleted === void 0) { isDeleted = false; }
|
|
50120
|
+
var currentRow = this.model.dataSource.find(function (p) { return p.id == id; });
|
|
50121
|
+
if (!currentRow)
|
|
50122
|
+
return;
|
|
50123
|
+
if (isDeleted) {
|
|
50124
|
+
currentRow.id = this._commonService.guid();
|
|
50125
|
+
}
|
|
50126
|
+
currentRow.isAuthorize = !isDeleted;
|
|
50127
|
+
this.afterGetData();
|
|
50128
|
+
};
|
|
50129
|
+
SettingAuthorizeButtonComponent.prototype.afterGetData = function () {
|
|
50130
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
50131
|
+
var _this = this;
|
|
50132
|
+
return __generator(this, function (_a) {
|
|
50133
|
+
this._unmarkLoading();
|
|
50134
|
+
if (!this.model.dataSource.length)
|
|
50135
|
+
return [2 /*return*/];
|
|
50136
|
+
this.model.dataSource.forEach(function (item) {
|
|
50137
|
+
item.name = item.rawText;
|
|
50138
|
+
item.code = item.permissionCode;
|
|
50139
|
+
item.moduleCode = _this.appCode;
|
|
50140
|
+
});
|
|
50141
|
+
return [2 /*return*/];
|
|
50142
|
+
});
|
|
50143
|
+
});
|
|
50144
|
+
};
|
|
50145
|
+
SettingAuthorizeButtonComponent.prototype.ngOnDestroy = function () {
|
|
50146
|
+
var _this = this;
|
|
50147
|
+
var buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');
|
|
50148
|
+
this.model.dataSource.forEach(function (rowData) {
|
|
50149
|
+
var buttonItem = buttonSetting[_this.authorizeButtonKey].find(function (p) { return p.code == rowData.code; });
|
|
50150
|
+
if (rowData.isAuthorize && !buttonItem) {
|
|
50151
|
+
buttonSetting[_this.authorizeButtonKey].push({
|
|
50152
|
+
id: rowData.id,
|
|
50153
|
+
code: rowData.code,
|
|
50154
|
+
});
|
|
50155
|
+
}
|
|
50156
|
+
else if (!rowData.isAuthorize && buttonItem) {
|
|
50157
|
+
var index = buttonSetting[_this.authorizeButtonKey].indexOf(buttonItem);
|
|
50158
|
+
buttonSetting[_this.authorizeButtonKey].splice(index, 1);
|
|
50159
|
+
}
|
|
50160
|
+
});
|
|
50161
|
+
sessionStorage.setItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE, JSON.stringify(buttonSetting));
|
|
50162
|
+
};
|
|
50163
|
+
return SettingAuthorizeButtonComponent;
|
|
50164
|
+
}(DataListBase));
|
|
50165
|
+
SettingAuthorizeButtonComponent.decorators = [
|
|
50166
|
+
{ type: i0.Component, args: [{
|
|
50167
|
+
selector: 'settings-authorize-button',
|
|
50168
|
+
template: "<crud-list #crudList [menuButtons]=\"getMenuButtons\" [model]=\"model\" [setting]=\"setting\" [dataSource]=\"model.dataSource\"\n [hiddenAdd]=\"true\" [hiddenDelete]=\"true\" [hiddenCopyLink]=\"true\" (onReload)=\"_triggerProcessData($event)\"\n (onAdd)=\"_add($event)\" (onEdit)=\"_edit($event)\" (onView)=\"_view($event)\" (onDelete)=\"_delete($event)\"\n (onDeleteMultiple)=\"_deleteMultiple($event)\" (onReloaded)=\"_handleReloaded($event)\" (onCopyLink)=\"_copyLink($event)\"\n (onCopyLinkMultiple)=\"_copyLinkMultiple()\">\n <ng-template #function let-rowData=\"rowData\">\n <button *ngIf=\"!rowData.isAuthorize\" class=\"p-button-rounded p-button-text p-button-info link-or-action\"\n type=\"button\" pButton icon=\"pi pi-plus\" pTooltip=\"Th\u00EAm m\u1EDBi\" (click)=\"addBasePermission(rowData)\"></button>\n <button *ngIf=\"rowData.isAuthorize\"\n class=\"p-button-rounded p-button-text p-button-danger p-button-info link-or-action\" type=\"button\" pButton\n icon=\"pi pi-trash\" pTooltip=\"X\u00F3a\" (click)=\"deleteBasePermission(rowData)\"></button>\n </ng-template>\n</crud-list>",
|
|
50169
|
+
providers: [ComponentContextService],
|
|
50170
|
+
styles: [""]
|
|
50171
|
+
},] }
|
|
50172
|
+
];
|
|
50173
|
+
SettingAuthorizeButtonComponent.ctorParameters = function () { return [
|
|
50174
|
+
{ type: i0.Injector },
|
|
50175
|
+
{ type: BasePermissionService },
|
|
50176
|
+
{ type: ModuleConfigService }
|
|
50177
|
+
]; };
|
|
50178
|
+
SettingAuthorizeButtonComponent.propDecorators = {
|
|
50179
|
+
authorizeButtonKey: [{ type: i0.Input }],
|
|
50180
|
+
dataSource: [{ type: i0.Input }]
|
|
50181
|
+
};
|
|
50182
|
+
|
|
49745
50183
|
var SettingsComponent = /** @class */ (function (_super) {
|
|
49746
50184
|
__extends(SettingsComponent, _super);
|
|
49747
50185
|
function SettingsComponent(_injector, _domService, _userService) {
|
|
@@ -53808,6 +54246,7 @@
|
|
|
53808
54246
|
TnAccordionTabComponent,
|
|
53809
54247
|
SplashComponentComponent,
|
|
53810
54248
|
SettingsWorkflowComponent,
|
|
54249
|
+
SettingAuthorizeButtonComponent,
|
|
53811
54250
|
SettingsWorkflowNo1Component,
|
|
53812
54251
|
CommonLibComponent
|
|
53813
54252
|
];
|
|
@@ -54015,6 +54454,7 @@
|
|
|
54015
54454
|
exports.BaseModule = BaseModule;
|
|
54016
54455
|
exports.BaseService = BaseService;
|
|
54017
54456
|
exports.BooleanFormatPipe = BooleanFormatPipe;
|
|
54457
|
+
exports.ButtonAction = ButtonAction;
|
|
54018
54458
|
exports.ButtonControlSchema = ButtonControlSchema;
|
|
54019
54459
|
exports.ButtonPermission = ButtonPermission;
|
|
54020
54460
|
exports.ButtonPermissions = ButtonPermissions;
|
|
@@ -54492,7 +54932,9 @@
|
|
|
54492
54932
|
exports["ɵdt"] = CheckReadyComponent;
|
|
54493
54933
|
exports["ɵdu"] = TnAccordionTabComponent;
|
|
54494
54934
|
exports["ɵdv"] = SettingsWorkflowComponent;
|
|
54495
|
-
exports["ɵdw"] =
|
|
54935
|
+
exports["ɵdw"] = SettingAuthorizeButtonComponent;
|
|
54936
|
+
exports["ɵdx"] = BasePermissionService;
|
|
54937
|
+
exports["ɵdy"] = SettingsWorkflowNo1Component;
|
|
54496
54938
|
exports["ɵe"] = ListBase;
|
|
54497
54939
|
exports["ɵf"] = ListComponentBase;
|
|
54498
54940
|
exports["ɵg"] = TreeTableComponent;
|