tnx-shared 5.3.261 → 5.3.263

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.
@@ -6251,7 +6251,7 @@
6251
6251
  switch (_c.label) {
6252
6252
  case 0:
6253
6253
  dataSource = [];
6254
- return [4 /*yield*/, this.doGetAll(groupCode)];
6254
+ return [4 /*yield*/, this.doGetAllCustom(groupCode)];
6255
6255
  case 1:
6256
6256
  result = _c.sent();
6257
6257
  result.data.forEach(function (element) {
@@ -6487,6 +6487,16 @@
6487
6487
  });
6488
6488
  });
6489
6489
  };
6490
+ // thực hiện get list singleCategory theo groupCategoryCode trên redis
6491
+ MasterDataService.prototype.doGetAllCustom = function (groupCode) {
6492
+ return __awaiter(this, void 0, void 0, function () {
6493
+ var uri;
6494
+ return __generator(this, function (_c) {
6495
+ uri = this.singleCategoryEndpoint + "/GetDataByGroupCode/" + groupCode;
6496
+ return [2 /*return*/, this._httpClient.get(uri).toPromise()];
6497
+ });
6498
+ });
6499
+ };
6490
6500
  MasterDataService.prototype.getData = function (uri, gridInfo) {
6491
6501
  return this._httpClient.post(uri, gridInfo).toPromise();
6492
6502
  };
@@ -6709,10 +6719,12 @@
6709
6719
  _this.get(groupCode)
6710
6720
  .then(function (res) {
6711
6721
  var result = [];
6712
- if (arrValue == null)
6722
+ if (arrValue == null) {
6713
6723
  result = res;
6714
- else
6724
+ }
6725
+ else {
6715
6726
  result = res.filter(function (x) { return arrValue.some(function (v) { return v == x[options.valueField]; }); });
6727
+ }
6716
6728
  resolve(result);
6717
6729
  }).catch(function (err) { return reject(err); });
6718
6730
  });
@@ -13686,8 +13698,9 @@
13686
13698
  var value = event.value;
13687
13699
  if (!isArray(value) || !(value === null || value === void 0 ? void 0 : value.length))
13688
13700
  return true;
13689
- var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
13690
- return !value.some(function (x) { return !re.test(String(x).toLowerCase()); });
13701
+ var strValue = value.join(',').replaceAll(' ', '');
13702
+ var re = /^(([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+([;,.](([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}){1,25})+)*$/;
13703
+ return re.test(strValue);
13691
13704
  };
13692
13705
  LstEmailValidator.prototype.getError = function () {
13693
13706
  return 'Có phần tử không đúng định dạng thư điện tử';