tnx-shared 5.3.329 → 5.3.331

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.
@@ -20629,8 +20629,8 @@
20629
20629
  return __awaiter(this, void 0, void 0, function () {
20630
20630
  var profileInfo, idsCanBo, common, filters, idsDonViCanBoLogin_1, idsDonVi_1, coCauToChucFilters_1, newfilters;
20631
20631
  var _this = this;
20632
- return __generator(this, function (_b) {
20633
- switch (_b.label) {
20632
+ return __generator(this, function (_d) {
20633
+ switch (_d.label) {
20634
20634
  case 0:
20635
20635
  profileInfo = this._userService.getCurrentUser();
20636
20636
  idsCanBo = [];
@@ -20648,7 +20648,7 @@
20648
20648
  }
20649
20649
  })];
20650
20650
  case 1:
20651
- _b.sent();
20651
+ _d.sent();
20652
20652
  if (idsDonViCanBoLogin_1.length == 0) {
20653
20653
  return [2 /*return*/, []];
20654
20654
  }
@@ -20665,7 +20665,7 @@
20665
20665
  }
20666
20666
  })];
20667
20667
  case 2:
20668
- _b.sent();
20668
+ _d.sent();
20669
20669
  if (idsDonVi_1.length == 0) {
20670
20670
  return [2 /*return*/, []];
20671
20671
  }
@@ -20680,7 +20680,7 @@
20680
20680
  }
20681
20681
  })];
20682
20682
  case 3:
20683
- _b.sent();
20683
+ _d.sent();
20684
20684
  return [2 /*return*/, idsCanBo];
20685
20685
  case 4: return [2 /*return*/, []];
20686
20686
  }
