tnx-shared 5.3.247 → 5.3.249

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.
@@ -20758,6 +20758,11 @@
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 _a;
20762
+ var columns = __spreadArray([], __read(this.lstEntityPickerColumn));
20763
+ if (((_a = control.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
20764
+ columns.push.apply(columns, __spreadArray([], __read(control.columns)));
20765
+ }
20761
20766
  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
20767
  var result = item.hoVaTen;
20763
20768
  if (item.code) {
@@ -20803,7 +20808,7 @@
20803
20808
  break;
20804
20809
  }
20805
20810
  return filters;
20806
- } }, control), { columns: __spreadArray(__spreadArray([], __read(this.lstEntityPickerColumn)), __read(control.columns)) }));
20811
+ } }, control), { columns: columns }));
20807
20812
  if (control.dataType == exports.EnumControlPickerType.DOITAC && !this.lstEntityPickerColumn.some(function (item) { return item.code == 'idDoiTac'; })) {
20808
20813
  this.lstEntityPickerColumn.push(new EntityPickerColumn({
20809
20814
  label: 'Đối tác',
@@ -21739,6 +21744,9 @@
21739
21744
  _this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.authorizationEndpoint;
21740
21745
  return _this;
21741
21746
  }
21747
+ BasePermissionService.prototype.getPermissionByCode = function (code) {
21748
+ return this.defaultGet(this.serviceUri + "/GetPermissionByCode?code=" + code);
21749
+ };
21742
21750
  return BasePermissionService;
21743
21751
  }(BaseService));
21744
21752
  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" });
@@ -25687,7 +25695,7 @@
25687
25695
  ListComponentBase.prototype.setAuthorizeButton = function (lstButtonTemplate) {
25688
25696
  var _a, _b;
25689
25697
  return __awaiter(this, void 0, void 0, function () {
25690
- var filterPermission, lstPermissionCode, buttonSetting, lstMenuButton, lstMenuButtons, _c_1;
25698
+ var lstPermissionCode, buttonSetting, lstMenuButton, lstMenuButtons, _c_1;
25691
25699
  var _this = this;
25692
25700
  return __generator(this, function (_h) {
25693
25701
  switch (_h.label) {
@@ -25696,8 +25704,7 @@
25696
25704
  if (i0.isDevMode()) {
25697
25705
  this.authorizeButtonKey = (this.serviceCode.toUpperCase() || this._moduleConfigService.getConfig().appCode.toUpperCase()) + "_" + window.location.pathname.substring(1).toUpperCase();
25698
25706
  }
25699
- filterPermission = [this.newFilter('code', exports.Operator.contain, "[" + this.authorizeButtonKey + "]")];
25700
- return [4 /*yield*/, this._basePermissionService.getAllWithIgnore(filterPermission, 'code,id')];
25707
+ return [4 /*yield*/, this._basePermissionService.getPermissionByCode("[" + this.authorizeButtonKey + "]")];
25701
25708
  case 1:
25702
25709
  lstPermissionCode = (_a = (_h.sent()).data) !== null && _a !== void 0 ? _a : [];
25703
25710
  buttonSetting = JSON.parse(sessionStorage.getItem(ComCtxConstants.LOCALSTORAGE_KEY.BUTTON_AUTHORIZE) || '{}');