@seniorsistemas/exclusion-process-component 0.0.1-c049d10c-e93a-4d63-9c2a-b17bca40c324 → 0.2.0

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.
Files changed (50) hide show
  1. package/bundles/seniorsistemas-exclusion-process-component.umd.js +662 -33
  2. package/bundles/seniorsistemas-exclusion-process-component.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-exclusion-process-component.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-exclusion-process-component.umd.min.js.map +1 -1
  5. package/esm2015/exclusion-details/exclusion-details.component.js +99 -12
  6. package/esm2015/exclusion-details/exclusion-details.module.js +4 -3
  7. package/esm2015/exclusion-details/protocols/exclusion-process-status-changed.js +1 -0
  8. package/esm2015/exclusion-details/protocols/show-details-information.js +1 -1
  9. package/esm2015/exclusion-details/protocols/web-socket-event-data.js +1 -0
  10. package/esm2015/exclusions-list/exclusions-list.component.js +358 -0
  11. package/esm2015/exclusions-list/exclusions-list.module.js +47 -0
  12. package/esm2015/exclusions-list/exclusions-list.routing.js +115 -0
  13. package/esm2015/exclusions-list/index.js +4 -0
  14. package/esm2015/public-api.js +2 -1
  15. package/esm2015/seniorsistemas-exclusion-process-component.js +4 -2
  16. package/esm2015/services/filter.service.js +4 -1
  17. package/esm2015/services/index.js +2 -0
  18. package/esm2015/services/logical-delete.service.js +33 -19
  19. package/esm5/exclusion-details/exclusion-details.component.js +104 -12
  20. package/esm5/exclusion-details/exclusion-details.module.js +4 -3
  21. package/esm5/exclusion-details/protocols/exclusion-process-status-changed.js +1 -0
  22. package/esm5/exclusion-details/protocols/show-details-information.js +1 -1
  23. package/esm5/exclusion-details/protocols/web-socket-event-data.js +1 -0
  24. package/esm5/exclusions-list/exclusions-list.component.js +373 -0
  25. package/esm5/exclusions-list/exclusions-list.module.js +50 -0
  26. package/esm5/exclusions-list/exclusions-list.routing.js +127 -0
  27. package/esm5/exclusions-list/index.js +4 -0
  28. package/esm5/public-api.js +2 -1
  29. package/esm5/seniorsistemas-exclusion-process-component.js +4 -2
  30. package/esm5/services/filter.service.js +4 -1
  31. package/esm5/services/index.js +2 -0
  32. package/esm5/services/logical-delete.service.js +36 -20
  33. package/exclusion-details/exclusion-details.component.d.ts +13 -1
  34. package/exclusion-details/protocols/exclusion-process-status-changed.d.ts +8 -0
  35. package/exclusion-details/protocols/show-details-information.d.ts +2 -1
  36. package/exclusion-details/protocols/web-socket-event-data.d.ts +6 -0
  37. package/exclusions-list/exclusions-list.component.d.ts +70 -0
  38. package/exclusions-list/exclusions-list.module.d.ts +2 -0
  39. package/exclusions-list/exclusions-list.routing.d.ts +29 -0
  40. package/exclusions-list/index.d.ts +3 -0
  41. package/fesm2015/seniorsistemas-exclusion-process-component.js +619 -33
  42. package/fesm2015/seniorsistemas-exclusion-process-component.js.map +1 -1
  43. package/fesm5/seniorsistemas-exclusion-process-component.js +657 -34
  44. package/fesm5/seniorsistemas-exclusion-process-component.js.map +1 -1
  45. package/package.json +14 -6
  46. package/public-api.d.ts +1 -0
  47. package/seniorsistemas-exclusion-process-component.d.ts +3 -1
  48. package/seniorsistemas-exclusion-process-component.metadata.json +1 -1
  49. package/services/index.d.ts +1 -0
  50. package/services/logical-delete.service.d.ts +5 -3
@@ -1,16 +1,22 @@
1
1
  import { __decorate, __param } from 'tslib';
2
2
  import { CommonModule } from '@angular/common';
3
- import { InjectionToken, Inject, Injectable, Output, Component, ViewEncapsulation, NgModule } from '@angular/core';
3
+ import { InjectionToken, Inject, Injectable, Output, Component, ViewEncapsulation, NgModule, ChangeDetectorRef, ViewChild } from '@angular/core';
4
4
  import { PanelModule } from 'primeng/panel';
5
5
  import { TableModule } from 'primeng/table';
6
- import { EnumColumnFieldType, EnumBadgeColors, SidebarModule, ButtonModule, TableModule as TableModule$1, LoadingStateModule, LocaleModule, FieldType } from '@seniorsistemas/angular-components';
6
+ import { EnumColumnFieldType, EnumBadgeColors, SidebarModule, ButtonModule, TableModule as TableModule$1, LoadingStateModule, LocaleModule, EmptyStateModule, FieldType, FormField, LocaleService, ControlErrorsModule, InfoSignModule, DynamicFormModule, TokenListModule } from '@seniorsistemas/angular-components';
7
7
  import * as moment from 'moment';
8
- import { Router, ActivatedRoute } from '@angular/router';
8
+ import { Router, ActivatedRoute, RouterModule } from '@angular/router';
9
+ import { TranslateService, TranslateModule } from '@ngx-translate/core';
9
10
  import { throwError, Subject } from 'rxjs';
10
11
  import { catchError, map, takeUntil, finalize } from 'rxjs/operators';
12
+ import { WebsocketService } from '@senior-gestao-empresarial/angular-components';
11
13
  import { HttpParams, HttpClient } from '@angular/common/http';
12
- import { TranslateService } from '@ngx-translate/core';
13
14
  import { MessageService } from 'primeng/api';
