@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.
- package/bundles/seniorsistemas-exclusion-process-component.umd.js +144 -104
- 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 +121 -71
- package/esm2015/exclusions-list/exclusions-list.component.js +21 -15
- package/esm2015/exclusions-list/exclusions-list.routing.js +4 -25
- package/esm5/exclusion-details/exclusion-details.component.js +127 -73
- package/esm5/exclusions-list/exclusions-list.component.js +21 -15
- package/esm5/exclusions-list/exclusions-list.routing.js +4 -26
- package/exclusion-details/exclusion-details.component.d.ts +16 -12
- package/exclusions-list/exclusions-list.component.d.ts +7 -5
- package/exclusions-list/exclusions-list.routing.d.ts +0 -8
- package/fesm2015/seniorsistemas-exclusion-process-component.js +143 -105
- package/fesm2015/seniorsistemas-exclusion-process-component.js.map +1 -1
- package/fesm5/seniorsistemas-exclusion-process-component.js +148 -107
- package/fesm5/seniorsistemas-exclusion-process-component.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-exclusion-process-component.metadata.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate, __param } from 'tslib';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { InjectionToken, Inject, Injectable, Output, Component, ViewEncapsulation, NgModule, ChangeDetectorRef, ViewChild } from '@angular/core';
|
|
3
|
+
import { InjectionToken, Inject, Injectable, EventEmitter, 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';
|
|
@@ -166,18 +166,37 @@ LogicalDeleteService = __decorate([
|
|
|
166
166
|
Injectable()
|
|
167
167
|
], LogicalDeleteService);
|
|
168
168
|
|
|
169
|
+
const EXCLUSION_PROCESS_STATUS_BADGE = [
|
|
170
|
+
{
|
|
171
|
+
enumValue: EnumExclusionProcessStatus.ERROR,
|
|
172
|
+
color: EnumBadgeColors.RED
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
enumValue: EnumExclusionProcessStatus.PENDING,
|
|
176
|
+
color: EnumBadgeColors.YELLOW
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
enumValue: EnumExclusionProcessStatus.PROCESSING,
|
|
180
|
+
color: EnumBadgeColors.BLUE
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
enumValue: EnumExclusionProcessStatus.SUCCESS,
|
|
184
|
+
color: EnumBadgeColors.GREEN
|
|
185
|
+
}
|
|
186
|
+
];
|
|
169
187
|
let ExclusionDetailsComponent = class ExclusionDetailsComponent {
|
|
170
|
-
constructor(
|
|
171
|
-
this.router = router;
|
|
188
|
+
constructor(route, translate, logicalDeleteService, projectConfigs) {
|
|
172
189
|
this.route = route;
|
|
173
190
|
this.translate = translate;
|
|
174
191
|
this.logicalDeleteService = logicalDeleteService;
|
|
175
192
|
this.projectConfigs = projectConfigs;
|
|
176
|
-
this.
|
|
193
|
+
this.expandedRows = {};
|
|
194
|
+
this.onProcessFinishedSuccessfully = new EventEmitter();
|
|
177
195
|
this._isVisible = false;
|
|
178
196
|
this._isLoading = false;
|
|
179
|
-
this.
|
|
180
|
-
this.
|
|
197
|
+
this._processGroupData = [];
|
|
198
|
+
this._processGroupColumns = [];
|
|
199
|
+
this._processStepColumns = [];
|
|
181
200
|
this.ngUnsubscribe = new Subject();
|
|
182
201
|
}
|
|
183
202
|
get isVisible() {
|
|
@@ -186,11 +205,14 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
|
|
|
186
205
|
get isLoading() {
|
|
187
206
|
return this._isLoading;
|
|
188
207
|
}
|
|
189
|
-
get
|
|
190
|
-
return this.
|
|
208
|
+
get processGroupData() {
|
|
209
|
+
return this._processGroupData;
|
|
210
|
+
}
|
|
211
|
+
get processGroupColumns() {
|
|
212
|
+
return this._processGroupColumns;
|
|
191
213
|
}
|
|
192
|
-
get
|
|
193
|
-
return this.
|
|
214
|
+
get processStepColumns() {
|
|
215
|
+
return this._processStepColumns;
|
|
194
216
|
}
|
|
195
217
|
ngOnInit() {
|
|
196
218
|
this.route.data
|
|
@@ -198,7 +220,8 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
|
|
|
198
220
|
.subscribe((data) => {
|
|
199
221
|
this.locale = data.localeConfig;
|
|
200
222
|
});
|
|
201
|
-
this.
|
|
223
|
+
this._processGroupColumns = this.getGroupColumns();
|
|
224
|
+
this._processStepColumns = this.getStepColumns();
|
|
202
225
|
}
|
|
203
226
|
ngOnDestroy() {
|
|
204
227
|
this.ngUnsubscribe.next();
|
|
@@ -207,12 +230,11 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
|
|
|
207
230
|
}
|
|
208
231
|
showDetails(details) {
|
|
209
232
|
this._exclusionDetails = details;
|
|
210
|
-
this._entityName = details.entityName;
|
|
211
233
|
this._isVisible = true;
|
|
212
|
-
this.
|
|
234
|
+
this._processGroupData = [];
|
|
213
235
|
this.processDetails = null;
|
|
214
236
|
this.entityDescription = details.entityDescription;
|
|
215
|
-
this.loadProcessDetails(details);
|
|
237
|
+
this.loadProcessDetails(details, true);
|
|
216
238
|
this.connectWebSocket();
|
|
217
239
|
}
|
|
218
240
|
onVisibilityChanged(event) {
|
|
@@ -221,17 +243,9 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
|
|
|
221
243
|
closeDetails() {
|
|
222
244
|
this._isVisible = false;
|
|
223
245
|
this._exclusionDetails = null;
|
|
224
|
-
this.
|
|
246
|
+
this._processGroupData = [];
|
|
225
247
|
this.disconnectWebSocket();
|
|
226
248
|
}
|
|
227
|
-
openExclusions() {
|
|
228
|
-
this.closeDetails();
|
|
229
|
-
this.router.navigate(["exclusions-list", this._entityName], {
|
|
230
|
-
queryParams: {
|
|
231
|
-
entityDescription: this.entityDescription
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
249
|
getRecordDescription() {
|
|
236
250
|
var _a;
|
|
237
251
|
if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.description)) {
|
|
@@ -281,15 +295,15 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
|
|
|
281
295
|
getEmptyStateDescription() {
|
|
282
296
|
return this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_empty_state_description`);
|
|
283
297
|
}
|
|
284
|
-
|
|
298
|
+
getGroupColumns() {
|
|
285
299
|
return [
|
|
286
300
|
{
|
|
287
301
|
field: "description",
|
|
288
302
|
attributes: ["description"],
|
|
289
|
-
header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.
|
|
303
|
+
header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_group`),
|
|
290
304
|
type: EnumColumnFieldType.STRING,
|
|
291
305
|
style: {
|
|
292
|
-
width: "
|
|
306
|
+
width: "340px"
|
|
293
307
|
}
|
|
294
308
|
},
|
|
295
309
|
{
|
|
@@ -302,24 +316,32 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
|
|
|
302
316
|
width: "100px"
|
|
303
317
|
},
|
|
304
318
|
tooltip: this.getColumnStatusTooltip,
|
|
305
|
-
badgeConfigs:
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
]
|
|
319
|
+
badgeConfigs: EXCLUSION_PROCESS_STATUS_BADGE
|
|
320
|
+
}
|
|
321
|
+
];
|
|
322
|
+
}
|
|
323
|
+
getStepColumns() {
|
|
324
|
+
return [
|
|
325
|
+
{
|
|
326
|
+
field: "description",
|
|
327
|
+
attributes: ["description"],
|
|
328
|
+
header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_step`),
|
|
329
|
+
type: EnumColumnFieldType.STRING,
|
|
330
|
+
style: {
|
|
331
|
+
width: "340px"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
field: "status",
|
|
336
|
+
attributes: ["status"],
|
|
337
|
+
header: this.translate.instant(`${this.projectConfigs.getTranslationPrefix()}.logical_delete_status`),
|
|
338
|
+
type: EnumColumnFieldType.ENUM,
|
|
339
|
+
enumPrefix: `${this.projectConfigs.getTranslationPrefix()}.logical_delete_enum_exclusion_process_status_`,
|
|
340
|
+
style: {
|
|
341
|
+
width: "100px"
|
|
342
|
+
},
|
|
343
|
+
tooltip: this.getColumnStatusTooltip,
|
|
344
|
+
badgeConfigs: EXCLUSION_PROCESS_STATUS_BADGE
|
|
323
345
|
}
|
|
324
346
|
];
|
|
325
347
|
}
|
|
@@ -329,7 +351,7 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
|
|
|
329
351
|
}
|
|
330
352
|
return null;
|
|
331
353
|
}
|
|
332
|
-
loadProcessDetails(details) {
|
|
354
|
+
loadProcessDetails(details, firstLoad = false) {
|
|
333
355
|
this._isLoading = true;
|
|
334
356
|
const processObservable = details.processId
|
|
335
357
|
? this.logicalDeleteService.getProcessDetails(details.processId)
|
|
@@ -342,37 +364,57 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
|
|
|
342
364
|
return;
|
|
343
365
|
}
|
|
344
366
|
this.processDetails = process;
|
|
345
|
-
this.
|
|
367
|
+
this._processGroupData = this.sortGroupsByStartDate(process.groups)
|
|
368
|
+
.map(p => (Object.assign(Object.assign({}, p), { steps: this.sortStepsByStartDate(p.steps) })));
|
|
369
|
+
this.expandedRows = {};
|
|
370
|
+
this._processGroupData
|
|
371
|
+
.filter(p => p.status !== EnumExclusionProcessStatus.SUCCESS)
|
|
372
|
+
.forEach(p => {
|
|
373
|
+
this.expandedRows[p.id] = true;
|
|
374
|
+
});
|
|
375
|
+
this.checkIfProcessDone();
|
|
376
|
+
if (!firstLoad) {
|
|
377
|
+
this.checkIfProcessWasSuccessuful();
|
|
378
|
+
}
|
|
346
379
|
});
|
|
347
380
|
}
|
|
348
|
-
|
|
349
|
-
if (
|
|
381
|
+
checkIfProcessDone() {
|
|
382
|
+
if (!this._processGroupData.length) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const isProcessFinished = this._processGroupData
|
|
386
|
+
.every(p => p.status === EnumExclusionProcessStatus.ERROR || p.status === EnumExclusionProcessStatus.SUCCESS);
|
|
387
|
+
if (isProcessFinished) {
|
|
388
|
+
this.disconnectWebSocket();
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
checkIfProcessWasSuccessuful() {
|
|
392
|
+
const isProcessSuccessful = this._processGroupData
|
|
393
|
+
.every(p => p.status === EnumExclusionProcessStatus.SUCCESS);
|
|
394
|
+
if (isProcessSuccessful) {
|
|
395
|
+
this.notifyProcessFinishedSuccessfully();
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
notifyProcessFinishedSuccessfully() {
|
|
399
|
+
this.onProcessFinishedSuccessfully.emit(this.processDetails);
|
|
400
|
+
}
|
|
401
|
+
sortByDate(firstDate, secondDate) {
|
|
402
|
+
if (!firstDate || !secondDate) {
|
|
350
403
|
return 1;
|
|
351
404
|
}
|
|
352
|
-
if (
|
|
405
|
+
if (firstDate.getTime() > secondDate.getTime()) {
|
|
406
|
+
return 1;
|
|
407
|
+
}
|
|
408
|
+
if (firstDate.getTime() < secondDate.getTime()) {
|
|
353
409
|
return -1;
|
|
354
410
|
}
|
|
355
411
|
return 0;
|
|
356
412
|
}
|
|
357
413
|
sortGroupsByStartDate(groups) {
|
|
358
|
-
return groups.sort((a, b) => this.sortByDate(a.startDate, b.
|
|
414
|
+
return groups.sort((a, b) => this.sortByDate(a.startDate, b.startDate));
|
|
359
415
|
}
|
|
360
416
|
sortStepsByStartDate(steps) {
|
|
361
|
-
return steps.sort((a, b) => this.sortByDate(a.startDate, b.
|
|
362
|
-
}
|
|
363
|
-
loadProcessSummary(process) {
|
|
364
|
-
const stepLogs = [];
|
|
365
|
-
this.sortGroupsByStartDate(process.groups)
|
|
366
|
-
.forEach(group => {
|
|
367
|
-
const steps = this.sortStepsByStartDate(group.steps)
|
|
368
|
-
.map(step => ({
|
|
369
|
-
description: step.description,
|
|
370
|
-
status: step.status,
|
|
371
|
-
errorMessage: step.errorMessage
|
|
372
|
-
}));
|
|
373
|
-
stepLogs.push(...steps);
|
|
374
|
-
});
|
|
375
|
-
this._processSummaryData = stepLogs;
|
|
417
|
+
return steps.sort((a, b) => this.sortByDate(a.startDate, b.startDate));
|
|
376
418
|
}
|
|
377
419
|
disconnectWebSocket() {
|
|
378
420
|
if (this._exclusionProcessStatusChangedSubscribe) {
|
|
@@ -423,7 +465,6 @@ let ExclusionDetailsComponent = class ExclusionDetailsComponent {
|
|
|
423
465
|
}
|
|
424
466
|
};
|
|
425
467
|
ExclusionDetailsComponent.ctorParameters = () => [
|
|
426
|
-
{ type: Router },
|
|
427
468
|
{ type: ActivatedRoute },
|
|
428
469
|
{ type: TranslateService },
|
|
429
470
|
{ type: LogicalDeleteService },
|
|
@@ -437,20 +478,29 @@ __decorate([
|
|
|
437
478
|
], ExclusionDetailsComponent.prototype, "isLoading", null);
|
|
438
479
|
__decorate([
|
|
439
480
|
Output()
|
|
440
|
-
], ExclusionDetailsComponent.prototype, "
|
|
481
|
+
], ExclusionDetailsComponent.prototype, "processGroupData", null);
|
|
482
|
+
__decorate([
|
|
483
|
+
Output()
|
|
484
|
+
], ExclusionDetailsComponent.prototype, "processGroupColumns", null);
|
|
441
485
|
__decorate([
|
|
442
486
|
Output()
|
|
443
|
-
], ExclusionDetailsComponent.prototype, "
|
|
487
|
+
], ExclusionDetailsComponent.prototype, "processStepColumns", null);
|
|
444
488
|
__decorate([
|
|
445
489
|
Output()
|
|
446
490
|
], ExclusionDetailsComponent.prototype, "processDetails", void 0);
|
|
447
491
|
__decorate([
|
|
448
492
|
Output()
|
|
449
493
|
], ExclusionDetailsComponent.prototype, "entityDescription", void 0);
|
|
494
|
+
__decorate([
|
|
495
|
+
Output()
|
|
496
|
+
], ExclusionDetailsComponent.prototype, "expandedRows", void 0);
|
|
497
|
+
__decorate([
|
|
498
|
+
Output()
|
|
499
|
+
], ExclusionDetailsComponent.prototype, "onProcessFinishedSuccessfully", void 0);
|
|
450
500
|
ExclusionDetailsComponent = __decorate([
|
|
451
501
|
Component({
|
|
452
502
|
selector: "s-exclusion-details",
|
|
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=\"
|
|
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",
|
|
454
504
|
encapsulation: ViewEncapsulation.None,
|
|
455
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}"]
|
|
456
506
|
})
|
|
@@ -581,7 +631,8 @@ var ExclusionsListComponent_1;
|
|
|
581
631
|
const HTTP_CODE_SERVER_ERROR_START = 500;
|
|
582
632
|
const HTTP_CODE_SERVER_ERROR_END = 600;
|
|
583
633
|
let ExclusionsListComponent = ExclusionsListComponent_1 = class ExclusionsListComponent {
|
|
584
|
-
constructor(route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs) {
|
|
634
|
+
constructor(router, route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs, cdr) {
|
|
635
|
+
this.router = router;
|
|
585
636
|
this.route = route;
|
|
586
637
|
this.translate = translate;
|
|
587
638
|
this.formBuilder = formBuilder;
|
|
@@ -589,6 +640,7 @@ let ExclusionsListComponent = ExclusionsListComponent_1 = class ExclusionsListCo
|
|
|
589
640
|
this.logicalDeleteService = logicalDeleteService;
|
|
590
641
|
this.filterService = filterService;
|
|
591
642
|
this.projectConfigs = projectConfigs;
|
|
643
|
+
this.cdr = cdr;
|
|
592
644
|
this.currentListParams = { page: 0, size: 10, sort: [], filterData: {} };
|
|
593
645
|
this.showLoader = false;
|
|
594
646
|
this.totalRecords = 0;
|
|
@@ -606,30 +658,32 @@ let ExclusionsListComponent = ExclusionsListComponent_1 = class ExclusionsListCo
|
|
|
606
658
|
.subscribe((data) => {
|
|
607
659
|
this.locale = data.localeConfig;
|
|
608
660
|
});
|
|
609
|
-
this.route.params
|
|
610
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
611
|
-
.subscribe((params) => {
|
|
612
|
-
this.entityName = params.entityName;
|
|
613
|
-
this.showBasedOnRoute();
|
|
614
|
-
});
|
|
615
661
|
this.route.queryParams
|
|
616
662
|
.pipe(takeUntil(this.ngUnsubscribe))
|
|
617
663
|
.subscribe((queryParams) => {
|
|
664
|
+
this.entityName = queryParams.entityName;
|
|
618
665
|
this.entityDescription = queryParams.entityDescription;
|
|
619
666
|
this.processId = queryParams.processId;
|
|
620
|
-
this.showBasedOnRoute();
|
|
621
667
|
});
|
|
622
668
|
}
|
|
623
|
-
|
|
669
|
+
ngAfterViewInit() {
|
|
624
670
|
if (this.entityName && this.entityDescription && this.processId) {
|
|
625
671
|
this.exclusionDetailsComponent.showDetails({
|
|
626
672
|
processId: this.processId,
|
|
627
673
|
entityDescription: this.entityDescription,
|
|
628
674
|
entityName: this.entityName
|
|
629
675
|
});
|
|
676
|
+
this.cdr.detectChanges();
|
|
630
677
|
}
|
|
631
678
|
}
|
|
632
679
|
ngOnDestroy() {
|
|
680
|
+
var _a;
|
|
681
|
+
const params = Object.assign({}, (_a = this.route.snapshot) === null || _a === void 0 ? void 0 : _a.queryParams);
|
|
682
|
+
if (params) {
|
|
683
|
+
delete params.entityName;
|
|
684
|
+
delete params.entityDescription;
|
|
685
|
+
this.router.navigate([], { queryParams: params });
|
|
686
|
+
}
|
|
633
687
|
this.ngUnsubscribe.next();
|
|
634
688
|
this.ngUnsubscribe.complete();
|
|
635
689
|
}
|
|
@@ -637,8 +691,8 @@ let ExclusionsListComponent = ExclusionsListComponent_1 = class ExclusionsListCo
|
|
|
637
691
|
return this.formBuilder.group({
|
|
638
692
|
description: [undefined, Validators.compose([])],
|
|
639
693
|
status: [undefined, Validators.compose([])],
|
|
640
|
-
startDate: [{ value:
|
|
641
|
-
endDate: [{ value:
|
|
694
|
+
startDate: [{ value: null, disabled: false }, Validators.compose([])],
|
|
695
|
+
endDate: [{ value: null, disabled: false }, Validators.compose([])]
|
|
642
696
|
});
|
|
643
697
|
}
|
|
644
698
|
getGridColumns() {
|
|
@@ -899,13 +953,15 @@ let ExclusionsListComponent = ExclusionsListComponent_1 = class ExclusionsListCo
|
|
|
899
953
|
};
|
|
900
954
|
ExclusionsListComponent.DATE_FORMAT = "YYYY-MM-DD";
|
|
901
955
|
ExclusionsListComponent.ctorParameters = () => [
|
|
956
|
+
{ type: Router },
|
|
902
957
|
{ type: ActivatedRoute },
|
|
903
958
|
{ type: TranslateService },
|
|
904
959
|
{ type: FormBuilder },
|
|
905
960
|
{ type: ChangeDetectorRef },
|
|
906
961
|
{ type: LogicalDeleteService },
|
|
907
962
|
{ type: FilterService },
|
|
908
|
-
{ type: LogicalDeleteConfigService }
|
|
963
|
+
{ type: LogicalDeleteConfigService },
|
|
964
|
+
{ type: ChangeDetectorRef }
|
|
909
965
|
];
|
|
910
966
|
__decorate([
|
|
911
967
|
ViewChild("exclusionsTable")
|
|
@@ -928,22 +984,6 @@ let ExclusionsListFeatureRoutingGuard = class ExclusionsListFeatureRoutingGuard
|
|
|
928
984
|
ExclusionsListFeatureRoutingGuard = __decorate([
|
|
929
985
|
Injectable()
|
|
930
986
|
], 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
987
|
let ExclusionsListFeatureRoutingPermissionResolver = class ExclusionsListFeatureRoutingPermissionResolver {
|
|
948
988
|
constructor(permissionsService) {
|
|
949
989
|
this.permissionsService = permissionsService;
|
|
@@ -988,12 +1028,11 @@ const routes = [
|
|
|
988
1028
|
],
|
|
989
1029
|
resolve: {
|
|
990
1030
|
allPermissions: ExclusionsListFeatureRoutingPermissionResolver,
|
|
991
|
-
localeConfig: ExclusionsListFeatureRoutingLocaleResolver
|
|
992
|
-
routeTitle: ExclusionsListFeatureRoutingListTitleResolver
|
|
1031
|
+
localeConfig: ExclusionsListFeatureRoutingLocaleResolver
|
|
993
1032
|
},
|
|
994
1033
|
children: [
|
|
995
1034
|
{
|
|
996
|
-
path: "
|
|
1035
|
+
path: "",
|
|
997
1036
|
component: ExclusionsListComponent
|
|
998
1037
|
}
|
|
999
1038
|
]
|
|
@@ -1012,8 +1051,7 @@ ExclusionsListFeatureRouting = __decorate([
|
|
|
1012
1051
|
providers: [
|
|
1013
1052
|
ExclusionsListFeatureRoutingGuard,
|
|
1014
1053
|
ExclusionsListFeatureRoutingPermissionResolver,
|
|
1015
|
-
ExclusionsListFeatureRoutingLocaleResolver
|
|
1016
|
-
ExclusionsListFeatureRoutingListTitleResolver
|
|
1054
|
+
ExclusionsListFeatureRoutingLocaleResolver
|
|
1017
1055
|
],
|
|
1018
1056
|
declarations: [
|
|
1019
1057
|
EmptyComponent
|
|
@@ -1077,5 +1115,5 @@ LogicalDeleteModule = LogicalDeleteModule_1 = __decorate([
|
|
|
1077
1115
|
* Generated bundle index. Do not edit.
|
|
1078
1116
|
*/
|
|
1079
1117
|
|
|
1080
|
-
export { EmptyComponent, ExclusionDetailsComponent, ExclusionDetailsModule, ExclusionsListComponent, ExclusionsListFeatureRouting, ExclusionsListFeatureRoutingGuard,
|
|
1118
|
+
export { EmptyComponent, ExclusionDetailsComponent, ExclusionDetailsModule, ExclusionsListComponent, ExclusionsListFeatureRouting, ExclusionsListFeatureRoutingGuard, 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 };
|
|
1081
1119
|
//# sourceMappingURL=seniorsistemas-exclusion-process-component.js.map
|