@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,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('primeng/panel'), require('primeng/table'), require('@seniorsistemas/angular-components'), require('moment'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@angular
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@seniorsistemas/exclusion-process-component', ['exports', '@angular/common', '@angular/core', 'primeng/panel', 'primeng/table', '@seniorsistemas/angular-components', 'moment', '@angular/router', 'rxjs', 'rxjs/operators', '@angular
|
|
4
|
-
(global = global || self, factory((global.seniorsistemas = global.seniorsistemas || {}, global.seniorsistemas['exclusion-process-component'] = {}), global.ng.common, global.ng.core, global.panel, global.table, global.angularComponents, global.moment, global.ng.router, global.rxjs, global.rxjs.operators, global.ng.common.http, global.
|
|
5
|
-
}(this, (function (exports, common, core, panel, table, angularComponents, moment, router, rxjs, operators,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('primeng/panel'), require('primeng/table'), require('@seniorsistemas/angular-components'), require('moment'), require('@angular/router'), require('@ngx-translate/core'), require('rxjs'), require('rxjs/operators'), require('@senior-gestao-empresarial/angular-components'), require('@angular/common/http'), require('primeng/api'), require('@angular/forms'), require('primeng/dialog'), require('primeng/confirmdialog'), require('primeng/inputtext'), require('@seniorsistemas/platform-components')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@seniorsistemas/exclusion-process-component', ['exports', '@angular/common', '@angular/core', 'primeng/panel', 'primeng/table', '@seniorsistemas/angular-components', 'moment', '@angular/router', '@ngx-translate/core', 'rxjs', 'rxjs/operators', '@senior-gestao-empresarial/angular-components', '@angular/common/http', 'primeng/api', '@angular/forms', 'primeng/dialog', 'primeng/confirmdialog', 'primeng/inputtext', '@seniorsistemas/platform-components'], factory) :
|
|
4
|
+
(global = global || self, factory((global.seniorsistemas = global.seniorsistemas || {}, global.seniorsistemas['exclusion-process-component'] = {}), global.ng.common, global.ng.core, global.panel, global.table, global.angularComponents, global.moment, global.ng.router, global.core$1, global.rxjs, global.rxjs.operators, global.angularComponents$1, global.ng.common.http, global.api, global.ng.forms, global.dialog, global.confirmdialog, global.inputtext, global.platformComponents));
|
|
5
|
+
}(this, (function (exports, common, core, panel, table, angularComponents, moment, router, core$1, rxjs, operators, angularComponents$1, http, api, forms, dialog, confirmdialog, inputtext, platformComponents) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -269,7 +269,6 @@
|
|
|
269
269
|
this.projectConfigs = projectConfigs;
|
|
270
270
|
var entityUrl = projectConfigs.getDomain() + "/" + projectConfigs.getService();
|
|
271
271
|
this.exclusionProcessUrl = entityUrl + "/entities/exclusionProcess";
|
|
272
|
-
this.listExclusionsUrl = entityUrl + "/entities/exclusionProcess";
|
|
273
272
|
this.defaultCatch = this.defaultCatch.bind(this);
|
|
274
273
|
}
|
|
275
274
|
LogicalDeleteService.prototype.defaultCatch = function () {
|
|
@@ -332,6 +331,7 @@
|
|
|
332
331
|
});
|
|
333
332
|
};
|
|
334
333
|
LogicalDeleteService.prototype.doGetProcessDetails = function (filterParams) {
|
|
334
|
+
var _this = this;
|
|
335
335
|
return this.http.get(this.exclusionProcessUrl, { params: filterParams })
|
|
336
336
|
.pipe(this.defaultCatch())
|
|
337
337
|
.pipe(operators.map(function (value) {
|
|
@@ -339,10 +339,18 @@
|
|
|
339
339
|
if (!((_a = value.contents) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
340
340
|
return null;
|
|
341
341
|
}
|
|
342
|
-
return value.contents[0];
|
|
342
|
+
return _this.mapExclusionsDates(value.contents[0]);
|
|
343
343
|
}));
|
|
344
344
|
};
|
|
345
|
+
LogicalDeleteService.prototype.mapExclusionsDates = function (exclusionProcess) {
|
|
346
|
+
var _a;
|
|
347
|
+
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) {
|
|
348
|
+
var _a;
|
|
349
|
+
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 })); }) }));
|
|
350
|
+
}) });
|
|
351
|
+
};
|
|
345
352
|
LogicalDeleteService.prototype.listExclusions = function (entityName, params) {
|
|
353
|
+
var _this = this;
|
|
346
354
|
if (params === void 0) { params = {}; }
|
|
347
355
|
if (params.filterQuery) {
|
|
348
356
|
params.filterQuery += " and lower(entityName) eq lower('" + entityName + "')";
|
|
@@ -353,14 +361,7 @@
|
|
|
353
361
|
return this.http.get(this.exclusionProcessUrl, { params: this.getListQueryParams(params) })
|
|
354
362
|
.pipe(this.defaultCatch())
|
|
355
363
|
.pipe(operators.map(function (value) {
|
|
356
|
-
value.contents.
|
|
357
|
-
if (p.startDate) {
|
|
358
|
-
p.startDate = moment(p.startDate).toDate();
|
|
359
|
-
}
|
|
360
|
-
if (p.finishDate) {
|
|
361
|
-
p.finishDate = moment(p.finishDate).toDate();
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
+
value.contents = value.contents.map(_this.mapExclusionsDates);
|
|
364
365
|
return value;
|
|
365
366
|
}));
|
|
366
367
|
};
|
|
@@ -430,17 +431,26 @@
|
|
|
430
431
|
ExclusionDetailsComponent.prototype.ngOnDestroy = function () {
|
|
431
432
|
this.ngUnsubscribe.next();
|
|
432
433
|
this.ngUnsubscribe.complete();
|
|
434
|
+
this.disconnectWebSocket();
|
|
433
435
|
};
|
|
434
436
|
ExclusionDetailsComponent.prototype.showDetails = function (details) {
|
|
435
|
-
this.
|
|
437
|
+
this._exclusionDetails = details;
|
|
436
438
|
this._entityName = details.entityName;
|
|
437
439
|
this._isVisible = true;
|
|
438
440
|
this._processSummaryData = [];
|
|
441
|
+
this.processDetails = null;
|
|
439
442
|
this.entityDescription = details.entityDescription;
|
|
440
443
|
this.loadProcessDetails(details);
|
|
444
|
+
this.connectWebSocket();
|
|
445
|
+
};
|
|
446
|
+
ExclusionDetailsComponent.prototype.onVisibilityChanged = function (event) {
|
|
447
|
+
this.closeDetails();
|
|
441
448
|
};
|
|
442
449
|
ExclusionDetailsComponent.prototype.closeDetails = function () {
|
|
443
450
|
this._isVisible = false;
|
|
451
|
+
this._exclusionDetails = null;
|
|
452
|
+
this._processSummaryData = [];
|
|
453
|
+
this.disconnectWebSocket();
|
|
444
454
|
};
|
|
445
455
|
ExclusionDetailsComponent.prototype.openExclusions = function () {
|
|
446
456
|
this.closeDetails();
|
|
@@ -462,14 +472,14 @@
|
|
|
462
472
|
if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.startDate)) {
|
|
463
473
|
return "";
|
|
464
474
|
}
|
|
465
|
-
return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm");
|
|
475
|
+
return moment(this.processDetails.startDate).format("DD/MM/YYYY HH:mm:ss");
|
|
466
476
|
};
|
|
467
477
|
ExclusionDetailsComponent.prototype.getFinishDate = function () {
|
|
468
478
|
var _a;
|
|
469
479
|
if (!((_a = this.processDetails) === null || _a === void 0 ? void 0 : _a.finishDate)) {
|
|
470
480
|
return "";
|
|
471
481
|
}
|
|
472
|
-
return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm");
|
|
482
|
+
return moment(this.processDetails.finishDate).format("DD/MM/YYYY HH:mm:ss");
|
|
473
483
|
};
|
|
474
484
|
ExclusionDetailsComponent.prototype.isFinished = function () {
|
|
475
485
|
var _a;
|
|
@@ -557,14 +567,37 @@
|
|
|
557
567
|
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
558
568
|
.pipe(operators.finalize(function () { return _this._isLoading = false; }))
|
|
559
569
|
.subscribe(function (process) {
|
|
570
|
+
if (!process) {
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
560
573
|
_this.processDetails = process;
|
|
561
574
|
_this.loadProcessSummary(process);
|
|
562
575
|
});
|
|
563
576
|
};
|
|
577
|
+
ExclusionDetailsComponent.prototype.sortByDate = function (startDate, finishDate) {
|
|
578
|
+
if (startDate.getTime() > finishDate.getTime()) {
|
|
579
|
+
return 1;
|
|
580
|
+
}
|
|
581
|
+
if (startDate.getTime() < finishDate.getTime()) {
|
|
582
|
+
return -1;
|
|
583
|
+
}
|
|
584
|
+
return 0;
|
|
585
|
+
};
|
|
586
|
+
ExclusionDetailsComponent.prototype.sortGroupsByStartDate = function (groups) {
|
|
587
|
+
var _this = this;
|
|
588
|
+
return groups.sort(function (a, b) { return _this.sortByDate(a.startDate, b.finishDate); });
|
|
589
|
+
};
|
|
590
|
+
ExclusionDetailsComponent.prototype.sortStepsByStartDate = function (steps) {
|
|
591
|
+
var _this = this;
|
|
592
|
+
return steps.sort(function (a, b) { return _this.sortByDate(a.startDate, b.finishDate); });
|
|
593
|
+
};
|
|
564
594
|
ExclusionDetailsComponent.prototype.loadProcessSummary = function (process) {
|
|
595
|
+
var _this = this;
|
|
565
596
|
var stepLogs = [];
|
|
566
|
-
process.groups
|
|
567
|
-
|
|
597
|
+
this.sortGroupsByStartDate(process.groups)
|
|
598
|
+
.forEach(function (group) {
|
|
599
|
+
var steps = _this.sortStepsByStartDate(group.steps)
|
|
600
|
+
.map(function (step) { return ({
|
|
568
601
|
description: step.description,
|
|
569
602
|
status: step.status,
|
|
570
603
|
errorMessage: step.errorMessage
|
|
@@ -573,6 +606,55 @@
|
|
|
573
606
|
});
|
|
574
607
|
this._processSummaryData = stepLogs;
|
|
575
608
|
};
|
|
609
|
+
ExclusionDetailsComponent.prototype.disconnectWebSocket = function () {
|
|
610
|
+
if (this._exclusionProcessStatusChangedSubscribe) {
|
|
611
|
+
this._exclusionProcessStatusChangedSubscribe.unsubscribe();
|
|
612
|
+
this._exclusionProcessStatusChangedSubscribe = null;
|
|
613
|
+
}
|
|
614
|
+
if (this._websocketService) {
|
|
615
|
+
this._websocketService.disconnect();
|
|
616
|
+
this._websocketService = null;
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
ExclusionDetailsComponent.prototype.connectWebSocket = function () {
|
|
620
|
+
var _this = this;
|
|
621
|
+
if (this._websocketService) {
|
|
622
|
+
this.disconnectWebSocket();
|
|
623
|
+
}
|
|
624
|
+
this._websocketService = new angularComponents$1.WebsocketService();
|
|
625
|
+
this._websocketService
|
|
626
|
+
.onConnect()
|
|
627
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
628
|
+
.subscribe(function () {
|
|
629
|
+
_this.startListeningWebhookEvents();
|
|
630
|
+
});
|
|
631
|
+
};
|
|
632
|
+
ExclusionDetailsComponent.prototype.startListeningWebhookEvents = function () {
|
|
633
|
+
var _this = this;
|
|
634
|
+
this._websocketService
|
|
635
|
+
.onError()
|
|
636
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
637
|
+
.subscribe(function (data) {
|
|
638
|
+
console.error('onError', data);
|
|
639
|
+
});
|
|
640
|
+
this._exclusionProcessStatusChangedSubscribe = this._websocketService
|
|
641
|
+
.onEvent({
|
|
642
|
+
domain: this.projectConfigs.getDomain(),
|
|
643
|
+
service: this.projectConfigs.getService(),
|
|
644
|
+
primitive: "exclusionProcessStatusChanged"
|
|
645
|
+
})
|
|
646
|
+
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
647
|
+
.subscribe(function (event) {
|
|
648
|
+
var data = event.data;
|
|
649
|
+
if (_this._exclusionDetails.processId && data.pid === _this._exclusionDetails.processId) {
|
|
650
|
+
_this.loadProcessDetails(_this._exclusionDetails);
|
|
651
|
+
return;
|
|
652
|
+
}
|
|
653
|
+
if (_this._exclusionDetails.recordId && data.recordId === _this._exclusionDetails.recordId) {
|
|
654
|
+
_this.loadProcessDetails(_this._exclusionDetails);
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
};
|
|
576
658
|
ExclusionDetailsComponent.ctorParameters = function () { return [
|
|
577
659
|
{ type: router.Router },
|
|
578
660
|
{ type: router.ActivatedRoute },
|
|
@@ -601,7 +683,7 @@
|
|
|
601
683
|
ExclusionDetailsComponent = __decorate([
|
|
602
684
|
core.Component({
|
|
603
685
|
selector: "s-exclusion-details",
|
|
604
|
-
template: "<s-sidebar [visible]=\"isVisible\" (visibleChange)=\"
|
|
686
|
+
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",
|
|
605
687
|
encapsulation: core.ViewEncapsulation.None,
|
|
606
688
|
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}"]
|
|
607
689
|
})
|
|
@@ -823,6 +905,7 @@
|
|
|
823
905
|
style: {
|
|
824
906
|
width: "100px"
|
|
825
907
|
},
|
|
908
|
+
tooltip: this.getColumnStatusTooltip,
|
|
826
909
|
badgeConfigs: [
|
|
827
910
|
{
|
|
828
911
|
enumValue: EnumExclusionProcessStatus.ERROR,
|
|
@@ -847,7 +930,7 @@
|
|
|
847
930
|
attributes: ["startDate"],
|
|
848
931
|
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_start"),
|
|
849
932
|
type: angularComponents.EnumColumnFieldType.DATE,
|
|
850
|
-
dateFormat: "DD/MM/YYYY HH:mm",
|
|
933
|
+
dateFormat: "DD/MM/YYYY HH:mm:ss",
|
|
851
934
|
style: {
|
|
852
935
|
width: "100px"
|
|
853
936
|
}
|
|
@@ -857,13 +940,19 @@
|
|
|
857
940
|
attributes: ["finishDate"],
|
|
858
941
|
header: this.translate.instant(this.projectConfigs.getTranslationPrefix() + ".logical_delete_finish"),
|
|
859
942
|
type: angularComponents.EnumColumnFieldType.DATE,
|
|
860
|
-
dateFormat: "DD/MM/YYYY HH:mm",
|
|
943
|
+
dateFormat: "DD/MM/YYYY HH:mm:ss",
|
|
861
944
|
style: {
|
|
862
945
|
width: "100px"
|
|
863
946
|
}
|
|
864
947
|
}
|
|
865
948
|
];
|
|
866
949
|
};
|
|
950
|
+
ExclusionsListComponent.prototype.getColumnStatusTooltip = function (rowValue) {
|
|
951
|
+
if (rowValue.errorMessage) {
|
|
952
|
+
return rowValue.errorMessage;
|
|
953
|
+
}
|
|
954
|
+
return null;
|
|
955
|
+
};
|
|
867
956
|
ExclusionsListComponent.prototype.getFilterFields = function () {
|
|
868
957
|
var translationPrefix = this.projectConfigs.getTranslationPrefix();
|
|
869
958
|
return [
|
|
@@ -1017,8 +1106,12 @@
|
|
|
1017
1106
|
this.searchTokens = this.getFilterTokens();
|
|
1018
1107
|
var filterQuery = this.getFilterQuery();
|
|
1019
1108
|
var displayFields = __spread([
|
|
1020
|
-
"recordId"
|
|
1109
|
+
"recordId",
|
|
1110
|
+
"errorMessage"
|
|
1021
1111
|
], this.gridColumns.map(function (column) { return column.field; }));
|
|
1112
|
+
if (!sort.length) {
|
|
1113
|
+
sort.push({ field: 'startDate', order: -1 });
|
|
1114
|
+
}
|
|
1022
1115
|
this.listExclusions({ page: page, size: size, sort: sort, filterQuery: filterQuery, displayFields: displayFields });
|
|
1023
1116
|
};
|
|
1024
1117
|
ExclusionsListComponent.prototype.listExclusions = function (params) {
|
|
@@ -1078,7 +1171,7 @@
|
|
|
1078
1171
|
], ExclusionsListComponent.prototype, "exclusionDetailsComponent", void 0);
|
|
1079
1172
|
ExclusionsListComponent = ExclusionsListComponent_1 = __decorate([
|
|
1080
1173
|
core.Component({
|
|
1081
|
-
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",
|
|
1174
|
+
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",
|
|
1082
1175
|
providers: []
|
|
1083
1176
|
})
|
|
1084
1177
|
], ExclusionsListComponent);
|