@smartsoft001/crud-shell-angular 1.1.715 → 1.1.718

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.
@@ -2641,8 +2641,8 @@
2641
2641
  return __awaiter(this, void 0, void 0, function () {
2642
2642
  var compiledComponents;
2643
2643
  var _this = this;
2644
- return __generator(this, function (_a) {
2645
- switch (_a.label) {
2644
+ return __generator(this, function (_b) {
2645
+ switch (_b.label) {
2646
2646
  case 0:
2647
2647
  this.detailsService.init();
2648
2648
  this.styleService.init(this.elementRef);
@@ -2654,15 +2654,15 @@
2654
2654
  this.mode = this.config.details ? "details" : "update";
2655
2655
  this.activeRoute.params
2656
2656
  .pipe(this.takeUntilDestroy)
2657
- .subscribe(function (_a) {
2658
- var id = _a.id;
2657
+ .subscribe(function (_b) {
2658
+ var id = _b.id;
2659
2659
  _this.facade.select(id);
2660
2660
  _this.id = id;
2661
2661
  });
2662
2662
  this.activeRoute.queryParams
2663
2663
  .pipe(this.takeUntilDestroy)
2664
- .subscribe(function (_a) {
2665
- var edit = _a.edit;
2664
+ .subscribe(function (_b) {
2665
+ var edit = _b.edit;
2666
2666
  if (edit) {
2667
2667
  _this.mode = "update";
2668
2668
  }
@@ -2670,8 +2670,8 @@
2670
2670
  }
2671
2671
  this.uniqueProvider = function (values) { return __awaiter(_this, void 0, void 0, function () {
2672
2672
  var filter, totalCount;
2673
- return __generator(this, function (_a) {
2674
- switch (_a.label) {
2673
+ return __generator(this, function (_b) {
2674
+ switch (_b.label) {
2675
2675
  case 0:
2676
2676
  filter = {
2677
2677
  query: [],
@@ -2692,7 +2692,7 @@
2692
2692
  }
2693
2693
  return [4 /*yield*/, this.service.getList(filter).toPromise()];
2694
2694
  case 1:
2695
- totalCount = (_a.sent()).totalCount;
2695
+ totalCount = (_b.sent()).totalCount;
2696
2696
  return [2 /*return*/, !totalCount];
2697
2697
  }
2698
2698
  });
@@ -2710,7 +2710,7 @@
2710
2710
  : []))),
2711
2711
  })];
2712
2712
  case 1:
2713
- compiledComponents = _a.sent();
2713
+ compiledComponents = _b.sent();
2714
2714
  this.detailsOptions = {
2715
2715
  type: this.config.type,
2716
2716
  item$: this.facade.selected$,
@@ -2728,7 +2728,7 @@
2728
2728
  : null,
2729
2729
  },
2730
2730
  };
2731
- _a.label = 2;
2731
+ _b.label = 2;
2732
2732
  case 2:
2733
2733
  this.initPageOptions();
2734
2734
  this.facade.selected$.pipe(this.takeUntilDestroy).subscribe(function (item) {
@@ -2859,9 +2859,14 @@
2859
2859
  ItemComponent.prototype.getInvalidFields = function (control, invalidFields, baseField, key) {
2860
2860
  var _this = this;
2861
2861
  if (key === void 0) { key = null; }
2862
+ var _a;
2862
2863
  if (control.valid)
2863
2864
  return;
2864
2865
  var field = key ? baseField + ' > ' + this.translateService.instant('MODEL.' + key) : baseField;
2866
+ if ((_a = control.errors) === null || _a === void 0 ? void 0 : _a.customMessage) {
2867
+ invalidFields.push(field + (" (" + control.errors.customMessage + ")"));
2868
+ return;
2869
+ }
2865
2870
  if (control instanceof forms.FormControl) {
2866
2871
  invalidFields.push(field);
2867
2872
  }