@valtimo/dossier-management 4.15.3-next-main.16 → 4.17.0

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.
Files changed (26) hide show
  1. package/bundles/valtimo-dossier-management.umd.js +572 -572
  2. package/bundles/valtimo-dossier-management.umd.js.map +1 -1
  3. package/bundles/valtimo-dossier-management.umd.min.js +1 -1
  4. package/bundles/valtimo-dossier-management.umd.min.js.map +1 -1
  5. package/esm2015/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.js +92 -92
  6. package/esm2015/lib/dossier-management-detail/dossier-management-detail.component.js +97 -97
  7. package/esm2015/lib/dossier-management-list/dossier-management-list.component.js +78 -78
  8. package/esm2015/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.js +63 -63
  9. package/esm2015/lib/dossier-management-routing.module.js +47 -47
  10. package/esm2015/lib/dossier-management-upload/dossier-management-upload.component.js +158 -159
  11. package/esm2015/lib/dossier-management.module.js +56 -56
  12. package/esm2015/public-api.js +21 -21
  13. package/esm2015/valtimo-dossier-management.js +10 -10
  14. package/fesm2015/valtimo-dossier-management.js +547 -548
  15. package/fesm2015/valtimo-dossier-management.js.map +1 -1
  16. package/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.d.ts +24 -25
  17. package/lib/dossier-management-detail/dossier-management-detail.component.d.ts +24 -25
  18. package/lib/dossier-management-list/dossier-management-list.component.d.ts +26 -27
  19. package/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.d.ts +18 -19
  20. package/lib/dossier-management-routing.module.d.ts +2 -2
  21. package/lib/dossier-management-upload/dossier-management-upload.component.d.ts +38 -38
  22. package/lib/dossier-management.module.d.ts +2 -2
  23. package/package.json +1 -1
  24. package/public-api.d.ts +2 -2
  25. package/valtimo-dossier-management.d.ts +9 -9
  26. package/valtimo-dossier-management.metadata.json +1 -1
