@valtimo/dossier 4.15.2-next-main.13 → 4.15.3-next-main.14

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.
@@ -767,6 +767,8 @@
767
767
  this.route = route;
768
768
  this.documentService = documentService;
769
769
  this.spinnerService = spinnerService;
770
+ this.paginationClicked = new i0.EventEmitter();
771
+ this.defaultAuditPage = 0;
770
772
  this.spinnerService.show('auditSpinner');
771
773
  var snapshot = this.route.snapshot.paramMap;
772
774
  this.documentId = snapshot.get('documentId') || '';
@@ -777,8 +779,11 @@
777
779
  return 'events.' + eventName;
778
780
  };
779
781
  DossierDetailTabAuditComponent.prototype.ngOnInit = function () {
782
+ this.loadAuditPage(this.defaultAuditPage);
783
+ };
784
+ DossierDetailTabAuditComponent.prototype.loadAuditPage = function (pageNumber) {
780
785
  var _this = this;
781
- this.documentService.getAuditLog(this.documentId).subscribe(function (page) {
786
+ this.documentService.getAuditLog(this.documentId, pageNumber).subscribe(function (page) {
782
787
  var timelineItems = [];
783
788
  page.content.forEach(function (auditRecord) {
784
789
  var occurredOn = moment$2(auditRecord.metaData.occurredOn);
@@ -787,15 +792,22 @@
787
792
  });
788
793
  _this.timelineItems = timelineItems;
789
794
  _this.spinnerService.hide('auditSpinner');
795
+ _this.pagination = page;
796
+ _this.pagination.number += 1;
790
797
  });
791
798
  };
799
+ DossierDetailTabAuditComponent.prototype.onChangePagination = function (page) {
800
+ this.paginationClicked.emit(page);
801
+ this.currentAuditPage = page - 1;
802
+ this.loadAuditPage(this.currentAuditPage);
803
+ };
792
804
  return DossierDetailTabAuditComponent;
793
805
  }());
794
806
  DossierDetailTabAuditComponent.decorators = [
795
807
  { type: i0.Component, args: [{
796
808
  selector: 'valtimo-dossier-detail-tab-audit',
797
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div *ngIf=\"timelineItems\">\n <valtimo-timeline [items]=\"timelineItems\"></valtimo-timeline>\n</div>\n<valtimo-spinner\n [useBootstrapSpinner]=\"false\"\n name=\"auditSpinner\"\n bdColor=\"rgba(125, 125, 125, 0.35)\"\n color=\"#264251\"\n type=\"square-jelly-box\"\n>\n</valtimo-spinner>\n",
798
- styles: [""]
809
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div *ngIf=\"timelineItems\">\n <valtimo-timeline [items]=\"timelineItems\"></valtimo-timeline>\n</div>\n<valtimo-spinner\n [useBootstrapSpinner]=\"false\"\n name=\"auditSpinner\"\n bdColor=\"rgba(125, 125, 125, 0.35)\"\n color=\"#264251\"\n type=\"square-jelly-box\"\n>\n</valtimo-spinner>\n<div\n class=\"pagination-holder audit-pagination bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0\"\n *ngIf=\"pagination && pagination.totalElements > pagination.size\"\n>\n <div class=\"float-left page-count col-4\">\n <strong>{{ 'list.currentPage' | translate: {current: pagination.number, total: pagination.totalPages} }}</strong>\n <br />\n {{\n pagination.totalElements === 1\n ? ('list.showingResult' | translate: {number: pagination.content.length})\n : ('list.showingResults'\n | translate: {number: pagination.content.length, total: pagination.totalElements})\n }}\n </div>\n <div class=\"col-8\">\n <ngb-pagination\n *ngIf=\"pagination.totalElements > pagination.size\"\n class=\"float-right\"\n [collectionSize]=\"pagination.totalElements\"\n [(page)]=\"pagination.number\"\n [pageSize]=\"pagination.size\"\n [maxSize]=\"pagination.size\"\n [rotate]=\"true\"\n (pageChange)=\"onChangePagination(pagination.number)\"></ngb-pagination>\n </div>\n</div>\n",
810
+ styles: [".audit-pagination{border-top:1px solid #dee2e6;margin:0 -1.923rem -1.923rem!important}"]
799
811
  },] }
800
812
  ];
