tnx-shared 5.3.329 → 5.3.330

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,53 @@
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
+ selectedValue = element.selectedValue;
20842
+ if (!!selectedValue) return [3 /*break*/, 2];
20843
+ lstIdDoiTac = this._commonService.distinct(dataSource.filter(function (item) { return !!item.idDoiTac; }).flatMap(function (item) { return item.idDoiTac.split(','); }));
20844
+ return [4 /*yield*/, this._hoSoDoiTacService.getAllWithIgnore([this.newFilter('id', exports.Operator.in, lstIdDoiTac)], 'id,ten')];
20845
+ case 1:
20846
+ lstDoiTac_1 = (_c = (_b = (_d.sent())) === null || _b === void 0 ? void 0 : _b.data) !== null && _c !== void 0 ? _c : [];
20847
+ if (lstDoiTac_1.length) {
20848
+ dataSource.forEach(function (item) {
20849
+ item.tenDoiTac = lstDoiTac_1.filter(function (x) { return item.idDoiTac.includes(x.id); }).map(function (x) { return x.ten; }).join(', ');
20850
+ });
20851
+ }
20852
+ return [3 /*break*/, 3];
20853
+ case 2:
20854
+ dataSource.forEach(function (x) {
20855
+ var _a;
20856
+ if (typeof selectedValue == 'object' && x.id == (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.id)) {
20857
+ x.tenDoiTac = selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.stridDoiTac;
20858
+ }
20859
+ else if (isArray(selectedValue) && selectedValue.includes(x.id))
20860
+ (x.tenDoiTac = (_a = selectedValue.find(function (y) { return y.id == x.id; })) === null || _a === void 0 ? void 0 : _a.stridDoiTac);
20861
+ });
20862
+ _d.label = 3;
20863
+ case 3:
20864
+ this.getTenDonVi(dataSource);
20865
+ return [2 /*return*/];
20866
+ }
20867
+ });
20868
+ }); }, afterGetDataPicked: function (dataSource, element) { return __awaiter(_this, void 0, void 0, function () {
20869
+ return __generator(this, function (_d) {
20870
+ switch (_d.label) {
20830
20871
  case 0: return [4 /*yield*/, this.getDataPlus(dataSource)];
20831
20872
  case 1:
20832
- _b.sent();
20873
+ _d.sent();
20833
20874
  return [2 /*return*/];
20834
20875
  }
20835
20876
  });
20836
20877
  }); }, afterGetDataUnPicked: function (dataSource, element) { return __awaiter(_this, void 0, void 0, function () {
20837
- return __generator(this, function (_b) {
20838
- switch (_b.label) {
20878
+ return __generator(this, function (_d) {
20879
+ switch (_d.label) {
20839
20880
  case 0: return [4 /*yield*/, this.getDataPlus(dataSource)];
20840
20881
  case 1:
20841
- _b.sent();
20882
+ _d.sent();
20842
20883
  return [2 /*return*/];
20843
20884
  }
20844
20885
  });
@@ -20859,17 +20900,6 @@
20859
20900
  }
20860
20901
  return filters;
20861
20902
  } }, 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
20903
  if (result.fieldPlus) {
20874
20904
  if (result.fieldPlus
20875
20905
  .split(',')
@@ -20884,7 +20914,7 @@
20884
20914
  return result;
20885
20915
  };
20886
20916
  CanBoHoSoService.prototype.getTenDonVi = function (dataSource) {
20887
- var e_1, _b;
20917
+ var e_1, _d;
20888
20918
  if (!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length))
20889
20919
  return;
20890
20920
  try {
@@ -20905,7 +20935,7 @@
20905
20935
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
20906
20936
  finally {
20907
20937
  try {
20908
- if (dataSource_1_1 && !dataSource_1_1.done && (_b = dataSource_1.return)) _b.call(dataSource_1);
20938
+ if (dataSource_1_1 && !dataSource_1_1.done && (_d = dataSource_1.return)) _d.call(dataSource_1);
20909
20939
  }
20910
20940
  finally { if (e_1) throw e_1.error; }
20911
20941
  }
@@ -20913,9 +20943,9 @@
20913
20943
  CanBoHoSoService.prototype.getDataPlus = function (dataSource) {
20914
20944
  var _a;
20915
20945
  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) {
20946
+ var dataSource_2, dataSource_2_1, item, _d, _e, i, _f, _g, i;
20947
+ var e_2, _h, e_3, _j, e_4, _k;
20948
+ return __generator(this, function (_l) {
20919
20949
  try {
20920
20950
  for (dataSource_2 = __values(dataSource), dataSource_2_1 = dataSource_2.next(); !dataSource_2_1.done; dataSource_2_1 = dataSource_2.next()) {
20921
20951
  item = dataSource_2_1.value;
@@ -20925,8 +20955,8 @@
20925
20955
  item.strChucDanhs = '';
20926
20956
  if (item.chucDanhs) {
20927
20957
  try {
20928
- for (_b = (e_3 = void 0, __values(item.chucDanhs)), _c = _b.next(); !_c.done; _c = _b.next()) {
20929
- i = _c.value;
20958
+ for (_d = (e_3 = void 0, __values(item.chucDanhs)), _e = _d.next(); !_e.done; _e = _d.next()) {
20959
+ i = _e.value;
20930
20960
  if (i.chucDanh) {
20931
20961
  item.strChucDanhs += i.chucDanh;
20932
20962
  }
@@ -20935,7 +20965,7 @@
20935
20965
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
20936
20966
  finally {
20937
20967
  try {
20938
- if (_c && !_c.done && (_g = _b.return)) _g.call(_b);
20968
+ if (_e && !_e.done && (_j = _d.return)) _j.call(_d);
20939
20969
  }
20940
20970
  finally { if (e_3) throw e_3.error; }
20941
20971
  }
@@ -20943,8 +20973,8 @@
20943
20973
  item.strDonViChucVus = '';
20944
20974
  if ((_a = item.donViChucVus) === null || _a === void 0 ? void 0 : _a.length) {
20945
20975
  try {
20946
- for (_d = (e_4 = void 0, __values(item.donViChucVus)), _e = _d.next(); !_e.done; _e = _d.next()) {
20947
- i = _e.value;
20976
+ for (_f = (e_4 = void 0, __values(item.donViChucVus)), _g = _f.next(); !_g.done; _g = _f.next()) {
20977
+ i = _g.value;
20948
20978
  if (i.chucVu) {
20949
20979
  item.strDonViChucVus += "<p>" + i.chucVu + " - " + i.donVi + "</p>";
20950
20980
  }
@@ -20956,7 +20986,7 @@
20956
20986
  catch (e_4_1) { e_4 = { error: e_4_1 }; }
20957
20987
  finally {
20958
20988
  try {
20959
- if (_e && !_e.done && (_h = _d.return)) _h.call(_d);
20989
+ if (_g && !_g.done && (_k = _f.return)) _k.call(_f);
20960
20990
  }
20961
20991
  finally { if (e_4) throw e_4.error; }
20962
20992
  }
@@ -20973,7 +21003,7 @@
20973
21003
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
20974
21004
  finally {
20975
21005
  try {
20976
- if (dataSource_2_1 && !dataSource_2_1.done && (_f = dataSource_2.return)) _f.call(dataSource_2);
21006
+ if (dataSource_2_1 && !dataSource_2_1.done && (_h = dataSource_2.return)) _h.call(dataSource_2);
20977
21007
  }
20978
21008
  finally { if (e_2) throw e_2.error; }
20979
21009
  }
@@ -21000,12 +21030,12 @@
21000
21030
  CanBoHoSoService.prototype.getLyLichKhoaHocCanBo = function (id) {
21001
21031
  return __awaiter(this, void 0, void 0, function () {
21002
21032
  var url;
21003
- return __generator(this, function (_b) {
21004
- switch (_b.label) {
21033
+ return __generator(this, function (_d) {
21034
+ switch (_d.label) {
21005
21035
  case 0:
21006
21036
  url = this.serviceUri + "/GetLyLichKhoaHocCanBo/" + id;
21007
21037
  return [4 /*yield*/, this.defaultGet(url)];
21008
- case 1: return [2 /*return*/, _b.sent()];
21038
+ case 1: return [2 /*return*/, _d.sent()];
21009
21039
  }
21010
21040
  });
21011
21041
  });
@@ -21013,12 +21043,12 @@
21013
21043
  CanBoHoSoService.prototype.GetDonViChucVu = function (idCanBo) {
21014
21044
  return __awaiter(this, void 0, void 0, function () {
21015
21045
  var url;
21016
- return __generator(this, function (_b) {
21017
- switch (_b.label) {
21046
+ return __generator(this, function (_d) {
21047
+ switch (_d.label) {
21018
21048
  case 0:
21019
21049
  url = this.serviceUri + "/GetDonViChucVu/" + idCanBo;
21020
21050
  return [4 /*yield*/, this.defaultGet(url)];
21021
- case 1: return [2 /*return*/, _b.sent()];
21051
+ case 1: return [2 /*return*/, _d.sent()];
21022
21052
  }
21023
21053
  });
21024
21054
  });
@@ -44416,9 +44446,9 @@
44416
44446
  displayField: this.control.displayField,
44417
44447
  valueField: this.control.valueField,
44418
44448
  fieldPlus: this.control.fieldPlus,
44419
- funcGetLabel: this.control.funcGetLabel,
44420
- plusUrl: this.control.plusUrl,
44421
44449
  sorts: this.control.sorts,
44450
+ funcGetLabel: this.control.funcGetLabel,
44451
+ plusUrl: this.control.plusUrl
44422
44452
  });
44423
44453
  if (pageSize) {
44424
44454
  result.pageSize = pageSize;
@@ -44478,7 +44508,9 @@
44478
44508
  case 3: return [4 /*yield*/, this.control.baseService.getDataDropdownByFilter(filters, this.getDropdownOptions())];
44479
44509
  case 4:
44480
44510
  dataSource = _b.sent();
44481
- this.fireEventAfterGetDataDropDown(dataSource);
44511
+ return [4 /*yield*/, this.fireEventAfterGetDataDropDown(dataSource)];
44512
+ case 5:
44513
+ _b.sent();
44482
44514
  this.reStructureDataSource(dataSource);
44483
44515
  this.results = this.dataSource;
44484
44516
  // Return để một số nơi khác dùng, k remove
@@ -44488,9 +44520,19 @@
44488
44520
  });
44489
44521
  };
44490
44522
  AutoCompletePickerComponent.prototype.fireEventAfterGetDataDropDown = function (dataSource) {
44491
- if (this.control.afterGetDataDropdown) {
44492
- this.control.afterGetDataDropdown(dataSource, this);
44493
- }
44523
+ return __awaiter(this, void 0, void 0, function () {
44524
+ return __generator(this, function (_b) {
44525
+ switch (_b.label) {
44526
+ case 0:
44527
+ if (!this.control.afterGetDataDropdown) return [3 /*break*/, 2];
44528
+ return [4 /*yield*/, this.control.afterGetDataDropdown(dataSource, this)];
44529
+ case 1:
44530
+ _b.sent();
44531
+ _b.label = 2;
44532
+ case 2: return [2 /*return*/];
44533
+ }
44534
+ });
44535
+ });
44494
44536
  };
44495
44537
  AutoCompletePickerComponent.prototype.resetControl = function () {
44496
44538
  // if (this._value != null) {
@@ -44673,32 +44715,36 @@
44673
44715
  switch (_b.label) {
44674
44716
  case 0:
44675
44717
  this.showFormPicker = false;
44676
- if (!this.dirty) return [3 /*break*/, 7];
44677
- if (!this.control.multiple) return [3 /*break*/, 3];
44718
+ if (!this.dirty) return [3 /*break*/, 9];
44719
+ if (!this.control.multiple) return [3 /*break*/, 4];
44678
44720
  dataSource = [];
44679
- if (!(this.value && this.value.length > 0)) return [3 /*break*/, 2];
44721
+ if (!(this.value && this.value.length > 0)) return [3 /*break*/, 3];
44680
44722
  return [4 /*yield*/, this.control.baseService.getDataDropdownByFilter([
44681
44723
  this.newFilter(this.control.valueField, exports.Operator.in, this.value)
44682
44724
  ], this.getDropdownOptions(this.value.length))];
44683
44725
  case 1:
44684
44726
  dataSource = _b.sent();
44685
- this.fireEventAfterGetDataDropDown(dataSource);
44686
- _b.label = 2;
44727
+ return [4 /*yield*/, this.fireEventAfterGetDataDropDown(dataSource)];
44687
44728
  case 2:
44729
+ _b.sent();
44730
+ _b.label = 3;
44731
+ case 3:
44688
44732
  this.reStructureDataSource(dataSource);
44689
44733
  this.selectedValueObject = this.dataSource;
44690
- return [3 /*break*/, 6];
44691
- case 3:
44734
+ return [3 /*break*/, 8];
44735
+ case 4:
44692
44736
  dataSource = [];
44693
- if (!this.value) return [3 /*break*/, 5];
44737
+ if (!this.value) return [3 /*break*/, 7];
44694
44738
  return [4 /*yield*/, this.control.baseService.getDataDropdownByFilter([
44695
44739
  this.newFilter(this.control.valueField, exports.Operator.equal, this.value)
44696
44740
  ], this.getDropdownOptions(1))];
44697
- case 4:
44698
- dataSource = _b.sent();
44699
- this.fireEventAfterGetDataDropDown(dataSource);
44700
- _b.label = 5;
44701
44741
  case 5:
44742
+ dataSource = _b.sent();
44743
+ return [4 /*yield*/, this.fireEventAfterGetDataDropDown(dataSource)];
44744
+ case 6:
44745
+ _b.sent();
44746
+ _b.label = 7;
44747
+ case 7:
44702
44748
  this.reStructureDataSource(dataSource);
44703
44749
  if (this.dataSource.length > 0) {
44704
44750
  this.selectedValueObject = this.dataSource[0];
@@ -44706,11 +44752,11 @@
44706
44752
  else {
44707
44753
  this.selectedValueObject = null;
44708
44754
  }
44709
- _b.label = 6;
44710
- case 6:
44755
+ _b.label = 8;
44756
+ case 8:
44711
44757
  this.updateSelectedValue();
44712
- _b.label = 7;
44713
- case 7: return [2 /*return*/];
44758
+ _b.label = 9;
44759
+ case 9: return [2 /*return*/];
44714
44760
  }
44715
44761
  });
44716
44762
  });
@@ -44776,13 +44822,20 @@
44776
44822
  return [4 /*yield*/, appendDefaultFilter(filters, this.control.defaultFilters)];
44777
44823
  case 1:
44778
44824
  _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
- });
44825
+ this.control.baseService.getDataDropdownByFilter(filters, this.getDropdownOptions(obj.length)).then(function (res) { return __awaiter(_this, void 0, void 0, function () {
44826
+ return __generator(this, function (_b) {
44827
+ switch (_b.label) {
44828
+ case 0: return [4 /*yield*/, this.fireEventAfterGetDataDropDown(res)];
44829
+ case 1:
44830
+ _b.sent();
44831
+ this.reStructureDataSource(res);
44832
+ this.results = this.dataSource;
44833
+ this.selectedValueObject = this.dataSource;
44834
+ resolve(this.selectedValueObject);
44835
+ return [2 /*return*/];
44836
+ }
44837
+ });
44838
+ }); });
44786
44839
  return [3 /*break*/, 3];
44787
44840
  case 2:
44788
44841
  this.results = [];
@@ -44792,18 +44845,26 @@
44792
44845
  case 3: return [3 /*break*/, 5];
44793
44846
  case 4:
44794
44847
  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);
44848
+ 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 () {
44849
+ return __generator(this, function (_b) {
44850
+ switch (_b.label) {
44851
+ case 0:
44852
+ if (!((res === null || res === void 0 ? void 0 : res.length) > 0)) return [3 /*break*/, 2];
44853
+ return [4 /*yield*/, this.fireEventAfterGetDataDropDown(res)];
44854
+ case 1:
44855
+ _b.sent();
44856
+ this.reStructureDataSource(res);
44857
+ this.results = this.dataSource;
44858
+ this.selectedValueObject = this.dataSource[0];
44859
+ resolve(this.selectedValueObject);
44860
+ if (this.control.callBack && this.control.callBack.select) {
44861
+ this.control.callBack.select(this.selectedValue);
44862
+ }
44863
+ _b.label = 2;
44864
+ case 2: return [2 /*return*/];
44804
44865
  }
44805
- }
44806
- });
44866
+ });
44867
+ }); });
44807
44868
  }
44808
44869
  else {
44809
44870
  this.results = [];
@@ -46601,12 +46662,12 @@
46601
46662
  _b.sent();
46602
46663
  _b.label = 5;
46603
46664
  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
- }
46665
+ // if (this.setting.columnSetting.sortField) {
46666
+ // gridInfo.sorts.push(<Sort>{
46667
+ // field: this.setting.columnSetting.sortField,
46668
+ // dir: this.setting.columnSetting.sortDir ? 1 : -1
46669
+ // });
46670
+ // }
46610
46671
  if (this.searchData && Array.isArray(this.searchData.lstData)) {
46611
46672
  gridInfo.filters.push(this.newFilter(this.searchData.fieldFilter, exports.Operator.in, this.searchData.lstData));
46612
46673
  }
@@ -47341,14 +47402,7 @@
47341
47402
  case 4:
47342
47403
  _b.sent();
47343
47404
  _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*/];
47405
+ case 5: return [2 /*return*/];
47352
47406
  }
47353
47407
  });
47354
47408
  });
@@ -47793,6 +47847,8 @@
47793
47847
  this.setting.fieldSearchText = this.control.fieldSearchText;
47794
47848
  this.setting.showEditLink = !this.readOnly && this.control.showEditLink;
47795
47849
  this.setting.hiddenPageSetting = this.control.hiddenPageSetting;
47850
+ this.setting.columnSetting.sortField = this.control.sortField;
47851
+ this.setting.columnSetting.sortDir = this.control.sortDir;
47796
47852
  this.plusUrl = this.control.plusUrl;
47797
47853
  // Todo: HieuND
47798
47854
  this.control.columns.forEach(function (column) {