15
+ import { Validators, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
16
+ import { DialogModule } from 'primeng/dialog';
17
+ import { ConfirmDialogModule } from 'primeng/confirmdialog';
18
+ import { InputTextModule } from 'primeng/inputtext';
19
+ import { PermissionsService } from '@seniorsistemas/platform-components';
14
20
 
15
21
  var EnumExclusionProcessStatus;
16
22
  (function (EnumExclusionProcessStatus) {
@@ -47,6 +53,8 @@ LogicalDeleteConfigService = __decorate([
47
53
  __param(0, Inject(ProjectConfigsInjectionToken))
48
54
  ], LogicalDeleteConfigService);
49
55
 
56
+ const HTTP_UNAUTHORIZED_CODE = 401;
57
+ const DEFAULT_PAGE_SIZE = 10;
50
58
  let LogicalDeleteService = class LogicalDeleteService {
51
59
  constructor(http, messageService, translate, projectConfigs) {
52
60
  this.http = http;
@@ -55,15 +63,15 @@ let LogicalDeleteService = class LogicalDeleteService {
55
63
  this.projectConfigs = projectConfigs;
56
64
  const entityUrl = `${projectConfigs.getDomain()}/${projectConfigs.getService()}`;
57
65
  this.exclusionProcessUrl = `${entityUrl}/entities/exclusionProcess`;
58
- this.listExclusionsUrl = `${entityUrl}/entities/exclusionProcess`;
59
66
  this.defaultCatch = this.defaultCatch.bind(this);
60
67
  }
61
68
  defaultCatch() {
62
69
  return catchError((err) => {
70
+ var _a;
63
71
  if (err) {
64
72
  let summary = err.status ? String(err.status) : "Error";
65
- let detail = (err.error && err.error.message) || err.statusText || err.message || "Error";
66
- if (err.status === 401) {
73
+ let detail = ((_a = err.error) === null || _a === void 0 ? void 0 : _a.message) || err.statusText || err.message;
74
+ if (err.status === HTTP_UNAUTHORIZED_CODE) {
67
75
  const prefix = this.projectConfigs.getTranslationPrefix();
68
76
  summary = this.translate.instant(`${prefix}.error_unauthorized_title`);
69
77
  detail = this.translate.instant(`${prefix}.error_unauthorized_description`);
@@ -71,14 +79,14 @@ let LogicalDeleteService = class LogicalDeleteService {
71
79
  this.messageService.add({
72
80
  severity: "error",
73
81
  summary,
74
- detail
82
+ detail: detail || "Error"
75
83
  });
76
84
  }
77
85
  return throwError(err);
78
86
  });
79
87
  }
80
88
  getListQueryParams(listParams) {
81
- const { page = 0, size = 10, sort = [], filterQuery = "", displayFields = [] } = listParams;
89
+ const { page = 0, size = DEFAULT_PAGE_SIZE, sort = [], filterQuery = "", displayFields = [] } = listParams;
82
90
  let params = new HttpParams();
83
91
  params = params.append("size", String(size));
84
92
  params = params.append("offset", String(page));
@@ -100,10 +108,22 @@ let LogicalDeleteService = class LogicalDeleteService {
100
108
  }
101
109
  return params;
102
110
  }
103
- getProcessDetails(recordId) {
104
- const filterParams = {
105
- filter: `recordId eq '${recordId}'`
106
- };
111
+ getProcessDetails(id) {
112
+ return this.doGetProcessDetails({
113
+ filter: `id eq '${id}'`,
114
+ size: "1",
115
+ offset: "0",
116
+ });
117
+ }
118
+ getLatestProcessDetails(recordId) {
119
+ return this.doGetProcessDetails({
120
+ filter: `recordId eq '${recordId}'`,
121
+ size: "1",
122
+ offset: "0",
123
+ orderby: "startDate desc"
124
+ });
125
+ }
126
+ doGetProcessDetails(filterParams) {
107
127
  return this.http.get(this.exclusionProcessUrl, { params: filterParams })
108
128
  .pipe(this.defaultCatch())
109
129
  .pipe(map(value => {
@@ -111,9 +131,16 @@ let LogicalDeleteService = class LogicalDeleteService {
111
131
  if (!((_a = value.contents) === null || _a === void 0 ? void 0 : _a.length)) {
112
132
  return null;
113
133
  }
114
- return value.contents[0];
134
+ return this.mapExclusionsDates(value.contents[0]);
115
135
  }));
116
136
  }
137
+ mapExclusionsDates(exclusionProcess) {
138
+ var _a;
139
+ return Object.assign(Object.assign({}, exclusionProcess), { startDate: exclusionProcess.startDate ? moment(exclusionProcess.startDate).toDate() : null, finishDate: exclusionProcess.finishDate ? moment(exclusionProcess.finishDate).toDate() : null, groups: (_a = exclusionProcess.groups) === null || _a === void 0 ? void 0 : _a.map(group => {
140
+ var _a;
141
+ return (Object.assign(Object.assign({}, group), { startDate: group.startDate ? moment(group.startDate).toDate() : null, finishDate: group.finishDate ? moment(group.finishDate).toDate() : null, steps: (_a = group.steps) === null || _a === void 0 ? void 0 : _a.map(step => (Object.assign(Object.assign({}, step), { startDate: step.startDate ? moment(step.startDate).toDate() : null, finishDate: step.finishDate ? moment(step.finishDate).toDate() : null }))) }));
142
+ }) });
143
+ }
117
144
  listExclusions(entityName, params = {}) {
118
145
  if (params.filterQuery) {
119
146
  params.filterQuery += ` and lower(entityName) eq lower('${entityName}')`;
@@ -124,14 +151,7 @@ let LogicalDeleteService = class LogicalDeleteService {
124
151
  return this.http.get(this.exclusionProcessUrl, { params: this.getListQueryParams(params) })
125
152
  .pipe(this.defaultCatch())
126
153
  .pipe(map(value => {
127
- value.contents.forEach(p => {
128
- if (p.startDate) {
129
- p.startDate = moment(p.startDate).toDate();
130
- }
131
- if (p.finishDate) {
132
- p.finishDate = moment(p.finishDate).toDate();
133
- }
134
- });
154
+ value.contents = value.contents.map(this.mapExclusionsDates);
135
155
  return value;
136
156
  }));
137
157
  }
@@ -183,16 +203,26 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
183
203
  ngOnDestroy() {
184
204
  this.ngUnsubscribe.next();
185
205
  this.ngUnsubscribe.complete();
206
+ this.disconnectWebSocket();
186
207
  }
187
208
  showDetails(details) {
188
- this.processDetails = null;
209
+ this._exclusionDetails = details;
189
210
  this._entityName = details.entityName;
190
211
  this._isVisible = true;
212
+ this._processSummaryData = [];
213
+ this.processDetails = null;
191
214
  this.entityDescription = details.entityDescription;
192
- this.loadProcessDetails(details.recordId);
215
+ this.loadProcessDetails(details);
216
+ this.connectWebSocket();
217
+ }
218
+ onVisibilityChanged(event) {
219
+ this.closeDetails();
193
220
  }
194
221
  closeDetails() {
195
222
  this._isVisible = false;
223
+ this._exclusionDetails = null;
224
+ this._processSummaryData = [];
225
+ this.disconnectWebSocket();
196
226
  }
197
227
  openExclusions() {
198
228
  this.closeDetails();
@@ -214,14 +244,14 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
214
244
  if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.startDate)) {
215
245
  return "";
216
246
  }
217
- return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm");
247
+ return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm:ss");
218
248
  }
219
249
  getFinishDate() {
220
250
  var _a;
221
251
  if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.finishDate)) {
222
252
  return "";
223
253
  }
224
- return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm");
254
+ return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm:ss");
225
255
  }
226
256
  isFinished() {
227
257
  var _a;
@@ -245,6 +275,12 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
245
275
  getSidebarTitle() {
246
276
  return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_details_title`);
247
277
  }
278
+ getEmptyStateTitle() {
279
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_empty_state_title`);
280
+ }
281
+ getEmptyStateDescription() {
282
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_empty_state_description`);
283
+ }
248
284
  getSummaryColumns() {
249
285
  return [
250
286
  {
@@ -293,20 +329,43 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
293
329
  }
294
330
  return null;
295
331
  }
296
- loadProcessDetails(recordId) {
332
+ loadProcessDetails(details) {
297
333
  this._isLoading = true;
298
- this.logicalDeleteService.getProcessDetails(recordId)
334
+ const processObservable = details.processId
335
+ ? this.logicalDeleteService.getProcessDetails(details.processId)
336
+ : this.logicalDeleteService.getLatestProcessDetails(details.recordId);
337
+ processObservable
299
338
  .pipe(takeUntil(this.ngUnsubscribe))
300
339
  .pipe(finalize(() => this._isLoading = false))
301
340
  .subscribe((process) => {
341
+ if (!process) {
342
+ return;
343
+ }
302
344
  this.processDetails = process;
303
345
  this.loadProcessSummary(process);
304
346
  });
305
347
  }
348
+ sortByDate(startDate, finishDate) {
349
+ if (startDate.getTime() > finishDate.getTime()) {
350
+ return 1;
351
+ }
352
+ if (startDate.getTime() < finishDate.getTime()) {
353
+ return -1;
354
+ }
355
+ return 0;
356
+ }
357
+ sortGroupsByStartDate(groups) {
358
+ return groups.sort((a, b) => this.sortByDate(a.startDate, b.finishDate));
359
+ }
360
+ sortStepsByStartDate(steps) {
361
+ return steps.sort((a, b) => this.sortByDate(a.startDate, b.finishDate));
362
+ }
306
363
  loadProcessSummary(process) {
307
364
  const stepLogs = [];
308
- process.groups.forEach(group => {
309
- const steps = group.steps.map(step => ({
365
+ this.sortGroupsByStartDate(process.groups)
366
+ .forEach(group => {
367
+ const steps = this.sortStepsByStartDate(group.steps)
368
+ .map(step => ({
310
369
  description: step.description,
311
370
  status: step.status,
312
371
  errorMessage: step.errorMessage
@@ -315,6 +374,53 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
315
374
  });
316
375
  this._processSummaryData = stepLogs;
317
376
  }
377
+ disconnectWebSocket() {
378
+ if (this._exclusionProcessStatusChangedSubscribe) {
379
+ this._exclusionProcessStatusChangedSubscribe.unsubscribe();
380
+ this._exclusionProcessStatusChangedSubscribe = null;
381
+ }
382
+ if (this._websocketService) {
383
+ this._websocketService.disconnect();
384
+ this._websocketService = null;
385
+ }
386
+ }
387
+ connectWebSocket() {
388
+ if (this._websocketService) {
389
+ this.disconnectWebSocket();
390
+ }
391
+ this._websocketService = new WebsocketService();
392
+ this._websocketService
393
+ .onConnect()
394
+ .pipe(takeUntil(this.ngUnsubscribe))
395
+ .subscribe(() => {
396
+ this.startListeningWebhookEvents();
397
+ });
398
+ }
399
+ startListeningWebhookEvents() {
400
+ this._websocketService
401
+ .onError()
402
+ .pipe(takeUntil(this.ngUnsubscribe))
403
+ .subscribe((data) => {
404
+ console.error('onError', data);
405
+ });
406
+ this._exclusionProcessStatusChangedSubscribe = this._websocketService
407
+ .onEvent({
408
+ domain: "erpx_fnd",
409
+ service: "produto",
410
+ primitive: "exclusionProcessStatusChanged"
411
+ })
412
+ .pipe(takeUntil(this.ngUnsubscribe))
413
+ .subscribe((event) => {
414
+ const { data } = event;
415
+ if (this._exclusionDetails.processId && data.pid === this._exclusionDetails.processId) {
416
+ this.loadProcessDetails(this._exclusionDetails);
417
+ return;
418
+ }
419
+ if (this._exclusionDetails.recordId && data.recordId === this._exclusionDetails.recordId) {
420
+ this.loadProcessDetails(this._exclusionDetails);
421
+ }
422
+ });
423
+ }
318
424
  };
319
425
  ExclusionDetailsComponent.ctorParameters = () => [
320
426
  { type: Router },
@@ -344,7 +450,7 @@ __decorate([
344
450
  ExclusionDetailsComponent = __decorate([
345
451
  Component({
346
452
  selector: "s-exclusion-details",
347
- template: "<s-sidebar [visible]=\"isVisible\" (visibleChange)=\"closeDetails()\" [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 <i class=\"far fa-file-alt s-exclusion-details-record-icon\"></i>\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 <p-table\n [value]=\"processSummaryData\"\n [columns]=\"processSummaryColumns\"\n dataKey=\"id\"\n [lazy]=\"false\"\n [scrollable]=\"false\"\n [paginator]=\"false\">\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",
453
+ 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",
348
454
  encapsulation: ViewEncapsulation.None,
349
455
  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}"]
350
456
  })
@@ -362,7 +468,8 @@ ExclusionDetailsModule = __decorate([
362
468
  TableModule,
363
469
  TableModule$1,
364
470
  LoadingStateModule,
365
- LocaleModule
471
+ LocaleModule,
472
+ EmptyStateModule
366
473
  ],
367
474
  declarations: [ExclusionDetailsComponent],
368
475
  exports: [ExclusionDetailsComponent],
@@ -439,6 +546,9 @@ let FilterService = class FilterService {
439
546
  ? this.translate.instant(`${this.logicalDeleteConfigService.getTranslationPrefix()}.list_grid_boolean_true`)
440
547
  : this.translate.instant(`${this.logicalDeleteConfigService.getTranslationPrefix()}.list_grid_boolean_false`);
441
548
  break;
549
+ default:
550
+ labelValue = value;
551
+ break;
442
552
  }
443
553
  return { id: name, label: `${label}: ${labelValue}` };
444
554
  }
@@ -467,6 +577,482 @@ FilterService = __decorate([
467
577
  Injectable()
468
578
  ], FilterService);
469
579
 
580
+ var ExclusionsListComponent_1;
581
+ const HTTP_CODE_SERVER_ERROR_START = 500;
582
+ const HTTP_CODE_SERVER_ERROR_END = 600;
583
+ let ExclusionsListComponent = ExclusionsListComponent_1 = class ExclusionsListComponent {
584
+ constructor(route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs) {
585
+ this.route = route;
586
+ this.translate = translate;
587
+ this.formBuilder = formBuilder;
588
+ this.changeDetectorRef = changeDetectorRef;
589
+ this.logicalDeleteService = logicalDeleteService;
590
+ this.filterService = filterService;
591
+ this.projectConfigs = projectConfigs;
592
+ this.currentListParams = { page: 0, size: 10, sort: [], filterData: {} };
593
+ this.showLoader = false;
594
+ this.totalRecords = 0;
595
+ this.filtersPanelCollapsed = true;
596
+ this.searchTokens = [];
597
+ this.serverError = false;
598
+ this.ngUnsubscribe = new Subject();
599
+ }
600
+ ngOnInit() {
601
+ this.filterFormGroup = this.getFormBuilder();
602
+ this.filterFields = this.getFilterFields();
603
+ this.gridColumns = this.getGridColumns();
604
+ this.route.data
605
+ .pipe(takeUntil(this.ngUnsubscribe))
606
+ .subscribe((data) => {
607
+ this.locale = data.localeConfig;
608
+ });
609
+ this.route.params
610
+ .pipe(takeUntil(this.ngUnsubscribe))
611
+ .subscribe((params) => {
612
+ this.entityName = params.entityName;
613
+ this.showBasedOnRoute();
614
+ });
615
+ this.route.queryParams
616
+ .pipe(takeUntil(this.ngUnsubscribe))
617
+ .subscribe((queryParams) => {
618
+ this.entityDescription = queryParams.entityDescription;
619
+ this.processId = queryParams.processId;
620
+ this.showBasedOnRoute();
621
+ });
622
+ }
623
+ showBasedOnRoute() {
624
+ if (this.entityName && this.entityDescription && this.processId) {
625
+ this.exclusionDetailsComponent.showDetails({
626
+ processId: this.processId,
627
+ entityDescription: this.entityDescription,
628
+ entityName: this.entityName
629
+ });
630
+ }
631
+ }
632
+ ngOnDestroy() {
633
+ this.ngUnsubscribe.next();
634
+ this.ngUnsubscribe.complete();
635
+ }
636
+ getFormBuilder() {
637
+ return this.formBuilder.group({
638
+ description: [undefined, Validators.compose([])],
639
+ status: [undefined, Validators.compose([])],
640
+ startDate: [{ value: undefined, disabled: false }, Validators.compose([])],
641
+ endDate: [{ value: undefined, disabled: false }, Validators.compose([])]
642
+ });
643
+ }
644
+ getGridColumns() {
645
+ return [
646
+ {
647
+ field: "description",
648
+ attributes: ["description"],
649
+ header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_description`),
650
+ type: EnumColumnFieldType.STRING,
651
+ style: {
652
+ width: "300px"
653
+ }
654
+ },
655
+ {
656
+ field: "status",
657
+ attributes: ["status"],
658
+ header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_status`),
659
+ type: EnumColumnFieldType.ENUM,
660
+ enumPrefix: `${this.projectConfigs.getTranslationPrefix()}.logical_delete_enum_exclusion_process_status_`,
661
+ style: {
662
+ width: "100px"
663
+ },
664
+ tooltip: this.getColumnStatusTooltip,
665
+ badgeConfigs: [
666
+ {
667
+ enumValue: EnumExclusionProcessStatus.ERROR,
668
+ color: EnumBadgeColors.RED
669
+ },
670
+ {
671
+ enumValue: EnumExclusionProcessStatus.PENDING,
672
+ color: EnumBadgeColors.YELLOW
673
+ },
674
+ {
675
+ enumValue: EnumExclusionProcessStatus.PROCESSING,
676
+ color: EnumBadgeColors.BLUE
677
+ },
678
+ {
679
+ enumValue: EnumExclusionProcessStatus.SUCCESS,
680
+ color: EnumBadgeColors.GREEN
681
+ }
682
+ ]
683
+ },
684
+ {
685
+ field: "startDate",
686
+ attributes: ["startDate"],
687
+ header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_start`),
688
+ type: EnumColumnFieldType.DATE,
689
+ dateFormat: "DD/MM/YYYY HH:mm:ss",
690
+ style: {
691
+ width: "100px"
692
+ }
693
+ },
694
+ {
695
+ field: "finishDate",
696
+ attributes: ["finishDate"],
697
+ header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_finish`),
698
+ type: EnumColumnFieldType.DATE,
699
+ dateFormat: "DD/MM/YYYY HH:mm:ss",
700
+ style: {
701
+ width: "100px"
702
+ }
703
+ }
704
+ ];
705
+ }
706
+ getColumnStatusTooltip(rowValue) {
707
+ if (rowValue.errorMessage) {
708
+ return rowValue.errorMessage;
709
+ }
710
+ return null;
711
+ }
712
+ getFilterFields() {
713
+ const translationPrefix = this.projectConfigs.getTranslationPrefix();
714
+ return [
715
+ new FormField({
716
+ type: FieldType.String,
717
+ name: "description",
718
+ label: this.translate.instant(`${translationPrefix}.logical_delete_description`)
719
+ }),
720
+ new FormField({
721
+ type: FieldType.Enum,
722
+ name: "status",
723
+ label: this.translate.instant(`${translationPrefix}.logical_delete_status`),
724
+ placeholder: this.translate.instant(`${translationPrefix}.logical_delete_status`),
725
+ multiple: true,
726
+ options: [
727
+ {
728
+ label: this.translate.instant(`${translationPrefix}.logical_delete_enum_exclusion_process_status_error`),
729
+ value: EnumExclusionProcessStatus.ERROR
730
+ },
731
+ {
732
+ label: this.translate.instant(`${translationPrefix}.logical_delete_enum_exclusion_process_status_pending`),
733
+ value: EnumExclusionProcessStatus.PENDING
734
+ },
735
+ {
736
+ label: this.translate.instant(`${translationPrefix}.logical_delete_enum_exclusion_process_status_processing`),
737
+ value: EnumExclusionProcessStatus.PROCESSING
738
+ },
739
+ {
740
+ label: this.translate.instant(`${translationPrefix}.logical_delete_enum_exclusion_process_status_success`),
741
+ value: EnumExclusionProcessStatus.SUCCESS
742
+ }
743
+ ]
744
+ }),
745
+ new FormField({
746
+ type: FieldType.Date,
747
+ name: "startDate",
748
+ label: this.translate.instant(`${translationPrefix}.logical_delete_start`)
749
+ }),
750
+ new FormField({
751
+ type: FieldType.Date,
752
+ name: "endDate",
753
+ label: this.translate.instant(`${translationPrefix}.logical_delete_finish`)
754
+ })
755
+ ];
756
+ }
757
+ getEmptyStateTitle() {
758
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_empty_state_title`);
759
+ }
760
+ getEmptyStateDescription() {
761
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_empty_state_description`);
762
+ }
763
+ getTitle() {
764
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_list_title`);
765
+ }
766
+ getDetailsButtonTitle() {
767
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_details`);
768
+ }
769
+ getFiltersTitle() {
770
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.filters`);
771
+ }
772
+ getFilterButtonTitle() {
773
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.filter`);
774
+ }
775
+ getClearButtonTitle() {
776
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.clear`);
777
+ }
778
+ getErrorInvalid() {
779
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.error_invalid`);
780
+ }
781
+ getErrorServerTitle() {
782
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.error_server_title`);
783
+ }
784
+ getErrorServerDescription() {
785
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.error_server_description`);
786
+ }
787
+ getActionsColumnLabel() {
788
+ return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.actions`);
789
+ }
790
+ onSearch() {
791
+ const filterData = this.filterFormGroup.getRawValue();
792
+ this.filtersPanelCollapsed = true;
793
+ this.resetGrid({ filterData });
794
+ }
795
+ onClear() {
796
+ this.filterFormGroup.reset();
797
+ const filterData = this.filterFormGroup.getRawValue();
798
+ this.resetGrid({ filterData });
799
+ }
800
+ onRemoveToken(token) {
801
+ this.filterFormGroup.get(token.id).setValue(undefined);
802
+ const filterData = this.filterFormGroup.getRawValue();
803
+ this.resetGrid({ filterData });
804
+ }
805
+ onGridChange(event) {
806
+ const size = event.rows;
807
+ const page = event.first / size;
808
+ const sort = event.multiSortMeta ? event.multiSortMeta : [];
809
+ return this.updateGrid({ page, size, sort });
810
+ }
811
+ getFilterTokens() {
812
+ const filterData = this.filterFormGroup.value;
813
+ return this.filterFields
814
+ .filter(({ name }) => filterData[name] !== undefined && filterData[name] !== "" && filterData[name] !== null)
815
+ .map(formField => this.filterService.createFilterTokens(formField, filterData[formField.name]));
816
+ }
817
+ getFilterQuery() {
818
+ const { filterData } = this.currentListParams;
819
+ const dateFields = ["startDate", "endDate"];
820
+ let filterQuery = this.filterFields
821
+ .filter(({ name }) => !dateFields.includes(name))
822
+ .filter(({ name }) => filterData[name] !== undefined && filterData[name] !== "" && filterData[name] !== null)
823
+ .map(formField => this.filterService.createFilterString(formField, filterData[formField.name]))
824
+ .join(" and ");
825
+ let dateQuery;
826
+ if (filterData.startDate && filterData.endDate) {
827
+ const startDate = moment(filterData.startDate).format(ExclusionsListComponent_1.DATE_FORMAT);
828
+ const endDate = moment(filterData.endDate).format(ExclusionsListComponent_1.DATE_FORMAT);
829
+ dateQuery = `startDate between '${startDate}T00:00:00Z' and '${endDate}T23:59:59Z'`;
830
+ }
831
+ else if (filterData.startDate) {
832
+ const startDate = moment(filterData.startDate).format(ExclusionsListComponent_1.DATE_FORMAT);
833
+ dateQuery = `startDate >= '${startDate}T00:00:00Z'`;
834
+ }
835
+ else if (filterData.endDate) {
836
+ const endDate = moment(filterData.endDate).format(ExclusionsListComponent_1.DATE_FORMAT);
837
+ dateQuery = `finishDate <= '${endDate}T23:59:59Z'`;
838
+ }
839
+ else {
840
+ // Não é necessário nenhuma condição a mais no filtro.
841
+ }
842
+ if (dateQuery) {
843
+ filterQuery += filterQuery ? ` and ${dateQuery}` : dateQuery;
844
+ }
845
+ return filterQuery;
846
+ }
847
+ updateGrid(listParams = {}) {
848
+ this.currentListParams = Object.assign(Object.assign({}, this.currentListParams), listParams);
849
+ const { page, size, sort } = this.currentListParams;
850
+ this.searchTokens = this.getFilterTokens();
851
+ const filterQuery = this.getFilterQuery();
852
+ const displayFields = [
853
+ "recordId",
854
+ "errorMessage",
855
+ ...this.gridColumns.map(column => column.field)
856
+ ];
857
+ if (!sort.length) {
858
+ sort.push({ field: 'startDate', order: -1 });
859
+ }
860
+ this.listExclusions({ page, size, sort, filterQuery, displayFields });
861
+ }
862
+ listExclusions(params) {
863
+ this.showLoader = true;
864
+ this.serverError = false;
865
+ this.changeDetectorRef.detectChanges();
866
+ this.logicalDeleteService
867
+ .listExclusions(this.entityName, params)
868
+ .pipe(takeUntil(this.ngUnsubscribe), catchError((err) => {
869
+ if (err.status >= HTTP_CODE_SERVER_ERROR_START && err.status < HTTP_CODE_SERVER_ERROR_END) {
870
+ this.serverError = true;
871
+ }
872
+ throw err;
873
+ }), finalize(() => this.showLoader = false))
874
+ .subscribe((list) => {
875
+ this.gridData = list.contents;
876
+ this.totalRecords = list.totalElements;
877
+ });
878
+ }
879
+ focusInput(elementId) {
880
+ const element = document.getElementById(`${elementId}`);
881
+ if (element) {
882
+ element.focus();
883
+ }
884
+ }
885
+ resetGrid(listParams) {
886
+ if (listParams) {
887
+ this.currentListParams = Object.assign(Object.assign({}, this.currentListParams), listParams);
888
+ }
889
+ this.currentListParams = Object.assign(Object.assign({}, this.currentListParams), { page: 0, sort: [] });
890
+ this.table.reset();
891
+ }
892
+ onClickDetails(rowData) {
893
+ this.exclusionDetailsComponent.showDetails({
894
+ processId: rowData.id,
895
+ entityDescription: this.entityDescription,
896
+ entityName: this.entityName
897
+ });
898
+ }
899
+ };
900
+ ExclusionsListComponent.DATE_FORMAT = "YYYY-MM-DD";
901
+ ExclusionsListComponent.ctorParameters = () => [
902
+ { type: ActivatedRoute },
903
+ { type: TranslateService },
904
+ { type: FormBuilder },
905
+ { type: ChangeDetectorRef },
906
+ { type: LogicalDeleteService },
907
+ { type: FilterService },
908
+ { type: LogicalDeleteConfigService }
909
+ ];
910
+ __decorate([
911
+ ViewChild("exclusionsTable")
912
+ ], ExclusionsListComponent.prototype, "table", void 0);
913
+ __decorate([
914
+ ViewChild(ExclusionDetailsComponent)
915
+ ], ExclusionsListComponent.prototype, "exclusionDetailsComponent", void 0);
916
+ ExclusionsListComponent = ExclusionsListComponent_1 = __decorate([
917
+ Component({
918
+ template: "<div>\n <form [formGroup]=\"filterFormGroup\" autocomplete=\"off\">\n <p-panel\n *sLoadingState=\"showLoader\"\n styleClass=\"form-group\"\n [toggleable]=\"true\"\n [(collapsed)]=\"filtersPanelCollapsed\"\n (onAfterToggle)=\"focusInput('description')\"\n >\n <p-header>\n {{ getFiltersTitle() }}\n <s-token-list\n [tokens]=\"searchTokens\"\n (tokenRemoved)=\"onRemoveToken($event)\"\n [removableTokens]=\"true\"\n ></s-token-list>\n </p-header>\n <div>\n <s-dynamic-form\n [fields]=\"filterFields\"\n [form]=\"filterFormGroup\"\n [errorMessages]=\"{ pattern: getErrorInvalid() }\"\n ></s-dynamic-form>\n </div>\n <p-footer>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <button\n id=\"filter-button\"\n class=\"ui-button\"\n type=\"submit\"\n pButton\n [label]=\"getFilterButtonTitle()\"\n (click)=\"onSearch()\"\n ></button>\n <button\n id=\"clear-button\"\n class=\"ui-button ui-button-link\"\n type=\"button\"\n pButton\n [label]=\"getClearButtonTitle()\"\n (click)=\"onClear()\"\n ></button>\n </div>\n </div>\n </p-footer>\n </p-panel>\n </form>\n <p-panel *sLoadingState=\"showLoader\">\n <p-header>\n {{ getTitle() }}\n </p-header>\n <ng-container>\n <s-empty-state\n *ngIf=\"serverError && !showLoader\"\n iconClass=\"fa fa-exclamation-triangle\"\n title=\"{{ getErrorServerTitle() | translate }}\"\n primaryActionLabel=\"{{ 'error_server_try_again' | translate }}\"\n (primaryAction)=\"resetGrid()\"\n description=\"{{ getErrorServerDescription() | translate }}\"\n ></s-empty-state>\n\n <s-empty-state\n *ngIf=\"!showLoader && !serverError && totalRecords === 0\"\n [title]=\"getEmptyStateTitle()\"\n [showPrimaryAction]=\"false\"\n [description]=\"getEmptyStateDescription()\"\n ></s-empty-state>\n\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <p-table\n #exclusionsTable\n id=\"exclusionsTable\"\n [hidden]=\"totalRecords === 0 || serverError\"\n [value]=\"gridData\"\n [columns]=\"gridColumns\"\n dataKey=\"id\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [resizableColumns]=\"true\"\n sortMode=\"multiple\"\n [paginator]=\"true\"\n [totalRecords]=\"totalRecords\"\n [rows]=\"10\"\n sortField=\"startDate\"\n sortOrder=\"-1\"\n rows=\"10\"\n [rowsPerPageOptions]=\"[10, 20, 50, 100]\"\n (onLazyLoad)=\"onGridChange($event)\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col\n *ngFor=\"let col of columns\"\n [style.width]=\"col.width\"\n />\n </colgroup>\n </ng-template>\n\n <ng-template\n pTemplate=\"header\"\n let-columns\n >\n <tr>\n <th *ngFor=\"let col of columns\"\n [id]=\"col.field\"\n [pSortableColumn]=\"col.field\"\n [ngStyle]=\"col.style\"\n pResizableColumn\n >\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">\n {{ col.header }}\n </span>\n <p-sortIcon [field]=\"col.field\"></p-sortIcon>\n </div>\n </th>\n <th id=\"action-column\" style=\"width: 100px\">\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ getActionsColumnLabel() }}</span>\n </div>\n </th>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr [pSelectableRow]=\"rowData\">\n <s-table-columns\n [columns]=\"columns\"\n [rowValue]=\"rowData\"\n [locale]=\"locale\">\n </s-table-columns>\n <td style=\"width: 100px\">\n <s-button\n id=\"details-button\"\n priority=\"default\"\n [label]=\"getDetailsButtonTitle()\"\n [auxiliary]=\"true\"\n (onClick)=\"onClickDetails(rowData)\">\n </s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate=\"paginatorright\">\n <s-table-paging\n [table]=\"exclusionsTable\"\n [totalRecords]=\"totalRecords\"\n ></s-table-paging>\n </ng-template>\n </p-table>\n </div>\n </div>\n </ng-container>\n </p-panel>\n</div>\n\n<s-exclusion-details></s-exclusion-details>\n",
919
+ providers: []
920
+ })
921
+ ], ExclusionsListComponent);
922
+
923
+ let ExclusionsListFeatureRoutingGuard = class ExclusionsListFeatureRoutingGuard {
924
+ canActivate() {
925
+ return true;
926
+ }
927
+ };
928
+ ExclusionsListFeatureRoutingGuard = __decorate([
929
+ Injectable()
930
+ ], ExclusionsListFeatureRoutingGuard);
931
+ let ExclusionsListFeatureRoutingListTitleResolver = class ExclusionsListFeatureRoutingListTitleResolver {
932
+ constructor(translate, projectConfigs) {
933
+ this.translate = translate;
934
+ this.projectConfigs = projectConfigs;
935
+ }
936
+ resolve() {
937
+ return this.translate.get(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_list_title`);
938
+ }
939
+ };
940
+ ExclusionsListFeatureRoutingListTitleResolver.ctorParameters = () => [
941
+ { type: TranslateService },
942
+ { type: LogicalDeleteConfigService }
943
+ ];
944
+ ExclusionsListFeatureRoutingListTitleResolver = __decorate([
945
+ Injectable()
946
+ ], ExclusionsListFeatureRoutingListTitleResolver);
947
+ let ExclusionsListFeatureRoutingPermissionResolver = class ExclusionsListFeatureRoutingPermissionResolver {
948
+ constructor(permissionsService) {
949
+ this.permissionsService = permissionsService;
950
+ }
951
+ resolve() {
952
+ return this.permissionsService.get();
953
+ }
954
+ };
955
+ ExclusionsListFeatureRoutingPermissionResolver.ctorParameters = () => [
956
+ { type: PermissionsService }
957
+ ];
958
+ ExclusionsListFeatureRoutingPermissionResolver = __decorate([
959
+ Injectable()
960
+ ], ExclusionsListFeatureRoutingPermissionResolver);
961
+ let ExclusionsListFeatureRoutingLocaleResolver = class ExclusionsListFeatureRoutingLocaleResolver {
962
+ constructor(localeService) {
963
+ this.localeService = localeService;
964
+ }
965
+ resolve() {
966
+ return this.localeService.get();
967
+ }
968
+ };
969
+ ExclusionsListFeatureRoutingLocaleResolver.ctorParameters = () => [
970
+ { type: LocaleService }
971
+ ];
972
+ ExclusionsListFeatureRoutingLocaleResolver = __decorate([
973
+ Injectable()
974
+ ], ExclusionsListFeatureRoutingLocaleResolver);
975
+ let EmptyComponent = class EmptyComponent {
976
+ };
977
+ EmptyComponent = __decorate([
978
+ Component({
979
+ template: `<router-outlet></router-outlet>`
980
+ })
981
+ ], EmptyComponent);
982
+ const routes = [
983
+ {
984
+ path: "exclusions-list",
985
+ component: EmptyComponent,
986
+ canActivate: [
987
+ ExclusionsListFeatureRoutingGuard
988
+ ],
989
+ resolve: {
990
+ allPermissions: ExclusionsListFeatureRoutingPermissionResolver,
991
+ localeConfig: ExclusionsListFeatureRoutingLocaleResolver,
992
+ routeTitle: ExclusionsListFeatureRoutingListTitleResolver
993
+ },
994
+ children: [
995
+ {
996
+ path: ":entityName",
997
+ component: ExclusionsListComponent
998
+ }
999
+ ]
1000
+ }
1001
+ ];
1002
+ let ExclusionsListFeatureRouting = class ExclusionsListFeatureRouting {
1003
+ };
1004
+ ExclusionsListFeatureRouting = __decorate([
1005
+ NgModule({
1006
+ imports: [
1007
+ RouterModule.forChild(routes)
1008
+ ],
1009
+ exports: [
1010
+ RouterModule
1011
+ ],
1012
+ providers: [
1013
+ ExclusionsListFeatureRoutingGuard,
1014
+ ExclusionsListFeatureRoutingPermissionResolver,
1015
+ ExclusionsListFeatureRoutingLocaleResolver,
1016
+ ExclusionsListFeatureRoutingListTitleResolver
1017
+ ],
1018
+ declarations: [
1019
+ EmptyComponent
1020
+ ]
1021
+ })
1022
+ ], ExclusionsListFeatureRouting);
1023
+
1024
+ let ExclusionsListModule = class ExclusionsListModule {
1025
+ };
1026
+ ExclusionsListModule = __decorate([
1027
+ NgModule({
1028
+ imports: [
1029
+ FormsModule,
1030
+ ReactiveFormsModule,
1031
+ TranslateModule,
1032
+ CommonModule,
1033
+ ControlErrorsModule,
1034
+ ButtonModule,
1035
+ PanelModule,
1036
+ InputTextModule,
1037
+ InfoSignModule,
1038
+ ConfirmDialogModule,
1039
+ DialogModule,
1040
+ TableModule,
1041
+ TableModule$1,
1042
+ LoadingStateModule,
1043
+ EmptyStateModule,
1044
+ DynamicFormModule,
1045
+ TokenListModule,
1046
+ LocaleModule.forChild(),
1047
+ ExclusionDetailsModule,
1048
+ ExclusionsListFeatureRouting
1049
+ ],
1050
+ declarations: [ExclusionsListComponent],
1051
+ exports: [ExclusionsListComponent],
1052
+ entryComponents: [ExclusionsListComponent]
1053
+ })
1054
+ ], ExclusionsListModule);
1055
+
470
1056
  var LogicalDeleteModule_1;
471
1057
  let LogicalDeleteModule = LogicalDeleteModule_1 = class LogicalDeleteModule {
472
1058
  static forRoot(config) {
@@ -491,5 +1077,5 @@ LogicalDeleteModule = LogicalDeleteModule_1 = __decorate([
491
1077
  * Generated bundle index. Do not edit.
492
1078
  */
493
1079
 
494
- export { ExclusionDetailsComponent, ExclusionDetailsModule, LogicalDeleteModule, LogicalDeleteService as ɵa, LogicalDeleteConfigService as ɵb, ProjectConfigsInjectionToken as ɵc, FilterService as ɵe };
1080
+ export { EmptyComponent, ExclusionDetailsComponent, ExclusionDetailsModule, ExclusionsListComponent, ExclusionsListFeatureRouting, ExclusionsListFeatureRoutingGuard, ExclusionsListFeatureRoutingListTitleResolver, ExclusionsListFeatureRoutingLocaleResolver, ExclusionsListFeatureRoutingPermissionResolver, ExclusionsListModule, LogicalDeleteModule, routes, LogicalDeleteService as ɵa, LogicalDeleteConfigService as ɵb, ProjectConfigsInjectionToken as ɵc, ExclusionDetailsModule as ɵe, ExclusionDetailsComponent as ɵf, LogicalDeleteService as ɵg, FilterService as ɵh };
495
1081
  //# sourceMappingURL=seniorsistemas-exclusion-process-component.js.map