801
813
  DossierDetailTabAuditComponent.ctorParameters = function () { return [
@@ -803,6 +815,9 @@
803
815
  { type: document.DocumentService },
804
816
  { type: ngxSpinner.NgxSpinnerService }
805
817
  ]; };
818
+ DossierDetailTabAuditComponent.propDecorators = {
819
+ paginationClicked: [{ type: i0.Output }]
820
+ };
806
821
 
807
822
  /*
808
823
  * Copyright 2015-2020 Ritense BV, the Netherlands.
@@ -1030,7 +1045,7 @@
1030
1045
  DossierDetailComponent.decorators = [
1031
1046
  { type: i0.Component, args: [{
1032
1047
  selector: 'valtimo-dossier-detail',
1033
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div class=\"card-header bg-light card-header-divider pb-5\">\n {{ documentDefinitionNameTitle }}\n <div class=\"float-right\">\n <div class=\"dropdown\">\n <button class=\"btn btn-primary dropdown-toggle\" type=\"button\"\n id=\"startProcessDropdown\" placement=\"bottom\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n <span>Start</span>\n <i class=\"pl-2 fas fa-caret-down\"></i>\n </button>\n <div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"startProcessDropdown\">\n <button *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\" class=\"dropdown-item p\"\n href=\"#\"\n (click)=\"startProcess(processDocumentDefinition)\">{{processDocumentDefinition.processName}}</button>\n </div>\n </div>\n </div>\n </div>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\" *ngFor=\"let tab of tabLoader.tabs\">\n <a id=\"{{ tab.name }}-tab\" class=\"nav-link clickable\"\n [ngClass]=\"{'active' : tab.isActive()}\"\n data-toggle=\"tab\"\n (click)=\"tabLoader.load(tab)\">\n {{ tabLoader.translateTabName(tab) }}\n </a>\n </li>\n </ul>\n <div class=\"card-body bg-white p-5 position-relative tab-container\">\n <ng-template #tabContainer>Loading...</ng-template>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </div>\n <valtimo-dossier-supporting-process-start-modal (formSubmit)=\"tabLoader.refreshView()\"\n #supportingProcessStartModal></valtimo-dossier-supporting-process-start-modal>\n </div>\n</div>\n",
1048
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div class=\"card-header bg-light card-header-divider pb-5\">\n {{ documentDefinitionNameTitle }}\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <valtimo-extension\n module=\"dossier\"\n page=\"dossier-detail\"\n section=\"card-header\"\n ></valtimo-extension>\n <div class=\"dropdown\">\n <button class=\"btn btn-primary dropdown-toggle\" type=\"button\"\n id=\"startProcessDropdown\" placement=\"bottom\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n data-toggle=\"dropdown\" aria-haspopup=\"true\" aria-expanded=\"false\">\n <span>Start</span>\n <i class=\"pl-2 fas fa-caret-down\"></i>\n </button>\n <div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"startProcessDropdown\">\n <button *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\" class=\"dropdown-item p\"\n href=\"#\"\n (click)=\"startProcess(processDocumentDefinition)\">{{processDocumentDefinition.processName}}</button>\n </div>\n </div>\n </div>\n </div>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\" *ngFor=\"let tab of tabLoader.tabs\">\n <a id=\"{{ tab.name }}-tab\" class=\"nav-link clickable\"\n [ngClass]=\"{'active' : tab.isActive()}\"\n data-toggle=\"tab\"\n (click)=\"tabLoader.load(tab)\">\n {{ tabLoader.translateTabName(tab) }}\n </a>\n </li>\n </ul>\n <div class=\"card-body bg-white p-5 position-relative tab-container\">\n <ng-template #tabContainer>Loading...</ng-template>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </div>\n <valtimo-dossier-supporting-process-start-modal (formSubmit)=\"tabLoader.refreshView()\"\n #supportingProcessStartModal></valtimo-dossier-supporting-process-start-modal>\n </div>\n</div>\n",
1034
1049
  styles: [".tab-container{min-height:300px}"]
1035
1050
  },] }
1036
1051
  ];
@@ -1584,7 +1599,9 @@
1584
1599
  components.ModalModule,
1585
1600
  ngBootstrap.NgbTooltipModule,
1586
1601
  components.UploaderModule,
1587
- components.DropzoneModule
1602
+ components.DropzoneModule,
1603
+ ngBootstrap.NgbPaginationModule,
1604
+ i1.ConfigModule
1588
1605
  ],
1589
1606
  exports: [
1590
1607
  DossierListComponent,