tnx-shared 5.3.245 → 5.3.247
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/tnx-shared.umd.js +15 -5
- 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/directives/authorize.directive.d.ts +3 -0
- package/directives/authorize.directive.d.ts.map +1 -1
- package/esm2015/directives/authorize.directive.js +14 -4
- package/esm2015/services/canbo-hoso.service.js +3 -3
- package/fesm2015/tnx-shared.js +15 -5
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/tnx-shared.metadata.json +1 -1
|
@@ -20758,7 +20758,7 @@
|
|
|
20758
20758
|
CanBoHoSoService.prototype.generatePickerControlSchema = function (control, enumCanBo) {
|
|
20759
20759
|
var _this = this;
|
|
20760
20760
|
if (enumCanBo === void 0) { enumCanBo = exports.EnumCanBo.TRONG_DON_VI; }
|
|
20761
|
-
var result = new AutoCompletePickerControlSchema(Object.assign({ field: 'idCanBo', label: 'Cán bộ', title: 'Chọn cán bộ', multiple: false, baseService: this, plusUrl: 'WithChucDanhChucVu', displayField: 'hoVaTen', fieldPlus: 'code', fieldSearchText: ['email', 'code'], funcGetLabel: function (item) {
|
|
20761
|
+
var result = new AutoCompletePickerControlSchema(Object.assign(Object.assign({ field: 'idCanBo', label: 'Cán bộ', title: 'Chọn cán bộ', multiple: false, baseService: this, plusUrl: 'WithChucDanhChucVu', displayField: 'hoVaTen', fieldPlus: 'code', fieldSearchText: ['email', 'code'], funcGetLabel: function (item) {
|
|
20762
20762
|
var result = item.hoVaTen;
|
|
20763
20763
|
if (item.code) {
|
|
20764
20764
|
result = item.code + " - " + result + " ";
|
|
@@ -20803,7 +20803,7 @@
|
|
|
20803
20803
|
break;
|
|
20804
20804
|
}
|
|
20805
20805
|
return filters;
|
|
20806
|
-
}, columns: this.lstEntityPickerColumn
|
|
20806
|
+
} }, control), { columns: __spreadArray(__spreadArray([], __read(this.lstEntityPickerColumn)), __read(control.columns)) }));
|
|
20807
20807
|
if (control.dataType == exports.EnumControlPickerType.DOITAC && !this.lstEntityPickerColumn.some(function (item) { return item.code == 'idDoiTac'; })) {
|
|
20808
20808
|
this.lstEntityPickerColumn.push(new EntityPickerColumn({
|
|
20809
20809
|
label: 'Đối tác',
|
|
@@ -38456,6 +38456,7 @@
|
|
|
38456
38456
|
// Dùng trong một số trường hợp code dùng chung template, buộc phải khai báo directive nhưng không phải element nào cũng cần check
|
|
38457
38457
|
this.enableAuthorize = true;
|
|
38458
38458
|
this.appCode = '';
|
|
38459
|
+
this.permissionChecked = false;
|
|
38459
38460
|
this._element = _el.nativeElement;
|
|
38460
38461
|
this.appCode = this._moduleConfigService.getConfig().appCode;
|
|
38461
38462
|
this.environment = this._moduleConfigService.getConfig().environment;
|
|
@@ -38478,13 +38479,15 @@
|
|
|
38478
38479
|
AuthorizeDirective.prototype.ngOnInit = function () {
|
|
38479
38480
|
};
|
|
38480
38481
|
AuthorizeDirective.prototype.ngAfterViewInit = function () {
|
|
38482
|
+
};
|
|
38483
|
+
AuthorizeDirective.prototype.permissionCheck = function () {
|
|
38481
38484
|
var _this = this;
|
|
38482
|
-
if (!this.permission) {
|
|
38483
|
-
this.setAuthorizeButton();
|
|
38484
|
-
}
|
|
38485
38485
|
if (this._moduleCode) {
|
|
38486
38486
|
this.appCode = this._moduleCode;
|
|
38487
38487
|
}
|
|
38488
|
+
if (!this.permission) {
|
|
38489
|
+
this.setAuthorizeButton();
|
|
38490
|
+
}
|
|
38488
38491
|
if (!this.enableAuthorize) {
|
|
38489
38492
|
return;
|
|
38490
38493
|
}
|
|
@@ -38519,6 +38522,13 @@
|
|
|
38519
38522
|
}
|
|
38520
38523
|
});
|
|
38521
38524
|
};
|
|
38525
|
+
AuthorizeDirective.prototype.ngAfterViewChecked = function () {
|
|
38526
|
+
var buttons = sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE);
|
|
38527
|
+
if (!this.permissionChecked && buttons) {
|
|
38528
|
+
this.permissionCheck();
|
|
38529
|
+
this.permissionChecked = true;
|
|
38530
|
+
}
|
|
38531
|
+
};
|
|
38522
38532
|
AuthorizeDirective.prototype.setAuthorizeButton = function () {
|
|
38523
38533
|
var _a, _b, _c, _d, _e;
|
|
38524
38534
|
var key = window.location.pathname.substring(1).toUpperCase().replace(/\//g, '_');
|