@@ -20726,8 +20726,8 @@
20726
20726
  CanBoHoSoService.prototype.getInfoAfterGetData = function (dataSource) {
20727
20727
  return __awaiter(this, void 0, void 0, function () {
20728
20728
  var guidEmpty, idsCanBo, lstCanBo;
20729
- return __generator(this, function (_b) {
20730
- switch (_b.label) {
20729
+ return __generator(this, function (_d) {
20730
+ switch (_d.label) {
20731
20731
  case 0:
20732
20732
  guidEmpty = this._commonService.guidEmpty();
20733
20733
  idsCanBo = this._commonService.distinctArray(dataSource
@@ -20735,7 +20735,7 @@
20735
20735
  .map(function (x) { return x.idCanBo; }));
20736
20736
  return [4 /*yield*/, this.getAll([this.newFilter('id', exports.Operator.in, idsCanBo)], 'id,code,hoVaTen,ngaySinh,gioiTinh')];
20737
20737
  case 1:
20738
- lstCanBo = (_b.sent()).data;
20738
+ lstCanBo = (_d.sent()).data;
20739
20739
  dataSource.forEach(function (element) {
20740
20740
  if (element.idCanBo != guidEmpty) {
20741
20741
  var canBo = lstCanBo.find(function (x) { return x.id == element.idCanBo; });
@@ -20766,12 +20766,12 @@
20766
20766
  CanBoHoSoService.prototype.getCoCauToChucRootDonVi_ByUserId = function (userId) {
20767
20767
  return __awaiter(this, void 0, void 0, function () {
20768
20768
  var url;
20769
- return __generator(this, function (_b) {
20770
- switch (_b.label) {
20769
+ return __generator(this, function (_d) {
20770
+ switch (_d.label) {
20771
20771
  case 0:
20772
20772
  url = this.serviceUri + "/GetCoCauToChucRootDonVi_ByUserId/" + userId;
20773
20773
  return [4 /*yield*/, this.defaultGet(url)];
20774
- case 1: return [2 /*return*/, _b.sent()];
20774
+ case 1: return [2 /*return*/, _d.sent()];
20775
20775
  }
20776
20776
  });
20777
20777
  });
@@ -20779,12 +20779,12 @@
20779
20779
  CanBoHoSoService.prototype.GetCoCauToChucRootDonVi_ByListUserId = function (lstUserId) {
20780
20780
  return __awaiter(this, void 0, void 0, function () {
20781
20781
  var url;
20782
- return __generator(this, function (_b) {
20783
- switch (_b.label) {
20782
+ return __generator(this, function (_d) {
20783
+ switch (_d.label) {
20784
20784
  case 0:
20785
20785
  url = this.serviceUri + "/GetCoCauToChucRootDonVi_ByListUserId";
20786
20786
  return [4 /*yield*/, this.defaultPost(url, lstUserId)];
20787
- case 1: return [2 /*return*/, _b.sent()];
20787
+ case 1: return [2 /*return*/, _d.sent()];
20788
20788
  }
20789
20789
  });
20790
20790
  });
@@ -20792,12 +20792,12 @@
20792
20792
  CanBoHoSoService.prototype.getCoCauToChucRootDonVi = function (gridInfo) {
20793
20793
  return __awaiter(this, void 0, void 0, function () {
20794
20794
  var url;
20795
- return __generator(this, function (_b) {
20796
- switch (_b.label) {
20795
+ return __generator(this, function (_d) {
20796
+ switch (_d.label) {
20797
20797
  case 0:
20798
20798
  url = this.serviceUri + "/GetAllByFilter/GetCoCauToChucRootDonVi";
20799
20799
  return [4 /*yield*/, this.defaultPost(url, gridInfo)];
20800
- case 1: return [2 /*return*/, _b.sent()];
20800
+ case 1: return [2 /*return*/, _d.sent()];
20801
20801
  }
20802
20802
  });
20803
20803
  });
@@ -20813,6 +20813,17 @@
20813
20813
  else if (((_a = control.columns) === null || _a === void 0 ? void 0 : _a.length) > 0) {
20814
20814
  columns.push.apply(columns, __spreadArray([], __read(control.columns)));
20815
20815
  }
20816
+ if (control.dataType == exports.EnumControlPickerType.DOITAC && !columns.some(function (item) { return item.code == 'idDoiTac'; })) {
20817
+ columns.push(new EntityPickerColumn({
20818
+ label: 'Đối tác',
20819
+ code: 'idDoiTac',
20820
+ baseService: this._hoSoDoiTacService,
20821
+ multiple: true,
20822
+ fullTextSearch: true,
20823
+ isArrayField: true,
20824
+ width: '200px',
20825
+ }));
20826
+ }
20816
20827
  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) {
20817
20828
  var result = item.hoVaTen;
20818
20829
  if (item.code) {
@@ -20822,23 +20833,57 @@
20822
20833
  result += "- " + item.tenDonVi;
20823
20834
  }
20824
20835
  return result;
20825
- }, required: true, afterGetDataDropdown: function (dataSource, element) {
20826
- _this.getTenDonVi(dataSource);
20827
- }, afterGetDataPicked: function (dataSource, element) { return __awaiter(_this, void 0, void 0, function () {
20828
- return __generator(this, function (_b) {
20829
- switch (_b.label) {
20836
+ }, required: true, afterGetDataDropdown: function (dataSource, element) { return __awaiter(_this, void 0, void 0, function () {
20837
+ var _b, _c, selectedValue, lstIdDoiTac, lstDoiTac_1;
20838
+ return __generator(this, function (_d) {
20839
+ switch (_d.label) {
20840
+ case 0:
20841
+ if (!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length))
20842
+ return [2 /*return*/];
20843
+ selectedValue = element.selectedValue;
20844
+ if (!!selectedValue) return [3 /*break*/, 3];
20845
+ lstIdDoiTac = this._commonService.distinct(dataSource.filter(function (item) { return !!item.idDoiTac; }).flatMap(function (item) { return item.idDoiTac.split(','); }));
20846
+ if (!lstIdDoiTac.length) return [3 /*break*/, 2];
20847
+ return [4 /*yield*/, this._hoSoDoiTacService.getAllWithIgnore([this.newFilter('id', exports.Operator.in, lstIdDoiTac.filter(function (id) { return !!id; }))], 'id,ten')];
20848
+ case 1:
20849
+ lstDoiTac_1 = (_c = (_b = (_d.sent())) === null || _b === void 0 ? void 0 : _b.data) !== null && _c !== void 0 ? _c : [];
20850
+ if (lstDoiTac_1.length) {
20851
+ dataSource.forEach(function (item) {
20852
+ item.tenDoiTac = lstDoiTac_1.filter(function (x) { return item.idDoiTac.includes(x.id); }).map(function (x) { return x.ten; }).join(', ');
20853
+ });
20854
+ }
20855
+ _d.label = 2;
20856
+ case 2: return [3 /*break*/, 4];
20857
+ case 3:
20858
+ dataSource.forEach(function (x) {
20859
+ var _a;
20860
+ if (typeof selectedValue == 'object' && x.id == (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.id)) {
20861
+ x.tenDoiTac = selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.stridDoiTac;
20862
+ }
20863
+ else if (isArray(selectedValue) && selectedValue.includes(x.id))
20864
+ (x.tenDoiTac = (_a = selectedValue.find(function (y) { return y.id == x.id; })) === null || _a === void 0 ? void 0 : _a.stridDoiTac);
20865
+ });
20866
+ _d.label = 4;
20867
+ case 4:
20868
+ this.getTenDonVi(dataSource);
20869
+ return [2 /*return*/];
20870
+ }
20871
+ });
20872
+ }); }, afterGetDataPicked: function (dataSource, element) { return __awaiter(_this, void 0, void 0, function () {
20873
+ return __generator(this, function (_d) {
20874
+ switch (_d.label) {
20830
20875
  case 0: return [4 /*yield*/, this.getDataPlus(dataSource)];
20831
20876
  case 1:
20832
- _b.sent();
20877
+ _d.sent();
20833
20878
  return [2 /*return*/];
20834
20879
  }
20835
20880
  });
20836
20881
  }); }, afterGetDataUnPicked: function (dataSource, element) { return __awaiter(_this, void 0, void 0, function () {
20837
- return __generator(this, function (_b) {
20838
- switch (_b.label) {
20882
+ return __generator(this, function (_d) {
20883
+ switch (_d.label) {
20839
20884
  case 0: return [4 /*yield*/, this.getDataPlus(dataSource)];
20840
20885
  case 1:
20841
- _b.sent();
20886
+ _d.sent();
20842
20887
  return [2 /*return*/];
20843
20888
  }
20844
20889
  });
@@ -20859,17 +20904,6 @@
20859
20904
  }
20860
20905
  return filters;
20861
20906
  } }, control), { columns: columns }));
20862
- if (control.dataType == exports.EnumControlPickerType.DOITAC && !this.lstEntityPickerColumn.some(function (item) { return item.code == 'idDoiTac'; })) {
20863
- this.lstEntityPickerColumn.push(new EntityPickerColumn({
20864
- label: 'Đối tác',
20865
- code: 'idDoiTac',
20866
- baseService: this._hoSoDoiTacService,
20867
- multiple: true,
20868
- fullTextSearch: true,
20869
- isArrayField: true,
20870
- width: '200px',
20871
- }));
20872
- }
20873
20907
  if (result.fieldPlus) {
20874
20908
  if (result.fieldPlus
20875
20909
  .split(',')
@@ -20878,15 +20912,12 @@
20878
20912
  result.fieldPlus += ',idNgachVienChuc';
20879
20913
  }
20880
20914
  }
20881
- else {
20915
+ if (!result.isOverrideColumns)
20882
20916
  result.fieldPlus = 'idNgachVienChuc,ngaySinh,ngaySinh2,chucDanhs,idHocHam,idHocVi,dienThoaiDiDong,code';
20883
- }
20884
20917
  return result;
20885
20918
  };
20886
20919
  CanBoHoSoService.prototype.getTenDonVi = function (dataSource) {
20887
- var e_1, _b;
20888
- if (!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length))
20889
- return;
20920
+ var e_1, _d;
20890
20921
  try {
20891
20922
  for (var dataSource_1 = __values(dataSource), dataSource_1_1 = dataSource_1.next(); !dataSource_1_1.done; dataSource_1_1 = dataSource_1.next()) {
20892
20923
  var item = dataSource_1_1.value;
@@ -20905,7 +20936,7 @@
20905
20936
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
20906
20937
  finally {
20907
20938
  try {
20908
- if (dataSource_1_1 && !dataSource_1_1.done && (_b = dataSource_1.return)) _b.call(dataSource_1);
20939
+ if (dataSource_1_1 && !dataSource_1_1.done && (_d = dataSource_1.return)) _d.call(dataSource_1);
20909
20940
  }
20910
20941
  finally { if (e_1) throw e_1.error; }
20911
20942
  }
@@ -20913,9 +20944,9 @@
20913
20944
  CanBoHoSoService.prototype.getDataPlus = function (dataSource) {
20914
20945
  var _a;
20915
20946
  return __awaiter(this, void 0, void 0, function () {
20916
- var dataSource_2, dataSource_2_1, item, _b, _c, i, _d, _e, i;
20917
- var e_2, _f, e_3, _g, e_4, _h;
20918
- return __generator(this, function (_j) {
20947
+ var dataSource_2, dataSource_2_1, item, _d, _e, i, _f, _g, i;
20948
+ var e_2, _h, e_3, _j, e_4, _k;
20949
+ return __generator(this, function (_l) {
20919
20950
  try {
20920
20951
  for (dataSource_2 = __values(dataSource), dataSource_2_1 = dataSource_2.next(); !dataSource_2_1.done; dataSource_2_1 = dataSource_2.next()) {
20921
20952
  item = dataSource_2_1.value;
@@ -20925,8 +20956,8 @@
20925
20956
  item.strChucDanhs = '';
20926
20957
  if (item.chucDanhs) {
20927
20958
  try {
20928
- for (_b = (e_3 = void 0, __values(item.chucDanhs)), _c = _b.next(); !_c.done; _c = _b.next()) {
20929
- i = _c.value;
20959
+ for (_d = (e_3 = void 0, __values(item.chucDanhs)), _e = _d.next(); !_e.done; _e = _d.next()) {
20960
+ i = _e.value;
20930
20961
  if (i.chucDanh) {
20931
20962
  item.strChucDanhs += i.chucDanh;
20932
20963
  }
@@ -20935,7 +20966,7 @@
20935
20966
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
20936
20967
  finally {
20937
20968
  try {
20938
- if (_c && !_c.done && (_g = _b.return)) _g.call(_b);
20969
+ if (_e && !_e.done && (_j = _d.return)) _j.call(_d);
20939
20970
  }
20940
20971
  finally { if (e_3) throw e_3.error; }
20941
20972
  }
@@ -20943,8 +20974,8 @@
20943
20974
  item.strDonViChucVus = '';
20944
20975
  if ((_a = item.donViChucVus) === null || _a === void 0 ? void 0 : _a.length) {
20945
20976
  try {
20946
- for (_d = (e_4 = void 0, __values(item.donViChucVus)), _e = _d.next(); !_e.done; _e = _d.next()) {
20947
- i = _e.value;
20977
+ for (_f = (e_4 = void 0, __values(item.donViChucVus)), _g = _f.next(); !_g.done; _g = _f.next()) {
20978
+ i = _g.value;
20948
20979
  if (i.chucVu) {
20949
20980
  item.strDonViChucVus += "<p>" + i.chucVu + " - " + i.donVi + "</p>";
20950
20981
  }
@@ -20956,7 +20987,7 @@
20956
20987
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
20957
20988
  finally {
20958
20989
  try {
20959
- if (_e && !_e.done && (_h = _d.return)) _h.call(_d);
20990
+ if (_g && !_g.done && (_k = _f.return)) _k.call(_f);
20960
20991
  }
20961
20992
  finally { if (e_4) throw e_4.error; }
20962
20993
  }
@@ -20973,7 +21004,7 @@
20973
21004
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
20974
21005
  finally {
20975
21006
  try {
20976
- if (dataSource_2_1 && !dataSource_2_1.done && (_f = dataSource_2.return)) _f.call(dataSource_2);
21007
+ if (dataSource_2_1 && !dataSource_2_1.done && (_h = dataSource_2.return)) _h.call(dataSource_2);
20977
21008
  }
20978
21009
  finally { if (e_2) throw e_2.error; }
20979
21010
  }
@@ -21000,12 +21031,12 @@
21000
21031
  CanBoHoSoService.prototype.getLyLichKhoaHocCanBo = function (id) {
21001
21032
  return __awaiter(this, void 0, void 0, function () {
21002
21033
  var url;
21003
- return __generator(this, function (_b) {
21004
- switch (_b.label) {
21034
+ return __generator(this, function (_d) {
21035
+ switch (_d.label) {
21005
21036
  case 0:
21006
21037
  url = this.serviceUri + "/GetLyLichKhoaHocCanBo/" + id;
21007
21038
  return [4 /*yield*/, this.defaultGet(url)];
21008
- case 1: return [2 /*return*/, _b.sent()];
21039
+ case 1: return [2 /*return*/, _d.sent()];
21009
21040
  }
21010
21041
  });
21011
21042
  });
@@ -21013,12 +21044,12 @@
21013
21044
  CanBoHoSoService.prototype.GetDonViChucVu = function (idCanBo) {
21014
21045
  return __awaiter(this, void 0, void 0, function () {
21015
21046
  var url;
21016
- return __generator(this, function (_b) {
21017
- switch (_b.label) {
21047
+ return __generator(this, function (_d) {
21048
+ switch (_d.label) {
21018
21049
  case 0:
21019
21050
  url = this.serviceUri + "/GetDonViChucVu/" + idCanBo;
21020
21051
  return [4 /*yield*/, this.defaultGet(url)];
21021
- case 1: return [2 /*return*/, _b.sent()];
21052
+ case 1: return [2 /*return*/, _d.sent()];
21022
21053
  }
21023
21054
  });
21024
21055
  });
@@ -44416,9 +44447,9 @@
44416
44447
  displayField: this.control.displayField,
44417
44448
  valueField: this.control.valueField,
44418
44449
  fieldPlus: this.control.fieldPlus,
44419
- funcGetLabel: this.control.funcGetLabel,
44420
- plusUrl: this.control.plusUrl,
44421
44450
  sorts: this.control.sorts,
44451
+ funcGetLabel: this.control.funcGetLabel,
44452
+ plusUrl: this.control.plusUrl
44422
44453
  });
44423
44454
  if (pageSize) {
44424
44455
  result.pageSize = pageSize;
@@ -44478,7 +44509,9 @@
44478
44509
  case 3: return [4 /*yield*/, this.control.baseService.getDataDropdownByFilter(filters, this.getDropdownOptions())];
44479
44510
  case 4:
44480
44511
  dataSource = _b.sent();
44481
- this.fireEventAfterGetDataDropDown(dataSource);
44512
+ return [4 /*yield*/, this.fireEventAfterGetDataDropDown(dataSource)];
44513
+ case 5:
44514
+ _b.sent();
44482
44515
  this.reStructureDataSource(dataSource);
44483
44516
  this.results = this.dataSource;
44484
44517
  // Return để một số nơi khác dùng, k remove
@@ -44488,9 +44521,19 @@
44488
44521
  });
44489
44522
  };
44490
44523
  AutoCompletePickerComponent.prototype.fireEventAfterGetDataDropDown = function (dataSource) {
44491
- if (this.control.afterGetDataDropdown) {
44492
- this.control.afterGetDataDropdown(dataSource, this);
44493
- }
44524
+ return __awaiter(this, void 0, void 0, function () {
44525
+ return __generator(this, function (_b) {
44526
+ switch (_b.label) {
44527
+ case 0:
44528
+ if (!this.control.afterGetDataDropdown) return [3 /*break*/, 2];
44529
+ return [4 /*yield*/, this.control.afterGetDataDropdown(dataSource, this)];
44530
+ case 1:
44531
+ _b.sent();
44532
+ _b.label = 2;
44533
+ case 2: return [2 /*return*/];
44534
+ }
44535
+ });
44536
+ });
44494
44537
  };
44495
44538
  AutoCompletePickerComponent.prototype.resetControl = function () {
44496
44539
  // if (this._value != null) {
@@ -44673,32 +44716,36 @@
44673
44716
  switch (_b.label) {
44674
44717
  case 0:
44675
44718
  this.showFormPicker = false;
44676
- if (!this.dirty) return [3 /*break*/, 7];
44677
- if (!this.control.multiple) return [3 /*break*/, 3];
44719
+ if (!this.dirty) return [3 /*break*/, 9];
44720
+ if (!this.control.multiple) return [3 /*break*/, 4];
44678
44721
  dataSource = [];
44679
- if (!(this.value && this.value.length > 0)) return [3 /*break*/, 2];
44722
+ if (!(this.value && this.value.length > 0)) return [3 /*break*/, 3];
44680
44723
  return [4 /*yield*/, this.control.baseService.getDataDropdownByFilter([
44681
44724
  this.newFilter(this.control.valueField, exports.Operator.in, this.value)
44682
44725
  ], this.getDropdownOptions(this.value.length))];
44683
44726
  case 1:
44684
44727
  dataSource = _b.sent();
44685
- this.fireEventAfterGetDataDropDown(dataSource);
44686
- _b.label = 2;
44728
+ return [4 /*yield*/, this.fireEventAfterGetDataDropDown(dataSource)];
44687
44729
  case 2:
44730
+ _b.sent();
44731
+ _b.label = 3;
44732
+ case 3:
44688
44733
  this.reStructureDataSource(dataSource);
44689
44734
  this.selectedValueObject = this.dataSource;
44690
- return [3 /*break*/, 6];
44691
- case 3:
44735
+ return [3 /*break*/, 8];
44736
+ case 4:
44692
44737
  dataSource = [];
44693
- if (!this.value) return [3 /*break*/, 5];
44738
+ if (!this.value) return [3 /*break*/, 7];
44694
44739
  return [4 /*yield*/, this.control.baseService.getDataDropdownByFilter([
44695
44740
  this.newFilter(this.control.valueField, exports.Operator.equal, this.value)
44696
44741
  ], this.getDropdownOptions(1))];
44697
- case 4:
44698
- dataSource = _b.sent();
44699
- this.fireEventAfterGetDataDropDown(dataSource);
44700
- _b.label = 5;
44701
44742
  case 5:
44743
+ dataSource = _b.sent();
44744
+ return [4 /*yield*/, this.fireEventAfterGetDataDropDown(dataSource)];
44745
+ case 6:
44746
+ _b.sent();
44747
+ _b.label = 7;
44748
+ case 7:
44702
44749
  this.reStructureDataSource(dataSource);
44703
44750
  if (this.dataSource.length > 0) {
44704
44751
  this.selectedValueObject = this.dataSource[0];
@@ -44706,11 +44753,11 @@
44706
44753
  else {
44707
44754
  this.selectedValueObject = null;
44708
44755
  }
44709
- _b.label = 6;
44710
- case 6:
44756
+ _b.label = 8;
44757
+ case 8:
44711
44758
  this.updateSelectedValue();
44712
- _b.label = 7;
44713
- case 7: return [2 /*return*/];
44759
+ _b.label = 9;
44760
+ case 9: return [2 /*return*/];
44714
44761
  }
44715
44762
  });
44716
44763
  });
@@ -44776,13 +44823,20 @@
44776
44823
  return [4 /*yield*/, appendDefaultFilter(filters, this.control.defaultFilters)];
44777
44824
  case 1:
44778
44825
  _b.sent();
44779
- this.control.baseService.getDataDropdownByFilter(filters, this.getDropdownOptions(obj.length)).then(function (res) {
44780
- _this.fireEventAfterGetDataDropDown(res);
44781
- _this.reStructureDataSource(res);
44782
- _this.results = _this.dataSource;
44783
- _this.selectedValueObject = _this.dataSource;
44784
- resolve(_this.selectedValueObject);
44785
- });
44826
+ this.control.baseService.getDataDropdownByFilter(filters, this.getDropdownOptions(obj.length)).then(function (res) { return __awaiter(_this, void 0, void 0, function () {
44827
+ return __generator(this, function (_b) {
44828
+ switch (_b.label) {
44829
+ case 0: return [4 /*yield*/, this.fireEventAfterGetDataDropDown(res)];
44830
+ case 1:
44831
+ _b.sent();
44832
+ this.reStructureDataSource(res);
44833
+ this.results = this.dataSource;
44834
+ this.selectedValueObject = this.dataSource;
44835
+ resolve(this.selectedValueObject);
44836
+ return [2 /*return*/];
44837
+ }
44838
+ });
44839
+ }); });
44786
44840
  return [3 /*break*/, 3];
44787
44841
  case 2:
44788
44842
  this.results = [];
@@ -44792,18 +44846,26 @@
44792
44846
  case 3: return [3 /*break*/, 5];
44793
44847
  case 4:
44794
44848
  if (obj != null) {
44795
- this.control.baseService.getDataDropdownByFilter([this.newFilter(this.control.valueField, exports.Operator.equal, obj)], this.getDropdownOptions(1)).then(function (res) {
44796
- if ((res === null || res === void 0 ? void 0 : res.length) > 0) {
44797
- _this.fireEventAfterGetDataDropDown(res);
44798
- _this.reStructureDataSource(res);
44799
- _this.results = _this.dataSource;
44800
- _this.selectedValueObject = _this.dataSource[0];
44801
- resolve(_this.selectedValueObject);
44802
- if (_this.control.callBack && _this.control.callBack.select) {
44803
- _this.control.callBack.select(_this.selectedValue);
44849
+ this.control.baseService.getDataDropdownByFilter([this.newFilter(this.control.valueField, exports.Operator.equal, obj)], this.getDropdownOptions(1)).then(function (res) { return __awaiter(_this, void 0, void 0, function () {
44850
+ return __generator(this, function (_b) {
44851
+ switch (_b.label) {
44852
+ case 0:
44853
+ if (!((res === null || res === void 0 ? void 0 : res.length) > 0)) return [3 /*break*/, 2];
44854
+ return [4 /*yield*/, this.fireEventAfterGetDataDropDown(res)];
44855
+ case 1:
44856
+ _b.sent();
44857
+ this.reStructureDataSource(res);
44858
+ this.results = this.dataSource;
44859
+ this.selectedValueObject = this.dataSource[0];
44860
+ resolve(this.selectedValueObject);
44861
+ if (this.control.callBack && this.control.callBack.select) {
44862
+ this.control.callBack.select(this.selectedValue);
44863
+ }
44864
+ _b.label = 2;
44865
+ case 2: return [2 /*return*/];
44804
44866
  }
44805
- }
44806
- });
44867
+ });
44868
+ }); });
44807
44869
  }
44808
44870
  else {
44809
44871
  this.results = [];
@@ -46601,12 +46663,12 @@
46601
46663
  _b.sent();
46602
46664
  _b.label = 5;
46603
46665
  case 5:
46604
- if (this.setting.columnSetting.sortField) {
46605
- gridInfo.sorts.push({
46606
- field: this.setting.columnSetting.sortField,
46607
- dir: this.setting.columnSetting.sortDir ? 1 : -1
46608
- });
46609
- }
46666
+ // if (this.setting.columnSetting.sortField) {
46667
+ // gridInfo.sorts.push(<Sort>{
46668
+ // field: this.setting.columnSetting.sortField,
46669
+ // dir: this.setting.columnSetting.sortDir ? 1 : -1
46670
+ // });
46671
+ // }
46610
46672
  if (this.searchData && Array.isArray(this.searchData.lstData)) {
46611
46673
  gridInfo.filters.push(this.newFilter(this.searchData.fieldFilter, exports.Operator.in, this.searchData.lstData));
46612
46674
  }
@@ -47341,14 +47403,7 @@
47341
47403
  case 4:
47342
47404
  _b.sent();
47343
47405
  _b.label = 5;
47344
- case 5:
47345
- if (this.setting.columnSetting.sortField) {
47346
- gridInfo.sorts.push({
47347
- field: this.setting.columnSetting.sortField,
47348
- dir: this.setting.columnSetting.sortDir ? 1 : -1
47349
- });
47350
- }
47351
- return [2 /*return*/];
47406
+ case 5: return [2 /*return*/];
47352
47407
  }
47353
47408
  });
47354
47409
  });
@@ -47793,6 +47848,8 @@
47793
47848
  this.setting.fieldSearchText = this.control.fieldSearchText;
47794
47849
  this.setting.showEditLink = !this.readOnly && this.control.showEditLink;
47795
47850
  this.setting.hiddenPageSetting = this.control.hiddenPageSetting;
47851
+ this.setting.columnSetting.sortField = this.control.sortField;
47852
+ this.setting.columnSetting.sortDir = this.control.sortDir;
47796
47853
  this.plusUrl = this.control.plusUrl;
47797
47854
  // Todo: HieuND
47798
47855
  this.control.columns.forEach(function (column) {