@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, __assign, __spread } 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';
|
|
@@ -172,18 +172,37 @@ 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 = {};
|
|
200
|
+
this.onProcessFinishedSuccessfully = new EventEmitter();
|
|
183
201
|
this._isVisible = false;
|
|
184
202
|
this._isLoading = false;
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
203
|
+
this._processGroupData = [];
|
|
204
|
+
this._processGroupColumns = [];
|
|
205
|
+
this._processStepColumns = [];
|
|
187
206
|
this.ngUnsubscribe = new Subject();
|
|
188
207
|
}
|
|
189
208
|
Object.defineProperty(ExclusionDetailsComponent.prototype, "isVisible", {
|
|
@@ -200,16 +219,23 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
200
219
|
enumerable: true,
|
|
201
220
|
configurable: true
|
|
202
221
|
});
|
|
203
|
-
Object.defineProperty(ExclusionDetailsComponent.prototype, "
|
|
222
|
+
Object.defineProperty(ExclusionDetailsComponent.prototype, "processGroupData", {
|
|
223
|
+
get: function () {
|
|
224
|
+
return this._processGroupData;
|
|
225
|
+
},
|
|
226
|
+
enumerable: true,
|
|
227
|
+
configurable: true
|
|
228
|
+
});
|
|
229
|
+
Object.defineProperty(ExclusionDetailsComponent.prototype, "processGroupColumns", {
|
|
204
230
|
get: function () {
|
|
205
|
-
return this.
|
|
231
|
+
return this._processGroupColumns;
|
|
206
232
|
},
|
|
207
233
|
enumerable: true,
|
|
208
234
|
configurable: true
|
|
209
235
|
});
|
|
210
|
-
Object.defineProperty(ExclusionDetailsComponent.prototype, "
|
|
236
|
+
Object.defineProperty(ExclusionDetailsComponent.prototype, "processStepColumns", {
|
|
211
237
|
get: function () {
|
|
212
|
-
return this.
|
|
238
|
+
return this._processStepColumns;
|
|
213
239
|
},
|
|
214
240
|
enumerable: true,
|
|
215
241
|
configurable: true
|
|
@@ -221,7 +247,8 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
221
247
|
.subscribe(function (data) {
|
|
222
248
|
_this.locale = data.localeConfig;
|
|
223
249
|
});
|
|
224
|
-
this.
|
|
250
|
+
this._processGroupColumns = this.getGroupColumns();
|
|
251
|
+
this._processStepColumns = this.getStepColumns();
|
|
225
252
|
};
|
|
226
253
|
ExclusionDetailsComponent.prototype.ngOnDestroy = function () {
|
|
227
254
|
this.ngUnsubscribe.next();
|
|
@@ -230,12 +257,11 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
230
257
|
};
|
|
231
258
|
ExclusionDetailsComponent.prototype.showDetails = function (details) {
|
|
232
259
|
this._exclusionDetails = details;
|
|
233
|
-
this._entityName = details.entityName;
|
|
234
260
|
this._isVisible = true;
|
|
235
|
-
this.
|
|
261
|
+
this._processGroupData = [];
|
|
236
262
|
this.processDetails = null;
|
|
237
263
|
this.entityDescription = details.entityDescription;
|
|
238
|
-
this.loadProcessDetails(details);
|
|
264
|
+
this.loadProcessDetails(details, true);
|
|
239
265
|
this.connectWebSocket();
|
|
240
266
|
};
|
|
241
267
|
ExclusionDetailsComponent.prototype.onVisibilityChanged = function (event) {
|
|
@@ -244,17 +270,9 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
244
270
|
ExclusionDetailsComponent.prototype.closeDetails = function () {
|
|
245
271
|
this._isVisible = false;
|
|
246
272
|
this._exclusionDetails = null;
|
|
247
|
-
this.
|
|
273
|
+
this._processGroupData = [];
|
|
248
274
|
this.disconnectWebSocket();
|
|
249
275
|
};
|
|
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
276
|
ExclusionDetailsComponent.prototype.getRecordDescription = function () {
|
|
259
277
|
var _a;
|
|
260
278
|
if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.description)) {
|
|
@@ -304,15 +322,15 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
304
322
|
ExclusionDetailsComponent.prototype.getEmptyStateDescription = function () {
|
|
305
323
|
return this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_empty_state_description");
|
|
306
324
|
};
|
|
307
|
-
ExclusionDetailsComponent.prototype.
|
|
325
|
+
ExclusionDetailsComponent.prototype.getGroupColumns = function () {
|
|
308
326
|
return [
|
|
309
327
|
{
|
|
310
328
|
field: "description",
|
|
311
329
|
attributes: ["description"],
|
|
312
|
-
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".
|
|
330
|
+
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_group"),
|
|
313
331
|
type: EnumColumnFieldType.STRING,
|
|
314
332
|
style: {
|
|
315
|
-
width: "
|
|
333
|
+
width: "340px"
|
|
316
334
|
}
|
|
317
335
|
},
|
|
318
336
|
{
|
|
@@ -325,24 +343,32 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
325
343
|
width: "100px"
|
|
326
344
|
},
|
|
327
345
|
tooltip: this.getColumnStatusTooltip,
|
|
328
|
-
badgeConfigs:
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
]
|
|
346
|
+
badgeConfigs: EXCLUSION_PROCESS_STATUS_BADGE
|
|
347
|
+
}
|
|
348
|
+
];
|
|
349
|
+
};
|
|
350
|
+
ExclusionDetailsComponent.prototype.getStepColumns = function () {
|
|
351
|
+
return [
|
|
352
|
+
{
|
|
353
|
+
field: "description",
|
|
354
|
+
attributes: ["description"],
|
|
355
|
+
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_step"),
|
|
356
|
+
type: EnumColumnFieldType.STRING,
|
|
357
|
+
style: {
|
|
358
|
+
width: "340px"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
field: "status",
|
|
363
|
+
attributes: ["status"],
|
|
364
|
+
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_status"),
|
|
365
|
+
type: EnumColumnFieldType.ENUM,
|
|
366
|
+
enumPrefix: this.projectConfigs.getTranslationPrefix() + ".logical_delete_enum_exclusion_process_status_",
|
|
367
|
+
style: {
|
|
368
|
+
width: "100px"
|
|
369
|
+
},
|
|
370
|
+
tooltip: this.getColumnStatusTooltip,
|
|
371
|
+
badgeConfigs: EXCLUSION_PROCESS_STATUS_BADGE
|
|
346
372
|
}
|
|
347
373
|
];
|
|
348
374
|
};
|
|
@@ -352,8 +378,9 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
352
378
|
}
|
|
353
379
|
return null;
|
|
354
380
|
};
|
|
355
|
-
ExclusionDetailsComponent.prototype.loadProcessDetails = function (details) {
|
|
381
|
+
ExclusionDetailsComponent.prototype.loadProcessDetails = function (details, firstLoad) {
|
|
356
382
|
var _this = this;
|
|
383
|
+
if (firstLoad === void 0) { firstLoad = false; }
|
|
357
384
|
this._isLoading = true;
|
|
358
385
|
var processObservable = details.processId
|
|
359
386
|
? this.logicalDeleteService.getProcessDetails(details.processId)
|
|
@@ -366,40 +393,59 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
366
393
|
return;
|
|
367
394
|
}
|
|
368
395
|
_this.processDetails = process;
|
|
369
|
-
_this.
|
|
396
|
+
_this._processGroupData = _this.sortGroupsByStartDate(process.groups)
|
|
397
|
+
.map(function (p) { return (__assign(__assign({}, p), { steps: _this.sortStepsByStartDate(p.steps) })); });
|
|
398
|
+
_this.expandedRows = {};
|
|
399
|
+
_this._processGroupData
|
|
400
|
+
.filter(function (p) { return p.status !== EnumExclusionProcessStatus.SUCCESS; })
|
|
401
|
+
.forEach(function (p) {
|
|
402
|
+
_this.expandedRows[p.id] = true;
|
|
403
|
+
});
|
|
404
|
+
_this.checkIfProcessDone();
|
|
405
|
+
if (!firstLoad) {
|
|
406
|
+
_this.checkIfProcessWasSuccessuful();
|
|
407
|
+
}
|
|
370
408
|
});
|
|
371
409
|
};
|
|
372
|
-
ExclusionDetailsComponent.prototype.
|
|
373
|
-
if (
|
|
410
|
+
ExclusionDetailsComponent.prototype.checkIfProcessDone = function () {
|
|
411
|
+
if (!this._processGroupData.length) {
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
var isProcessFinished = this._processGroupData
|
|
415
|
+
.every(function (p) { return p.status === EnumExclusionProcessStatus.ERROR || p.status === EnumExclusionProcessStatus.SUCCESS; });
|
|
416
|
+
if (isProcessFinished) {
|
|
417
|
+
this.disconnectWebSocket();
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
ExclusionDetailsComponent.prototype.checkIfProcessWasSuccessuful = function () {
|
|
421
|
+
var isProcessSuccessful = this._processGroupData
|
|
422
|
+
.every(function (p) { return p.status === EnumExclusionProcessStatus.SUCCESS; });
|
|
423
|
+
if (isProcessSuccessful) {
|
|
424
|
+
this.notifyProcessFinishedSuccessfully();
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
ExclusionDetailsComponent.prototype.notifyProcessFinishedSuccessfully = function () {
|
|
428
|
+
this.onProcessFinishedSuccessfully.emit(this.processDetails);
|
|
429
|
+
};
|
|
430
|
+
ExclusionDetailsComponent.prototype.sortByDate = function (firstDate, secondDate) {
|
|
431
|
+
if (!firstDate || !secondDate) {
|
|
374
432
|
return 1;
|
|
375
433
|
}
|
|
376
|
-
if (
|
|
434
|
+
if (firstDate.getTime() > secondDate.getTime()) {
|
|
435
|
+
return 1;
|
|
436
|
+
}
|
|
437
|
+
if (firstDate.getTime() < secondDate.getTime()) {
|
|
377
438
|
return -1;
|
|
378
439
|
}
|
|
379
440
|
return 0;
|
|
380
441
|
};
|
|
381
442
|
ExclusionDetailsComponent.prototype.sortGroupsByStartDate = function (groups) {
|
|
382
443
|
var _this = this;
|
|
383
|
-
return groups.sort(function (a, b) { return _this.sortByDate(a.startDate, b.
|
|
444
|
+
return groups.sort(function (a, b) { return _this.sortByDate(a.startDate, b.startDate); });
|
|
384
445
|
};
|
|
385
446
|
ExclusionDetailsComponent.prototype.sortStepsByStartDate = function (steps) {
|
|
386
447
|
var _this = this;
|
|
387
|
-
return steps.sort(function (a, b) { return _this.sortByDate(a.startDate, b.
|
|
388
|
-
};
|
|
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;
|
|
448
|
+
return steps.sort(function (a, b) { return _this.sortByDate(a.startDate, b.startDate); });
|
|
403
449
|
};
|
|
404
450
|
ExclusionDetailsComponent.prototype.disconnectWebSocket = function () {
|
|
405
451
|
if (this._exclusionProcessStatusChangedSubscribe) {
|
|
@@ -451,7 +497,6 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
451
497
|
});
|
|
452
498
|
};
|
|
453
499
|
ExclusionDetailsComponent.ctorParameters = function () { return [
|
|
454
|
-
{ type: Router },
|
|
455
500
|
{ type: ActivatedRoute },
|
|
456
501
|
{ type: TranslateService },
|
|
457
502
|
{ type: LogicalDeleteService },
|
|
@@ -465,20 +510,29 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
465
510
|
], ExclusionDetailsComponent.prototype, "isLoading", null);
|
|
466
511
|
__decorate([
|
|
467
512
|
Output()
|
|
468
|
-
], ExclusionDetailsComponent.prototype, "
|
|
513
|
+
], ExclusionDetailsComponent.prototype, "processGroupData", null);
|
|
469
514
|
__decorate([
|
|
470
515
|
Output()
|
|
471
|
-
], ExclusionDetailsComponent.prototype, "
|
|
516
|
+
], ExclusionDetailsComponent.prototype, "processGroupColumns", null);
|
|
517
|
+
__decorate([
|
|
518
|
+
Output()
|
|
519
|
+
], ExclusionDetailsComponent.prototype, "processStepColumns", null);
|
|
472
520
|
__decorate([
|
|
473
521
|
Output()
|
|
474
522
|
], ExclusionDetailsComponent.prototype, "processDetails", void 0);
|
|
475
523
|
__decorate([
|
|
476
524
|
Output()
|
|
477
525
|
], ExclusionDetailsComponent.prototype, "entityDescription", void 0);
|
|
526
|
+
__decorate([
|
|
527
|
+
Output()
|
|
528
|
+
], ExclusionDetailsComponent.prototype, "expandedRows", void 0);
|
|
529
|
+
__decorate([
|
|
530
|
+
Output()
|
|
531
|
+
], ExclusionDetailsComponent.prototype, "onProcessFinishedSuccessfully", void 0);
|
|
478
532
|
ExclusionDetailsComponent = __decorate([
|
|
479
533
|
Component({
|
|
480
534
|
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=\"
|
|
535
|
+
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
536
|
encapsulation: ViewEncapsulation.None,
|
|
483
537
|
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
538
|
})
|
|
@@ -618,7 +672,8 @@ var FilterService = /** @class */ (function () {
|
|
|
618
672
|
var HTTP_CODE_SERVER_ERROR_START = 500;
|
|
619
673
|
var HTTP_CODE_SERVER_ERROR_END = 600;
|
|
620
674
|
var ExclusionsListComponent = /** @class */ (function () {
|
|
621
|
-
function ExclusionsListComponent(route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs) {
|
|
675
|
+
function ExclusionsListComponent(router, route, translate, formBuilder, changeDetectorRef, logicalDeleteService, filterService, projectConfigs, cdr) {
|
|
676
|
+
this.router = router;
|
|
622
677
|
this.route = route;
|
|
623
678
|
this.translate = translate;
|
|
624
679
|
this.formBuilder = formBuilder;
|
|
@@ -626,6 +681,7 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
626
681
|
this.logicalDeleteService = logicalDeleteService;
|
|
627
682
|
this.filterService = filterService;
|
|
628
683
|
this.projectConfigs = projectConfigs;
|
|
684
|
+
this.cdr = cdr;
|
|
629
685
|
this.currentListParams = { page: 0, size: 10, sort: [], filterData: {} };
|
|
630
686
|
this.showLoader = false;
|
|
631
687
|
this.totalRecords = 0;
|
|
@@ -645,30 +701,32 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
645
701
|
.subscribe(function (data) {
|
|
646
702
|
_this.locale = data.localeConfig;
|
|
647
703
|
});
|
|
648
|
-
this.route.params
|
|
649
|
-
.pipe(takeUntil(this.ngUnsubscribe))
|
|
650
|
-
.subscribe(function (params) {
|
|
651
|
-
_this.entityName = params.entityName;
|
|
652
|
-
_this.showBasedOnRoute();
|
|
653
|
-
});
|
|
654
704
|
this.route.queryParams
|
|
655
705
|
.pipe(takeUntil(this.ngUnsubscribe))
|
|
656
706
|
.subscribe(function (queryParams) {
|
|
707
|
+
_this.entityName = queryParams.entityName;
|
|
657
708
|
_this.entityDescription = queryParams.entityDescription;
|
|
658
709
|
_this.processId = queryParams.processId;
|
|
659
|
-
_this.showBasedOnRoute();
|
|
660
710
|
});
|
|
661
711
|
};
|
|
662
|
-
ExclusionsListComponent.prototype.
|
|
712
|
+
ExclusionsListComponent.prototype.ngAfterViewInit = function () {
|
|
663
713
|
if (this.entityName && this.entityDescription && this.processId) {
|
|
664
714
|
this.exclusionDetailsComponent.showDetails({
|
|
665
715
|
processId: this.processId,
|
|
666
716
|
entityDescription: this.entityDescription,
|
|
667
717
|
entityName: this.entityName
|
|
668
718
|
});
|
|
719
|
+
this.cdr.detectChanges();
|
|
669
720
|
}
|
|
670
721
|
};
|
|
671
722
|
ExclusionsListComponent.prototype.ngOnDestroy = function () {
|
|
723
|
+
var _a;
|
|
724
|
+
var params = __assign({}, (_a = this.route.snapshot) === null || _a === void 0 ? void 0 : _a.queryParams);
|
|
725
|
+
if (params) {
|
|
726
|
+
delete params.entityName;
|
|
727
|
+
delete params.entityDescription;
|
|
728
|
+
this.router.navigate([], { queryParams: params });
|
|
729
|
+
}
|
|
672
730
|
this.ngUnsubscribe.next();
|
|
673
731
|
this.ngUnsubscribe.complete();
|
|
674
732
|
};
|
|
@@ -676,8 +734,8 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
676
734
|
return this.formBuilder.group({
|
|
677
735
|
description: [undefined, Validators.compose([])],
|
|
678
736
|
status: [undefined, Validators.compose([])],
|
|
679
|
-
startDate: [{ value:
|
|
680
|
-
endDate: [{ value:
|
|
737
|
+
startDate: [{ value: null, disabled: false }, Validators.compose([])],
|
|
738
|
+
endDate: [{ value: null, disabled: false }, Validators.compose([])]
|
|
681
739
|
});
|
|
682
740
|
};
|
|
683
741
|
ExclusionsListComponent.prototype.getGridColumns = function () {
|
|
@@ -950,13 +1008,15 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
950
1008
|
var ExclusionsListComponent_1;
|
|
951
1009
|
ExclusionsListComponent.DATE_FORMAT = "YYYY-MM-DD";
|
|
952
1010
|
ExclusionsListComponent.ctorParameters = function () { return [
|
|
1011
|
+
{ type: Router },
|
|
953
1012
|
{ type: ActivatedRoute },
|
|
954
1013
|
{ type: TranslateService },
|
|
955
1014
|
{ type: FormBuilder },
|
|
956
1015
|
{ type: ChangeDetectorRef },
|
|
957
1016
|
{ type: LogicalDeleteService },
|
|
958
1017
|
{ type: FilterService },
|
|
959
|
-
{ type: LogicalDeleteConfigService }
|
|
1018
|
+
{ type: LogicalDeleteConfigService },
|
|
1019
|
+
{ type: ChangeDetectorRef }
|
|
960
1020
|
]; };
|
|
961
1021
|
__decorate([
|
|
962
1022
|
ViewChild("exclusionsTable")
|
|
@@ -984,23 +1044,6 @@ var ExclusionsListFeatureRoutingGuard = /** @class */ (function () {
|
|
|
984
1044
|
], ExclusionsListFeatureRoutingGuard);
|
|
985
1045
|
return ExclusionsListFeatureRoutingGuard;
|
|
986
1046
|
}());
|
|
987
|
-
var ExclusionsListFeatureRoutingListTitleResolver = /** @class */ (function () {
|
|
988
|
-
function ExclusionsListFeatureRoutingListTitleResolver(translate, projectConfigs) {
|
|
989
|
-
this.translate = translate;
|
|
990
|
-
this.projectConfigs = projectConfigs;
|
|
991
|
-
}
|
|
992
|
-
ExclusionsListFeatureRoutingListTitleResolver.prototype.resolve = function () {
|
|
993
|
-
return this.translate.get(this.projectConfigs.getTranslationPrefix() + ".logical_delete_list_title");
|
|
994
|
-
};
|
|
995
|
-
ExclusionsListFeatureRoutingListTitleResolver.ctorParameters = function () { return [
|
|
996
|
-
{ type: TranslateService },
|
|
997
|
-
{ type: LogicalDeleteConfigService }
|
|
998
|
-
]; };
|
|
999
|
-
ExclusionsListFeatureRoutingListTitleResolver = __decorate([
|
|
1000
|
-
Injectable()
|
|
1001
|
-
], ExclusionsListFeatureRoutingListTitleResolver);
|
|
1002
|
-
return ExclusionsListFeatureRoutingListTitleResolver;
|
|
1003
|
-
}());
|
|
1004
1047
|
var ExclusionsListFeatureRoutingPermissionResolver = /** @class */ (function () {
|
|
1005
1048
|
function ExclusionsListFeatureRoutingPermissionResolver(permissionsService) {
|
|
1006
1049
|
this.permissionsService = permissionsService;
|
|
@@ -1050,12 +1093,11 @@ var routes = [
|
|
|
1050
1093
|
],
|
|
1051
1094
|
resolve: {
|
|
1052
1095
|
allPermissions: ExclusionsListFeatureRoutingPermissionResolver,
|
|
1053
|
-
localeConfig: ExclusionsListFeatureRoutingLocaleResolver
|
|
1054
|
-
routeTitle: ExclusionsListFeatureRoutingListTitleResolver
|
|
1096
|
+
localeConfig: ExclusionsListFeatureRoutingLocaleResolver
|
|
1055
1097
|
},
|
|
1056
1098
|
children: [
|
|
1057
1099
|
{
|
|
1058
|
-
path: "
|
|
1100
|
+
path: "",
|
|
1059
1101
|
component: ExclusionsListComponent
|
|
1060
1102
|
}
|
|
1061
1103
|
]
|
|
@@ -1075,8 +1117,7 @@ var ExclusionsListFeatureRouting = /** @class */ (function () {
|
|
|
1075
1117
|
providers: [
|
|
1076
1118
|
ExclusionsListFeatureRoutingGuard,
|
|
1077
1119
|
ExclusionsListFeatureRoutingPermissionResolver,
|
|
1078
|
-
ExclusionsListFeatureRoutingLocaleResolver
|
|
1079
|
-
ExclusionsListFeatureRoutingListTitleResolver
|
|
1120
|
+
ExclusionsListFeatureRoutingLocaleResolver
|
|
1080
1121
|
],
|
|
1081
1122
|
declarations: [
|
|
1082
1123
|
EmptyComponent
|
|
@@ -1149,5 +1190,5 @@ var LogicalDeleteModule = /** @class */ (function () {
|
|
|
1149
1190
|
* Generated bundle index. Do not edit.
|
|
1150
1191
|
*/
|
|
1151
1192
|
|
|
1152
|
-
export { EmptyComponent, ExclusionDetailsComponent, ExclusionDetailsModule, ExclusionsListComponent, ExclusionsListFeatureRouting, ExclusionsListFeatureRoutingGuard,
|
|
1193
|
+
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 };
|
|
1153
1194
|
//# sourceMappingURL=seniorsistemas-exclusion-process-component.js.map
|