tnx-shared 5.3.291 → 5.3.293

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.
Files changed (35) hide show
  1. package/bundles/tnx-shared.umd.js +131 -121
  2. package/bundles/tnx-shared.umd.js.map +1 -1
  3. package/bundles/tnx-shared.umd.min.js +1 -1
  4. package/bundles/tnx-shared.umd.min.js.map +1 -1
  5. package/classes/base/list-component-base.d.ts.map +1 -1
  6. package/classes/form-schema.d.ts +2 -0
  7. package/classes/form-schema.d.ts.map +1 -1
  8. package/components/autocomplete-picker/autocomplete-picker.component.d.ts.map +1 -1
  9. package/components/common-search-form/common-search-form.component.d.ts.map +1 -1
  10. package/components/dropdown/dropdown.component.d.ts +2 -0
  11. package/components/dropdown/dropdown.component.d.ts.map +1 -1
  12. package/components/entity-picker/entity-picker-dialog/components/entity-picker-data/entity-picker-data.component.d.ts.map +1 -1
  13. package/components/entity-picker/entity-picker-dialog/components/entity-picker-selected/entity-picker-selected.component.d.ts.map +1 -1
  14. package/esm2015/classes/base/list-component-base.js +3 -3
  15. package/esm2015/classes/form-schema.js +3 -1
  16. package/esm2015/components/autocomplete-picker/autocomplete-picker.component.js +7 -5
  17. package/esm2015/components/common-search-form/common-search-form.component.js +5 -2
  18. package/esm2015/components/dropdown/dropdown.component.js +19 -23
  19. package/esm2015/components/entity-picker/entity-picker-dialog/components/entity-picker-data/entity-picker-data.component.js +2 -1
  20. package/esm2015/components/entity-picker/entity-picker-dialog/components/entity-picker-selected/entity-picker-selected.component.js +2 -1
  21. package/esm2015/public-api.js +2 -1
  22. package/esm2015/services/base.service.js +6 -4
  23. package/esm2015/services/canbo-hoso.service.js +7 -3
  24. package/esm2015/services/crud.service.js +4 -4
  25. package/esm2015/services/dm-chucvu.service.js +1 -2
  26. package/fesm2015/tnx-shared.js +65 -56
  27. package/fesm2015/tnx-shared.js.map +1 -1
  28. package/package.json +2 -2
  29. package/public-api.d.ts +1 -0
  30. package/public-api.d.ts.map +1 -1
  31. package/services/base.service.d.ts +0 -2
  32. package/services/base.service.d.ts.map +1 -1
  33. package/services/canbo-hoso.service.d.ts.map +1 -1
  34. package/services/dm-chucvu.service.d.ts.map +1 -1
  35. package/tnx-shared.metadata.json +1 -1
@@ -2063,6 +2063,7 @@
2063
2063
  _this.insertPlusUrl = '';
2064
2064
  _this.loadInFirstDisplay = true;
2065
2065
  _this.autoGetData = true;
2066
+ _this.isAllowDisabled = true;
2066
2067
  _this.valueField = 'id';
2067
2068
  _this.displayField = 'ten';
2068
2069
  _this.autoDisplayFirst = false;
@@ -2351,6 +2352,7 @@
2351
2352
  this.isServerLoad = false;
2352
2353
  this.refFields = [];
2353
2354
  this.isTreeBaseModel = false;
2355
+ this.isGetAll = false;
2354
2356
  this.funcCompare = function (item, value) { return item[_this.valueField] == value; };
2355
2357
  for (var key in init) {
2356
2358
  this[key] = init[key];
@@ -7031,11 +7033,11 @@
7031
7033
  refFields: schema.refFields,
7032
7034
  isTreeBaseModel: schema.isTreeBaseModel,
7033
7035
  // TODO: Cần điền vào không có lỗi không chạy được
7034
- selectChildItem: null
7036
+ selectChildItem: null,
7037
+ isGetAll: !(schema instanceof DropdownControlSchema)
7035
7038
  });
7036
7039
  if (result.isServerLoad) {
7037
7040
  result.pageSize = schema.pageSize;
7038
- // result.pageSize = 2;
7039
7041
  }
7040
7042
  return result;
7041
7043
  };
@@ -8015,6 +8017,7 @@
8015
8017
  var EXCEL_EXTENSION$1 = '.xlsx';
