tnx-shared 5.1.415 → 5.1.417
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 +12 -9
- package/bundles/tnx-shared.umd.js.map +1 -1
- package/bundles/tnx-shared.umd.min.js +1 -1
- package/bundles/tnx-shared.umd.min.js.map +1 -1
- package/classes/base/list-component-base.d.ts.map +1 -1
- package/classes/form-schema.d.ts +1 -0
- package/classes/form-schema.d.ts.map +1 -1
- package/components/user-picker/user-picker.component.d.ts.map +1 -1
- package/directives/authorize.directive.d.ts.map +1 -1
- package/esm2015/classes/base/list-component-base.js +5 -5
- package/esm2015/classes/form-schema.js +2 -1
- package/esm2015/components/common-app-component/common-app-component.js +2 -2
- package/esm2015/components/user-picker/user-picker.component.js +3 -2
- package/esm2015/directives/authorize.directive.js +1 -1
- package/esm2015/services/permission.service.js +5 -4
- package/fesm2015/tnx-shared.js +12 -9
- package/fesm2015/tnx-shared.js.map +1 -1
- package/package.json +2 -2
- package/services/permission.service.d.ts.map +1 -1
- package/tnx-shared.metadata.json +1 -1
package/fesm2015/tnx-shared.js
CHANGED
|
@@ -1355,6 +1355,7 @@ class VanBanPickerControlSchema extends FormControlBase {
|
|
|
1355
1355
|
this.useVbDen = true;
|
|
1356
1356
|
this.useVbDi = true;
|
|
1357
1357
|
this.readOnly = false;
|
|
1358
|
+
this.readonly = false;
|
|
1358
1359
|
this.loaiVanBan = EnumLoaiVanBanBase.VB_DI;
|
|
1359
1360
|
for (const key in init) {
|
|
1360
1361
|
this[key] = init[key];
|
|
@@ -17440,14 +17441,15 @@ class PermissionService extends BaseService {
|
|
|
17440
17441
|
// Set local storage cho permission của người dùng
|
|
17441
17442
|
for (const service of lstAppCodes) {
|
|
17442
17443
|
let permissions = [];
|
|
17444
|
+
const serviceCode = service.toUpperCase();
|
|
17443
17445
|
for (const key in res.data) {
|
|
17444
|
-
if (key.toUpperCase() !=
|
|
17446
|
+
if (key.toUpperCase() != serviceCode) {
|
|
17445
17447
|
continue;
|
|
17446
17448
|
}
|
|
17447
17449
|
permissions = res.data[key];
|
|
17448
17450
|
break;
|
|
17449
17451
|
}
|
|
17450
|
-
const key = `AUTHORIZATION.${
|
|
17452
|
+
const key = `AUTHORIZATION.${serviceCode}`;
|
|
17451
17453
|
const storageItem = this.storage.getItem(key);
|
|
17452
17454
|
if (storageItem != null) {
|
|
17453
17455
|
this.storage.removeItem(key);
|
|
@@ -17512,7 +17514,7 @@ class PermissionService extends BaseService {
|
|
|
17512
17514
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17513
17515
|
try {
|
|
17514
17516
|
const user = this._userService.getCurrentUser();
|
|
17515
|
-
|
|
17517
|
+
const valueIsDevMode = true;
|
|
17516
17518
|
if (isDevMode() && valueIsDevMode) {
|
|
17517
17519
|
return true;
|
|
17518
17520
|
}
|
|
@@ -18260,17 +18262,17 @@ class ListComponentBase extends ComponentBase {
|
|
|
18260
18262
|
if (!this.serviceCode && this.setting.baseService) {
|
|
18261
18263
|
this.serviceCode = this.setting.baseService.serviceCode;
|
|
18262
18264
|
}
|
|
18263
|
-
if (
|
|
18265
|
+
if (this.authorizePath) {
|
|
18264
18266
|
this.authorizePaths[ComCtxConstants.COMMON.ADD] = `${this.authorizePath}/ADD`;
|
|
18265
18267
|
this.authorizePaths[ComCtxConstants.COMMON.EDIT] = `${this.authorizePath}/EDIT`;
|
|
18266
18268
|
this.authorizePaths[ComCtxConstants.COMMON.DELETE] = `${this.authorizePath}/DELETE`;
|
|
18267
18269
|
this.authorizePaths[ComCtxConstants.COMMON.DELETE_MULTIPLE] = `${this.authorizePath}/DELETE_MULTIPLE`;
|
|
18268
18270
|
this.authorizePaths[ComCtxConstants.COMMON.EXPORT_EXCEL] = `${this.authorizePath}/EXPORT_EXCEL`;
|
|
18269
18271
|
this.authorizePaths[ComCtxConstants.COMMON.EXPORT_ALL_EXCEL] = `${this.authorizePath}/EXPORT_ALL_EXCEL`;
|
|
18272
|
+
this.authorizeButtons.forEach(button => {
|
|
18273
|
+
this.buttonApplyAuthorize[button] = true;
|
|
18274
|
+
});
|
|
18270
18275
|
}
|
|
18271
|
-
this.authorizeButtons.forEach(button => {
|
|
18272
|
-
this.buttonApplyAuthorize[button] = true;
|
|
18273
|
-
});
|
|
18274
18276
|
const userService = this._injector.get(UserService);
|
|
18275
18277
|
const temp = userService.getCurrentUser();
|
|
18276
18278
|
if (temp != null) {
|
|
@@ -27486,7 +27488,7 @@ class CommonAppComponentComponent {
|
|
|
27486
27488
|
// get current User
|
|
27487
27489
|
this._userService.populateCurrentUser();
|
|
27488
27490
|
this._componentContextService.subscribe(ComCtxConstants.ROOT.NEED_CLEAR_PERMISSION_CACHE, () => __awaiter(this, void 0, void 0, function* () {
|
|
27489
|
-
const res = yield this._permissionService.
|
|
27491
|
+
const res = yield this._permissionService.clearPermissionCache([]);
|
|
27490
27492
|
if (!res.success) {
|
|
27491
27493
|
this._notifierService.showWarning('Có lỗi trong lúc clear cache phân quyền');
|
|
27492
27494
|
}
|
|
@@ -50136,8 +50138,9 @@ class UserPickerComponent extends ComponentBase {
|
|
|
50136
50138
|
return value[this.control.valueField];
|
|
50137
50139
|
};
|
|
50138
50140
|
}
|
|
50139
|
-
else
|
|
50141
|
+
else {
|
|
50140
50142
|
this.funcReturnValue = value => value;
|
|
50143
|
+
}
|
|
50141
50144
|
this.buildFilterKeyword();
|
|
50142
50145
|
this.buildSettingEntityPicker();
|
|
50143
50146
|
this.createSchemaSearch();
|