@valtimo/dossier-management 4.23.0 → 5.0.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.
- package/esm2020/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.mjs +92 -0
- package/esm2020/lib/dossier-management-detail/dossier-management-detail.component.mjs +102 -0
- package/esm2020/lib/dossier-management-list/dossier-management-list.component.mjs +76 -0
- package/esm2020/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.mjs +57 -0
- package/esm2020/lib/dossier-management-roles/dossier-management-roles.component.mjs +97 -0
- package/esm2020/lib/dossier-management-routing.module.mjs +51 -0
- package/esm2020/lib/dossier-management-upload/dossier-management-upload.component.mjs +157 -0
- package/esm2020/lib/dossier-management.module.mjs +90 -0
- package/esm2020/public-api.mjs +21 -0
- package/esm2020/valtimo-dossier-management.mjs +5 -0
- package/fesm2015/valtimo-dossier-management.mjs +691 -0
- package/fesm2015/valtimo-dossier-management.mjs.map +1 -0
- package/fesm2020/valtimo-dossier-management.mjs +691 -0
- package/fesm2020/valtimo-dossier-management.mjs.map +1 -0
- package/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.d.ts +4 -0
- package/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.d.ts.map +1 -0
- package/lib/dossier-management-detail/dossier-management-detail.component.d.ts +4 -0
- package/lib/dossier-management-detail/dossier-management-detail.component.d.ts.map +1 -0
- package/lib/dossier-management-list/dossier-management-list.component.d.ts +4 -0
- package/lib/dossier-management-list/dossier-management-list.component.d.ts.map +1 -0
- package/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.d.ts +4 -0
- package/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.d.ts.map +1 -0
- package/lib/dossier-management-roles/dossier-management-roles.component.d.ts +5 -1
- package/lib/dossier-management-roles/dossier-management-roles.component.d.ts.map +1 -0
- package/lib/dossier-management-routing.module.d.ts +6 -0
- package/lib/dossier-management-routing.module.d.ts.map +1 -0
- package/lib/dossier-management-upload/dossier-management-upload.component.d.ts +4 -0
- package/lib/dossier-management-upload/dossier-management-upload.component.d.ts.map +1 -0
- package/lib/dossier-management.module.d.ts +18 -0
- package/lib/dossier-management.module.d.ts.map +1 -0
- package/package.json +22 -10
- package/public-api.d.ts +1 -0
- package/public-api.d.ts.map +1 -0
- package/valtimo-dossier-management.d.ts +2 -6
- package/valtimo-dossier-management.d.ts.map +1 -0
- package/bundles/valtimo-dossier-management.umd.js +0 -708
- package/bundles/valtimo-dossier-management.umd.js.map +0 -1
- package/bundles/valtimo-dossier-management.umd.min.js +0 -2
- package/bundles/valtimo-dossier-management.umd.min.js.map +0 -1
- package/esm2015/lib/dossier-management-connect-modal/dossier-management-connect-modal.component.js +0 -92
- package/esm2015/lib/dossier-management-detail/dossier-management-detail.component.js +0 -99
- package/esm2015/lib/dossier-management-list/dossier-management-list.component.js +0 -78
- package/esm2015/lib/dossier-management-remove-modal/dossier-management-remove-modal.component.js +0 -63
- package/esm2015/lib/dossier-management-roles/dossier-management-roles.component.js +0 -103
- package/esm2015/lib/dossier-management-routing.module.js +0 -47
- package/esm2015/lib/dossier-management-upload/dossier-management-upload.component.js +0 -158
- package/esm2015/lib/dossier-management.module.js +0 -59
- package/esm2015/public-api.js +0 -21
- package/esm2015/valtimo-dossier-management.js +0 -11
- package/fesm2015/valtimo-dossier-management.js +0 -682
- package/fesm2015/valtimo-dossier-management.js.map +0 -1
- package/valtimo-dossier-management.metadata.json +0 -1
|
@@ -1,708 +0,0 @@
|
|
|
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('rxjs/operators'), require('@ng-bootstrap/ng-bootstrap'), require('@valtimo/authority'), require('lodash')) :
|
|
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', '@valtimo/authority', 'lodash'], 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, global.authority, global.lodash));
|
|
5
|
-
}(this, (function (exports, common, core, forms, core$1, components, config, document$1, process, ngxToastr, router, moment_, rxjs, security, operators, ngBootstrap, authority, lodash) { 'use strict';
|
|
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\">{{ 'dossierManagement.selectProcessDef' | translate }}</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
|
-
};
|
|
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 mr-1\"></i>\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 mr-1\"></i>\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\">{{\n 'dossierManagement.readonly' | translate\n }}</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>{{ 'dossierManagement.connectedProcesses' | translate }}</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=\"icon mdi mdi-delete mr-1\"></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 mr-1\"></i\n >{{ 'dossierManagement.connectProcess' | translate }}\n </button>\n </div>\n <valtimo-dossier-management-roles [documentDefinitionName]=\"documentDefinitionName\">\n </valtimo-dossier-management-roles>\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
|
-
documentRoles: [{ type: core.ViewChild, args: ['documentRoles',] }]
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
/*
|
|
195
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
196
|
-
*
|
|
197
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
198
|
-
* you may not use this file except in compliance with the License.
|
|
199
|
-
* You may obtain a copy of the License at
|
|
200
|
-
*
|
|
201
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
202
|
-
*
|
|
203
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
204
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
205
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
206
|
-
* See the License for the specific language governing permissions and
|
|
207
|
-
* limitations under the License.
|
|
208
|
-
*/
|
|
209
|
-
var moment = moment_;
|
|
210
|
-
moment.locale(localStorage.getItem('langKey') || '');
|
|
211
|
-
var DossierManagementListComponent = /** @class */ (function () {
|
|
212
|
-
function DossierManagementListComponent(documentService, router) {
|
|
213
|
-
this.documentService = documentService;
|
|
214
|
-
this.router = router;
|
|
215
|
-
this.dossiers = [];
|
|
216
|
-
this.pagination = {
|
|
217
|
-
collectionSize: 0,
|
|
218
|
-
page: 1,
|
|
219
|
-
size: 10,
|
|
220
|
-
maxPaginationItemSize: 5,
|
|
221
|
-
};
|
|
222
|
-
this.pageParam = 0;
|
|
223
|
-
this.dossierFields = [
|
|
224
|
-
{ key: 'schema.title', label: 'Title' },
|
|
225
|
-
{ key: 'createdOn', label: 'Created On' },
|
|
226
|
-
{ key: 'readOnly', label: 'Read-only' },
|
|
227
|
-
];
|
|
228
|
-
this.showModal$ = new rxjs.BehaviorSubject(false);
|
|
229
|
-
}
|
|
230
|
-
DossierManagementListComponent.prototype.paginationClicked = function (page) {
|
|
231
|
-
this.pageParam = page - 1;
|
|
232
|
-
this.getDocumentDefinitions();
|
|
233
|
-
};
|
|
234
|
-
DossierManagementListComponent.prototype.paginationSet = function () {
|
|
235
|
-
this.getDocumentDefinitions();
|
|
236
|
-
};
|
|
237
|
-
DossierManagementListComponent.prototype.redirectToDetails = function (documentDefinition) {
|
|
238
|
-
this.router.navigate(['/dossier-management/dossier', documentDefinition.id.name]);
|
|
239
|
-
};
|
|
240
|
-
DossierManagementListComponent.prototype.getDocumentDefinitions = function () {
|
|
241
|
-
var _this = this;
|
|
242
|
-
this.documentService
|
|
243
|
-
.queryDefinitions({ filteredOnRole: false, page: this.pageParam, size: this.pagination.size })
|
|
244
|
-
.subscribe(function (documentDefinitionPage) {
|
|
245
|
-
_this.pagination.collectionSize = documentDefinitionPage.totalElements;
|
|
246
|
-
_this.dossiers = documentDefinitionPage.content;
|
|
247
|
-
_this.dossiers.map(function (dossier) {
|
|
248
|
-
dossier.createdOn = moment(dossier.createdOn).format('DD MMM YYYY HH:mm');
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
};
|
|
252
|
-
DossierManagementListComponent.prototype.showModal = function () {
|
|
253
|
-
this.showModal$.next(true);
|
|
254
|
-
};
|
|
255
|
-
return DossierManagementListComponent;
|
|
256
|
-
}());
|
|
257
|
-
DossierManagementListComponent.decorators = [
|
|
258
|
-
{ type: core.Component, args: [{
|
|
259
|
-
selector: 'valtimo-dossier-management-list',
|
|
260
|
-
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 mr-1\"></i>\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",
|
|
261
|
-
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 */"]
|
|
262
|
-
},] }
|
|
263
|
-
];
|
|
264
|
-
DossierManagementListComponent.ctorParameters = function () { return [
|
|
265
|
-
{ type: document$1.DocumentService },
|
|
266
|
-
{ type: router.Router }
|
|
267
|
-
]; };
|
|
268
|
-
|
|
269
|
-
/*
|
|
270
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
271
|
-
*
|
|
272
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
273
|
-
* you may not use this file except in compliance with the License.
|
|
274
|
-
* You may obtain a copy of the License at
|
|
275
|
-
*
|
|
276
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
277
|
-
*
|
|
278
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
279
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
280
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
281
|
-
* See the License for the specific language governing permissions and
|
|
282
|
-
* limitations under the License.
|
|
283
|
-
*/
|
|
284
|
-
var ɵ0 = { title: 'Dossiers', roles: [config.ROLE_ADMIN] }, ɵ1 = { title: 'Dossier details', roles: [config.ROLE_ADMIN] };
|
|
285
|
-
var routes = [
|
|
286
|
-
{
|
|
287
|
-
path: 'dossier-management',
|
|
288
|
-
component: DossierManagementListComponent,
|
|
289
|
-
canActivate: [security.AuthGuardService],
|
|
290
|
-
data: ɵ0,
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
path: 'dossier-management/dossier/:name',
|
|
294
|
-
component: DossierManagementDetailComponent,
|
|
295
|
-
canActivate: [security.AuthGuardService],
|
|
296
|
-
data: ɵ1,
|
|
297
|
-
},
|
|
298
|
-
];
|
|
299
|
-
var DossierManagementRoutingModule = /** @class */ (function () {
|
|
300
|
-
function DossierManagementRoutingModule() {
|
|
301
|
-
}
|
|
302
|
-
return DossierManagementRoutingModule;
|
|
303
|
-
}());
|
|
304
|
-
DossierManagementRoutingModule.decorators = [
|
|
305
|
-
{ type: core.NgModule, args: [{
|
|
306
|
-
imports: [router.RouterModule.forRoot(routes)],
|
|
307
|
-
exports: [router.RouterModule],
|
|
308
|
-
declarations: [],
|
|
309
|
-
},] }
|
|
310
|
-
];
|
|
311
|
-
|
|
312
|
-
/*
|
|
313
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
314
|
-
*
|
|
315
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
316
|
-
* you may not use this file except in compliance with the License.
|
|
317
|
-
* You may obtain a copy of the License at
|
|
318
|
-
*
|
|
319
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
320
|
-
*
|
|
321
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
322
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
323
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
324
|
-
* See the License for the specific language governing permissions and
|
|
325
|
-
* limitations under the License.
|
|
326
|
-
*/
|
|
327
|
-
var DossierManagementUploadComponent = /** @class */ (function () {
|
|
328
|
-
function DossierManagementUploadComponent(documentService, translateService, menuService) {
|
|
329
|
-
this.documentService = documentService;
|
|
330
|
-
this.translateService = translateService;
|
|
331
|
-
this.menuService = menuService;
|
|
332
|
-
this.definitionUploaded = new core.EventEmitter();
|
|
333
|
-
this.clear$ = new rxjs.Subject();
|
|
334
|
-
this.jsonString$ = new rxjs.BehaviorSubject('');
|
|
335
|
-
this.error$ = new rxjs.BehaviorSubject('');
|
|
336
|
-
this.disabled$ = new rxjs.BehaviorSubject(false);
|
|
337
|
-
this.file$ = new rxjs.BehaviorSubject(undefined);
|
|
338
|
-
}
|
|
339
|
-
DossierManagementUploadComponent.prototype.ngAfterViewInit = function () {
|
|
340
|
-
this.openShowSubscription();
|
|
341
|
-
this.openFileSubscription();
|
|
342
|
-
};
|
|
343
|
-
DossierManagementUploadComponent.prototype.ngOnDestroy = function () {
|
|
344
|
-
this.showSubscription.unsubscribe();
|
|
345
|
-
this.fileSubscription.unsubscribe();
|
|
346
|
-
this.closeErrorSubscription();
|
|
347
|
-
};
|
|
348
|
-
DossierManagementUploadComponent.prototype.setFile = function (file) {
|
|
349
|
-
this.clearError();
|
|
350
|
-
this.file$.next(file);
|
|
351
|
-
};
|
|
352
|
-
DossierManagementUploadComponent.prototype.uploadDefinition = function () {
|
|
353
|
-
var _this = this;
|
|
354
|
-
this.disable();
|
|
355
|
-
this.jsonString$
|
|
356
|
-
.pipe(operators.switchMap(function (jsonString) { return _this.documentService
|
|
357
|
-
.createDocumentDefinition(new document$1.DocumentDefinitionCreateRequest(jsonString))
|
|
358
|
-
.pipe(operators.tap(
|
|
359
|
-
// success
|
|
360
|
-
function () {
|
|
361
|
-
_this.closeErrorSubscription();
|
|
362
|
-
_this.clearError();
|
|
363
|
-
_this.enable();
|
|
364
|
-
_this.hideModal();
|
|
365
|
-
_this.menuService.reload();
|
|
366
|
-
_this.definitionUploaded.emit();
|
|
367
|
-
},
|
|
368
|
-
// error
|
|
369
|
-
function () {
|
|
370
|
-
_this.openErrorSubscription('dropzone.error.invalidDocDef');
|
|
371
|
-
_this.enable();
|
|
372
|
-
})); }), operators.take(1))
|
|
373
|
-
.subscribe();
|
|
374
|
-
};
|
|
375
|
-
DossierManagementUploadComponent.prototype.openErrorSubscription = function (errorCode) {
|
|
376
|
-
var _this = this;
|
|
377
|
-
this.closeErrorSubscription();
|
|
378
|
-
this.errorSubscription = this.translateService.stream(errorCode).subscribe(function (error) {
|
|
379
|
-
_this.error$.next(error);
|
|
380
|
-
});
|
|
381
|
-
};
|
|
382
|
-
DossierManagementUploadComponent.prototype.closeErrorSubscription = function () {
|
|
383
|
-
if (this.errorSubscription) {
|
|
384
|
-
this.errorSubscription.unsubscribe();
|
|
385
|
-
}
|
|
386
|
-
};
|
|
387
|
-
DossierManagementUploadComponent.prototype.clearError = function () {
|
|
388
|
-
this.error$.next('');
|
|
389
|
-
};
|
|
390
|
-
DossierManagementUploadComponent.prototype.openFileSubscription = function () {
|
|
391
|
-
var _this = this;
|
|
392
|
-
this.fileSubscription = this.file$.subscribe(function (file) {
|
|
393
|
-
if (file) {
|
|
394
|
-
var reader_1 = new FileReader();
|
|
395
|
-
reader_1.onloadend = function () {
|
|
396
|
-
var result = reader_1.result.toString();
|
|
397
|
-
if (_this.stringIsValidJson(result)) {
|
|
398
|
-
_this.jsonString$.next(result);
|
|
399
|
-
}
|
|
400
|
-
};
|
|
401
|
-
reader_1.readAsText(file);
|
|
402
|
-
}
|
|
403
|
-
else {
|
|
404
|
-
_this.clearJsonString();
|
|
405
|
-
}
|
|
406
|
-
});
|
|
407
|
-
};
|
|
408
|
-
DossierManagementUploadComponent.prototype.openShowSubscription = function () {
|
|
409
|
-
var _this = this;
|
|
410
|
-
this.showSubscription = this.show$.subscribe(function (show) {
|
|
411
|
-
if (show) {
|
|
412
|
-
_this.showModal();
|
|
413
|
-
}
|
|
414
|
-
else {
|
|
415
|
-
_this.hideModal();
|
|
416
|
-
}
|
|
417
|
-
_this.clearJsonString();
|
|
418
|
-
_this.clearError();
|
|
419
|
-
_this.clearDropzone();
|
|
420
|
-
});
|
|
421
|
-
};
|
|
422
|
-
DossierManagementUploadComponent.prototype.clearJsonString = function () {
|
|
423
|
-
this.jsonString$.next('');
|
|
424
|
-
};
|
|
425
|
-
DossierManagementUploadComponent.prototype.clearDropzone = function () {
|
|
426
|
-
this.clear$.next();
|
|
427
|
-
};
|
|
428
|
-
DossierManagementUploadComponent.prototype.showModal = function () {
|
|
429
|
-
this.modal.show();
|
|
430
|
-
};
|
|
431
|
-
DossierManagementUploadComponent.prototype.hideModal = function () {
|
|
432
|
-
this.modal.hide();
|
|
433
|
-
};
|
|
434
|
-
DossierManagementUploadComponent.prototype.stringIsValidJson = function (string) {
|
|
435
|
-
try {
|
|
436
|
-
JSON.parse(string);
|
|
437
|
-
}
|
|
438
|
-
catch (e) {
|
|
439
|
-
return false;
|
|
440
|
-
}
|
|
441
|
-
return true;
|
|
442
|
-
};
|
|
443
|
-
DossierManagementUploadComponent.prototype.disable = function () {
|
|
444
|
-
this.disabled$.next(true);
|
|
445
|
-
};
|
|
446
|
-
DossierManagementUploadComponent.prototype.enable = function () {
|
|
447
|
-
this.disabled$.next(false);
|
|
448
|
-
};
|
|
449
|
-
return DossierManagementUploadComponent;
|
|
450
|
-
}());
|
|
451
|
-
DossierManagementUploadComponent.decorators = [
|
|
452
|
-
{ type: core.Component, args: [{
|
|
453
|
-
selector: 'valtimo-dossier-management-upload',
|
|
454
|
-
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 <i class=\"icon mdi mdi-upload mr-1\"></i>\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",
|
|
455
|
-
styles: [""]
|
|
456
|
-
},] }
|
|
457
|
-
];
|
|
458
|
-
DossierManagementUploadComponent.ctorParameters = function () { return [
|
|
459
|
-
{ type: document$1.DocumentService },
|
|
460
|
-
{ type: core$1.TranslateService },
|
|
461
|
-
{ type: components.MenuService }
|
|
462
|
-
]; };
|
|
463
|
-
DossierManagementUploadComponent.propDecorators = {
|
|
464
|
-
show$: [{ type: core.Input }],
|
|
465
|
-
definitionUploaded: [{ type: core.Output }],
|
|
466
|
-
modal: [{ type: core.ViewChild, args: ['uploadDefinitionModal',] }]
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
/*
|
|
470
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
471
|
-
*
|
|
472
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
473
|
-
* you may not use this file except in compliance with the License.
|
|
474
|
-
* You may obtain a copy of the License at
|
|
475
|
-
*
|
|
476
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
477
|
-
*
|
|
478
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
479
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
480
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
481
|
-
* See the License for the specific language governing permissions and
|
|
482
|
-
* limitations under the License.
|
|
483
|
-
*/
|
|
484
|
-
var DossierManagementRemoveModalComponent = /** @class */ (function () {
|
|
485
|
-
function DossierManagementRemoveModalComponent(documentService, toasterService, router, translateService, menuService) {
|
|
486
|
-
this.documentService = documentService;
|
|
487
|
-
this.toasterService = toasterService;
|
|
488
|
-
this.router = router;
|
|
489
|
-
this.translateService = translateService;
|
|
490
|
-
this.menuService = menuService;
|
|
491
|
-
this.documentDefinition = null;
|
|
492
|
-
this.errors = [];
|
|
493
|
-
}
|
|
494
|
-
DossierManagementRemoveModalComponent.prototype.openModal = function (documentDefinition) {
|
|
495
|
-
this.documentDefinition = documentDefinition;
|
|
496
|
-
this.modal.show();
|
|
497
|
-
};
|
|
498
|
-
DossierManagementRemoveModalComponent.prototype.removeDocumentDefinition = function () {
|
|
499
|
-
var _this = this;
|
|
500
|
-
this.documentService.removeDocumentDefinition(this.documentDefinition.id.name).subscribe(function () {
|
|
501
|
-
_this.menuService.reload();
|
|
502
|
-
_this.router.navigate(['/dossier-management']);
|
|
503
|
-
_this.toasterService.success(_this.translateService.instant('remove-document-definition-success'));
|
|
504
|
-
}, function (result) {
|
|
505
|
-
_this.errors = result.errors;
|
|
506
|
-
});
|
|
507
|
-
};
|
|
508
|
-
return DossierManagementRemoveModalComponent;
|
|
509
|
-
}());
|
|
510
|
-
DossierManagementRemoveModalComponent.decorators = [
|
|
511
|
-
{ type: core.Component, args: [{
|
|
512
|
-
selector: 'valtimo-dossier-management-remove-modal',
|
|
513
|
-
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",
|
|
514
|
-
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 */"]
|
|
515
|
-
},] }
|
|
516
|
-
];
|
|
517
|
-
DossierManagementRemoveModalComponent.ctorParameters = function () { return [
|
|
518
|
-
{ type: document$1.DocumentService },
|
|
519
|
-
{ type: ngxToastr.ToastrService },
|
|
520
|
-
{ type: router.Router },
|
|
521
|
-
{ type: core$1.TranslateService },
|
|
522
|
-
{ type: components.MenuService }
|
|
523
|
-
]; };
|
|
524
|
-
DossierManagementRemoveModalComponent.propDecorators = {
|
|
525
|
-
modal: [{ type: core.ViewChild, args: ['documentDefinitionRemoveModal',] }]
|
|
526
|
-
};
|
|
527
|
-
|
|
528
|
-
/*
|
|
529
|
-
* Copyright 2015-2022 Ritense BV, the Netherlands.
|
|
530
|
-
*
|
|
531
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
532
|
-
* you may not use this file except in compliance with the License.
|
|
533
|
-
* You may obtain a copy of the License at
|
|
534
|
-
*
|
|
535
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
536
|
-
*
|
|
537
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
538
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
539
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
540
|
-
* See the License for the specific language governing permissions and
|
|
541
|
-
* limitations under the License.
|
|
542
|
-
*/
|
|
543
|
-
var DossierManagementRolesComponent = /** @class */ (function () {
|
|
544
|
-
function DossierManagementRolesComponent(authorityService, documentService, alertService, translateService) {
|
|
545
|
-
this.authorityService = authorityService;
|
|
546
|
-
this.documentService = documentService;
|
|
547
|
-
this.alertService = alertService;
|
|
548
|
-
this.translateService = translateService;
|
|
549
|
-
this.dropdownSettings = {
|
|
550
|
-
singleSelection: false,
|
|
551
|
-
idField: 'name',
|
|
552
|
-
textField: 'name',
|
|
553
|
-
selectAllText: 'Select All',
|
|
554
|
-
unSelectAllText: 'UnSelect All',
|
|
555
|
-
itemsShowLimit: 3,
|
|
556
|
-
enableCheckAll: true,
|
|
557
|
-
allowSearchFilter: true,
|
|
558
|
-
};
|
|
559
|
-
this.roles = new rxjs.BehaviorSubject(undefined);
|
|
560
|
-
this.preSelectedItems = new rxjs.BehaviorSubject(undefined);
|
|
561
|
-
}
|
|
562
|
-
DossierManagementRolesComponent.prototype.ngOnInit = function () {
|
|
563
|
-
this.loadAllRoles();
|
|
564
|
-
};
|
|
565
|
-
DossierManagementRolesComponent.prototype.loadAllRoles = function () {
|
|
566
|
-
var _this = this;
|
|
567
|
-
this.authorityService.query().subscribe(function (result) {
|
|
568
|
-
_this.roles.next(result.body);
|
|
569
|
-
_this.loadDocumentRoles();
|
|
570
|
-
});
|
|
571
|
-
};
|
|
572
|
-
DossierManagementRolesComponent.prototype.loadDocumentRoles = function () {
|
|
573
|
-
var _this = this;
|
|
574
|
-
if (this.documentDefinitionName) {
|
|
575
|
-
this.documentService.getDocumentRoles(this.documentDefinitionName).subscribe(function (result) {
|
|
576
|
-
_this.preSelectedItems.next(result);
|
|
577
|
-
}, function (err) {
|
|
578
|
-
_this.alertService.warning(_this.translateService.instant('dossierManagement.roles.messages.unsuccessfullyRetrievedRoles'));
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
};
|
|
582
|
-
DossierManagementRolesComponent.prototype.onSelectedItems = function (data) {
|
|
583
|
-
var _this = this;
|
|
584
|
-
var roles = this.returnArrayOfString(data);
|
|
585
|
-
if (lodash.isEqual(roles, this.preSelectedItems.value)) {
|
|
586
|
-
return;
|
|
587
|
-
}
|
|
588
|
-
this.documentService.modifyDocumentRoles(this.documentDefinitionName, roles).subscribe(function () {
|
|
589
|
-
_this.alertService.success(_this.translateService.instant('dossierManagement.roles.messages.successfullyStored'));
|
|
590
|
-
_this.preSelectedItems.next(roles);
|
|
591
|
-
}, function (err) {
|
|
592
|
-
_this.alertService.error(_this.translateService.instant('dossierManagement.roles.messages.unsuccessfullyStored'));
|
|
593
|
-
});
|
|
594
|
-
};
|
|
595
|
-
/**
|
|
596
|
-
* The data could be either an array of string (i.e. ["ROLE_ADMIN", "ROLE_DEVELOPER"]
|
|
597
|
-
* or an array of object with name parameters (i.e. [{"name": "ROLE_ADMIN"},{"name":"ROLE_DEVELOPER}]
|
|
598
|
-
*
|
|
599
|
-
* This method will always make sure an array of strings is returned
|
|
600
|
-
*/
|
|
601
|
-
DossierManagementRolesComponent.prototype.returnArrayOfString = function (data) {
|
|
602
|
-
return data.map(function (el) {
|
|
603
|
-
if (typeof el === 'string') {
|
|
604
|
-
return el;
|
|
605
|
-
}
|
|
606
|
-
return el.name;
|
|
607
|
-
});
|
|
608
|
-
};
|
|
609
|
-
return DossierManagementRolesComponent;
|
|
610
|
-
}());
|
|
611
|
-
DossierManagementRolesComponent.decorators = [
|
|
612
|
-
{ type: core.Component, args: [{
|
|
613
|
-
selector: 'valtimo-dossier-management-roles',
|
|
614
|
-
template: "<!--\n ~ Copyright 2015-2022 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<!--<h2 class=\"mb-4 mt-6\">{{ 'connectorManagement.extension.title' | translate }}</h2>-->\n<h2 class=\"mb-4 mt-6\">{{ 'dossierManagement.roles.rolesTitle' | translate }}</h2>\n<p class=\"card-text\">{{ 'dossierManagement.roles.rolesDescription' | translate }}</p>\n\n<valtimo-multiselect-dropdown\n [items]=\"roles | async\"\n [selectedItems]=\"preSelectedItems | async\"\n [dropdownSettings]=\"dropdownSettings\"\n [placeHolder]=\"'dossierManagement.roles.rolesPlaceHolder' | translate\"\n (itemsSelected)=\"onSelectedItems($event)\"\n></valtimo-multiselect-dropdown>\n",
|
|
615
|
-
styles: [""]
|
|
616
|
-
},] }
|
|
617
|
-
];
|
|
618
|
-
DossierManagementRolesComponent.ctorParameters = function () { return [
|
|
619
|
-
{ type: authority.AuthorityService },
|
|
620
|
-
{ type: document$1.DocumentService },
|
|
621
|
-
{ type: components.AlertService },
|
|
622
|
-
{ type: core$1.TranslateService }
|
|
623
|
-
]; };
|
|
624
|
-
DossierManagementRolesComponent.propDecorators = {
|
|
625
|
-
documentDefinitionName: [{ type: core.Input }]
|
|
626
|
-
};
|
|
627
|
-
|
|
628
|
-
/*
|
|
629
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
630
|
-
*
|
|
631
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
632
|
-
* you may not use this file except in compliance with the License.
|
|
633
|
-
* You may obtain a copy of the License at
|
|
634
|
-
*
|
|
635
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
636
|
-
*
|
|
637
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
638
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
639
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
640
|
-
* See the License for the specific language governing permissions and
|
|
641
|
-
* limitations under the License.
|
|
642
|
-
*/
|
|
643
|
-
var DossierManagementModule = /** @class */ (function () {
|
|
644
|
-
function DossierManagementModule() {
|
|
645
|
-
}
|
|
646
|
-
return DossierManagementModule;
|
|
647
|
-
}());
|
|
648
|
-
DossierManagementModule.decorators = [
|
|
649
|
-
{ type: core.NgModule, args: [{
|
|
650
|
-
declarations: [
|
|
651
|
-
DossierManagementListComponent,
|
|
652
|
-
DossierManagementDetailComponent,
|
|
653
|
-
DossierManagementConnectModalComponent,
|
|
654
|
-
DossierManagementRemoveModalComponent,
|
|
655
|
-
DossierManagementUploadComponent,
|
|
656
|
-
DossierManagementRolesComponent,
|
|
657
|
-
],
|
|
658
|
-
imports: [
|
|
659
|
-
common.CommonModule,
|
|
660
|
-
components.WidgetModule,
|
|
661
|
-
components.DropzoneModule,
|
|
662
|
-
components.ListModule,
|
|
663
|
-
DossierManagementRoutingModule,
|
|
664
|
-
forms.FormsModule,
|
|
665
|
-
core$1.TranslateModule,
|
|
666
|
-
components.ModalModule,
|
|
667
|
-
config.ConfigModule,
|
|
668
|
-
ngBootstrap.NgbTooltipModule,
|
|
669
|
-
components.MultiselectDropdownModule,
|
|
670
|
-
],
|
|
671
|
-
exports: [],
|
|
672
|
-
entryComponents: [config.ExtensionComponent],
|
|
673
|
-
},] }
|
|
674
|
-
];
|
|
675
|
-
|
|
676
|
-
/*
|
|
677
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
678
|
-
*
|
|
679
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
680
|
-
* you may not use this file except in compliance with the License.
|
|
681
|
-
* You may obtain a copy of the License at
|
|
682
|
-
*
|
|
683
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
684
|
-
*
|
|
685
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
686
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
687
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
688
|
-
* See the License for the specific language governing permissions and
|
|
689
|
-
* limitations under the License.
|
|
690
|
-
*/
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* Generated bundle index. Do not edit.
|
|
694
|
-
*/
|
|
695
|
-
|
|
696
|
-
exports.DossierManagementListComponent = DossierManagementListComponent;
|
|
697
|
-
exports.DossierManagementModule = DossierManagementModule;
|
|
698
|
-
exports.ɵa = DossierManagementDetailComponent;
|
|
699
|
-
exports.ɵb = DossierManagementConnectModalComponent;
|
|
700
|
-
exports.ɵc = DossierManagementRemoveModalComponent;
|
|
701
|
-
exports.ɵd = DossierManagementUploadComponent;
|
|
702
|
-
exports.ɵe = DossierManagementRolesComponent;
|
|
703
|
-
exports.ɵf = DossierManagementRoutingModule;
|
|
704
|
-
|
|
705
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
706
|
-
|
|
707
|
-
})));
|
|
708
|
-
//# sourceMappingURL=valtimo-dossier-management.umd.js.map
|