@seniorsistemas/exclusion-process-component 0.2.1 → 0.3.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.
- package/bundles/seniorsistemas-exclusion-process-component.umd.js +103 -75
- package/bundles/seniorsistemas-exclusion-process-component.umd.js.map +1 -1
- package/bundles/seniorsistemas-exclusion-process-component.umd.min.js +2 -2
- package/bundles/seniorsistemas-exclusion-process-component.umd.min.js.map +1 -1
- package/esm2015/exclusion-details/exclusion-details.component.js +82 -63
- package/esm2015/exclusions-list/exclusions-list.component.js +21 -15
- package/esm2015/exclusions-list/exclusions-list.routing.js +2 -2
- package/esm5/exclusion-details/exclusion-details.component.js +87 -65
- package/esm5/exclusions-list/exclusions-list.component.js +21 -15
- package/esm5/exclusions-list/exclusions-list.routing.js +2 -2
- package/exclusion-details/exclusion-details.component.d.ts +11 -11
- package/exclusions-list/exclusions-list.component.d.ts +7 -5
- package/fesm2015/seniorsistemas-exclusion-process-component.js +101 -76
- package/fesm2015/seniorsistemas-exclusion-process-component.js.map +1 -1
- package/fesm5/seniorsistemas-exclusion-process-component.js +105 -77
- package/fesm5/seniorsistemas-exclusion-process-component.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-exclusion-process-component.metadata.json +1 -1
|
@@ -3,9 +3,9 @@ import { CommonModule } from '@angular/common';
|
|
|
3
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 {
|
|
6
|
+
import { EnumBadgeColors, EnumColumnFieldType, 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 {
|
|
8
|
+
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
9
9
|
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
10
10
|
import { throwError, Subject } from 'rxjs';
|
|
11
11
|
import { catchError, map, takeUntil, finalize } from 'rxjs/operators';
|
|
@@ -172,18 +172,36 @@ var LogicalDeleteService = /** @class */ (function () {
|
|
|
172
172
|
return LogicalDeleteService;
|
|
173
173
|
}());
|
|
174
174
|
|
|
175
|
+
var EXCLUSION_PROCESS_STATUS_BADGE = [
|
|
176
|
+
{
|
|
177
|
+
enumValue: EnumExclusionProcessStatus.ERROR,
|
|
178
|
+
color: EnumBadgeColors.RED
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
enumValue: EnumExclusionProcessStatus.PENDING,
|
|
182
|
+
color: EnumBadgeColors.YELLOW
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
enumValue: EnumExclusionProcessStatus.PROCESSING,
|
|
186
|
+
color: EnumBadgeColors.BLUE
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
enumValue: EnumExclusionProcessStatus.SUCCESS,
|
|
190
|
+
color: EnumBadgeColors.GREEN
|
|
191
|
+
}
|
|
192
|
+
];
|
|
175
193
|
var ExclusionDetailsComponent = /** @class */ (function () {
|
|
176
|
-
function ExclusionDetailsComponent(
|
|
177
|
-
this.router = router;
|
|
194
|
+
function ExclusionDetailsComponent(route, translate, logicalDeleteService, projectConfigs) {
|
|
178
195
|
this.route = route;
|
|
179
196
|
this.translate = translate;
|
|
180
197
|
this.logicalDeleteService = logicalDeleteService;
|
|
181
198
|
this.projectConfigs = projectConfigs;
|
|
182
|
-
this.
|
|
199
|
+
this.expandedRows = {};
|
|
183
200
|
this._isVisible = false;
|
|
184
201
|
this._isLoading = false;
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
202
|
+
this._processGroupData = [];
|
|
203
|
+
this._processGroupColumns = [];
|
|
204
|
+
this._processStepColumns = [];
|
|
187
205
|
this.ngUnsubscribe = new Subject();
|
|
188
206
|
}
|
|
189
207
|
Object.defineProperty(ExclusionDetailsComponent.prototype, "isVisible", {
|
|
@@ -200,16 +218,23 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
200
218
|
enumerable: true,
|
|
201
219
|
configurable: true
|
|
202
220
|
});
|
|
203
|
-
Object.defineProperty(ExclusionDetailsComponent.prototype, "
|
|
221
|
+
Object.defineProperty(ExclusionDetailsComponent.prototype, "processGroupData", {
|
|
204
222
|
get: function () {
|
|
205
|
-
return this.
|
|
223
|
+
return this._processGroupData;
|
|
206
224
|
},
|
|
207
225
|
enumerable: true,
|
|
208
226
|
configurable: true
|
|
209
227
|
});
|
|
210
|
-
Object.defineProperty(ExclusionDetailsComponent.prototype, "
|
|
228
|
+
Object.defineProperty(ExclusionDetailsComponent.prototype, "processGroupColumns", {
|
|
211
229
|
get: function () {
|
|
212
|
-
return this.
|
|
230
|
+
return this._processGroupColumns;
|
|
231
|
+
},
|
|
232
|
+
enumerable: true,
|
|
233
|
+
configurable: true
|
|
234
|
+
});
|
|
235
|
+
Object.defineProperty(ExclusionDetailsComponent.prototype, "processStepColumns", {
|
|
236
|
+
get: function () {
|
|
237
|
+
return this._processStepColumns;
|
|
213
238
|
},
|
|
214
239
|
enumerable: true,
|
|
215
240
|
configurable: true
|
|
@@ -221,7 +246,8 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
221
246
|
.subscribe(function (data) {
|
|
222
247
|
_this.locale = data.localeConfig;
|
|
223
248
|
});
|
|
224
|
-
this.
|
|
249
|
+
this._processGroupColumns = this.getGroupColumns();
|
|
250
|
+
this._processStepColumns = this.getStepColumns();
|
|
225
251
|
};
|
|
226
252
|
ExclusionDetailsComponent.prototype.ngOnDestroy = function () {
|
|
227
253
|
this.ngUnsubscribe.next();
|
|
@@ -230,9 +256,8 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
230
256
|
};
|
|
231
257
|
ExclusionDetailsComponent.prototype.showDetails = function (details) {
|
|
232
258
|
this._exclusionDetails = details;
|
|
233
|
-
this._entityName = details.entityName;
|
|
234
259
|
this._isVisible = true;
|
|
235
|
-
this.
|
|
260
|
+
this._processGroupData = [];
|
|
236
261
|
this.processDetails = null;
|
|
237
262
|
this.entityDescription = details.entityDescription;
|
|
238
263
|
this.loadProcessDetails(details);
|
|
@@ -244,17 +269,9 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
244
269
|
ExclusionDetailsComponent.prototype.closeDetails = function () {
|
|
245
270
|
this._isVisible = false;
|
|
246
271
|
this._exclusionDetails = null;
|
|
247
|
-
this.
|
|
272
|
+
this._processGroupData = [];
|
|
248
273
|
this.disconnectWebSocket();
|
|
249
274
|
};
|
|
250
|
-
ExclusionDetailsComponent.prototype.openExclusions = function () {
|
|
251
|
-
this.closeDetails();
|
|
252
|
-
this.router.navigate(["exclusions-list", this._entityName], {
|
|
253
|
-
queryParams: {
|
|
254
|
-
entityDescription: this.entityDescription
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
};
|
|
258
275
|
ExclusionDetailsComponent.prototype.getRecordDescription = function () {
|
|
259
276
|
var _a;
|
|
260
277
|
if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.description)) {
|
|
@@ -304,15 +321,15 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
304
321
|
ExclusionDetailsComponent.prototype.getEmptyStateDescription = function () {
|
|
305
322
|
return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_empty_state_description");
|
|
306
323
|
};
|
|
307
|
-
ExclusionDetailsComponent.prototype.
|
|
324
|
+
ExclusionDetailsComponent.prototype.getGroupColumns = function () {
|
|
308
325
|
return [
|
|
309
326
|
{
|
|
310
327
|
field: "description",
|
|
311
328
|
attributes: ["description"],
|
|
312
|
-
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".
|
|
329
|
+
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_group"),
|
|
313
330
|
type: EnumColumnFieldType.STRING,
|
|
314
331
|
style: {
|
|
315
|
-
width: "
|
|
332
|
+
width: "340px"
|
|
316
333
|
}
|
|
317
334
|
},
|
|
318
335
|
{
|
|
@@ -325,24 +342,32 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
325
342
|
width: "100px"
|
|
326
343
|
},
|
|
327
344
|
tooltip: this.getColumnStatusTooltip,
|
|
328
|
-
badgeConfigs:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
]
|
|
345
|
+
badgeConfigs: EXCLUSION_PROCESS_STATUS_BADGE
|
|
346
|
+
}
|
|
347
|
+
];
|
|
348
|
+
};
|
|
349
|
+
ExclusionDetailsComponent.prototype.getStepColumns = function () {
|
|
350
|
+
return [
|
|
351
|
+
{
|
|
352
|
+
field: "description",
|
|
353
|
+
attributes: ["description"],
|
|
354
|
+
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_step"),
|
|
355
|
+
type: EnumColumnFieldType.STRING,
|
|
356
|
+
style: {
|
|
357
|
+
width: "340px"
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
field: "status",
|
|
362
|
+
attributes: ["status"],
|
|
363
|
+
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_status"),
|
|
364
|
+
type: EnumColumnFieldType.ENUM,
|
|
365
|
+
enumPrefix: this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_",
|
|
366
|
+
style: {
|
|
367
|
+
width: "100px"
|
|
368
|
+
},
|
|
369
|
+
tooltip: this.getColumnStatusTooltip,
|
|
370
|
+
badgeConfigs: EXCLUSION_PROCESS_STATUS_BADGE
|
|
346
371
|
}
|
|
347
372
|
];
|
|
348
373
|
};
|
|
@@ -366,7 +391,14 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
366
391
|
return;
|
|
367
392
|
}
|
|
368
393
|
_this.processDetails = process;
|
|
369
|
-
_this.
|
|
394
|
+
_this._processGroupData = _this.sortGroupsByStartDate(process.groups)
|
|
395
|
+
.map(function (p) { return (__assign(__assign({}, p), { steps: _this.sortStepsByStartDate(p.steps) })); });
|
|
396
|
+
_this.expandedRows = {};
|
|
397
|
+
_this._processGroupData
|
|
398
|
+
.filter(function (p) { return p.status !== EnumExclusionProcessStatus.SUCCESS; })
|
|
399
|
+
.forEach(function (p) {
|
|
400
|
+
_this.expandedRows[p.id] = true;
|
|
401
|
+
});
|
|
370
402
|
});
|
|
371
403
|
};
|
|
372
404
|
ExclusionDetailsComponent.prototype.sortByDate = function (startDate, finishDate) {
|
|
@@ -386,21 +418,6 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
386
418
|
var _this = this;
|
|
387
419
|
return steps.sort(function (a, b) { return _this.sortByDate(a.startDate, b.finishDate); });
|
|
388
420
|
};
|
|
389
|
-
ExclusionDetailsComponent.prototype.loadProcessSummary = function (process) {
|
|
390
|
-
var _this = this;
|
|
391
|
-
var stepLogs = [];
|
|
392
|
-
this.sortGroupsByStartDate(process.groups)
|
|
393
|
-
.forEach(function (group) {
|
|
394
|
-
var steps = _this.sortStepsByStartDate(group.steps)
|
|
395
|
-
.map(function (step) { return ({
|
|
396
|
-
description: step.description,
|
|
397
|
-
status: step.status,
|
|
398
|
-
errorMessage: step.errorMessage
|
|
399
|
-
}); });
|
|
400
|
-
stepLogs.push.apply(stepLogs, __spread(steps));
|
|
401
|
-
});
|
|
402
|
-
this._processSummaryData = stepLogs;
|
|
403
|
-
};
|
|
404
421
|
ExclusionDetailsComponent.prototype.disconnectWebSocket = function () {
|
|
405
422
|
if (this._exclusionProcessStatusChangedSubscribe) {
|
|
406
423
|
this._exclusionProcessStatusChangedSubscribe.unsubscribe();
|
|
@@ -451,7 +468,6 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
451
468
|
});
|
|
452
469
|
};
|
|
453
470
|
ExclusionDetailsComponent.ctorParameters = function () { return [
|
|
454
|
-
{ type: Router },
|
|
455
471
|
{ type: ActivatedRoute },
|
|
456
472
|
{ type: TranslateService },
|
|
457
473
|
{ type: LogicalDeleteService },
|
|
@@ -465,20 +481,26 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
465
481
|
], ExclusionDetailsComponent.prototype, "isLoading", null);
|
|
466
482
|
__decorate([
|
|
467
483
|
Output()
|
|
468
|
-
], ExclusionDetailsComponent.prototype, "
|
|
484
|
+
], ExclusionDetailsComponent.prototype, "processGroupData", null);
|
|
485
|
+
__decorate([
|
|
486
|
+
Output()
|
|
487
|
+
], ExclusionDetailsComponent.prototype, "processGroupColumns", null);
|
|
469
488
|
__decorate([
|
|
470
489
|
Output()
|
|
471
|
-
], ExclusionDetailsComponent.prototype, "
|
|
490
|
+
], ExclusionDetailsComponent.prototype, "processStepColumns", null);
|
|
472
491
|
__decorate([
|
|
473
492
|
Output()
|
|
474
493
|
], ExclusionDetailsComponent.prototype, "processDetails", void 0);
|
|
475
494
|
__decorate([
|
|
476
495
|
Output()
|
|
477
496
|
], ExclusionDetailsComponent.prototype, "entityDescription", void 0);
|
|
497
|
+
__decorate([
|
|
498
|
+
Output()
|
|
499
|
+
], ExclusionDetailsComponent.prototype, "expandedRows", void 0);
|
|
478
500
|
ExclusionDetailsComponent = __decorate([
|
|
479
501
|
Component({
|
|
480
502
|
selector: "s-exclusion-details",
|
|
481
|
-
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=\"
|
|
503
|
+
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",
|
|
482
504
|
encapsulation: ViewEncapsulation.None,
|
|
483
505
|
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}"]
|
|
484
506
|
})
|
|
@@ -618,7 +640,8 @@ var FilterService = /** @class */ (function () {
|
|
|
618
640
|
var HTTP_CODE_SERVER_ERROR_START = 500;
|
|
619
641
|
var HTTP_CODE_SERVER_ERROR_END = 600;
|
|
620
642
|
var ExclusionsListComponent = /** @class */ (function () {
|
|
621
|
-
function ExclusionsListComponent(route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs) {
|
|
643
|
+
function ExclusionsListComponent(router, route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs, cdr) {
|
|
644
|
+
this.router = router;
|
|
622
645
|
this.route = route;
|
|
623
646
|
this.translate = translate;
|
|
624
647
|
this.formBuilder = formBuilder;
|
|
@@ -626,6 +649,7 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
626
649
|
this.logicalDeleteService = logicalDeleteService;
|
|
627
650
|
this.filterService = filterService;
|
|
628
651
|
this.projectConfigs = projectConfigs;
|
|
652
|
+
this.cdr = cdr;
|
|
629
653
|
this.currentListParams = { page: 0, size: 10, sort: [], filterData: {} };
|
|
630
654
|
this.showLoader = false;
|
|
631
655
|
this.totalRecords = 0;
|
|
@@ -645,30 +669,32 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
645
669
|
.subscribe(function (data) {
|
|
646
670
|
_this.locale = data.localeConfig;
|
|
647
671
|
});
|
|
648
|
-
this.route.params
|
|
649
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
650
|
-
.subscribe(function (params) {
|
|
651
|
-
_this.entityName = params.entityName;
|
|
652
|
-
_this.showBasedOnRoute();
|
|
653
|
-
});
|
|
654
672
|
this.route.queryParams
|
|
655
673
|
.pipe(takeUntil(this.ngUnsubscribe))
|
|
656
674
|
.subscribe(function (queryParams) {
|
|
675
|
+
_this.entityName = queryParams.entityName;
|
|
657
676
|
_this.entityDescription = queryParams.entityDescription;
|
|
658
677
|
_this.processId = queryParams.processId;
|
|
659
|
-
_this.showBasedOnRoute();
|
|
660
678
|
});
|
|
661
679
|
};
|
|
662
|
-
ExclusionsListComponent.prototype.
|
|
680
|
+
ExclusionsListComponent.prototype.ngAfterViewInit = function () {
|
|
663
681
|
if (this.entityName && this.entityDescription && this.processId) {
|
|
664
682
|
this.exclusionDetailsComponent.showDetails({
|
|
665
683
|
processId: this.processId,
|
|
666
684
|
entityDescription: this.entityDescription,
|
|
667
685
|
entityName: this.entityName
|
|
668
686
|
});
|
|
687
|
+
this.cdr.detectChanges();
|
|
669
688
|
}
|
|
670
689
|
};
|
|
671
690
|
ExclusionsListComponent.prototype.ngOnDestroy = function () {
|
|
691
|
+
var _a;
|
|
692
|
+
var params = __assign({}, (_a = this.route.snapshot) === null || _a === void 0 ? void 0 : _a.queryParams);
|
|
693
|
+
if (params) {
|
|
694
|
+
delete params.entityName;
|
|
695
|
+
delete params.entityDescription;
|
|
696
|
+
this.router.navigate([], { queryParams: params });
|
|
697
|
+
}
|
|
672
698
|
this.ngUnsubscribe.next();
|
|
673
699
|
this.ngUnsubscribe.complete();
|
|
674
700
|
};
|
|
@@ -676,8 +702,8 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
676
702
|
return this.formBuilder.group({
|
|
677
703
|
description: [undefined, Validators.compose([])],
|
|
678
704
|
status: [undefined, Validators.compose([])],
|
|
679
|
-
startDate: [{ value:
|
|
680
|
-
endDate: [{ value:
|
|
705
|
+
startDate: [{ value: null, disabled: false }, Validators.compose([])],
|
|
706
|
+
endDate: [{ value: null, disabled: false }, Validators.compose([])]
|
|
681
707
|
});
|
|
682
708
|
};
|
|
683
709
|
ExclusionsListComponent.prototype.getGridColumns = function () {
|
|
@@ -950,13 +976,15 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
950
976
|
var ExclusionsListComponent_1;
|
|
951
977
|
ExclusionsListComponent.DATE_FORMAT = "YYYY-MM-DD";
|
|
952
978
|
ExclusionsListComponent.ctorParameters = function () { return [
|
|
979
|
+
{ type: Router },
|
|
953
980
|
{ type: ActivatedRoute },
|
|
954
981
|
{ type: TranslateService },
|
|
955
982
|
{ type: FormBuilder },
|
|
956
983
|
{ type: ChangeDetectorRef },
|
|
957
984
|
{ type: LogicalDeleteService },
|
|
958
985
|
{ type: FilterService },
|
|
959
|
-
{ type: LogicalDeleteConfigService }
|
|
986
|
+
{ type: LogicalDeleteConfigService },
|
|
987
|
+
{ type: ChangeDetectorRef }
|
|
960
988
|
]; };
|
|
961
989
|
__decorate([
|
|
962
990
|
ViewChild("exclusionsTable")
|
|
@@ -1055,7 +1083,7 @@ var routes = [
|
|
|
1055
1083
|
},
|
|
1056
1084
|
children: [
|
|
1057
1085
|
{
|
|
1058
|
-
path: "
|
|
1086
|
+
path: "",
|
|
1059
1087
|
component: ExclusionsListComponent
|
|
1060
1088
|
}
|
|
1061
1089
|
]
|