@@ -1,593 +1,593 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@ngx-translate/core'), require('@valtimo/components'), require('@valtimo/config'), require('@valtimo/document'), require('@valtimo/process'), require('ngx-toastr'), require('@angular/router'), require('moment'), require('rxjs'), require('@valtimo/security'), require('@valtimo/contract'), require('rxjs/operators'), require('@ng-bootstrap/ng-bootstrap')) :
3
- typeof define === 'function' && define.amd ? define('@valtimo/dossier-management', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@ngx-translate/core', '@valtimo/components', '@valtimo/config', '@valtimo/document', '@valtimo/process', 'ngx-toastr', '@angular/router', 'moment', 'rxjs', '@valtimo/security', '@valtimo/contract', 'rxjs/operators', '@ng-bootstrap/ng-bootstrap'], factory) :
4
- (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo['dossier-management'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.core$1, global.components, global.config, global.document, global.process, global.ngxToastr, global.ng.router, global.moment, global.rxjs, global.security, global.contract, global.rxjs.operators, global.ngBootstrap));
5
- }(this, (function (exports, common, core, forms, core$1, components, config, document$1, process, ngxToastr, router, moment_, rxjs, security, contract, operators, ngBootstrap) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@ngx-translate/core'), require('@valtimo/components'), require('@valtimo/config'), require('@valtimo/document'), require('@valtimo/process'), require('ngx-toastr'), require('@angular/router'), require('moment'), require('rxjs'), require('@valtimo/security'), require('rxjs/operators'), require('@ng-bootstrap/ng-bootstrap')) :
3
+ typeof define === 'function' && define.amd ? define('@valtimo/dossier-management', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@ngx-translate/core', '@valtimo/components', '@valtimo/config', '@valtimo/document', '@valtimo/process', 'ngx-toastr', '@angular/router', 'moment', 'rxjs', '@valtimo/security', 'rxjs/operators', '@ng-bootstrap/ng-bootstrap'], factory) :
4
+ (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo['dossier-management'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.core$1, global.components, global.config, global.document, global.process, global.ngxToastr, global.ng.router, global.moment, global.rxjs, global.security, global.rxjs.operators, global.ngBootstrap));
5
+ }(this, (function (exports, common, core, forms, core$1, components, config, document$1, process, ngxToastr, router, moment_, rxjs, security, operators, ngBootstrap) { 'use strict';
6
6
 
7
- /*
8
- * Copyright 2015-2020 Ritense BV, the Netherlands.
9
- *
10
- * Licensed under EUPL, Version 1.2 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" basis,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
- var DossierManagementConnectModalComponent = /** @class */ (function () {
23
- function DossierManagementConnectModalComponent(processService, documentService, toasterService) {
24
- this.processService = processService;
25
- this.documentService = documentService;
26
- this.toasterService = toasterService;
27
- this.documentDefinition = null;
28
- this.newDocumentProcessDefinition = null;
29
- this.newDocumentProcessDefinitionInit = true;
30
- this.newDocumentProcessDefinitionStartableByUser = false;
31
- this.processDocumentDefinitionExists = {};
32
- this.reloadProcessDocumentDefinitions = new core.EventEmitter();
33
- }
34
- DossierManagementConnectModalComponent.prototype.loadProcessDocumentDefinitions = function () {
35
- var _this = this;
36
- this.processDocumentDefinitionExists = {};
37
- this.documentService
38
- .findProcessDocumentDefinitions(this.documentDefinition.id.name)
39
- .subscribe(function (processDocumentDefinitions) {
40
- processDocumentDefinitions.forEach(function (processDocumentDefinition) {
41
- _this.processDocumentDefinitionExists[processDocumentDefinition.id.processDefinitionKey] = true;
42
- });
43
- });
44
- };
45
- DossierManagementConnectModalComponent.prototype.loadProcessDefinitions = function () {
46
- var _this = this;
47
- this.processService
48
- .getProcessDefinitions()
49
- .subscribe(function (processDefinitions) {
50
- _this.processDefinitions = processDefinitions;
51
- });
52
- };
53
- DossierManagementConnectModalComponent.prototype.ngOnInit = function () {
54
- this.loadProcessDefinitions();
55
- };
56
- DossierManagementConnectModalComponent.prototype.openModal = function (dossier) {
57
- this.documentDefinition = dossier;
58
- this.newDocumentProcessDefinition = null;
59
- this.newDocumentProcessDefinitionInit = true;
60
- this.newDocumentProcessDefinitionStartableByUser = false;
61
- this.loadProcessDocumentDefinitions();
62
- this.modal.show();
63
- };
64
- DossierManagementConnectModalComponent.prototype.submit = function () {
65
- var _this = this;
66
- var request = {
67
- canInitializeDocument: this.newDocumentProcessDefinitionInit,
68
- startableByUser: this.newDocumentProcessDefinitionStartableByUser,
69
- documentDefinitionName: this.documentDefinition.id.name,
70
- processDefinitionKey: this.newDocumentProcessDefinition.key,
71
- };
72
- this.documentService.createProcessDocumentDefinition(request).subscribe(function () {
73
- _this.toasterService.success('Successfully added new process document definition');
74
- _this.reloadProcessDocumentDefinitions.emit();
75
- }, function (err) {
76
- _this.toasterService.error('Failed to add new process document definition');
77
- });
78
- };
79
- return DossierManagementConnectModalComponent;
80
- }());
81
- DossierManagementConnectModalComponent.decorators = [
82
- { type: core.Component, args: [{
83
- selector: 'valtimo-dossier-management-connect-modal',
84
- 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<valtimo-modal\n #dossierConnectModal\n elementId=\"dossierConnectModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"Connect document definition to process definition\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <p>\n {{ 'Select process definition for document definition' | translate }}\n <strong>{{ documentDefinition.id.name }} *</strong>\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <select class=\"form-control\" [(ngModel)]=\"newDocumentProcessDefinition\">\n <option [ngValue]=\"null\">Select process definition</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [disabled]=\"processDocumentDefinitionExists[processDefinition.key]\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n </div>\n <p>\n {{ 'Select options for the selected process' | translate }}\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <label class=\"custom-control custom-checkbox custom-control-inline pl-6 mb-0\">\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionInit\"\n /><span class=\"custom-control-label custom-control-color\">Init document?</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline ml-2 pl-6 mb-0\"\n placement=\"right\"\n ngbTooltip=\"{{ 'Startable by user tooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionStartableByUser\"\n /><span class=\"custom-control-label custom-control-color\"\n >{{ 'Startable by user' | translate }}?</span\n >\n </label>\n </div>\n </div>\n <div footer>\n <button\n (click)=\"submit()\"\n class=\"btn btn-primary\"\n data-dismiss=\"modal\"\n [disabled]=\"!newDocumentProcessDefinition\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</valtimo-modal>\n",
85
- styles: ["/*!\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 */"]
86
- },] }
87
- ];
88
- DossierManagementConnectModalComponent.ctorParameters = function () { return [
89
- { type: process.ProcessService },
90
- { type: document$1.DocumentService },
91
- { type: ngxToastr.ToastrService }
92
- ]; };
93
- DossierManagementConnectModalComponent.propDecorators = {
94
- reloadProcessDocumentDefinitions: [{ type: core.Output }],
95
- modal: [{ type: core.ViewChild, args: ['dossierConnectModal',] }]
7
+ /*
8
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
9
+ *
10
+ * Licensed under EUPL, Version 1.2 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" basis,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ var DossierManagementConnectModalComponent = /** @class */ (function () {
23
+ function DossierManagementConnectModalComponent(processService, documentService, toasterService) {
24
+ this.processService = processService;
25
+ this.documentService = documentService;
26
+ this.toasterService = toasterService;
27
+ this.documentDefinition = null;
28
+ this.newDocumentProcessDefinition = null;
29
+ this.newDocumentProcessDefinitionInit = true;
30
+ this.newDocumentProcessDefinitionStartableByUser = false;
31
+ this.processDocumentDefinitionExists = {};
32
+ this.reloadProcessDocumentDefinitions = new core.EventEmitter();
33
+ }
34
+ DossierManagementConnectModalComponent.prototype.loadProcessDocumentDefinitions = function () {
35
+ var _this = this;
36
+ this.processDocumentDefinitionExists = {};
37
+ this.documentService
38
+ .findProcessDocumentDefinitions(this.documentDefinition.id.name)
39
+ .subscribe(function (processDocumentDefinitions) {
40
+ processDocumentDefinitions.forEach(function (processDocumentDefinition) {
41
+ _this.processDocumentDefinitionExists[processDocumentDefinition.id.processDefinitionKey] = true;
42
+ });
43
+ });
44
+ };
45
+ DossierManagementConnectModalComponent.prototype.loadProcessDefinitions = function () {
46
+ var _this = this;
47
+ this.processService
48
+ .getProcessDefinitions()
49
+ .subscribe(function (processDefinitions) {
50
+ _this.processDefinitions = processDefinitions;
51
+ });
52
+ };
53
+ DossierManagementConnectModalComponent.prototype.ngOnInit = function () {
54
+ this.loadProcessDefinitions();
55
+ };
56
+ DossierManagementConnectModalComponent.prototype.openModal = function (dossier) {
57
+ this.documentDefinition = dossier;
58
+ this.newDocumentProcessDefinition = null;
59
+ this.newDocumentProcessDefinitionInit = true;
60
+ this.newDocumentProcessDefinitionStartableByUser = false;
61
+ this.loadProcessDocumentDefinitions();
62
+ this.modal.show();
63
+ };
64
+ DossierManagementConnectModalComponent.prototype.submit = function () {
65
+ var _this = this;
66
+ var request = {
67
+ canInitializeDocument: this.newDocumentProcessDefinitionInit,
68
+ startableByUser: this.newDocumentProcessDefinitionStartableByUser,
69
+ documentDefinitionName: this.documentDefinition.id.name,
70
+ processDefinitionKey: this.newDocumentProcessDefinition.key,
71
+ };
72
+ this.documentService.createProcessDocumentDefinition(request).subscribe(function () {
73
+ _this.toasterService.success('Successfully added new process document definition');
74
+ _this.reloadProcessDocumentDefinitions.emit();
75
+ }, function (err) {
76
+ _this.toasterService.error('Failed to add new process document definition');
77
+ });
78
+ };
79
+ return DossierManagementConnectModalComponent;
80
+ }());
81
+ DossierManagementConnectModalComponent.decorators = [
82
+ { type: core.Component, args: [{
83
+ selector: 'valtimo-dossier-management-connect-modal',
84
+ 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<valtimo-modal\n #dossierConnectModal\n elementId=\"dossierConnectModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"Connect document definition to process definition\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <p>\n {{ 'Select process definition for document definition' | translate }}\n <strong>{{ documentDefinition.id.name }} *</strong>\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <select class=\"form-control\" [(ngModel)]=\"newDocumentProcessDefinition\">\n <option [ngValue]=\"null\">Select process definition</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [disabled]=\"processDocumentDefinitionExists[processDefinition.key]\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n </div>\n <p>\n {{ 'Select options for the selected process' | translate }}\n </p>\n <div class=\"input-group mb-3 align-items-center\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionInit\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.processCreatesCase' | translate\n }}</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline ml-2 pl-6 mb-0\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [(ngModel)]=\"newDocumentProcessDefinitionStartableByUser\"\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.startableWithinCase' | translate\n }}</span>\n </label>\n </div>\n </div>\n <div footer>\n <button\n (click)=\"submit()\"\n class=\"btn btn-primary\"\n data-dismiss=\"modal\"\n [disabled]=\"!newDocumentProcessDefinition\"\n >\n {{ 'Save' | translate }}\n </button>\n </div>\n</valtimo-modal>\n",
85
+ styles: ["/*!\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 */"]
86
+ },] }
87
+ ];
88
+ DossierManagementConnectModalComponent.ctorParameters = function () { return [
89
+ { type: process.ProcessService },
90
+ { type: document$1.DocumentService },
91
+ { type: ngxToastr.ToastrService }
92
+ ]; };
93
+ DossierManagementConnectModalComponent.propDecorators = {
94
+ reloadProcessDocumentDefinitions: [{ type: core.Output }],
95
+ modal: [{ type: core.ViewChild, args: ['dossierConnectModal',] }]
96
96
  };
97
97
 
98
- /*
99
- * Copyright 2015-2020 Ritense BV, the Netherlands.
100
- *
101
- * Licensed under EUPL, Version 1.2 (the "License");
102
- * you may not use this file except in compliance with the License.
103
- * You may obtain a copy of the License at
104
- *
105
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
106
- *
107
- * Unless required by applicable law or agreed to in writing, software
108
- * distributed under the License is distributed on an "AS IS" basis,
109
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
110
- * See the License for the specific language governing permissions and
111
- * limitations under the License.
112
- */
113
- var DossierManagementDetailComponent = /** @class */ (function () {
114
- function DossierManagementDetailComponent(documentService, route, alertService) {
115
- this.documentService = documentService;
116
- this.route = route;
117
- this.alertService = alertService;
118
- this.documentDefinitionName = null;
119
- this.documentDefinition = null;
120
- this.processDocumentDefinitions = [];
121
- this.documentDefinitionName = this.route.snapshot.paramMap.get('name');
122
- }
123
- DossierManagementDetailComponent.prototype.ngOnInit = function () {
124
- this.loadDocumentDefinition();
125
- this.loadProcessDocumentDefinitions();
126
- };
127
- DossierManagementDetailComponent.prototype.loadProcessDocumentDefinitions = function () {
128
- var _this = this;
129
- this.documentService
130
- .findProcessDocumentDefinitions(this.documentDefinitionName)
131
- .subscribe(function (processDocumentDefinitions) {
132
- _this.processDocumentDefinitions = processDocumentDefinitions;
133
- });
134
- };
135
- DossierManagementDetailComponent.prototype.loadDocumentDefinition = function () {
136
- var _this = this;
137
- this.documentService
138
- .getDocumentDefinition(this.documentDefinitionName)
139
- .subscribe(function (documentDefinition) {
140
- _this.documentDefinition = documentDefinition;
141
- });
142
- };
143
- DossierManagementDetailComponent.prototype.openDossierConnectModal = function () {
144
- this.dossierConnectModal.openModal(this.documentDefinition);
145
- };
146
- DossierManagementDetailComponent.prototype.openDossierRemoveModal = function () {
147
- this.dossierRemoveModal.openModal(this.documentDefinition);
148
- };
149
- DossierManagementDetailComponent.prototype.deleteProcessDocumentDefinition = function (processDocumentDefinition) {
150
- var _this = this;
151
- this.documentService
152
- .deleteProcessDocumentDefinition({
153
- documentDefinitionName: processDocumentDefinition.id.documentDefinitionId.name,
154
- processDefinitionKey: processDocumentDefinition.id.processDefinitionKey,
155
- canInitializeDocument: processDocumentDefinition.canInitializeDocument,
156
- startableByUser: processDocumentDefinition.startableByUser,
157
- })
158
- .subscribe(function () {
159
- _this.alertService.success('Successfully deleted process document definition');
160
- _this.loadProcessDocumentDefinitions();
161
- }, function () {
162
- _this.alertService.error('Failed to delete process document definition');
163
- });
164
- };
165
- DossierManagementDetailComponent.prototype.downloadDefinition = function () {
166
- var definition = this.documentDefinition;
167
- var dataString = 'data:text/json;charset=utf-8,' +
168
- encodeURIComponent(JSON.stringify(definition.schema, null, 2));
169
- var downloadAnchorElement = document.getElementById('downloadAnchorElement');
170
- downloadAnchorElement.setAttribute('href', dataString);
171
- downloadAnchorElement.setAttribute('download', definition.id.name + "-v" + definition.id.version + ".json");
172
- downloadAnchorElement.click();
173
- };
174
- return DossierManagementDetailComponent;
175
- }());
176
- DossierManagementDetailComponent.decorators = [
177
- { type: core.Component, args: [{
178
- selector: 'valtimo-dossier-management-detail',
179
- 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 pt-0\">\n <div class=\"container-fluid\">\n <div *ngIf=\"documentDefinition\" class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space\" (click)=\"downloadDefinition()\">\n <i class=\"icon mdi mdi-download\"></i>&nbsp;\n {{ 'Download document definition' | translate }}\n </button>\n <a id=\"downloadAnchorElement\" style=\"display: none\"></a>\n <button\n *ngIf=\"!this.documentDefinition.readOnly\"\n class=\"btn btn-secondary btn-space mr-0\"\n (click)=\"openDossierRemoveModal()\"\n >\n <i class=\"icon mdi mdi-delete\"></i>&nbsp;\n {{ 'Remove document definition' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <valtimo-widget *ngIf=\"documentDefinition\">\n <div class=\"bg-light dossier-header\">\n <h3 class=\"dossier-title\">\n {{ documentDefinition.schema.title }}\n <div *ngIf=\"documentDefinition.readOnly\" class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">Read-only</span>\n </div>\n </h3>\n </div>\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5\">\n <h2>{{ 'document definition' | translate }}</h2>\n </div>\n <div class=\"col-5 offset-2\">\n <h2>Connected processes</h2>\n </div>\n </div>\n <div class=\"row bg-white mb-5 pb-4 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 dossier-schema\" rows=\"25\" disabled\n >{{ documentDefinition | json }}\n </textarea>\n </div>\n <div class=\"col-5 offset-2 bg-blue\">\n <div\n class=\"input-group mb-5\"\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n >\n <div class=\"input-group-prepend w-75\">\n <button\n class=\"btn btn-danger\"\n (click)=\"deleteProcessDocumentDefinition(processDocumentDefinition)\"\n data-toggle=\"tooltip\"\n data-placement=\"left\"\n title=\"Delete this connected process\"\n >\n <i class=\"fa fa-trash\"></i>\n </button>\n <input\n class=\"form-control\"\n [value]=\"\n processDocumentDefinition.processName\n ? processDocumentDefinition.processName\n : '' + ' (' + processDocumentDefinition.id.processDefinitionKey + ')'\n \"\n type=\"text\"\n disabled\n />\n </div>\n <div class=\"row mb-2 mt-2\">\n <label class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\">\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [checked]=\"processDocumentDefinition.canInitializeDocument\"\n disabled\n /><span class=\"custom-control-label custom-control-color\">Init document?</span>\n </label>\n <label class=\"custom-control custom-checkbox custom-control-inline pl-6\">\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [checked]=\"processDocumentDefinition.startableByUser\"\n disabled\n /><span class=\"custom-control-label custom-control-color\"\n >{{ 'Startable by user' | translate }}?</span\n >\n </label>\n </div>\n </div>\n <div class=\"text-right mt-5 mb-5\">\n <button class=\"btn btn-primary\" (click)=\"openDossierConnectModal()\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp; Connect process\n </button>\n </div>\n <valtimo-extension\n module=\"dossier-management\"\n page=\"dossier\"\n section=\"right-panel\"\n ></valtimo-extension>\n </div>\n </div>\n </valtimo-widget>\n\n <valtimo-dossier-management-connect-modal\n #dossierConnectModal\n (reloadProcessDocumentDefinitions)=\"loadProcessDocumentDefinitions()\"\n ></valtimo-dossier-management-connect-modal>\n <valtimo-dossier-management-remove-modal\n #dossierRemoveModal\n ></valtimo-dossier-management-remove-modal>\n </div>\n</div>\n",
180
- styles: ["/*!\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 */.dossier-header{border-bottom:1px solid #dee2e6;height:80px;padding-left:18px;padding-right:18px;padding-top:21px}.dossier-title{margin-bottom:7px;margin-top:0}.row{margin:0}.dossier-schema{resize:none}"]
181
- },] }
182
- ];
183
- DossierManagementDetailComponent.ctorParameters = function () { return [
184
- { type: document$1.DocumentService },
185
- { type: router.ActivatedRoute },
186
- { type: components.AlertService }
187
- ]; };
188
- DossierManagementDetailComponent.propDecorators = {
189
- dossierConnectModal: [{ type: core.ViewChild, args: ['dossierConnectModal',] }],
190
- dossierRemoveModal: [{ type: core.ViewChild, args: ['dossierRemoveModal',] }]
98
+ /*
99
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
100
+ *
101
+ * Licensed under EUPL, Version 1.2 (the "License");
102
+ * you may not use this file except in compliance with the License.
103
+ * You may obtain a copy of the License at
104
+ *
105
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
106
+ *
107
+ * Unless required by applicable law or agreed to in writing, software
108
+ * distributed under the License is distributed on an "AS IS" basis,
109
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
110
+ * See the License for the specific language governing permissions and
111
+ * limitations under the License.
112
+ */
113
+ var DossierManagementDetailComponent = /** @class */ (function () {
114
+ function DossierManagementDetailComponent(documentService, route, alertService) {
115
+ this.documentService = documentService;
116
+ this.route = route;
117
+ this.alertService = alertService;
118
+ this.documentDefinitionName = null;
119
+ this.documentDefinition = null;
120
+ this.processDocumentDefinitions = [];
121
+ this.documentDefinitionName = this.route.snapshot.paramMap.get('name');
122
+ }
123
+ DossierManagementDetailComponent.prototype.ngOnInit = function () {
124
+ this.loadDocumentDefinition();
125
+ this.loadProcessDocumentDefinitions();
126
+ };
127
+ DossierManagementDetailComponent.prototype.loadProcessDocumentDefinitions = function () {
128
+ var _this = this;
129
+ this.documentService
130
+ .findProcessDocumentDefinitions(this.documentDefinitionName)
131
+ .subscribe(function (processDocumentDefinitions) {
132
+ _this.processDocumentDefinitions = processDocumentDefinitions;
133
+ });
134
+ };
135
+ DossierManagementDetailComponent.prototype.loadDocumentDefinition = function () {
136
+ var _this = this;
137
+ this.documentService
138
+ .getDocumentDefinition(this.documentDefinitionName)
139
+ .subscribe(function (documentDefinition) {
140
+ _this.documentDefinition = documentDefinition;
141
+ });
142
+ };
143
+ DossierManagementDetailComponent.prototype.openDossierConnectModal = function () {
144
+ this.dossierConnectModal.openModal(this.documentDefinition);
145
+ };
146
+ DossierManagementDetailComponent.prototype.openDossierRemoveModal = function () {
147
+ this.dossierRemoveModal.openModal(this.documentDefinition);
148
+ };
149
+ DossierManagementDetailComponent.prototype.deleteProcessDocumentDefinition = function (processDocumentDefinition) {
150
+ var _this = this;
151
+ this.documentService
152
+ .deleteProcessDocumentDefinition({
153
+ documentDefinitionName: processDocumentDefinition.id.documentDefinitionId.name,
154
+ processDefinitionKey: processDocumentDefinition.id.processDefinitionKey,
155
+ canInitializeDocument: processDocumentDefinition.canInitializeDocument,
156
+ startableByUser: processDocumentDefinition.startableByUser,
157
+ })
158
+ .subscribe(function () {
159
+ _this.alertService.success('Successfully deleted process document definition');
160
+ _this.loadProcessDocumentDefinitions();
161
+ }, function () {
162
+ _this.alertService.error('Failed to delete process document definition');
163
+ });
164
+ };
165
+ DossierManagementDetailComponent.prototype.downloadDefinition = function () {
166
+ var definition = this.documentDefinition;
167
+ var dataString = 'data:text/json;charset=utf-8,' +
168
+ encodeURIComponent(JSON.stringify(definition.schema, null, 2));
169
+ var downloadAnchorElement = document.getElementById('downloadAnchorElement');
170
+ downloadAnchorElement.setAttribute('href', dataString);
171
+ downloadAnchorElement.setAttribute('download', definition.id.name + "-v" + definition.id.version + ".json");
172
+ downloadAnchorElement.click();
173
+ };
174
+ return DossierManagementDetailComponent;
175
+ }());
176
+ DossierManagementDetailComponent.decorators = [
177
+ { type: core.Component, args: [{
178
+ selector: 'valtimo-dossier-management-detail',
179
+ 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 pt-0\">\n <div class=\"container-fluid\">\n <div *ngIf=\"documentDefinition\" class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space\" (click)=\"downloadDefinition()\">\n <i class=\"icon mdi mdi-download\"></i>&nbsp;\n {{ 'Download document definition' | translate }}\n </button>\n <a id=\"downloadAnchorElement\" style=\"display: none\"></a>\n <button\n *ngIf=\"!this.documentDefinition.readOnly\"\n class=\"btn btn-secondary btn-space mr-0\"\n (click)=\"openDossierRemoveModal()\"\n >\n <i class=\"icon mdi mdi-delete\"></i>&nbsp;\n {{ 'Remove document definition' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <valtimo-widget *ngIf=\"documentDefinition\">\n <div class=\"bg-light dossier-header\">\n <h3 class=\"dossier-title\">\n {{ documentDefinition.schema.title }}\n <div *ngIf=\"documentDefinition.readOnly\" class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">Read-only</span>\n </div>\n </h3>\n </div>\n <div class=\"row bg-white mt-5 mb-2 pl-2 pr-2\">\n <div class=\"col-5\">\n <h2>{{ 'document definition' | translate }}</h2>\n </div>\n <div class=\"col-5 offset-2\">\n <h2>Connected processes</h2>\n </div>\n </div>\n <div class=\"row bg-white mb-5 pb-4 pl-2 pr-2\">\n <div class=\"col-5 bg-red\">\n <textarea class=\"w-100 dossier-schema\" rows=\"25\" disabled\n >{{ documentDefinition | json }}\n </textarea>\n </div>\n <div class=\"col-5 offset-2 bg-blue\">\n <div\n class=\"input-group mb-5\"\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n >\n <div class=\"input-group-prepend w-75\">\n <button\n class=\"btn btn-danger\"\n (click)=\"deleteProcessDocumentDefinition(processDocumentDefinition)\"\n data-toggle=\"tooltip\"\n data-placement=\"left\"\n title=\"Delete this connected process\"\n >\n <i class=\"fa fa-trash\"></i>\n </button>\n <input\n class=\"form-control\"\n [value]=\"\n processDocumentDefinition.processName\n ? processDocumentDefinition.processName\n : '' + ' (' + processDocumentDefinition.id.processDefinitionKey + ')'\n \"\n type=\"text\"\n disabled\n />\n </div>\n <div class=\"row mb-2 mt-2\">\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6 mr-5\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.processCreatesCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [checked]=\"processDocumentDefinition.canInitializeDocument\"\n disabled\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.processCreatesCase' | translate\n }}</span>\n </label>\n <label\n class=\"custom-control custom-checkbox custom-control-inline pl-6\"\n placement=\"bottom\"\n ngbTooltip=\"{{ 'processCaseConnection.startableWithinCaseTooltip' | translate }}\"\n >\n <input\n class=\"custom-control-input\"\n type=\"checkbox\"\n [checked]=\"processDocumentDefinition.startableByUser\"\n disabled\n /><span class=\"custom-control-label custom-control-color\">{{\n 'processCaseConnection.startableWithinCase' | translate\n }}</span>\n </label>\n </div>\n </div>\n <div class=\"text-right mt-5 mb-5\">\n <button class=\"btn btn-primary\" (click)=\"openDossierConnectModal()\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp; Connect process\n </button>\n </div>\n <valtimo-extension\n module=\"dossier-management\"\n page=\"dossier\"\n section=\"right-panel\"\n ></valtimo-extension>\n </div>\n </div>\n </valtimo-widget>\n\n <valtimo-dossier-management-connect-modal\n #dossierConnectModal\n (reloadProcessDocumentDefinitions)=\"loadProcessDocumentDefinitions()\"\n ></valtimo-dossier-management-connect-modal>\n <valtimo-dossier-management-remove-modal\n #dossierRemoveModal\n ></valtimo-dossier-management-remove-modal>\n </div>\n</div>\n",
180
+ styles: ["/*!\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 */.dossier-header{border-bottom:1px solid #dee2e6;height:80px;padding-left:18px;padding-right:18px;padding-top:21px}.dossier-title{margin-bottom:7px;margin-top:0}.row{margin:0}.dossier-schema{resize:none}"]
181
+ },] }
182
+ ];
183
+ DossierManagementDetailComponent.ctorParameters = function () { return [
184
+ { type: document$1.DocumentService },
185
+ { type: router.ActivatedRoute },
186
+ { type: components.AlertService }
187
+ ]; };
188
+ DossierManagementDetailComponent.propDecorators = {
189
+ dossierConnectModal: [{ type: core.ViewChild, args: ['dossierConnectModal',] }],
190
+ dossierRemoveModal: [{ type: core.ViewChild, args: ['dossierRemoveModal',] }]
191
191
  };
192
192
 
193
- /*
194
- * Copyright 2015-2020 Ritense BV, the Netherlands.
195
- *
196
- * Licensed under EUPL, Version 1.2 (the "License");
197
- * you may not use this file except in compliance with the License.
198
- * You may obtain a copy of the License at
199
- *
200
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
201
- *
202
- * Unless required by applicable law or agreed to in writing, software
203
- * distributed under the License is distributed on an "AS IS" basis,
204
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
- * See the License for the specific language governing permissions and
206
- * limitations under the License.
207
- */
208
- var moment = moment_;
209
- moment.locale(localStorage.getItem('langKey') || '');
210
- var DossierManagementListComponent = /** @class */ (function () {
211
- function DossierManagementListComponent(documentService, router) {
212
- this.documentService = documentService;
213
- this.router = router;
214
- this.dossiers = [];
215
- this.pagination = {
216
- collectionSize: 0,
217
- page: 1,
218
- size: 10,
219
- maxPaginationItemSize: 5,
220
- };
221
- this.pageParam = 0;
222
- this.dossierFields = [
223
- { key: 'schema.title', label: 'Title' },
224
- { key: 'createdOn', label: 'Created On' },
225
- { key: 'readOnly', label: 'Read-only' },
226
- ];
227
- this.showModal$ = new rxjs.BehaviorSubject(false);
228
- }
229
- DossierManagementListComponent.prototype.paginationClicked = function (page) {
230
- this.pageParam = page - 1;
231
- this.getDocumentDefinitions();
232
- };
233
- DossierManagementListComponent.prototype.paginationSet = function () {
234
- this.getDocumentDefinitions();
235
- };
236
- DossierManagementListComponent.prototype.redirectToDetails = function (documentDefinition) {
237
- this.router.navigate(['/dossier-management/dossier', documentDefinition.id.name]);
238
- };
239
- DossierManagementListComponent.prototype.getDocumentDefinitions = function () {
240
- var _this = this;
241
- this.documentService
242
- .queryDefinitions({ page: this.pageParam, size: this.pagination.size })
243
- .subscribe(function (documentDefinitionPage) {
244
- _this.pagination.collectionSize = documentDefinitionPage.totalElements;
245
- _this.dossiers = documentDefinitionPage.content;
246
- _this.dossiers.map(function (dossier) {
247
- dossier.createdOn = moment(dossier.createdOn).format('DD MMM YYYY HH:mm');
248
- });
249
- });
250
- };
251
- DossierManagementListComponent.prototype.showModal = function () {
252
- this.showModal$.next(true);
253
- };
254
- return DossierManagementListComponent;
255
- }());
256
- DossierManagementListComponent.decorators = [
257
- { type: core.Component, args: [{
258
- selector: 'valtimo-dossier-management-list',
259
- 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 pt-0\">\n <div class=\"container-fluid\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-secondary btn-space mr-0\" (click)=\"showModal()\">\n <i class=\"icon mdi mdi-upload\"></i>&nbsp;\n {{ 'Upload document definition' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"dossiers\"\n [fields]=\"dossierFields\"\n [header]=\"true\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n [pagination]=\"pagination\"\n paginationIdentifier=\"dossierManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Dossiers' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Dossiers' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n\n<valtimo-dossier-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"paginationSet()\"\n></valtimo-dossier-management-upload>\n",
260
- styles: ["/*!\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 */"]
261
- },] }
262
- ];
263
- DossierManagementListComponent.ctorParameters = function () { return [
264
- { type: document$1.DocumentService },
265
- { type: router.Router }
193
+ /*
194
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
195
+ *
196
+ * Licensed under EUPL, Version 1.2 (the "License");
197
+ * you may not use this file except in compliance with the License.
198
+ * You may obtain a copy of the License at
199
+ *
200
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
201
+ *
202
+ * Unless required by applicable law or agreed to in writing, software
203
+ * distributed under the License is distributed on an "AS IS" basis,
204
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
+ * See the License for the specific language governing permissions and
206
+ * limitations under the License.
207
+ */
208
+ var moment = moment_;
209
+ moment.locale(localStorage.getItem('langKey') || '');
210
+ var DossierManagementListComponent = /** @class */ (function () {
211
+ function DossierManagementListComponent(documentService, router) {
212
+ this.documentService = documentService;
213
+ this.router = router;
214
+ this.dossiers = [];
215
+ this.pagination = {
216
+ collectionSize: 0,
217
+ page: 1,
218
+ size: 10,
219
+ maxPaginationItemSize: 5,
220
+ };
221
+ this.pageParam = 0;
222
+ this.dossierFields = [
223
+ { key: 'schema.title', label: 'Title' },
224
+ { key: 'createdOn', label: 'Created On' },
225
+ { key: 'readOnly', label: 'Read-only' },
226
+ ];
227
+ this.showModal$ = new rxjs.BehaviorSubject(false);
228
+ }
229
+ DossierManagementListComponent.prototype.paginationClicked = function (page) {
230
+ this.pageParam = page - 1;
231
+ this.getDocumentDefinitions();
232
+ };
233
+ DossierManagementListComponent.prototype.paginationSet = function () {
234
+ this.getDocumentDefinitions();
235
+ };
236
+ DossierManagementListComponent.prototype.redirectToDetails = function (documentDefinition) {
237
+ this.router.navigate(['/dossier-management/dossier', documentDefinition.id.name]);
238
+ };
239
+ DossierManagementListComponent.prototype.getDocumentDefinitions = function () {
240
+ var _this = this;
241
+ this.documentService
242
+ .queryDefinitions({ page: this.pageParam, size: this.pagination.size })
243
+ .subscribe(function (documentDefinitionPage) {
244
+ _this.pagination.collectionSize = documentDefinitionPage.totalElements;
245
+ _this.dossiers = documentDefinitionPage.content;
246
+ _this.dossiers.map(function (dossier) {
247
+ dossier.createdOn = moment(dossier.createdOn).format('DD MMM YYYY HH:mm');
248
+ });
249
+ });
250
+ };
251
+ DossierManagementListComponent.prototype.showModal = function () {
252
+ this.showModal$.next(true);
253
+ };
254
+ return DossierManagementListComponent;
255
+ }());
256
+ DossierManagementListComponent.decorators = [
257
+ { type: core.Component, args: [{
258
+ selector: 'valtimo-dossier-management-list',
259
+ 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 pt-0\">\n <div class=\"container-fluid\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-secondary btn-space mr-0\" (click)=\"showModal()\">\n <i class=\"icon mdi mdi-upload\"></i>&nbsp;\n {{ 'Upload document definition' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"dossiers\"\n [fields]=\"dossierFields\"\n [header]=\"true\"\n [viewMode]=\"true\"\n [isSearchable]=\"true\"\n [pagination]=\"pagination\"\n paginationIdentifier=\"dossierManagementList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n (rowClicked)=\"redirectToDetails($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Dossiers' | translate }}</h3>\n <h5 class=\"list-header-description\">{{ 'Overview of all Dossiers' | translate }}</h5>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n</div>\n\n<valtimo-dossier-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"paginationSet()\"\n></valtimo-dossier-management-upload>\n",
260
+ styles: ["/*!\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 */"]
261
+ },] }
262
+ ];
263
+ DossierManagementListComponent.ctorParameters = function () { return [
264
+ { type: document$1.DocumentService },
265
+ { type: router.Router }
266
266
  ]; };
267
267
 
268
- /*
269
- * Copyright 2015-2020 Ritense BV, the Netherlands.
270
- *
271
- * Licensed under EUPL, Version 1.2 (the "License");
272
- * you may not use this file except in compliance with the License.
273
- * You may obtain a copy of the License at
274
- *
275
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
276
- *
277
- * Unless required by applicable law or agreed to in writing, software
278
- * distributed under the License is distributed on an "AS IS" basis,
279
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
280
- * See the License for the specific language governing permissions and
281
- * limitations under the License.
282
- */
283
- var ɵ0 = { title: 'Dossiers', roles: [contract.ROLE_ADMIN] }, ɵ1 = { title: 'Dossier details', roles: [contract.ROLE_ADMIN] };
284
- var routes = [
285
- {
286
- path: 'dossier-management',
287
- component: DossierManagementListComponent,
288
- canActivate: [security.AuthGuardService],
289
- data: ɵ0,
290
- },
291
- {
292
- path: 'dossier-management/dossier/:name',
293
- component: DossierManagementDetailComponent,
294
- canActivate: [security.AuthGuardService],
295
- data: ɵ1,
296
- },
297
- ];
298
- var DossierManagementRoutingModule = /** @class */ (function () {
299
- function DossierManagementRoutingModule() {
300
- }
301
- return DossierManagementRoutingModule;
302
- }());
303
- DossierManagementRoutingModule.decorators = [
304
- { type: core.NgModule, args: [{
305
- imports: [router.RouterModule.forRoot(routes)],
306
- exports: [router.RouterModule],
307
- declarations: [],
308
- },] }
268
+ /*
269
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
270
+ *
271
+ * Licensed under EUPL, Version 1.2 (the "License");
272
+ * you may not use this file except in compliance with the License.
273
+ * You may obtain a copy of the License at
274
+ *
275
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
276
+ *
277
+ * Unless required by applicable law or agreed to in writing, software
278
+ * distributed under the License is distributed on an "AS IS" basis,
279
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
280
+ * See the License for the specific language governing permissions and
281
+ * limitations under the License.
282
+ */
283
+ var ɵ0 = { title: 'Dossiers', roles: [config.ROLE_ADMIN] }, ɵ1 = { title: 'Dossier details', roles: [config.ROLE_ADMIN] };
284
+ var routes = [
285
+ {
286
+ path: 'dossier-management',
287
+ component: DossierManagementListComponent,
288
+ canActivate: [security.AuthGuardService],
289
+ data: ɵ0,
290
+ },
291
+ {
292
+ path: 'dossier-management/dossier/:name',
293
+ component: DossierManagementDetailComponent,
294
+ canActivate: [security.AuthGuardService],
295
+ data: ɵ1,
296
+ },
297
+ ];
298
+ var DossierManagementRoutingModule = /** @class */ (function () {
299
+ function DossierManagementRoutingModule() {
300
+ }
301
+ return DossierManagementRoutingModule;
302
+ }());
303
+ DossierManagementRoutingModule.decorators = [
304
+ { type: core.NgModule, args: [{
305
+ imports: [router.RouterModule.forRoot(routes)],
306
+ exports: [router.RouterModule],
307
+ declarations: [],
308
+ },] }
309
309
  ];
310
310
 
311
- /*
312
- * Copyright 2015-2020 Ritense BV, the Netherlands.
313
- *
314
- * Licensed under EUPL, Version 1.2 (the "License");
315
- * you may not use this file except in compliance with the License.
316
- * You may obtain a copy of the License at
317
- *
318
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
319
- *
320
- * Unless required by applicable law or agreed to in writing, software
321
- * distributed under the License is distributed on an "AS IS" basis,
322
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
323
- * See the License for the specific language governing permissions and
324
- * limitations under the License.
325
- */
326
- var DossierManagementUploadComponent = /** @class */ (function () {
327
- function DossierManagementUploadComponent(documentService, translateService, menuService) {
328
- this.documentService = documentService;
329
- this.translateService = translateService;
330
- this.menuService = menuService;
331
- this.definitionUploaded = new core.EventEmitter();
332
- this.clear$ = new rxjs.Subject();
333
- this.jsonString$ = new rxjs.BehaviorSubject('');
334
- this.error$ = new rxjs.BehaviorSubject('');
335
- this.disabled$ = new rxjs.BehaviorSubject(false);
336
- this.file$ = new rxjs.BehaviorSubject(undefined);
337
- }
338
- DossierManagementUploadComponent.prototype.ngAfterViewInit = function () {
339
- this.openShowSubscription();
340
- this.openFileSubscription();
341
- };
342
- DossierManagementUploadComponent.prototype.ngOnDestroy = function () {
343
- this.showSubscription.unsubscribe();
344
- this.fileSubscription.unsubscribe();
345
- this.closeErrorSubscription();
346
- };
347
- DossierManagementUploadComponent.prototype.setFile = function (file) {
348
- this.clearError();
349
- this.file$.next(file);
350
- };
351
- DossierManagementUploadComponent.prototype.uploadDefinition = function () {
352
- var _this = this;
353
- this.disable();
354
- this.jsonString$
355
- .pipe(operators.switchMap(function (jsonString) { return _this.documentService
356
- .createDocumentDefinition(new contract.DocumentDefinitionCreateRequest(jsonString))
357
- .pipe(operators.tap(
358
- // success
359
- function () {
360
- _this.closeErrorSubscription();
361
- _this.clearError();
362
- _this.enable();
363
- _this.hideModal();
364
- _this.menuService.reload();
365
- _this.definitionUploaded.emit();
366
- },
367
- // error
368
- function () {
369
- _this.openErrorSubscription('dropzone.error.invalidDocDef');
370
- _this.enable();
371
- })); }), operators.take(1))
372
- .subscribe();
373
- };
374
- DossierManagementUploadComponent.prototype.openErrorSubscription = function (errorCode) {
375
- var _this = this;
376
- this.closeErrorSubscription();
377
- this.errorSubscription = this.translateService.stream(errorCode).subscribe(function (error) {
378
- _this.error$.next(error);
379
- });
380
- };
381
- DossierManagementUploadComponent.prototype.closeErrorSubscription = function () {
382
- if (this.errorSubscription) {
383
- this.errorSubscription.unsubscribe();
384
- }
385
- };
386
- DossierManagementUploadComponent.prototype.clearError = function () {
387
- this.error$.next('');
388
- };
389
- DossierManagementUploadComponent.prototype.openFileSubscription = function () {
390
- var _this = this;
391
- this.fileSubscription = this.file$.subscribe(function (file) {
392
- if (file) {
393
- var reader_1 = new FileReader();
394
- reader_1.onloadend = function () {
395
- var result = reader_1.result.toString();
396
- if (_this.stringIsValidJson(result)) {
397
- _this.jsonString$.next(result);
398
- }
399
- };
400
- reader_1.readAsText(file);
401
- }
402
- else {
403
- _this.clearJsonString();
404
- }
405
- });
406
- };
407
- DossierManagementUploadComponent.prototype.openShowSubscription = function () {
408
- var _this = this;
409
- this.showSubscription = this.show$.subscribe(function (show) {
410
- if (show) {
411
- _this.showModal();
412
- }
413
- else {
414
- _this.hideModal();
415
- }
416
- _this.clearJsonString();
417
- _this.clearError();
418
- _this.clearDropzone();
419
- });
420
- };
421
- DossierManagementUploadComponent.prototype.clearJsonString = function () {
422
- this.jsonString$.next('');
423
- };
424
- DossierManagementUploadComponent.prototype.clearDropzone = function () {
425
- this.clear$.next();
426
- };
427
- DossierManagementUploadComponent.prototype.showModal = function () {
428
- this.modal.show();
429
- };
430
- DossierManagementUploadComponent.prototype.hideModal = function () {
431
- this.modal.hide();
432
- };
433
- DossierManagementUploadComponent.prototype.stringIsValidJson = function (string) {
434
- try {
435
- JSON.parse(string);
436
- }
437
- catch (e) {
438
- return false;
439
- }
440
- return true;
441
- };
442
- DossierManagementUploadComponent.prototype.disable = function () {
443
- this.disabled$.next(true);
444
- };
445
- DossierManagementUploadComponent.prototype.enable = function () {
446
- this.disabled$.next(false);
447
- };
448
- return DossierManagementUploadComponent;
449
- }());
450
- DossierManagementUploadComponent.decorators = [
451
- { type: core.Component, args: [{
452
- selector: 'valtimo-dossier-management-upload',
453
- template: "<valtimo-modal\n #uploadDefinitionModal\n [title]=\"'Upload document definition' | translate\"\n showFooter=\"true\"\n>\n <div class=\"mt-2\" body>\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.jsonDocDef' | translate\"\n [externalError$]=\"error$\"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf=\"(jsonString$ | async) && !(error$ | async); else pleaseSelect\">\n <button [disabled]=\"disabled$ | async\" class=\"btn btn-primary\" (click)=\"uploadDefinition()\">\n {{ 'Upload' | translate }}\n </button>\n </ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #pleaseSelect>\n <button class=\"btn btn-primary\" [disabled]=\"true\">\n {{ 'Select a document definition' | translate }}\n </button>\n</ng-template>\n",
454
- styles: [""]
455
- },] }
456
- ];
457
- DossierManagementUploadComponent.ctorParameters = function () { return [
458
- { type: document$1.DocumentService },
459
- { type: core$1.TranslateService },
460
- { type: components.MenuService }
461
- ]; };
462
- DossierManagementUploadComponent.propDecorators = {
463
- show$: [{ type: core.Input }],
464
- definitionUploaded: [{ type: core.Output }],
465
- modal: [{ type: core.ViewChild, args: ['uploadDefinitionModal',] }]
311
+ /*
312
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
313
+ *
314
+ * Licensed under EUPL, Version 1.2 (the "License");
315
+ * you may not use this file except in compliance with the License.
316
+ * You may obtain a copy of the License at
317
+ *
318
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
319
+ *
320
+ * Unless required by applicable law or agreed to in writing, software
321
+ * distributed under the License is distributed on an "AS IS" basis,
322
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
323
+ * See the License for the specific language governing permissions and
324
+ * limitations under the License.
325
+ */
326
+ var DossierManagementUploadComponent = /** @class */ (function () {
327
+ function DossierManagementUploadComponent(documentService, translateService, menuService) {
328
+ this.documentService = documentService;
329
+ this.translateService = translateService;
330
+ this.menuService = menuService;
331
+ this.definitionUploaded = new core.EventEmitter();
332
+ this.clear$ = new rxjs.Subject();
333
+ this.jsonString$ = new rxjs.BehaviorSubject('');
334
+ this.error$ = new rxjs.BehaviorSubject('');
335
+ this.disabled$ = new rxjs.BehaviorSubject(false);
336
+ this.file$ = new rxjs.BehaviorSubject(undefined);
337
+ }
338
+ DossierManagementUploadComponent.prototype.ngAfterViewInit = function () {
339
+ this.openShowSubscription();
340
+ this.openFileSubscription();
341
+ };
342
+ DossierManagementUploadComponent.prototype.ngOnDestroy = function () {
343
+ this.showSubscription.unsubscribe();
344
+ this.fileSubscription.unsubscribe();
345
+ this.closeErrorSubscription();
346
+ };
347
+ DossierManagementUploadComponent.prototype.setFile = function (file) {
348
+ this.clearError();
349
+ this.file$.next(file);
350
+ };
351
+ DossierManagementUploadComponent.prototype.uploadDefinition = function () {
352
+ var _this = this;
353
+ this.disable();
354
+ this.jsonString$
355
+ .pipe(operators.switchMap(function (jsonString) { return _this.documentService
356
+ .createDocumentDefinition(new document$1.DocumentDefinitionCreateRequest(jsonString))
357
+ .pipe(operators.tap(
358
+ // success
359
+ function () {
360
+ _this.closeErrorSubscription();
361
+ _this.clearError();
362
+ _this.enable();
363
+ _this.hideModal();
364
+ _this.menuService.reload();
365
+ _this.definitionUploaded.emit();
366
+ },
367
+ // error
368
+ function () {
369
+ _this.openErrorSubscription('dropzone.error.invalidDocDef');
370
+ _this.enable();
371
+ })); }), operators.take(1))
372
+ .subscribe();
373
+ };
374
+ DossierManagementUploadComponent.prototype.openErrorSubscription = function (errorCode) {
375
+ var _this = this;
376
+ this.closeErrorSubscription();
377
+ this.errorSubscription = this.translateService.stream(errorCode).subscribe(function (error) {
378
+ _this.error$.next(error);
379
+ });
380
+ };
381
+ DossierManagementUploadComponent.prototype.closeErrorSubscription = function () {
382
+ if (this.errorSubscription) {
383
+ this.errorSubscription.unsubscribe();
384
+ }
385
+ };
386
+ DossierManagementUploadComponent.prototype.clearError = function () {
387
+ this.error$.next('');
388
+ };
389
+ DossierManagementUploadComponent.prototype.openFileSubscription = function () {
390
+ var _this = this;
391
+ this.fileSubscription = this.file$.subscribe(function (file) {
392
+ if (file) {
393
+ var reader_1 = new FileReader();
394
+ reader_1.onloadend = function () {
395
+ var result = reader_1.result.toString();
396
+ if (_this.stringIsValidJson(result)) {
397
+ _this.jsonString$.next(result);
398
+ }
399
+ };
400
+ reader_1.readAsText(file);
401
+ }
402
+ else {
403
+ _this.clearJsonString();
404
+ }
405
+ });
406
+ };
407
+ DossierManagementUploadComponent.prototype.openShowSubscription = function () {
408
+ var _this = this;
409
+ this.showSubscription = this.show$.subscribe(function (show) {
410
+ if (show) {
411
+ _this.showModal();
412
+ }
413
+ else {
414
+ _this.hideModal();
415
+ }
416
+ _this.clearJsonString();
417
+ _this.clearError();
418
+ _this.clearDropzone();
419
+ });
420
+ };
421
+ DossierManagementUploadComponent.prototype.clearJsonString = function () {
422
+ this.jsonString$.next('');
423
+ };
424
+ DossierManagementUploadComponent.prototype.clearDropzone = function () {
425
+ this.clear$.next();
426
+ };
427
+ DossierManagementUploadComponent.prototype.showModal = function () {
428
+ this.modal.show();
429
+ };
430
+ DossierManagementUploadComponent.prototype.hideModal = function () {
431
+ this.modal.hide();
432
+ };
433
+ DossierManagementUploadComponent.prototype.stringIsValidJson = function (string) {
434
+ try {
435
+ JSON.parse(string);
436
+ }
437
+ catch (e) {
438
+ return false;
439
+ }
440
+ return true;
441
+ };
442
+ DossierManagementUploadComponent.prototype.disable = function () {
443
+ this.disabled$.next(true);
444
+ };
445
+ DossierManagementUploadComponent.prototype.enable = function () {
446
+ this.disabled$.next(false);
447
+ };
448
+ return DossierManagementUploadComponent;
449
+ }());
450
+ DossierManagementUploadComponent.decorators = [
451
+ { type: core.Component, args: [{
452
+ selector: 'valtimo-dossier-management-upload',
453
+ template: "<valtimo-modal\n #uploadDefinitionModal\n [title]=\"'Upload document definition' | translate\"\n showFooter=\"true\"\n>\n <div class=\"mt-2\" body>\n <valtimo-dropzone\n [clear$]=\"clear$\"\n (fileSelected)=\"setFile($event)\"\n [disabled]=\"disabled$ | async\"\n [subtitle]=\"'dropzone.jsonDocDef' | translate\"\n [externalError$]=\"error$\"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf=\"(jsonString$ | async) && !(error$ | async); else pleaseSelect\">\n <button [disabled]=\"disabled$ | async\" class=\"btn btn-primary\" (click)=\"uploadDefinition()\">\n {{ 'Upload' | translate }}\n </button>\n </ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #pleaseSelect>\n <button class=\"btn btn-primary\" [disabled]=\"true\">\n {{ 'Select a document definition' | translate }}\n </button>\n</ng-template>\n",
454
+ styles: [""]
455
+ },] }
456
+ ];
457
+ DossierManagementUploadComponent.ctorParameters = function () { return [
458
+ { type: document$1.DocumentService },
459
+ { type: core$1.TranslateService },
460
+ { type: components.MenuService }
461
+ ]; };
462
+ DossierManagementUploadComponent.propDecorators = {
463
+ show$: [{ type: core.Input }],
464
+ definitionUploaded: [{ type: core.Output }],
465
+ modal: [{ type: core.ViewChild, args: ['uploadDefinitionModal',] }]
466
466
  };
467
467
 
468
- /*
469
- * Copyright 2015-2020 Ritense BV, the Netherlands.
470
- *
471
- * Licensed under EUPL, Version 1.2 (the "License");
472
- * you may not use this file except in compliance with the License.
473
- * You may obtain a copy of the License at
474
- *
475
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
476
- *
477
- * Unless required by applicable law or agreed to in writing, software
478
- * distributed under the License is distributed on an "AS IS" basis,
479
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
480
- * See the License for the specific language governing permissions and
481
- * limitations under the License.
482
- */
483
- var DossierManagementRemoveModalComponent = /** @class */ (function () {
484
- function DossierManagementRemoveModalComponent(documentService, toasterService, router, translateService, menuService) {
485
- this.documentService = documentService;
486
- this.toasterService = toasterService;
487
- this.router = router;
488
- this.translateService = translateService;
489
- this.menuService = menuService;
490
- this.documentDefinition = null;
491
- this.errors = [];
492
- }
493
- DossierManagementRemoveModalComponent.prototype.openModal = function (documentDefinition) {
494
- this.documentDefinition = documentDefinition;
495
- this.modal.show();
496
- };
497
- DossierManagementRemoveModalComponent.prototype.removeDocumentDefinition = function () {
498
- var _this = this;
499
- this.documentService.removeDocumentDefinition(this.documentDefinition.id.name).subscribe(function () {
500
- _this.menuService.reload();
501
- _this.router.navigate(['/dossier-management']);
502
- _this.toasterService.success(_this.translateService.instant('remove-document-definition-success'));
503
- }, function (result) {
504
- _this.errors = result.errors;
505
- });
506
- };
507
- return DossierManagementRemoveModalComponent;
508
- }());
509
- DossierManagementRemoveModalComponent.decorators = [
510
- { type: core.Component, args: [{
511
- selector: 'valtimo-dossier-management-remove-modal',
512
- 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<valtimo-modal\n #documentDefinitionRemoveModal\n elementId=\"documentDefinitionRemoveModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"{{ 'Remove document definition' | translate }}\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <div class=\"alert alert-contrast alert-danger mt-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div\n class=\"message\"\n [innerHTML]=\"'remove-document-definition-confirmation' | translate\"\n ></div>\n </div>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n </div>\n <div footer>\n <button (click)=\"removeDocumentDefinition()\" class=\"btn btn-primary\" data-dismiss=\"modal\">\n {{ 'remove-document-definition-confirmation-button' | translate }}\n </button>\n </div>\n</valtimo-modal>\n",
513
- styles: ["/*!\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 */"]
514
- },] }
515
- ];
516
- DossierManagementRemoveModalComponent.ctorParameters = function () { return [
517
- { type: document$1.DocumentService },
518
- { type: ngxToastr.ToastrService },
519
- { type: router.Router },
520
- { type: core$1.TranslateService },
521
- { type: components.MenuService }
522
- ]; };
523
- DossierManagementRemoveModalComponent.propDecorators = {
524
- modal: [{ type: core.ViewChild, args: ['documentDefinitionRemoveModal',] }]
468
+ /*
469
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
470
+ *
471
+ * Licensed under EUPL, Version 1.2 (the "License");
472
+ * you may not use this file except in compliance with the License.
473
+ * You may obtain a copy of the License at
474
+ *
475
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
476
+ *
477
+ * Unless required by applicable law or agreed to in writing, software
478
+ * distributed under the License is distributed on an "AS IS" basis,
479
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
480
+ * See the License for the specific language governing permissions and
481
+ * limitations under the License.
482
+ */
483
+ var DossierManagementRemoveModalComponent = /** @class */ (function () {
484
+ function DossierManagementRemoveModalComponent(documentService, toasterService, router, translateService, menuService) {
485
+ this.documentService = documentService;
486
+ this.toasterService = toasterService;
487
+ this.router = router;
488
+ this.translateService = translateService;
489
+ this.menuService = menuService;
490
+ this.documentDefinition = null;
491
+ this.errors = [];
492
+ }
493
+ DossierManagementRemoveModalComponent.prototype.openModal = function (documentDefinition) {
494
+ this.documentDefinition = documentDefinition;
495
+ this.modal.show();
496
+ };
497
+ DossierManagementRemoveModalComponent.prototype.removeDocumentDefinition = function () {
498
+ var _this = this;
499
+ this.documentService.removeDocumentDefinition(this.documentDefinition.id.name).subscribe(function () {
500
+ _this.menuService.reload();
501
+ _this.router.navigate(['/dossier-management']);
502
+ _this.toasterService.success(_this.translateService.instant('remove-document-definition-success'));
503
+ }, function (result) {
504
+ _this.errors = result.errors;
505
+ });
506
+ };
507
+ return DossierManagementRemoveModalComponent;
508
+ }());
509
+ DossierManagementRemoveModalComponent.decorators = [
510
+ { type: core.Component, args: [{
511
+ selector: 'valtimo-dossier-management-remove-modal',
512
+ 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<valtimo-modal\n #documentDefinitionRemoveModal\n elementId=\"documentDefinitionRemoveModal\"\n [title]=\"documentDefinition ? documentDefinition.schema.title : 'Document definition'\"\n subtitle=\"{{ 'Remove document definition' | translate }}\"\n showFooter=\"true\"\n>\n <div body *ngIf=\"documentDefinition\">\n <div class=\"alert alert-contrast alert-danger mt-2\" role=\"alert\">\n <div class=\"icon\"><span class=\"mdi mdi-alert-triangle\"></span></div>\n <div\n class=\"message\"\n [innerHTML]=\"'remove-document-definition-confirmation' | translate\"\n ></div>\n </div>\n <div *ngIf=\"errors.length > 0\" class=\"alert alert-danger pt-5 pb-5 mb-2\">\n <ol>\n <li *ngFor=\"let error of errors\">\n {{ error }}\n </li>\n </ol>\n </div>\n </div>\n <div footer>\n <button (click)=\"removeDocumentDefinition()\" class=\"btn btn-primary\" data-dismiss=\"modal\">\n {{ 'remove-document-definition-confirmation-button' | translate }}\n </button>\n </div>\n</valtimo-modal>\n",
513
+ styles: ["/*!\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 */"]
514
+ },] }
515
+ ];
516
+ DossierManagementRemoveModalComponent.ctorParameters = function () { return [
517
+ { type: document$1.DocumentService },
518
+ { type: ngxToastr.ToastrService },
519
+ { type: router.Router },
520
+ { type: core$1.TranslateService },
521
+ { type: components.MenuService }
522
+ ]; };
523
+ DossierManagementRemoveModalComponent.propDecorators = {
524
+ modal: [{ type: core.ViewChild, args: ['documentDefinitionRemoveModal',] }]
525
525
  };
526
526
 
527
- /*
528
- * Copyright 2015-2020 Ritense BV, the Netherlands.
529
- *
530
- * Licensed under EUPL, Version 1.2 (the "License");
531
- * you may not use this file except in compliance with the License.
532
- * You may obtain a copy of the License at
533
- *
534
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
535
- *
536
- * Unless required by applicable law or agreed to in writing, software
537
- * distributed under the License is distributed on an "AS IS" basis,
538
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
539
- * See the License for the specific language governing permissions and
540
- * limitations under the License.
541
- */
542
- var DossierManagementModule = /** @class */ (function () {
543
- function DossierManagementModule() {
544
- }
545
- return DossierManagementModule;
546
- }());
547
- DossierManagementModule.decorators = [
548
- { type: core.NgModule, args: [{
549
- declarations: [
550
- DossierManagementListComponent,
551
- DossierManagementDetailComponent,
552
- DossierManagementConnectModalComponent,
553
- DossierManagementRemoveModalComponent,
554
- DossierManagementUploadComponent,
555
- ],
556
- imports: [
557
- common.CommonModule,
558
- components.WidgetModule,
559
- components.DropzoneModule,
560
- components.ListModule,
561
- DossierManagementRoutingModule,
562
- forms.FormsModule,
563
- core$1.TranslateModule,
564
- components.ModalModule,
565
- config.ConfigModule,
566
- ngBootstrap.NgbTooltipModule,
567
- ],
568
- exports: [],
569
- entryComponents: [config.ExtensionComponent],
570
- },] }
527
+ /*
528
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
529
+ *
530
+ * Licensed under EUPL, Version 1.2 (the "License");
531
+ * you may not use this file except in compliance with the License.
532
+ * You may obtain a copy of the License at
533
+ *
534
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
535
+ *
536
+ * Unless required by applicable law or agreed to in writing, software
537
+ * distributed under the License is distributed on an "AS IS" basis,
538
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
539
+ * See the License for the specific language governing permissions and
540
+ * limitations under the License.
541
+ */
542
+ var DossierManagementModule = /** @class */ (function () {
543
+ function DossierManagementModule() {
544
+ }
545
+ return DossierManagementModule;
546
+ }());
547
+ DossierManagementModule.decorators = [
548
+ { type: core.NgModule, args: [{
549
+ declarations: [
550
+ DossierManagementListComponent,
551
+ DossierManagementDetailComponent,
552
+ DossierManagementConnectModalComponent,
553
+ DossierManagementRemoveModalComponent,
554
+ DossierManagementUploadComponent,
555
+ ],
556
+ imports: [
557
+ common.CommonModule,
558
+ components.WidgetModule,
559
+ components.DropzoneModule,
560
+ components.ListModule,
561
+ DossierManagementRoutingModule,
562
+ forms.FormsModule,
563
+ core$1.TranslateModule,
564
+ components.ModalModule,
565
+ config.ConfigModule,
566
+ ngBootstrap.NgbTooltipModule,
567
+ ],
568
+ exports: [],
569
+ entryComponents: [config.ExtensionComponent],
570
+ },] }
571
571
  ];
572
572
 
573
- /*
574
- * Copyright 2015-2020 Ritense BV, the Netherlands.
575
- *
576
- * Licensed under EUPL, Version 1.2 (the "License");
577
- * you may not use this file except in compliance with the License.
578
- * You may obtain a copy of the License at
579
- *
580
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
581
- *
582
- * Unless required by applicable law or agreed to in writing, software
583
- * distributed under the License is distributed on an "AS IS" basis,
584
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
585
- * See the License for the specific language governing permissions and
586
- * limitations under the License.
573
+ /*
574
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
575
+ *
576
+ * Licensed under EUPL, Version 1.2 (the "License");
577
+ * you may not use this file except in compliance with the License.
578
+ * You may obtain a copy of the License at
579
+ *
580
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
581
+ *
582
+ * Unless required by applicable law or agreed to in writing, software
583
+ * distributed under the License is distributed on an "AS IS" basis,
584
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
585
+ * See the License for the specific language governing permissions and
586
+ * limitations under the License.
587
587
  */
588
588
 
589
- /**
590
- * Generated bundle index. Do not edit.
589
+ /**
590
+ * Generated bundle index. Do not edit.
591
591
  */
592
592
 
593
593
  exports.DossierManagementListComponent = DossierManagementListComponent;