@seniorsistemas/exclusion-process-component 0.1.0 → 0.2.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 +117 -24
- 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 +86 -9
- package/esm2015/exclusion-details/protocols/exclusion-process-status-changed.js +1 -0
- package/esm2015/exclusion-details/protocols/web-socket-event-data.js +1 -0
- package/esm2015/exclusions-list/exclusions-list.component.js +15 -4
- package/esm2015/services/logical-delete.service.js +10 -11
- package/esm5/exclusion-details/exclusion-details.component.js +91 -9
- package/esm5/exclusion-details/protocols/exclusion-process-status-changed.js +1 -0
- package/esm5/exclusion-details/protocols/web-socket-event-data.js +1 -0
- package/esm5/exclusions-list/exclusions-list.component.js +16 -5
- package/esm5/services/logical-delete.service.js +13 -12
- package/exclusion-details/exclusion-details.component.d.ts +11 -1
- package/exclusion-details/protocols/exclusion-process-status-changed.d.ts +8 -0
- package/exclusion-details/protocols/web-socket-event-data.d.ts +6 -0
- package/exclusions-list/exclusions-list.component.d.ts +1 -0
- package/fesm2015/seniorsistemas-exclusion-process-component.js +107 -20
- package/fesm2015/seniorsistemas-exclusion-process-component.js.map +1 -1
- package/fesm5/seniorsistemas-exclusion-process-component.js +116 -22
- package/fesm5/seniorsistemas-exclusion-process-component.js.map +1 -1
- package/package.json +14 -6
- package/seniorsistemas-exclusion-process-component.metadata.json +1 -1
- package/services/logical-delete.service.d.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __decorate, __param,
|
|
1
|
+
import { __decorate, __param, __assign, __spread } from 'tslib';
|
|
2
2
|
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';
|
|
@@ -6,10 +6,11 @@ import { TableModule } from 'primeng/table';
|
|
|
6
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
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, TranslateModule } from '@ngx-translate/core';
|
|
13
14
|
import { MessageService } from 'primeng/api';
|
|
14
15
|
import { Validators, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
15
16
|
import { DialogModule } from 'primeng/dialog';
|
|
@@ -63,7 +64,6 @@ var LogicalDeleteService = /** @class */ (function () {
|
|
|
63
64
|
this.projectConfigs = projectConfigs;
|
|
64
65
|
var entityUrl = projectConfigs.getDomain() + "/" + projectConfigs.getService();
|
|
65
66
|
this.exclusionProcessUrl = entityUrl + "/entities/exclusionProcess";
|
|
66
|
-
this.listExclusionsUrl = entityUrl + "/entities/exclusionProcess";
|
|
67
67
|
this.defaultCatch = this.defaultCatch.bind(this);
|
|
68
68
|
}
|
|
69
69
|
LogicalDeleteService.prototype.defaultCatch = function () {
|
|
@@ -126,6 +126,7 @@ var LogicalDeleteService = /** @class */ (function () {
|
|
|
126
126
|
});
|
|
127
127
|
};
|
|
128
128
|
LogicalDeleteService.prototype.doGetProcessDetails = function (filterParams) {
|
|
129
|
+
var _this = this;
|
|
129
130
|
return this.http.get(this.exclusionProcessUrl, { params: filterParams })
|
|
130
131
|
.pipe(this.defaultCatch())
|
|
131
132
|
.pipe(map(function (value) {
|
|
@@ -133,10 +134,18 @@ var LogicalDeleteService = /** @class */ (function () {
|
|
|
133
134
|
if (!((_a = value.contents) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
134
135
|
return null;
|
|
135
136
|
}
|
|
136
|
-
return value.contents[0];
|
|
137
|
+
return _this.mapExclusionsDates(value.contents[0]);
|
|
137
138
|
}));
|
|
138
139
|
};
|
|
140
|
+
LogicalDeleteService.prototype.mapExclusionsDates = function (exclusionProcess) {
|
|
141
|
+
var _a;
|
|
142
|
+
return __assign(__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(function (group) {
|
|
143
|
+
var _a;
|
|
144
|
+
return (__assign(__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(function (step) { return (__assign(__assign({}, step), { startDate: step.startDate ? moment(step.startDate).toDate() : null, finishDate: step.finishDate ? moment(step.finishDate).toDate() : null })); }) }));
|
|
145
|
+
}) });
|
|
146
|
+
};
|
|
139
147
|
LogicalDeleteService.prototype.listExclusions = function (entityName, params) {
|
|
148
|
+
var _this = this;
|
|
140
149
|
if (params === void 0) { params = {}; }
|
|
141
150
|
if (params.filterQuery) {
|
|
142
151
|
params.filterQuery += " and lower(entityName) eq lower('" + entityName + "')";
|
|
@@ -147,14 +156,7 @@ var LogicalDeleteService = /** @class */ (function () {
|
|
|
147
156
|
return this.http.get(this.exclusionProcessUrl, { params: this.getListQueryParams(params) })
|
|
148
157
|
.pipe(this.defaultCatch())
|
|
149
158
|
.pipe(map(function (value) {
|
|
150
|
-
value.contents.
|
|
151
|
-
if (p.startDate) {
|
|
152
|
-
p.startDate = moment(p.startDate).toDate();
|
|
153
|
-
}
|
|
154
|
-
if (p.finishDate) {
|
|
155
|
-
p.finishDate = moment(p.finishDate).toDate();
|
|
156
|
-
}
|
|
157
|
-
});
|
|
159
|
+
value.contents = value.contents.map(_this.mapExclusionsDates);
|
|
158
160
|
return value;
|
|
159
161
|
}));
|
|
160
162
|
};
|
|
@@ -224,17 +226,26 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
224
226
|
ExclusionDetailsComponent.prototype.ngOnDestroy = function () {
|
|
225
227
|
this.ngUnsubscribe.next();
|
|
226
228
|
this.ngUnsubscribe.complete();
|
|
229
|
+
this.disconnectWebSocket();
|
|
227
230
|
};
|
|
228
231
|
ExclusionDetailsComponent.prototype.showDetails = function (details) {
|
|
229
|
-
this.
|
|
232
|
+
this._exclusionDetails = details;
|
|
230
233
|
this._entityName = details.entityName;
|
|
231
234
|
this._isVisible = true;
|
|
232
235
|
this._processSummaryData = [];
|
|
236
|
+
this.processDetails = null;
|
|
233
237
|
this.entityDescription = details.entityDescription;
|
|
234
238
|
this.loadProcessDetails(details);
|
|
239
|
+
this.connectWebSocket();
|
|
240
|
+
};
|
|
241
|
+
ExclusionDetailsComponent.prototype.onVisibilityChanged = function (event) {
|
|
242
|
+
this.closeDetails();
|
|
235
243
|
};
|
|
236
244
|
ExclusionDetailsComponent.prototype.closeDetails = function () {
|
|
237
245
|
this._isVisible = false;
|
|
246
|
+
this._exclusionDetails = null;
|
|
247
|
+
this._processSummaryData = [];
|
|
248
|
+
this.disconnectWebSocket();
|
|
238
249
|
};
|
|
239
250
|
ExclusionDetailsComponent.prototype.openExclusions = function () {
|
|
240
251
|
this.closeDetails();
|
|
@@ -256,14 +267,14 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
256
267
|
if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.startDate)) {
|
|
257
268
|
return "";
|
|
258
269
|
}
|
|
259
|
-
return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm");
|
|
270
|
+
return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm:ss");
|
|
260
271
|
};
|
|
261
272
|
ExclusionDetailsComponent.prototype.getFinishDate = function () {
|
|
262
273
|
var _a;
|
|
263
274
|
if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.finishDate)) {
|
|
264
275
|
return "";
|
|
265
276
|
}
|
|
266
|
-
return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm");
|
|
277
|
+
return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm:ss");
|
|
267
278
|
};
|
|
268
279
|
ExclusionDetailsComponent.prototype.isFinished = function () {
|
|
269
280
|
var _a;
|
|
@@ -351,14 +362,37 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
351
362
|
.pipe(takeUntil(this.ngUnsubscribe))
|
|
352
363
|
.pipe(finalize(function () { return _this._isLoading = false; }))
|
|
353
364
|
.subscribe(function (process) {
|
|
365
|
+
if (!process) {
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
354
368
|
_this.processDetails = process;
|
|
355
369
|
_this.loadProcessSummary(process);
|
|
356
370
|
});
|
|
357
371
|
};
|
|
372
|
+
ExclusionDetailsComponent.prototype.sortByDate = function (startDate, finishDate) {
|
|
373
|
+
if (startDate.getTime() > finishDate.getTime()) {
|
|
374
|
+
return 1;
|
|
375
|
+
}
|
|
376
|
+
if (startDate.getTime() < finishDate.getTime()) {
|
|
377
|
+
return -1;
|
|
378
|
+
}
|
|
379
|
+
return 0;
|
|
380
|
+
};
|
|
381
|
+
ExclusionDetailsComponent.prototype.sortGroupsByStartDate = function (groups) {
|
|
382
|
+
var _this = this;
|
|
383
|
+
return groups.sort(function (a, b) { return _this.sortByDate(a.startDate, b.finishDate); });
|
|
384
|
+
};
|
|
385
|
+
ExclusionDetailsComponent.prototype.sortStepsByStartDate = function (steps) {
|
|
386
|
+
var _this = this;
|
|
387
|
+
return steps.sort(function (a, b) { return _this.sortByDate(a.startDate, b.finishDate); });
|
|
388
|
+
};
|
|
358
389
|
ExclusionDetailsComponent.prototype.loadProcessSummary = function (process) {
|
|
390
|
+
var _this = this;
|
|
359
391
|
var stepLogs = [];
|
|
360
|
-
process.groups
|
|
361
|
-
|
|
392
|
+
this.sortGroupsByStartDate(process.groups)
|
|
393
|
+
.forEach(function (group) {
|
|
394
|
+
var steps = _this.sortStepsByStartDate(group.steps)
|
|
395
|
+
.map(function (step) { return ({
|
|
362
396
|
description: step.description,
|
|
363
397
|
status: step.status,
|
|
364
398
|
errorMessage: step.errorMessage
|
|
@@ -367,6 +401,55 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
367
401
|
});
|
|
368
402
|
this._processSummaryData = stepLogs;
|
|
369
403
|
};
|
|
404
|
+
ExclusionDetailsComponent.prototype.disconnectWebSocket = function () {
|
|
405
|
+
if (this._exclusionProcessStatusChangedSubscribe) {
|
|
406
|
+
this._exclusionProcessStatusChangedSubscribe.unsubscribe();
|
|
407
|
+
this._exclusionProcessStatusChangedSubscribe = null;
|
|
408
|
+
}
|
|
409
|
+
if (this._websocketService) {
|
|
410
|
+
this._websocketService.disconnect();
|
|
411
|
+
this._websocketService = null;
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
ExclusionDetailsComponent.prototype.connectWebSocket = function () {
|
|
415
|
+
var _this = this;
|
|
416
|
+
if (this._websocketService) {
|
|
417
|
+
this.disconnectWebSocket();
|
|
418
|
+
}
|
|
419
|
+
this._websocketService = new WebsocketService();
|
|
420
|
+
this._websocketService
|
|
421
|
+
.onConnect()
|
|
422
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
423
|
+
.subscribe(function () {
|
|
424
|
+
_this.startListeningWebhookEvents();
|
|
425
|
+
});
|
|
426
|
+
};
|
|
427
|
+
ExclusionDetailsComponent.prototype.startListeningWebhookEvents = function () {
|
|
428
|
+
var _this = this;
|
|
429
|
+
this._websocketService
|
|
430
|
+
.onError()
|
|
431
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
432
|
+
.subscribe(function (data) {
|
|
433
|
+
console.error('onError', data);
|
|
434
|
+
});
|
|
435
|
+
this._exclusionProcessStatusChangedSubscribe = this._websocketService
|
|
436
|
+
.onEvent({
|
|
437
|
+
domain: this.projectConfigs.getDomain(),
|
|
438
|
+
service: this.projectConfigs.getService(),
|
|
439
|
+
primitive: "exclusionProcessStatusChanged"
|
|
440
|
+
})
|
|
441
|
+
.pipe(takeUntil(this.ngUnsubscribe))
|
|
442
|
+
.subscribe(function (event) {
|
|
443
|
+
var data = event.data;
|
|
444
|
+
if (_this._exclusionDetails.processId && data.pid === _this._exclusionDetails.processId) {
|
|
445
|
+
_this.loadProcessDetails(_this._exclusionDetails);
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
if (_this._exclusionDetails.recordId && data.recordId === _this._exclusionDetails.recordId) {
|
|
449
|
+
_this.loadProcessDetails(_this._exclusionDetails);
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
};
|
|
370
453
|
ExclusionDetailsComponent.ctorParameters = function () { return [
|
|
371
454
|
{ type: Router },
|
|
372
455
|
{ type: ActivatedRoute },
|
|
@@ -395,7 +478,7 @@ var ExclusionDetailsComponent = /** @class */ (function () {
|
|
|
395
478
|
ExclusionDetailsComponent = __decorate([
|
|
396
479
|
Component({
|
|
397
480
|
selector: "s-exclusion-details",
|
|
398
|
-
template: "<s-sidebar [visible]=\"isVisible\" (visibleChange)=\"
|
|
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=\"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",
|
|
399
482
|
encapsulation: ViewEncapsulation.None,
|
|
400
483
|
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}"]
|
|
401
484
|
})
|
|
@@ -617,6 +700,7 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
617
700
|
style: {
|
|
618
701
|
width: "100px"
|
|
619
702
|
},
|
|
703
|
+
tooltip: this.getColumnStatusTooltip,
|
|
620
704
|
badgeConfigs: [
|
|
621
705
|
{
|
|
622
706
|
enumValue: EnumExclusionProcessStatus.ERROR,
|
|
@@ -641,7 +725,7 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
641
725
|
attributes: ["startDate"],
|
|
642
726
|
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_start"),
|
|
643
727
|
type: EnumColumnFieldType.DATE,
|
|
644
|
-
dateFormat: "DD/MM/YYYY HH:mm",
|
|
728
|
+
dateFormat: "DD/MM/YYYY HH:mm:ss",
|
|
645
729
|
style: {
|
|
646
730
|
width: "100px"
|
|
647
731
|
}
|
|
@@ -651,13 +735,19 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
651
735
|
attributes: ["finishDate"],
|
|
652
736
|
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_finish"),
|
|
653
737
|
type: EnumColumnFieldType.DATE,
|
|
654
|
-
dateFormat: "DD/MM/YYYY HH:mm",
|
|
738
|
+
dateFormat: "DD/MM/YYYY HH:mm:ss",
|
|
655
739
|
style: {
|
|
656
740
|
width: "100px"
|
|
657
741
|
}
|
|
658
742
|
}
|
|
659
743
|
];
|
|
660
744
|
};
|
|
745
|
+
ExclusionsListComponent.prototype.getColumnStatusTooltip = function (rowValue) {
|
|
746
|
+
if (rowValue.errorMessage) {
|
|
747
|
+
return rowValue.errorMessage;
|
|
748
|
+
}
|
|
749
|
+
return null;
|
|
750
|
+
};
|
|
661
751
|
ExclusionsListComponent.prototype.getFilterFields = function () {
|
|
662
752
|
var translationPrefix = this.projectConfigs.getTranslationPrefix();
|
|
663
753
|
return [
|
|
@@ -811,8 +901,12 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
811
901
|
this.searchTokens = this.getFilterTokens();
|
|
812
902
|
var filterQuery = this.getFilterQuery();
|
|
813
903
|
var displayFields = __spread([
|
|
814
|
-
"recordId"
|
|
904
|
+
"recordId",
|
|
905
|
+
"errorMessage"
|
|
815
906
|
], this.gridColumns.map(function (column) { return column.field; }));
|
|
907
|
+
if (!sort.length) {
|
|
908
|
+
sort.push({ field: 'startDate', order: -1 });
|
|
909
|
+
}
|
|
816
910
|
this.listExclusions({ page: page, size: size, sort: sort, filterQuery: filterQuery, displayFields: displayFields });
|
|
817
911
|
};
|
|
818
912
|
ExclusionsListComponent.prototype.listExclusions = function (params) {
|
|
@@ -872,7 +966,7 @@ var ExclusionsListComponent = /** @class */ (function () {
|
|
|
872
966
|
], ExclusionsListComponent.prototype, "exclusionDetailsComponent", void 0);
|
|
873
967
|
ExclusionsListComponent = ExclusionsListComponent_1 = __decorate([
|
|
874
968
|
Component({
|
|
875
|
-
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 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",
|
|
969
|
+
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",
|
|
876
970
|
providers: []
|
|
877
971
|
})
|
|
878
972
|
], ExclusionsListComponent);
|