8016
8018
  var BaseService = /** @class */ (function () {
8017
8019
  function BaseService(http, injector, serviceUri) {
8020
+ var _a, _b;
8018
8021
  this.serviceUri = '';
8019
8022
  this.endPoint = '';
8020
8023
  this.serviceCode = '';
@@ -8024,8 +8027,6 @@
8024
8027
  this.apiGetData = 'GetData';
8025
8028
  this.apiGetAll = 'GetAllByFilter';
8026
8029
  this.apiGetDetailByFilter = 'GetByFilter';
8027
- this.fieldSort = '';
8028
- this.fieldSuDung = '';
8029
8030
  this.disableFieldNotUse = false;
8030
8031
  this.RETRY_COUNT = 0;
8031
8032
  this.REPLAY_COUNT = 1;
@@ -8035,6 +8036,8 @@
8035
8036
  this.serviceUri = serviceUri;
8036
8037
  this._commonService = injector.get(CommonService);
8037
8038
  this._signalrServicePrivate = injector.get(SignalRService);
8039
+ var environment = this._injector.get(ModuleConfigService).getConfig().environment;
8040
+ this.disableFieldNotUse = (_b = (_a = environment === null || environment === void 0 ? void 0 : environment.cauHinhNghiepVu) === null || _a === void 0 ? void 0 : _a.disableFieldNotUse) !== null && _b !== void 0 ? _b : false;
8038
8041
  }
8039
8042
  BaseService.prototype.setCurrentServiceUri = function (key) {
8040
8043
  };
@@ -8273,8 +8276,8 @@
8273
8276
  BaseService.prototype.checkDuplicatedByField = function (field, value, id) {
8274
8277
  return __awaiter(this, void 0, void 0, function () {
8275
8278
  var filters, result;
8276
- return __generator(this, function (_a) {
8277
- switch (_a.label) {
8279
+ return __generator(this, function (_c) {
8280
+ switch (_c.label) {
8278
8281
  case 0:
8279
8282
  filters = [
8280
8283
  new Filter({
@@ -8290,7 +8293,7 @@
8290
8293
  ];
8291
8294
  return [4 /*yield*/, this.checkExistByFilter(filters)];
8292
8295
  case 1:
8293
- result = _a.sent();
8296
+ result = _c.sent();
8294
8297
  if (!result.success)
8295
8298
  return [2 /*return*/, true];
8296
8299
  return [2 /*return*/, result.data];
@@ -8362,7 +8365,7 @@
8362
8365
  var _this = this;
8363
8366
  return new Promise(function (resolve, reject) {
8364
8367
  var gridInfo = _this.generateGridInfoDropdown(filters, options);
8365
- if (options.isServerLoad) {
8368
+ if (options.isServerLoad && !options.isGetAll) {
8366
8369
  _this.getByGridRequest(gridInfo, options.plusUrl)
8367
8370
  .then(function (res) {
8368
8371
  resolve(res);
@@ -8384,7 +8387,7 @@
8384
8387
  * @private
8385
8388
  */
8386
8389
  BaseService.prototype.getTreeModelBase = function (rawData, fieldParent, fieldParentTreeItem) {
8387
- var e_1, _a;
8390
+ var e_1, _c;
8388
8391
  if (rawData == null || rawData.length == 0) {
8389
8392
  return [];
8390
8393
  }
@@ -8418,7 +8421,7 @@
8418
8421
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
8419
8422
  finally {
8420
8423
  try {
8421
- if (rawData_1_1 && !rawData_1_1.done && (_a = rawData_1.return)) _a.call(rawData_1);
8424
+ if (rawData_1_1 && !rawData_1_1.done && (_c = rawData_1.return)) _c.call(rawData_1);
8422
8425
  }
8423
8426
  finally { if (e_1) throw e_1.error; }
8424
8427
  }
@@ -8432,7 +8435,7 @@
8432
8435
  * @private
8433
8436
  */
8434
8437
  BaseService.prototype.getTreeData = function (rawData, fieldParent, fieldParentTreeItem) {
8435
- var e_2, _a, e_3, _b, e_4, _c;
8438
+ var e_2, _c, e_3, _d, e_4, _e;
8436
8439
  if (rawData == null)
8437
8440
  return [];
8438
8441
  // let count = 0;
@@ -8519,12 +8522,12 @@
8519
8522
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
8520
8523
  finally {
8521
8524
  try {
8522
- if (rawData_2_1 && !rawData_2_1.done && (_a = rawData_2.return)) _a.call(rawData_2);
8525
+ if (rawData_2_1 && !rawData_2_1.done && (_c = rawData_2.return)) _c.call(rawData_2);
8523
8526
  }
8524
8527
  finally { if (e_2) throw e_2.error; }
8525
8528
  }
8526
8529
  var funcSetPrefix = function (node, parentNode, prefix) {
8527
- var e_5, _a;
8530
+ var e_5, _c;
8528
8531
  // count++;
8529
8532
  node.data._prefix = prefix;
8530
8533
  node.data._level = parentNode.data._level + 1;
@@ -8533,15 +8536,15 @@
8533
8536
  return;
8534
8537
  }
8535
8538
  try {
8536
- for (var _b = __values(node.children), _c = _b.next(); !_c.done; _c = _b.next()) {
8537
- var child = _c.value;
8539
+ for (var _d = __values(node.children), _e = _d.next(); !_e.done; _e = _d.next()) {
8540
+ var child = _e.value;
8538
8541
  funcSetPrefix(child, node, prefix + '---');
8539
8542
  }
8540
8543
  }
8541
8544
  catch (e_5_1) { e_5 = { error: e_5_1 }; }
8542
8545
  finally {
8543
8546
  try {
8544
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
8547
+ if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
8545
8548
  }
8546
8549
  finally { if (e_5) throw e_5.error; }
8547
8550
  }
@@ -8561,15 +8564,15 @@
8561
8564
  continue;
8562
8565
  }
8563
8566
  try {
8564
- for (var _d = (e_4 = void 0, __values(node.children)), _e = _d.next(); !_e.done; _e = _d.next()) {
8565
- var child = _e.value;
8567
+ for (var _f = (e_4 = void 0, __values(node.children)), _g = _f.next(); !_g.done; _g = _f.next()) {
8568
+ var child = _g.value;
8566
8569
  funcSetPrefix(child, node, '|--');
8567
8570
  }
8568
8571
  }
8569
8572
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
8570
8573
  finally {
8571
8574
  try {
8572
- if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
8575
+ if (_g && !_g.done && (_e = _f.return)) _e.call(_f);
8573
8576
  }
8574
8577
  finally { if (e_4) throw e_4.error; }
8575
8578
  }
@@ -8578,7 +8581,7 @@
8578
8581
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
8579
8582
  finally {
8580
8583
  try {
8581
- if (roots_1_1 && !roots_1_1.done && (_b = roots_1.return)) _b.call(roots_1);
8584
+ if (roots_1_1 && !roots_1_1.done && (_d = roots_1.return)) _d.call(roots_1);
8582
8585
  }
8583
8586
  finally { if (e_3) throw e_3.error; }
8584
8587
  }
@@ -8737,13 +8740,13 @@
8737
8740
  BaseService.prototype.getWorkflowSettingByCode = function (workflowCode) {
8738
8741
  return __awaiter(this, void 0, void 0, function () {
8739
8742
  var workflowSetting, jsonSchema, stateMachineData;
8740
- return __generator(this, function (_a) {
8741
- switch (_a.label) {
8743
+ return __generator(this, function (_c) {
8744
+ switch (_c.label) {
8742
8745
  case 0: return [4 /*yield*/, this.getDetailByFilter([
8743
8746
  this.newFilter('code', exports.Operator.equal, workflowCode)
8744
8747
  ])];
8745
8748
  case 1:
8746
- workflowSetting = (_a.sent()).data;
8749
+ workflowSetting = (_c.sent()).data;
8747
8750
  if (workflowSetting == null)
8748
8751
  return [2 /*return*/, null];
8749
8752
  jsonSchema = workflowSetting['data'];
@@ -8835,11 +8838,11 @@
8835
8838
  FileSaver__namespace.saveAs(res, fileName);
8836
8839
  }).catch(function (err) { return __awaiter(_this, void 0, void 0, function () {
8837
8840
  var errorText;
8838
- return __generator(this, function (_a) {
8839
- switch (_a.label) {
8841
+ return __generator(this, function (_c) {
8842
+ switch (_c.label) {
8840
8843
  case 0: return [4 /*yield*/, err.error.text()];
8841
8844
  case 1:
8842
- errorText = _a.sent();
8845
+ errorText = _c.sent();
8843
8846
  console.error(errorText);
8844
8847
  return [2 /*return*/];
8845
8848
  }
@@ -8933,8 +8936,8 @@
8933
8936
  if (sortDir === void 0) { sortDir = null; }
8934
8937
  return __awaiter(this, void 0, void 0, function () {
8935
8938
  var arrFilter, arrSort, arrResult;
8936
- return __generator(this, function (_a) {
8937
- switch (_a.label) {
8939
+ return __generator(this, function (_c) {
8940
+ switch (_c.label) {
8938
8941
  case 0:
8939
8942
  arrValue = (arrValue || []).filter(function (val, ind, arr) { return (val === 0 || val) && arr.indexOf(val) === ind; });
8940
8943
  if (!arrValue || !arrValue.length)
@@ -8953,7 +8956,7 @@
8953
8956
  }
8954
8957
  return [4 /*yield*/, this.getAll(arrFilter, getFields, arrSort)];
8955
8958
  case 1:
8956
- arrResult = (_a.sent()).data;
8959
+ arrResult = (_c.sent()).data;
8957
8960
  return [2 /*return*/, (arrResult || [])];
8958
8961
  }
8959
8962
  });
@@ -8964,11 +8967,11 @@
8964
8967
  if (valueField === void 0) { valueField = null; }
8965
8968
  return __awaiter(this, void 0, void 0, function () {
8966
8969
  var arrResult, rsDic;
8967
- return __generator(this, function (_a) {
8968
- switch (_a.label) {
8970
+ return __generator(this, function (_c) {
8971
+ switch (_c.label) {
8969
8972
  case 0: return [4 /*yield*/, this.getByField(field, arrValue, getFields)];
8970
8973
  case 1:
8971
- arrResult = _a.sent();
8974
+ arrResult = _c.sent();
8972
8975
  rsDic = {};
8973
8976
  if (!arrResult.length) {
8974
8977
  return [2 /*return*/, rsDic];
@@ -9017,7 +9020,7 @@
9017
9020
  };
9018
9021
  BaseService.prototype.getDataTrinhKy = function (item, rowData) {
9019
9022
  return __awaiter(this, void 0, void 0, function () {
9020
- return __generator(this, function (_a) {
9023
+ return __generator(this, function (_c) {
9021
9024
  return [2 /*return*/, []];
9022
9025
  });
9023
9026
  });
@@ -20177,6 +20180,8 @@
20177
20180
  }),
20178
20181
  new ColumnSchemaBase({
20179
20182
  field: 'email',
20183
+ operator: exports.Operator.equal,
20184
+ isOverrideFilter: true,
20180
20185
  width: '180px'
20181
20186
  }),
20182
20187
  new ColumnSchemaBase({
@@ -20746,7 +20751,8 @@
20746
20751
  new EntityPickerColumn({
20747
20752
  label: 'Email',
20748
20753
  code: 'email',
20749
- fullTextSearch: true,
20754
+ operator: exports.Operator.equal,
20755
+ isOverrideFilter: true,
20750
20756
  width: '170px',
20751
20757
  }),
20752
20758
  new EntityPickerColumn({
@@ -20816,7 +20822,8 @@
20816
20822
  new EntityPickerColumn({
20817
20823
  label: 'Email',
20818
20824
  code: 'email',
20819
- fullTextSearch: true,
20825
+ operator: exports.Operator.equal,
20826
+ isOverrideFilter: true,
20820
20827
  width: '170px',
20821
20828
  })
20822
20829
  ];
@@ -24440,7 +24447,7 @@
24440
24447
  isArrayField: col.isArrayField ? true : false
24441
24448
  });
24442
24449
  templateFilter.push(filter);
24443
- _this.filterSchema.dropdown[col.field] = new DropdownControlSchema(Object.assign(Object.assign({}, col), { appendTo: 'body', placeholder: "Ch\u1ECDn " + col.label, multiple: filterMuliple.includes(filter.operator), loadOnInit: true, isServerLoad: col.isServerLoad }));
24450
+ _this.filterSchema.dropdown[col.field] = new DropdownControlSchema(Object.assign(Object.assign({}, col), { appendTo: 'body', placeholder: "Ch\u1ECDn " + col.label, multiple: filterMuliple.includes(filter.operator), loadOnInit: true, isServerLoad: col.isServerLoad, isAllowDisabled: false }));
24444
24451
  }
24445
24452
  else {
24446
24453
  _this._notifierService.showWarning("Ch\u01B0a c\u1EA5u h\u00ECnh baseService ho\u1EB7c dataSource cho c\u1ED9t " + col.field + ": " + col.label);
@@ -24869,7 +24876,7 @@
24869
24876
  }
24870
24877
  else {
24871
24878
  if (col.baseService || (col.dataSource && col.dataSource.length > 0)) {
24872
- searchInfo.fieldDropdown[col.field] = new DropdownControlSchema(Object.assign(Object.assign({}, col), { label: col.label, operator: col.multiple ? exports.Operator.in : exports.Operator.equal, mdWidth: col.mdWidth ? col.mdWidth : 10, loadOnInit: true }));
24879
+ searchInfo.fieldDropdown[col.field] = new DropdownControlSchema(Object.assign(Object.assign({}, col), { label: col.label, operator: col.multiple ? exports.Operator.in : exports.Operator.equal, mdWidth: col.mdWidth ? col.mdWidth : 10, loadOnInit: true, isAllowDisabled: false }));
24873
24880
  searchInfo.schema.push(searchInfo.fieldDropdown[col.field]);
24874
24881
  }
24875
24882
  else if (col.dataType == 'int') {
@@ -32468,6 +32475,9 @@
32468
32475
  _this.handleSearch(null, evt.control.field);
32469
32476
  };
32470
32477
  }
32478
+ if (column instanceof DropdownControlSchema) {
32479
+ column.isAllowDisabled = false;
32480
+ }
32471
32481
  if (column instanceof NumberRangeControlSchema) {
32472
32482
  _this.lstNumberRangeControl.push(column.field);
32473
32483
  }
@@ -32514,7 +32524,7 @@
32514
32524
  if (isLazyLoad) {
32515
32525
  _this.lstControlLazyLoad.push(column.field);
32516
32526
  }
32517
- result.push(new DropdownControlSchema(Object.assign(Object.assign({}, column), { placeholder: (_a = column.placeholder) !== null && _a !== void 0 ? _a : "Ch\u1ECDn " + column.label, multiple: !column.single, dataSource: dataSource, mdWidth: _this.mdWidth, isLazyLoad: isLazyLoad, showLabel: false, showClear: true, onChanged: function (evt) {
32527
+ result.push(new DropdownControlSchema(Object.assign(Object.assign({}, column), { placeholder: (_a = column.placeholder) !== null && _a !== void 0 ? _a : "Ch\u1ECDn " + column.label, isAllowDisabled: false, multiple: !column.single, dataSource: dataSource, mdWidth: _this.mdWidth, isLazyLoad: isLazyLoad, showLabel: false, showClear: true, onChanged: function (evt) {
32518
32528
  var _a;
32519
32529
  if (column.dataType == exports.DataType.boolean) {
32520
32530
  evt.parentModel[column.field] = column.single ? (_a = evt.value.id) !== null && _a !== void 0 ? _a : evt.value : evt.value.map(function (p) { return p.id; });
@@ -32828,6 +32838,8 @@
32828
32838
  _this.loading = false;
32829
32839
  _this.page = 1;
32830
32840
  _this.totalPage = 2;
32841
+ _this.fieldSuDung = 'suDung';
32842
+ _this.disableFieldNotUse = false;
32831
32843
  _this.modifyOptionWhenFilter = function (options) {
32832
32844
  _this.dropdownOptions = _this.dropdown._options;
32833
32845
  _this._modifyOptionWhenFilter(options);
@@ -32959,13 +32971,14 @@
32959
32971
  if (this.control.loadOnInit && !this.control.isLazyLoad) {
32960
32972
  this._getData();
32961
32973
  }
32974
+ if (this.control.baseService instanceof MasterDataService) {
32975
+ this.control.maxItemDisplay = 9999;
32976
+ }
32977
+ this.disableFieldNotUse = this.control.baseService['disableFieldNotUse'];
32962
32978
  }
32963
32979
  if (!this._deviceDetectorService.isDesktop()) {
32964
32980
  this.hideTransitionOptions = this.showTransitionOptions = '';
32965
32981
  }
32966
- if (this.control.baseService instanceof MasterDataService) {
32967
- this.control.maxItemDisplay = 9999;
32968
- }
32969
32982
  if (this.control.onInit) {
32970
32983
  this.control.onInit(this);
32971
32984
  }
@@ -33129,6 +33142,7 @@
33129
33142
  this._getData();
33130
33143
  };
33131
33144
  DropdownComponent.prototype.combineDataSource = function (dataSource, page) {
33145
+ var _this = this;
33132
33146
  this.autofocusSelectedItem = true;
33133
33147
  if (!dataSource)
33134
33148
  dataSource = [];
@@ -33167,9 +33181,9 @@
33167
33181
  this._hasLoadedDatasource = true;
33168
33182
  }
33169
33183
  }
33170
- if (this.control.baseService && this.control.baseService['disableFieldNotUse']) {
33171
- var fieldSuDung_1 = this.control.baseService['fieldSuDung'];
33172
- this.dataSourceInternal.forEach(function (item) { return item.inactive = !item.value[fieldSuDung_1]; });
33184
+ if (this.disableFieldNotUse && this.control.isAllowDisabled
33185
+ && this.dataSourceInternal.some(function (p) { return p.value.hasOwnProperty(_this.fieldSuDung); })) {
33186
+ this.dataSourceInternal.forEach(function (item) { return item.inactive = !item.value[_this.fieldSuDung]; });
33173
33187
  }
33174
33188
  };
33175
33189
  DropdownComponent.prototype.appendDataSource = function (destSource, dataSource, direction) {
@@ -33473,25 +33487,13 @@
33473
33487
  if (page === void 0) { page = 1; }
33474
33488
  if (pageSize === void 0) { pageSize = null; }
33475
33489
  return __awaiter(this, void 0, void 0, function () {
33476
- var dataSource, totalPage, fieldSuDung, dropdownOptions, response, result, dataSource_3, dataSource_3_1, item;
33490
+ var dataSource, totalPage, dropdownOptions, response, result, dataSource_3, dataSource_3_1, item;
33477
33491
  var e_5, _a;
33478
- var _this = this;
33479
33492
  return __generator(this, function (_b) {
33480
33493
  switch (_b.label) {
33481
33494
  case 0:
33482
33495
  dataSource = null;
33483
33496
  totalPage = 1;
33484
- if (this.control.baseService['fieldSort']) {
33485
- this.control.sorts = [this.newSort(this.control.baseService['fieldSort'])];
33486
- }
33487
- fieldSuDung = this.control.baseService['fieldSuDung'];
33488
- if (fieldSuDung) {
33489
- this.control.sorts.splice(0, 0, this.newSort(fieldSuDung, -1));
33490
- this.control.fieldPlus += "," + fieldSuDung;
33491
- this.control.funcGetLabel = function (item) {
33492
- return item[fieldSuDung] ? item[_this.control.displayField] : item[_this.control.displayField] + " (Kh\u00F4ng s\u1EED d\u1EE5ng)";
33493
- };
33494
- }
33495
33497
  dropdownOptions = this._crudService.createDropdownOptions(this.control);
33496
33498
  dropdownOptions.page = page;
33497
33499
  if (pageSize) {
@@ -33626,14 +33628,18 @@
33626
33628
  var _this = this;
33627
33629
  if (this.control.multiple) {
33628
33630
  if (!event.itemValue) {
33629
- // Trường hợp select all
33630
- if (event.value.length) {
33631
- this._value = this.dataSourceInternal.map(function (q) { return q.value; });
33632
- }
33633
33631
  // Trường hợp unselect all
33634
- else {
33632
+ if (!event.value.length || event.value.every(function (p) { return p.hasOwnProperty(_this.fieldSuDung) && !p[_this.fieldSuDung]; })) {
33635
33633
  this._value = [];
33636
33634
  }
33635
+ // Trường hợp select all
33636
+ else {
33637
+ var tmpDataSource = __spreadArray([], __read(this.dataSourceInternal));
33638
+ if (this.dataSourceInternal.some(function (p) { return p.hasOwnProperty('inactive'); })) {
33639
+ tmpDataSource = tmpDataSource.filter(function (p) { return !p.inactive; });
33640
+ }
33641
+ this._value = tmpDataSource.map(function (q) { return q.value; });
33642
+ }
33637
33643
  }
33638
33644
  else if (this.control.selectDescendant) {
33639
33645
  var parentIds_1 = [event.itemValue[this.control.valueField]];
@@ -39473,6 +39479,28 @@
39473
39479
  return Column;
39474
39480
  }());
39475
39481
 
39482
+ exports.EnumDoiTuongGuiThongBaoNguoiDung = void 0;
39483
+ (function (EnumDoiTuongGuiThongBaoNguoiDung) {
39484
+ EnumDoiTuongGuiThongBaoNguoiDung["TAT_CA_NGUOI_DUNG"] = "0";
39485
+ EnumDoiTuongGuiThongBaoNguoiDung["TAT_CA_LANH_DAO"] = "1";
39486
+ EnumDoiTuongGuiThongBaoNguoiDung["CHON_NGUOI_DUNG"] = "2";
39487
+ EnumDoiTuongGuiThongBaoNguoiDung["LANH_DAO_DON_VI"] = "3";
39488
+ })(exports.EnumDoiTuongGuiThongBaoNguoiDung || (exports.EnumDoiTuongGuiThongBaoNguoiDung = {}));
39489
+ var NotificationParams = /** @class */ (function () {
39490
+ function NotificationParams() {
39491
+ }
39492
+ return NotificationParams;
39493
+ }());
39494
+ exports.EnumNotificationAction = void 0;
39495
+ (function (EnumNotificationAction) {
39496
+ EnumNotificationAction[EnumNotificationAction["NEW"] = 0] = "NEW";
39497
+ })(exports.EnumNotificationAction || (exports.EnumNotificationAction = {}));
39498
+ ;
39499
+ var ɵ0$1 = exports.EnumNotificationAction.NEW;
39500
+ var SEND_ACTION = [
39501
+ { id: ɵ0$1, name: 'NEW' }
39502
+ ];
39503
+
39476
39504
  var ReponseResult = /** @class */ (function () {
39477
39505
  function ReponseResult() {
39478
39506
  }
@@ -40182,28 +40210,6 @@
40182
40210
  { type: ModuleConfigService }
40183
40211
  ]; };
40184
40212
 
40185
- var EnumDoiTuongGuiThongBaoNguoiDung;
40186
- (function (EnumDoiTuongGuiThongBaoNguoiDung) {
40187
- EnumDoiTuongGuiThongBaoNguoiDung["TAT_CA_NGUOI_DUNG"] = "0";
40188
- EnumDoiTuongGuiThongBaoNguoiDung["TAT_CA_LANH_DAO"] = "1";
40189
- EnumDoiTuongGuiThongBaoNguoiDung["CHON_NGUOI_DUNG"] = "2";
40190
- EnumDoiTuongGuiThongBaoNguoiDung["LANH_DAO_DON_VI"] = "3";
40191
- })(EnumDoiTuongGuiThongBaoNguoiDung || (EnumDoiTuongGuiThongBaoNguoiDung = {}));
40192
- var NotificationParams = /** @class */ (function () {
40193
- function NotificationParams() {
40194
- }
40195
- return NotificationParams;
40196
- }());
40197
- var EnumNotificationAction;
40198
- (function (EnumNotificationAction) {
40199
- EnumNotificationAction[EnumNotificationAction["NEW"] = 0] = "NEW";
40200
- })(EnumNotificationAction || (EnumNotificationAction = {}));
40201
- ;
40202
- var ɵ0$1 = EnumNotificationAction.NEW;
40203
- var SEND_ACTION = [
40204
- { id: ɵ0$1, name: 'NEW' }
40205
- ];
40206
-
40207
40213
  var AnnouncementsService = /** @class */ (function (_super) {
40208
40214
  __extends(AnnouncementsService, _super);
40209
40215
  function AnnouncementsService(http, injector, _moduleConfigService) {
@@ -40233,13 +40239,13 @@
40233
40239
  userIds = this._commonService.distinctArray(userIds);
40234
40240
  notificationParams = new NotificationParams();
40235
40241
  if (orgIds.length > 0) {
40236
- notificationParams.receiverType = EnumDoiTuongGuiThongBaoNguoiDung.LANH_DAO_DON_VI;
40242
+ notificationParams.receiverType = exports.EnumDoiTuongGuiThongBaoNguoiDung.LANH_DAO_DON_VI;
40237
40243
  }
40238
40244
  else if (userIds.length > 0) {
40239
- notificationParams.receiverType = EnumDoiTuongGuiThongBaoNguoiDung.CHON_NGUOI_DUNG;
40245
+ notificationParams.receiverType = exports.EnumDoiTuongGuiThongBaoNguoiDung.CHON_NGUOI_DUNG;
40240
40246
  }
40241
40247
  else {
40242
- notificationParams.receiverType = EnumDoiTuongGuiThongBaoNguoiDung.TAT_CA_LANH_DAO;
40248
+ notificationParams.receiverType = exports.EnumDoiTuongGuiThongBaoNguoiDung.TAT_CA_LANH_DAO;
40243
40249
  }
40244
40250
  notificationParams.orgIds = orgIds.join(',');
40245
40251
  notificationParams.userIds = userIds.join(',');
@@ -40253,7 +40259,7 @@
40253
40259
  }
40254
40260
  notificationParams.isSendEmail = isSendEmail;
40255
40261
  notificationParams.isChangeUser = isChangeUser;
40256
- notificationParams.actions = SEND_ACTION[EnumNotificationAction.NEW].name;
40262
+ notificationParams.actions = SEND_ACTION[exports.EnumNotificationAction.NEW].name;
40257
40263
  this.openThongBao(notificationParams);
40258
40264
  return [2 /*return*/];
40259
40265
  });
@@ -40337,7 +40343,6 @@
40337
40343
  _this.entityName = 'DM_ChucVu';
40338
40344
  _this.endPoint = _moduleConfigService.getConfig().environment.apiDomain.canboEndpoint;
40339
40345
  _this._moduleConfig = _moduleConfigService.getConfig();
40340
- _this.fieldSuDung = 'trangThai';
40341
40346
  return _this;
40342
40347
  }
40343
40348
  return DmChucVuService;
@@ -43844,26 +43849,28 @@
43844
43849
  };
43845
43850
  AutoCompletePickerComponent.prototype.buildFilterKeyword = function () {
43846
43851
  var _this = this;
43852
+ var _a;
43853
+ var operator = (_a = this.control.operatorFieldSearchText) !== null && _a !== void 0 ? _a : exports.Operator.contain;
43847
43854
  if (this.fieldSearchText.length == 1) {
43848
- this.getFilterOnSearch = function (value) { return _this.newFilter(_this.control.displayField, exports.Operator.contain, value); };
43855
+ this.getFilterOnSearch = function (value) { return _this.newFilter(_this.control.displayField, operator, value); };
43849
43856
  }
43850
43857
  else {
43851
43858
  this.getFilterOnSearch = function (value) {
43852
- var e_1, _a;
43859
+ var e_1, _b;
43853
43860
  var result = new Filter({
43854
43861
  logic: 'or',
43855
43862
  filters: []
43856
43863
  });
43857
43864
  try {
43858
- for (var _b = __values(_this.fieldSearchText), _c = _b.next(); !_c.done; _c = _b.next()) {
43859
- var fieldSearch = _c.value;
43860
- result.filters.push(_this.newFilter(fieldSearch, exports.Operator.contain, value));
43865
+ for (var _c = __values(_this.fieldSearchText), _d = _c.next(); !_d.done; _d = _c.next()) {
43866
+ var fieldSearch = _d.value;
43867
+ result.filters.push(_this.newFilter(fieldSearch, operator, value));
43861
43868
  }
43862
43869
  }
43863
43870
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
43864
43871
  finally {
43865
43872
  try {
43866
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
43873
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
43867
43874
  }
43868
43875
  finally { if (e_1) throw e_1.error; }
43869
43876
  }
@@ -43925,14 +43932,14 @@
43925
43932
  };
43926
43933
  AutoCompletePickerComponent.prototype.showPickForm = function () {
43927
43934
  return __awaiter(this, void 0, void 0, function () {
43928
- return __generator(this, function (_a) {
43929
- switch (_a.label) {
43935
+ return __generator(this, function (_b) {
43936
+ switch (_b.label) {
43930
43937
  case 0:
43931
43938
  if (!this.control.modifyInitSearchData) return [3 /*break*/, 2];
43932
43939
  return [4 /*yield*/, this.control.modifyInitSearchData(this)];
43933
43940
  case 1:
43934
- _a.sent();
43935
- _a.label = 2;
43941
+ _b.sent();
43942
+ _b.label = 2;
43936
43943
  case 2:
43937
43944
  this.dirty = false;
43938
43945
  this.showFormPicker = true;
@@ -43944,8 +43951,8 @@
43944
43951
  AutoCompletePickerComponent.prototype.getData = function () {
43945
43952
  return __awaiter(this, void 0, void 0, function () {
43946
43953
  var filters, allow, dataSource;
43947
- return __generator(this, function (_a) {
43948
- switch (_a.label) {
43954
+ return __generator(this, function (_b) {
43955
+ switch (_b.label) {
43949
43956
  case 0:
43950
43957
  filters = [];
43951
43958
  if (this.control.multiple) {
@@ -43960,22 +43967,22 @@
43960
43967
  }
43961
43968
  return [4 /*yield*/, appendDefaultFilter(filters, this.control.defaultFilters)];
43962
43969
  case 1:
43963
- _a.sent();
43970
+ _b.sent();
43964
43971
  if (this.keyword && this.keyword.length > 0) {
43965
43972
  filters.push(this.getFilterOnSearch(this.keyword));
43966
43973
  }
43967
43974
  if (!this.control.modifyFilter) return [3 /*break*/, 3];
43968
43975
  return [4 /*yield*/, this.control.modifyFilter(filters, this, this.currentNode)];
43969
43976
  case 2:
43970
- allow = _a.sent();
43977
+ allow = _b.sent();
43971
43978
  if (allow === false) {
43972
43979
  this.results = [];
43973
43980
  return [2 /*return*/];
43974
43981
  }
43975
- _a.label = 3;
43982
+ _b.label = 3;
43976
43983
  case 3: return [4 /*yield*/, this.control.baseService.getDataDropdownByFilter(filters, this.getDropdownOptions())];
43977
43984
  case 4:
43978
- dataSource = _a.sent();
43985
+ dataSource = _b.sent();
43979
43986
  this.fireEventAfterGetDataDropDown(dataSource);
43980
43987
  this.reStructureDataSource(dataSource);
43981
43988
  this.results = this.dataSource;
@@ -44167,8 +44174,8 @@
44167
44174
  AutoCompletePickerComponent.prototype.handleHide = function (evt) {
44168
44175
  return __awaiter(this, void 0, void 0, function () {
44169
44176
  var dataSource, dataSource;
44170
- return __generator(this, function (_a) {
44171
- switch (_a.label) {
44177
+ return __generator(this, function (_b) {
44178
+ switch (_b.label) {
44172
44179
  case 0:
44173
44180
  this.showFormPicker = false;
44174
44181
  if (!this.dirty) return [3 /*break*/, 7];
@@ -44179,9 +44186,9 @@
44179
44186
  this.newFilter(this.control.valueField, exports.Operator.in, this.value)
44180
44187
  ], this.getDropdownOptions(this.value.length))];
44181
44188
  case 1:
44182
- dataSource = _a.sent();
44189
+ dataSource = _b.sent();
44183
44190
  this.fireEventAfterGetDataDropDown(dataSource);
44184
- _a.label = 2;
44191
+ _b.label = 2;
44185
44192
  case 2:
44186
44193
  this.reStructureDataSource(dataSource);
44187
44194
  this.selectedValueObject = this.dataSource;
@@ -44193,9 +44200,9 @@
44193
44200
  this.newFilter(this.control.valueField, exports.Operator.equal, this.value)
44194
44201
  ], this.getDropdownOptions(1))];
44195
44202
  case 4:
44196
- dataSource = _a.sent();
44203
+ dataSource = _b.sent();
44197
44204
  this.fireEventAfterGetDataDropDown(dataSource);
44198
- _a.label = 5;
44205
+ _b.label = 5;
44199
44206
  case 5:
44200
44207
  this.reStructureDataSource(dataSource);
44201
44208
  if (this.dataSource.length > 0) {
@@ -44204,10 +44211,10 @@
44204
44211
  else {
44205
44212
  this.selectedValueObject = null;
44206
44213
  }
44207
- _a.label = 6;
44214
+ _b.label = 6;
44208
44215
  case 6:
44209
44216
  this.updateSelectedValue();
44210
- _a.label = 7;
44217
+ _b.label = 7;
44211
44218
  case 7: return [2 /*return*/];
44212
44219
  }
44213
44220
  });
@@ -44225,7 +44232,7 @@
44225
44232
  }
44226
44233
  };
44227
44234
  AutoCompletePickerComponent.prototype.reStructureDataSource = function (sources) {
44228
- var e_2, _a;
44235
+ var e_2, _b;
44229
44236
  if (sources != null && sources.length > 0) {
44230
44237
  var arr = [];
44231
44238
  try {
@@ -44238,7 +44245,7 @@
44238
44245
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
44239
44246
  finally {
44240
44247
  try {
44241
- if (sources_1_1 && !sources_1_1.done && (_a = sources_1.return)) _a.call(sources_1);
44248
+ if (sources_1_1 && !sources_1_1.done && (_b = sources_1.return)) _b.call(sources_1);
44242
44249
  }
44243
44250
  finally { if (e_2) throw e_2.error; }
44244
44251
  }
@@ -44264,8 +44271,8 @@
44264
44271
  return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
44265
44272
  var filters;
44266
44273
  var _this = this;
44267
- return __generator(this, function (_a) {
44268
- switch (_a.label) {
44274
+ return __generator(this, function (_b) {
44275
+ switch (_b.label) {
44269
44276
  case 0:
44270
44277
  if (!this.control.multiple) return [3 /*break*/, 4];
44271
44278
  if (!(obj != null && obj.length > 0)) return [3 /*break*/, 2];
@@ -44273,7 +44280,7 @@
44273
44280
  filters.push(this.newFilter(this.control.valueField, exports.Operator.in, obj));
44274
44281
  return [4 /*yield*/, appendDefaultFilter(filters, this.control.defaultFilters)];
44275
44282
  case 1:
44276
- _a.sent();
44283
+ _b.sent();
44277
44284
  this.control.baseService.getDataDropdownByFilter(filters, this.getDropdownOptions(obj.length)).then(function (res) {
44278
44285
  _this.fireEventAfterGetDataDropDown(res);
44279
44286
  _this.reStructureDataSource(res);
@@ -44286,7 +44293,7 @@
44286
44293
  this.results = [];
44287
44294
  this.selectedValueObject = [];
44288
44295
  resolve(this.selectedValueObject);
44289
- _a.label = 3;
44296
+ _b.label = 3;
44290
44297
  case 3: return [3 /*break*/, 5];
44291
44298
  case 4:
44292
44299
  if (obj != null) {
@@ -44308,7 +44315,7 @@
44308
44315
  this.selectedValueObject = null;
44309
44316
  resolve(this.selectedValueObject);
44310
44317
  }
44311
- _a.label = 5;
44318
+ _b.label = 5;
44312
44319
  case 5: return [2 /*return*/];
44313
44320
  }
44314
44321
  });
@@ -45991,6 +45998,7 @@
45991
45998
  funcSetValueRow: column.funcSetValueRow,
45992
45999
  dataSource: column.dataSource,
45993
46000
  groupCode: column.groupCode,
46001
+ isOverrideFilter: column.isOverrideFilter,
45994
46002
  order: column.order
45995
46003
  });
45996
46004
  if (column.dataType == 'custom') {
@@ -46246,6 +46254,7 @@
46246
46254
  funcSetValueRow: column.funcSetValueRow,
46247
46255
  dataSource: column.dataSource,
46248
46256
  groupCode: column.groupCode,
46257
+ isOverrideFilter: column.isOverrideFilter,
46249
46258
  order: column.order
46250
46259
  });
46251
46260
  if (column.dataType == 'custom') {
@@ -56313,6 +56322,7 @@
56313
56322
  exports.MultiTranslateHttpLoader = MultiTranslateHttpLoader;
56314
56323
  exports.MultipleReferenceDataFormatPipe = MultipleReferenceDataFormatPipe;
56315
56324
  exports.NameValidator = NameValidator;
56325
+ exports.NotificationParams = NotificationParams;
56316
56326
  exports.NotificationService = NotificationService;
56317
56327
  exports.NotifierService = NotifierService;
56318
56328
  exports.NumberCompareValidator = NumberCompareValidator;
@@ -56358,6 +56368,7 @@
56358
56368
  exports.RequiredValidator = RequiredValidator;
56359
56369
  exports.RowColorOption = RowColorOption;
56360
56370
  exports.RowExcel = RowExcel;
56371
+ exports.SEND_ACTION = SEND_ACTION;
56361
56372
  exports.SHARE_COMPONENT_ID = SHARE_COMPONENT_ID;
56362
56373
  exports.SHARE_EVENT = SHARE_EVENT;
56363
56374
  exports.SafeHtmlPipe = SafeHtmlPipe;
@@ -56518,7 +56529,6 @@
56518
56529
  exports.monthDiff = monthDiff;
56519
56530
  exports.multipleSort = multipleSort;
56520
56531
  exports.romanize = romanize;
56521
- exports["ɵ0"] = ɵ0$2;
56522
56532
  exports["ɵ1"] = ɵ1$1;
56523
56533
  exports["ɵ2"] = ɵ2$1;
56524
56534
  exports["ɵ3"] = ɵ3;