tnx-shared 5.1.646 → 5.1.648

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.
@@ -51365,11 +51365,15 @@
51365
51365
  if (item.url == item.defaultRedirect) {
51366
51366
  item.url = '/' + item.code.toLowerCase();
51367
51367
  }
51368
+ var defaultPath = item.defaultRedirect;
51369
+ if (redirectType != null && redirectType == UserRedirectType$1.PERSONAL_INFO) {
51370
+ defaultPath = item.userProfileUrl;
51371
+ }
51368
51372
  if (!this.openNewTab) {
51369
- top.location.href = item.url + "/" + item.defaultRedirect;
51373
+ top.location.href = item.url + "/" + defaultPath;
51370
51374
  }
51371
51375
  else {
51372
- window.open(item.url + "/" + item.defaultRedirect, '_blank');
51376
+ window.open(item.url + "/" + defaultPath, '_blank');
51373
51377
  }
51374
51378
  }
51375
51379
  else {
@@ -67625,21 +67629,25 @@
67625
67629
  callbackDataFinish: function (evt) {
67626
67630
  _this.readyToReload = true;
67627
67631
  },
67628
- onChanged: function (value) {
67632
+ onChanged: function (evt) {
67629
67633
  var control = _this.formControls['idDistrict'];
67630
- if (control == null) {
67634
+ if (control == null || control.hidden) {
67631
67635
  control = _this.formControls['idWard'];
67632
67636
  if (control && control._component && control._component.getData) {
67633
- control._component.getData();
67637
+ control._component.getData([
67638
+ _this.newFilter('parentId', exports.Operator.equal, evt.value.idRoot)
67639
+ ]);
67634
67640
  }
67635
67641
  }
67636
67642
  },
67637
- onAdjustedValue: function (value) {
67643
+ onAdjustedValue: function (evt) {
67638
67644
  var control = _this.formControls['idDistrict'];
67639
- if (control == null) {
67645
+ if (control == null || control.hidden) {
67640
67646
  control = _this.formControls['idWard'];
67641
67647
  if (control && control._component && control._component.getData) {
67642
- control._component.getData();
67648
+ control._component.getData([
67649
+ _this.newFilter('parentId', exports.Operator.equal, evt.value.idRoot)
67650
+ ]);
67643
67651
  }
67644
67652
  }
67645
67653
  }
@@ -67659,11 +67667,12 @@
67659
67667
  mdWidth: this.control.districtWidth,
67660
67668
  disabled: this._disabled,
67661
67669
  hidden: true,
67662
- onChanged: function (value) {
67663
- _this._modelData.idDistrict = value;
67670
+ onChanged: function (evt) {
67664
67671
  var control = _this.formControls['idWard'];
67665
67672
  if (control && control._component && control._component.getData) {
67666
- control._component.getData();
67673
+ control._component.getData([
67674
+ _this.newFilter('parentId', exports.Operator.equal, evt.value.idRoot)
67675
+ ]);
67667
67676
  }
67668
67677
  }
67669
67678
  }),
@@ -67674,12 +67683,13 @@
67674
67683
  required: this.control.required && this.control.requiredWard,
67675
67684
  baseService: this.control.baseService,
67676
67685
  defaultFilters: [{ field: 'level', operator: exports.Operator.equal, value: exports.ENUM_DON_VI_HANH_CHINH.PHUONG_XA.toString() }],
67677
- modifyFilter: function (filters) {
67678
- var parentId = _this.formControls['idDistrict']
67679
- ? _this._modelData.idDistrict
67680
- : _this._modelData.idProvince;
67681
- filters.push({ field: 'parentId', operator: exports.Operator.equal, value: parentId });
67682
- },
67686
+ // modifyFilter: (filters: Filter[]) =>
67687
+ // {
67688
+ // const parentId = this.formControls['idDistrict'] && !this.formControls['idDistrict'].hidden
67689
+ // ? this._modelData.idDistrict
67690
+ // : this._modelData.idProvince;
67691
+ // filters.push({ field: 'parentId', operator: Operator.equal, value: parentId });
67692
+ // },
67683
67693
  valueField: 'id',
67684
67694
  displayField: 'name',
67685
67695
  fieldPlus: 'idRoot',