@seniorsistemas/exclusion-process-component 0.2.1 → 0.3.1

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.
@@ -377,18 +377,37 @@
377
377
  return LogicalDeleteService;
378
378
  }());
379
379
 
380
+ var EXCLUSION_PROCESS_STATUS_BADGE = [
381
+ {
382
+ enumValue: EnumExclusionProcessStatus.ERROR,
383
+ color: angularComponents.EnumBadgeColors.RED
384
+ },
385
+ {
386
+ enumValue: EnumExclusionProcessStatus.PENDING,
387
+ color: angularComponents.EnumBadgeColors.YELLOW
388
+ },
389
+ {
390
+ enumValue: EnumExclusionProcessStatus.PROCESSING,
391
+ color: angularComponents.EnumBadgeColors.BLUE
392
+ },
393
+ {
394
+ enumValue: EnumExclusionProcessStatus.SUCCESS,
395
+ color: angularComponents.EnumBadgeColors.GREEN
396
+ }
397
+ ];
380
398
  var ExclusionDetailsComponent = /** @class */ (function () {
381
- function ExclusionDetailsComponent(router, route, translate, logicalDeleteService, projectConfigs) {
382
- this.router = router;
399
+ function ExclusionDetailsComponent(route, translate, logicalDeleteService, projectConfigs) {
383
400
  this.route = route;
384
401
  this.translate = translate;
385
402
  this.logicalDeleteService = logicalDeleteService;
386
403
  this.projectConfigs = projectConfigs;
387
- this._entityName = "";
404
+ this.expandedRows = {};
405
+ this.onProcessFinishedSuccessfully = new core.EventEmitter();
388
406
  this._isVisible = false;
389
407
  this._isLoading = false;
390
- this._processSummaryData = [];
391
- this._processSummaryColumns = [];
408
+ this._processGroupData = [];
409
+ this._processGroupColumns = [];
410
+ this._processStepColumns = [];
392
411
  this.ngUnsubscribe = new rxjs.Subject();
393
412
  }
394
413
  Object.defineProperty(ExclusionDetailsComponent.prototype, "isVisible", {
@@ -405,16 +424,23 @@
405
424
  enumerable: true,
406
425
  configurable: true
407
426
  });
408
- Object.defineProperty(ExclusionDetailsComponent.prototype, "processSummaryData", {
427
+ Object.defineProperty(ExclusionDetailsComponent.prototype, "processGroupData", {
428
+ get: function () {
429
+ return this._processGroupData;
430
+ },
431
+ enumerable: true,
432
+ configurable: true
433
+ });
434
+ Object.defineProperty(ExclusionDetailsComponent.prototype, "processGroupColumns", {
409
435
  get: function () {
410
- return this._processSummaryData;
436
+ return this._processGroupColumns;
411
437
  },
412
438
  enumerable: true,
413
439
  configurable: true
414
440
  });
415
- Object.defineProperty(ExclusionDetailsComponent.prototype, "processSummaryColumns", {
441
+ Object.defineProperty(ExclusionDetailsComponent.prototype, "processStepColumns", {
416
442
  get: function () {
417
- return this._processSummaryColumns;
443
+ return this._processStepColumns;
418
444
  },
419
445
  enumerable: true,
420
446
  configurable: true
@@ -426,7 +452,8 @@
426
452
  .subscribe(function (data) {
427
453
  _this.locale = data.localeConfig;
428
454
  });
429
- this._processSummaryColumns = this.getSummaryColumns();
455
+ this._processGroupColumns = this.getGroupColumns();
456
+ this._processStepColumns = this.getStepColumns();
430
457
  };
431
458
  ExclusionDetailsComponent.prototype.ngOnDestroy = function () {
432
459
  this.ngUnsubscribe.next();
@@ -435,12 +462,11 @@
435
462
  };
436
463
  ExclusionDetailsComponent.prototype.showDetails = function (details) {
437
464
  this._exclusionDetails = details;
438
- this._entityName = details.entityName;
439
465
  this._isVisible = true;
440
- this._processSummaryData = [];
466
+ this._processGroupData = [];
441
467
  this.processDetails = null;
442
468
  this.entityDescription = details.entityDescription;
443
- this.loadProcessDetails(details);
469
+ this.loadProcessDetails(details, true);
444
470
  this.connectWebSocket();
445
471
  };
446
472
  ExclusionDetailsComponent.prototype.onVisibilityChanged = function (event) {
@@ -449,17 +475,9 @@
449
475
  ExclusionDetailsComponent.prototype.closeDetails = function () {
450
476
  this._isVisible = false;
451
477
  this._exclusionDetails = null;
452
- this._processSummaryData = [];
478
+ this._processGroupData = [];
453
479
  this.disconnectWebSocket();
454
480
  };
455
- ExclusionDetailsComponent.prototype.openExclusions = function () {
456
- this.closeDetails();
457
- this.router.navigate(["exclusions-list", this._entityName], {
458
- queryParams: {
459
- entityDescription: this.entityDescription
460
- }
461
- });
462
- };
463
481
  ExclusionDetailsComponent.prototype.getRecordDescription = function () {
464
482
  var _a;
465
483
  if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.description)) {
@@ -509,15 +527,15 @@
509
527
  ExclusionDetailsComponent.prototype.getEmptyStateDescription = function () {
510
528
  return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_empty_state_description");
511
529
  };
512
- ExclusionDetailsComponent.prototype.getSummaryColumns = function () {
530
+ ExclusionDetailsComponent.prototype.getGroupColumns = function () {
513
531
  return [
514
532
  {
515
533
  field: "description",
516
534
  attributes: ["description"],
517
- header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_description"),
535
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_group"),
518
536
  type: angularComponents.EnumColumnFieldType.STRING,
519
537
  style: {
520
- width: "300px"
538
+ width: "340px"
521
539
  }
522
540
  },
523
541
  {
@@ -530,24 +548,32 @@
530
548
  width: "100px"
531
549
  },
532
550
  tooltip: this.getColumnStatusTooltip,
533
- badgeConfigs: [
534
- {
535
- enumValue: EnumExclusionProcessStatus.ERROR,
536
- color: angularComponents.EnumBadgeColors.RED
537
- },
538
- {
539
- enumValue: EnumExclusionProcessStatus.PENDING,
540
- color: angularComponents.EnumBadgeColors.YELLOW
541
- },
542
- {
543
- enumValue: EnumExclusionProcessStatus.PROCESSING,
544
- color: angularComponents.EnumBadgeColors.BLUE
545
- },
546
- {
547
- enumValue: EnumExclusionProcessStatus.SUCCESS,
548
- color: angularComponents.EnumBadgeColors.GREEN
549
- }
550
- ]
551
+ badgeConfigs: EXCLUSION_PROCESS_STATUS_BADGE
552
+ }
553
+ ];
554
+ };
555
+ ExclusionDetailsComponent.prototype.getStepColumns = function () {
556
+ return [
557
+ {
558
+ field: "description",
559
+ attributes: ["description"],
560
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_step"),
561
+ type: angularComponents.EnumColumnFieldType.STRING,
562
+ style: {
563
+ width: "340px"
564
+ }
565
+ },
566
+ {
567
+ field: "status",
568
+ attributes: ["status"],
569
+ header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_status"),
570
+ type: angularComponents.EnumColumnFieldType.ENUM,
571
+ enumPrefix: this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_",
572
+ style: {
573
+ width: "100px"
574
+ },
575
+ tooltip: this.getColumnStatusTooltip,
576
+ badgeConfigs: EXCLUSION_PROCESS_STATUS_BADGE
551
577
  }
552
578
  ];
553
579
  };
@@ -557,8 +583,9 @@
557
583
  }
558
584
  return null;
559
585
  };
560
- ExclusionDetailsComponent.prototype.loadProcessDetails = function (details) {
586
+ ExclusionDetailsComponent.prototype.loadProcessDetails = function (details, firstLoad) {
561
587
  var _this = this;
588
+ if (firstLoad === void 0) { firstLoad = false; }
562
589
  this._isLoading = true;
563
590
  var processObservable = details.processId
564
591
  ? this.logicalDeleteService.getProcessDetails(details.processId)
@@ -571,40 +598,59 @@
571
598
  return;
572
599
  }
573
600
  _this.processDetails = process;
574
- _this.loadProcessSummary(process);
601
+ _this._processGroupData = _this.sortGroupsByStartDate(process.groups)
602
+ .map(function (p) { return (__assign(__assign({}, p), { steps: _this.sortStepsByStartDate(p.steps) })); });
603
+ _this.expandedRows = {};
604
+ _this._processGroupData
605
+ .filter(function (p) { return p.status !== EnumExclusionProcessStatus.SUCCESS; })
606
+ .forEach(function (p) {
607
+ _this.expandedRows[p.id] = true;
608
+ });
609
+ _this.checkIfProcessDone();
610
+ if (!firstLoad) {
611
+ _this.checkIfProcessWasSuccessuful();
612
+ }
575
613
  });
576
614
  };
577
- ExclusionDetailsComponent.prototype.sortByDate = function (startDate, finishDate) {
578
- if (startDate.getTime() > finishDate.getTime()) {
615
+ ExclusionDetailsComponent.prototype.checkIfProcessDone = function () {
616
+ if (!this._processGroupData.length) {
617
+ return;
618
+ }
619
+ var isProcessFinished = this._processGroupData
620
+ .every(function (p) { return p.status === EnumExclusionProcessStatus.ERROR || p.status === EnumExclusionProcessStatus.SUCCESS; });
621
+ if (isProcessFinished) {
622
+ this.disconnectWebSocket();
623
+ }
624
+ };
625
+ ExclusionDetailsComponent.prototype.checkIfProcessWasSuccessuful = function () {
626
+ var isProcessSuccessful = this._processGroupData
627
+ .every(function (p) { return p.status === EnumExclusionProcessStatus.SUCCESS; });
628
+ if (isProcessSuccessful) {
629
+ this.notifyProcessFinishedSuccessfully();
630
+ }
631
+ };
632
+ ExclusionDetailsComponent.prototype.notifyProcessFinishedSuccessfully = function () {
633
+ this.onProcessFinishedSuccessfully.emit(this.processDetails);
634
+ };
635
+ ExclusionDetailsComponent.prototype.sortByDate = function (firstDate, secondDate) {
636
+ if (!firstDate || !secondDate) {
579
637
  return 1;
580
638
  }
581
- if (startDate.getTime() < finishDate.getTime()) {
639
+ if (firstDate.getTime() > secondDate.getTime()) {
640
+ return 1;
641
+ }
642
+ if (firstDate.getTime() < secondDate.getTime()) {
582
643
  return -1;
583
644
  }
584
645
  return 0;
585
646
  };
586
647
  ExclusionDetailsComponent.prototype.sortGroupsByStartDate = function (groups) {
587
648
  var _this = this;
588
- return groups.sort(function (a, b) { return _this.sortByDate(a.startDate, b.finishDate); });
649
+ return groups.sort(function (a, b) { return _this.sortByDate(a.startDate, b.startDate); });
589
650
  };
590
651
  ExclusionDetailsComponent.prototype.sortStepsByStartDate = function (steps) {
591
652
  var _this = this;
592
- return steps.sort(function (a, b) { return _this.sortByDate(a.startDate, b.finishDate); });
593
- };
594
- ExclusionDetailsComponent.prototype.loadProcessSummary = function (process) {
595
- var _this = this;
596
- var stepLogs = [];
597
- this.sortGroupsByStartDate(process.groups)
598
- .forEach(function (group) {
599
- var steps = _this.sortStepsByStartDate(group.steps)
600
- .map(function (step) { return ({
601
- description: step.description,
602
- status: step.status,
603
- errorMessage: step.errorMessage
604
- }); });
605
- stepLogs.push.apply(stepLogs, __spread(steps));
606
- });
607
- this._processSummaryData = stepLogs;
653
+ return steps.sort(function (a, b) { return _this.sortByDate(a.startDate, b.startDate); });
608
654
  };
609
655
  ExclusionDetailsComponent.prototype.disconnectWebSocket = function () {
610
656
  if (this._exclusionProcessStatusChangedSubscribe) {
@@ -656,7 +702,6 @@
656
702
  });
657
703
  };
658
704
  ExclusionDetailsComponent.ctorParameters = function () { return [
659
- { type: router.Router },
660
705
  { type: router.ActivatedRoute },
661
706
  { type: core$1.TranslateService },
662
707
  { type: LogicalDeleteService },
@@ -670,20 +715,29 @@
670
715
  ], ExclusionDetailsComponent.prototype, "isLoading", null);
671
716
  __decorate([
672
717
  core.Output()
673
- ], ExclusionDetailsComponent.prototype, "processSummaryData", null);
718
+ ], ExclusionDetailsComponent.prototype, "processGroupData", null);
674
719
  __decorate([
675
720
  core.Output()
676
- ], ExclusionDetailsComponent.prototype, "processSummaryColumns", null);
721
+ ], ExclusionDetailsComponent.prototype, "processGroupColumns", null);
722
+ __decorate([
723
+ core.Output()
724
+ ], ExclusionDetailsComponent.prototype, "processStepColumns", null);
677
725
  __decorate([
678
726
  core.Output()
679
727
  ], ExclusionDetailsComponent.prototype, "processDetails", void 0);
680
728
  __decorate([
681
729
  core.Output()
682
730
  ], ExclusionDetailsComponent.prototype, "entityDescription", void 0);
731
+ __decorate([
732
+ core.Output()
733
+ ], ExclusionDetailsComponent.prototype, "expandedRows", void 0);
734
+ __decorate([
735
+ core.Output()
736
+ ], ExclusionDetailsComponent.prototype, "onProcessFinishedSuccessfully", void 0);
683
737
  ExclusionDetailsComponent = __decorate([
684
738
  core.Component({
685
739
  selector: "s-exclusion-details",
686
- template: "<s-sidebar [visible]=\"isVisible\" (visibleChange)=\"onVisibilityChanged($event)\" [header]=\"getSidebarTitle()\">\n <s-loading-state [loading]=\"isLoading\">\n <p-panel [showHeader]=\"false\" styleClass=\"s-exclusion-details-record-details-panel\">\n <div class=\"s-exclusion-details-record-details-container\">\n <div class=\"s-exclusion-details-record-icon-background\">\n <em class=\"far fa-file-alt s-exclusion-details-record-icon\"></em>\n </div>\n\n <div class=\"s-exclusion-details-record-details-recordinfo\">\n <span class=\"s-exclusion-details-record-details-type\">\n {{entityDescription}}\n </span>\n <span>\n {{getRecordDescription()}}\n </span>\n </div>\n\n <div class=\"s-exclusion-details-record-details-dateinfo\">\n <span>\n {{getStartDateLabel()}}: {{getInicialDate()}}\n </span>\n <span *ngIf=\"isFinished()\">\n {{getFinishDateLabel()}}: {{getFinishDate()}}\n </span>\n </div>\n </div>\n </p-panel>\n\n <p-panel>\n <p-header>\n {{getSummaryLabel()}}\n </p-header>\n\n <s-empty-state\n *ngIf=\"processSummaryData && !processSummaryData.length\"\n [title]=\"getEmptyStateTitle()\"\n [description]=\"getEmptyStateDescription()\">\n [showPrimaryAction]=\"false\"\n </s-empty-state>\n\n <p-table\n [value]=\"processSummaryData\"\n [columns]=\"processSummaryColumns\"\n dataKey=\"id\"\n [lazy]=\"false\"\n [scrollable]=\"false\"\n [paginator]=\"false\"\n *ngIf=\"processSummaryData && processSummaryData.length\">\n\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngFor=\"let col of columns\"\n [style.width]=\"col.width\"\n />\n </colgroup>\n </ng-template>\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\"\n [id]=\"col.field\"\n [ngStyle]=\"col.style\"\n [pSortableColumn]=\"col.field\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\" ></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr>\n <s-table-columns\n [columns]=\"columns\"\n [rowValue]=\"rowData\"\n [locale]=\"locale\">\n </s-table-columns>\n </tr>\n </ng-template>\n </p-table>\n </p-panel>\n </s-loading-state>\n\n <s-footer>\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <s-button [label]=\"getShowExclusionsButtonLabel()\" (onClick)=\"openExclusions()\"></s-button>\n <s-button [label]=\"getCloseButtonLabel()\" priority=\"link\" (onClick)=\"closeDetails()\"></s-button>\n </div>\n </div>\n </s-footer>\n</s-sidebar>\n",
740
+ template: "<s-sidebar [visible]=\"isVisible\" (visibleChange)=\"onVisibilityChanged($event)\" [header]=\"getSidebarTitle()\">\n <s-loading-state [loading]=\"isLoading\">\n <p-panel [showHeader]=\"false\" styleClass=\"s-exclusion-details-record-details-panel\">\n <div class=\"s-exclusion-details-record-details-container\">\n <div class=\"s-exclusion-details-record-icon-background\">\n <em class=\"far fa-file-alt s-exclusion-details-record-icon\"></em>\n </div>\n\n <div class=\"s-exclusion-details-record-details-recordinfo\">\n <span class=\"s-exclusion-details-record-details-type\">\n {{entityDescription}}\n </span>\n <span>\n {{getRecordDescription()}}\n </span>\n </div>\n\n <div class=\"s-exclusion-details-record-details-dateinfo\">\n <span>\n {{getStartDateLabel()}}: {{getInicialDate()}}\n </span>\n <span *ngIf=\"isFinished()\">\n {{getFinishDateLabel()}}: {{getFinishDate()}}\n </span>\n </div>\n </div>\n </p-panel>\n\n <p-panel>\n <p-header>\n {{getSummaryLabel()}}\n </p-header>\n\n <s-empty-state\n *ngIf=\"processGroupData && !processGroupData.length\"\n [title]=\"getEmptyStateTitle()\"\n [description]=\"getEmptyStateDescription()\">\n [showPrimaryAction]=\"false\"\n </s-empty-state>\n\n <p-table\n [value]=\"processGroupData\"\n [columns]=\"processGroupColumns\"\n dataKey=\"id\"\n [lazy]=\"false\"\n [scrollable]=\"false\"\n [paginator]=\"false\"\n *ngIf=\"processGroupData && processGroupData.length\"\n [expandedRowKeys]=\"expandedRows\">\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th id=\"expend-column\" style=\"width: 40px;\"></th>\n <th *ngFor=\"let col of columns\"\n [id]=\"col.field\"\n [ngStyle]=\"col.style\"\n [pSortableColumn]=\"col.field\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\" ></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\" let-expanded=\"expanded\">\n <tr sNavigation [sRowToggler]=\"rowData\">\n <td style=\"width: 40px;\" tabindex=\"0\">\n <em class=\"fa fa-{{ expanded ? 'minus' : 'plus' }}\"></em>\n </td>\n <s-table-columns\n [columns]=\"columns\"\n [rowValue]=\"rowData\"\n [locale]=\"locale\">\n </s-table-columns>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"rowexpansion\" let-rowData let-columns=\"columns\">\n <tr class=\"sds-expanded-row\">\n <td [attr.colspan]=\"columns.length + 1\">\n <p-table \n [value]=\"rowData.steps\"\n [columns]=\"processStepColumns\"\n dataKey=\"id\"\n [paginator]=\"false\"\n [responsive]=\"true\"\n [scrollable]=\"false\"\n [lazy]=\"false\">\n\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngFor=\"let col of columns\"\n [id]=\"col.field\"\n [ngStyle]=\"col.style\"\n [pSortableColumn]=\"col.field\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.header }}</span>\n <p-sortIcon [field]=\"col.field\" ></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n \n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr>\n <s-table-columns\n [columns]=\"columns\"\n [rowValue]=\"rowData\"\n [locale]=\"locale\">\n </s-table-columns>\n </tr>\n </ng-template>\n </p-table>\n </td>\n </tr>\n </ng-template>\n </p-table>\n </p-panel>\n </s-loading-state>\n\n <s-footer>\n <div class=\"ui-fluid\">\n <div class=\"ui-g\">\n <s-button [label]=\"getCloseButtonLabel()\" priority=\"link\" (onClick)=\"closeDetails()\"></s-button>\n </div>\n </div>\n </s-footer>\n</s-sidebar>\n",
687
741
  encapsulation: core.ViewEncapsulation.None,
688
742
  styles: [".s-exclusion-details-record-details-panel{margin-bottom:10px}.s-exclusion-details-record-details-container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}.s-exclusion-details-record-details-recordinfo{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:10px;-ms-flex:1;flex:1}.s-exclusion-details-record-details-dateinfo{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:10px;-ms-flex-align:end;align-items:flex-end;font-size:12px}.s-exclusion-details-record-details-type{color:#999}.s-exclusion-details-record-icon{font-size:22pt;color:#7e8d95}.s-exclusion-details-record-icon-background{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:16px;background-color:#c1cad1;border-radius:50%;height:60px;width:60px}"]
689
743
  })
@@ -823,7 +877,8 @@
823
877
  var HTTP_CODE_SERVER_ERROR_START = 500;
824
878
  var HTTP_CODE_SERVER_ERROR_END = 600;
825
879
  var ExclusionsListComponent = /** @class */ (function () {
826
- function ExclusionsListComponent(route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs) {
880
+ function ExclusionsListComponent(router, route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs, cdr) {
881
+ this.router = router;
827
882
  this.route = route;
828
883
  this.translate = translate;
829
884
  this.formBuilder = formBuilder;
@@ -831,6 +886,7 @@
831
886
  this.logicalDeleteService = logicalDeleteService;
832
887
  this.filterService = filterService;
833
888
  this.projectConfigs = projectConfigs;
889
+ this.cdr = cdr;
834
890
  this.currentListParams = { page: 0, size: 10, sort: [], filterData: {} };
835
891
  this.showLoader = false;
836
892
  this.totalRecords = 0;
@@ -850,30 +906,32 @@
850
906
  .subscribe(function (data) {
851
907
  _this.locale = data.localeConfig;
852
908
  });
853
- this.route.params
854
- .pipe(operators.takeUntil(this.ngUnsubscribe))
855
- .subscribe(function (params) {
856
- _this.entityName = params.entityName;
857
- _this.showBasedOnRoute();
858
- });
859
909
  this.route.queryParams
860
910
  .pipe(operators.takeUntil(this.ngUnsubscribe))
861
911
  .subscribe(function (queryParams) {
912
+ _this.entityName = queryParams.entityName;
862
913
  _this.entityDescription = queryParams.entityDescription;
863
914
  _this.processId = queryParams.processId;
864
- _this.showBasedOnRoute();
865
915
  });
866
916
  };
867
- ExclusionsListComponent.prototype.showBasedOnRoute = function () {
917
+ ExclusionsListComponent.prototype.ngAfterViewInit = function () {
868
918
  if (this.entityName && this.entityDescription && this.processId) {
869
919
  this.exclusionDetailsComponent.showDetails({
870
920
  processId: this.processId,
871
921
  entityDescription: this.entityDescription,
872
922
  entityName: this.entityName
873
923
  });
924
+ this.cdr.detectChanges();
874
925
  }
875
926
  };
876
927
  ExclusionsListComponent.prototype.ngOnDestroy = function () {
928
+ var _a;
929
+ var params = __assign({}, (_a = this.route.snapshot) === null || _a === void 0 ? void 0 : _a.queryParams);
930
+ if (params) {
931
+ delete params.entityName;
932
+ delete params.entityDescription;
933
+ this.router.navigate([], { queryParams: params });
934
+ }
877
935
  this.ngUnsubscribe.next();
878
936
  this.ngUnsubscribe.complete();
879
937
  };
@@ -881,8 +939,8 @@
881
939
  return this.formBuilder.group({
882
940
  description: [undefined, forms.Validators.compose([])],
883
941
  status: [undefined, forms.Validators.compose([])],
884
- startDate: [{ value: undefined, disabled: false }, forms.Validators.compose([])],
885
- endDate: [{ value: undefined, disabled: false }, forms.Validators.compose([])]
942
+ startDate: [{ value: null, disabled: false }, forms.Validators.compose([])],
943
+ endDate: [{ value: null, disabled: false }, forms.Validators.compose([])]
886
944
  });
887
945
  };
888
946
  ExclusionsListComponent.prototype.getGridColumns = function () {
@@ -1155,13 +1213,15 @@
1155
1213
  var ExclusionsListComponent_1;
1156
1214
  ExclusionsListComponent.DATE_FORMAT = "YYYY-MM-DD";
1157
1215
  ExclusionsListComponent.ctorParameters = function () { return [
1216
+ { type: router.Router },
1158
1217
  { type: router.ActivatedRoute },
1159
1218
  { type: core$1.TranslateService },
1160
1219
  { type: forms.FormBuilder },
1161
1220
  { type: core.ChangeDetectorRef },
1162
1221
  { type: LogicalDeleteService },
1163
1222
  { type: FilterService },
1164
- { type: LogicalDeleteConfigService }
1223
+ { type: LogicalDeleteConfigService },
1224
+ { type: core.ChangeDetectorRef }
1165
1225
  ]; };
1166
1226
  __decorate([
1167
1227
  core.ViewChild("exclusionsTable")
@@ -1189,23 +1249,6 @@
1189
1249
  ], ExclusionsListFeatureRoutingGuard);
1190
1250
  return ExclusionsListFeatureRoutingGuard;
1191
1251
  }());
1192
- var ExclusionsListFeatureRoutingListTitleResolver = /** @class */ (function () {
1193
- function ExclusionsListFeatureRoutingListTitleResolver(translate, projectConfigs) {
1194
- this.translate = translate;
1195
- this.projectConfigs = projectConfigs;
1196
- }
1197
- ExclusionsListFeatureRoutingListTitleResolver.prototype.resolve = function () {
1198
- return this.translate.get(this.projectConfigs.getTranslationPrefix() + ".logical_delete_list_title");
1199
- };
1200
- ExclusionsListFeatureRoutingListTitleResolver.ctorParameters = function () { return [
1201
- { type: core$1.TranslateService },
1202
- { type: LogicalDeleteConfigService }
1203
- ]; };
1204
- ExclusionsListFeatureRoutingListTitleResolver = __decorate([
1205
- core.Injectable()
1206
- ], ExclusionsListFeatureRoutingListTitleResolver);
1207
- return ExclusionsListFeatureRoutingListTitleResolver;
1208
- }());
1209
1252
  var ExclusionsListFeatureRoutingPermissionResolver = /** @class */ (function () {
1210
1253
  function ExclusionsListFeatureRoutingPermissionResolver(permissionsService) {
1211
1254
  this.permissionsService = permissionsService;
@@ -1255,12 +1298,11 @@
1255
1298
  ],
1256
1299
  resolve: {
1257
1300
  allPermissions: ExclusionsListFeatureRoutingPermissionResolver,
1258
- localeConfig: ExclusionsListFeatureRoutingLocaleResolver,
1259
- routeTitle: ExclusionsListFeatureRoutingListTitleResolver
1301
+ localeConfig: ExclusionsListFeatureRoutingLocaleResolver
1260
1302
  },
1261
1303
  children: [
1262
1304
  {
1263
- path: ":entityName",
1305
+ path: "",
1264
1306
  component: ExclusionsListComponent
1265
1307
  }
1266
1308
  ]
@@ -1280,8 +1322,7 @@
1280
1322
  providers: [
1281
1323
  ExclusionsListFeatureRoutingGuard,
1282
1324
  ExclusionsListFeatureRoutingPermissionResolver,
1283
- ExclusionsListFeatureRoutingLocaleResolver,
1284
- ExclusionsListFeatureRoutingListTitleResolver
1325
+ ExclusionsListFeatureRoutingLocaleResolver
1285
1326
  ],
1286
1327
  declarations: [
1287
1328
  EmptyComponent
@@ -1356,7 +1397,6 @@
1356
1397
  exports.ExclusionsListComponent = ExclusionsListComponent;
1357
1398
  exports.ExclusionsListFeatureRouting = ExclusionsListFeatureRouting;
1358
1399
  exports.ExclusionsListFeatureRoutingGuard = ExclusionsListFeatureRoutingGuard;
1359
- exports.ExclusionsListFeatureRoutingListTitleResolver = ExclusionsListFeatureRoutingListTitleResolver;
1360
1400
  exports.ExclusionsListFeatureRoutingLocaleResolver = ExclusionsListFeatureRoutingLocaleResolver;
1361
1401
  exports.ExclusionsListFeatureRoutingPermissionResolver = ExclusionsListFeatureRoutingPermissionResolver;
1362
1402
  exports.ExclusionsListModule = ExclusionsListModule;