@valtimo/dossier 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.
- package/bundles/valtimo-dossier.umd.js +1820 -1675
- package/bundles/valtimo-dossier.umd.js.map +1 -1
- package/bundles/valtimo-dossier.umd.min.js +1 -15
- package/bundles/valtimo-dossier.umd.min.js.map +1 -1
- package/esm2015/lib/dossier-detail/dossier-detail.component.js +92 -92
- package/esm2015/lib/dossier-detail/tab/audit/audit.component.js +79 -79
- package/esm2015/lib/dossier-detail/tab/contact-moments/contact-moments.component.js +90 -91
- package/esm2015/lib/dossier-detail/tab/documents/documents.component.js +122 -119
- package/esm2015/lib/dossier-detail/tab/progress/progress.component.js +49 -49
- package/esm2015/lib/dossier-detail/tab/summary/summary.component.js +126 -126
- package/esm2015/lib/dossier-detail-tab-enum.js +24 -24
- package/esm2015/lib/dossier-list/dossier-list.component.js +216 -216
- package/esm2015/lib/dossier-process-start-modal/dossier-process-start-modal.component.js +130 -131
- package/esm2015/lib/dossier-routing.module.js +58 -58
- package/esm2015/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.js +125 -126
- package/esm2015/lib/dossier-update/dossier-update.component.js +121 -121
- package/esm2015/lib/dossier.config.js +29 -29
- package/esm2015/lib/dossier.module.js +121 -121
- package/esm2015/lib/dossier.service.js +53 -53
- package/esm2015/lib/models/index.js +19 -0
- package/esm2015/lib/models/tabs.model.js +104 -0
- package/esm2015/lib/tab.service.js +44 -44
- package/esm2015/public_api.js +32 -31
- package/esm2015/valtimo-dossier.js +9 -9
- package/fesm2015/valtimo-dossier.js +1457 -1333
- package/fesm2015/valtimo-dossier.js.map +1 -1
- package/lib/dossier-detail/dossier-detail.component.d.ts +34 -34
- package/lib/dossier-detail/tab/audit/audit.component.d.ts +21 -21
- package/lib/dossier-detail/tab/contact-moments/contact-moments.component.d.ts +26 -27
- package/lib/dossier-detail/tab/documents/documents.component.d.ts +43 -44
- package/lib/dossier-detail/tab/progress/progress.component.d.ts +14 -14
- package/lib/dossier-detail/tab/summary/summary.component.d.ts +37 -37
- package/lib/dossier-detail-tab-enum.d.ts +7 -7
- package/lib/dossier-list/dossier-list.component.d.ts +64 -65
- package/lib/dossier-process-start-modal/dossier-process-start-modal.component.d.ts +36 -37
- package/lib/dossier-routing.module.d.ts +2 -2
- package/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.d.ts +34 -35
- package/lib/dossier-update/dossier-update.component.d.ts +33 -33
- package/lib/dossier.config.d.ts +3 -3
- package/lib/dossier.module.d.ts +5 -5
- package/lib/dossier.service.d.ts +10 -10
- package/lib/models/index.d.ts +1 -0
- package/lib/models/tabs.model.d.ts +50 -0
- package/lib/tab.service.d.ts +7 -7
- package/package.json +1 -1
- package/public_api.d.ts +13 -12
- package/valtimo-dossier.d.ts +8 -8
- package/valtimo-dossier.metadata.json +1 -1
|
@@ -1,1716 +1,1859 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@ngx-translate/core'), require('@valtimo/document'), require('moment'), require('rxjs'), require('@valtimo/config'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@valtimo/dossier', ['exports', '@angular/core', '@angular/router', '@ngx-translate/core', '@valtimo/document', 'moment', 'rxjs', '@valtimo/config', '@
|
|
4
|
-
(global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.dossier = {}), global.ng.core, global.ng.router, global.core$1, global.document, global.moment, global.rxjs, global.config, global.
|
|
5
|
-
}(this, (function (exports, i0, router, core, document, moment_, rxjs, i1,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/router'), require('@ngx-translate/core'), require('@valtimo/document'), require('moment'), require('rxjs'), require('@valtimo/config'), require('@angular/common'), require('@valtimo/process'), require('@valtimo/task'), require('@valtimo/form'), require('@valtimo/components'), require('@valtimo/security'), require('ngx-spinner'), require('ngx-toastr'), require('@valtimo/resource'), require('rxjs/operators'), require('@valtimo/contact-moment'), require('@ng-bootstrap/ng-bootstrap'), require('@valtimo/form-link'), require('ngx-logger'), require('@angular/forms'), require('@angular/common/http')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@valtimo/dossier', ['exports', '@angular/core', '@angular/router', '@ngx-translate/core', '@valtimo/document', 'moment', 'rxjs', '@valtimo/config', '@angular/common', '@valtimo/process', '@valtimo/task', '@valtimo/form', '@valtimo/components', '@valtimo/security', 'ngx-spinner', 'ngx-toastr', '@valtimo/resource', 'rxjs/operators', '@valtimo/contact-moment', '@ng-bootstrap/ng-bootstrap', '@valtimo/form-link', 'ngx-logger', '@angular/forms', '@angular/common/http'], factory) :
|
|
4
|
+
(global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.dossier = {}), global.ng.core, global.ng.router, global.core$1, global.document, global.moment, global.rxjs, global.config, global.ng.common, global.process, global.task, global.form, global.components, global.security, global.ngxSpinner, global.ngxToastr, global.resource, global.rxjs.operators, global.contactMoment, global.ngBootstrap, global.formLink, global.ngxLogger, global.ng.forms, global.ng.common.http));
|
|
5
|
+
}(this, (function (exports, i0, router, core, document, moment_, rxjs, i1, common, process, task, form, components, security, ngxSpinner, ngxToastr, resource, operators, contactMoment, ngBootstrap, formLink, ngxLogger, forms, http) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
if (
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
function
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
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 TabLoaderImpl = /** @class */ (function () {
|
|
23
|
+
function TabLoaderImpl(tabs, componentFactoryResolver, viewContainerRef, translateService, router, location) {
|
|
24
|
+
this._tabs = null;
|
|
25
|
+
this._componentFactoryResolver = null;
|
|
26
|
+
this._viewContainerRef = null;
|
|
27
|
+
this._activeComponent = null;
|
|
28
|
+
this._activeTab = null;
|
|
29
|
+
this._translateService = null;
|
|
30
|
+
this._tabs = tabs;
|
|
31
|
+
this._componentFactoryResolver = componentFactoryResolver;
|
|
32
|
+
this._viewContainerRef = viewContainerRef;
|
|
33
|
+
this._translateService = translateService;
|
|
34
|
+
this._router = router;
|
|
35
|
+
this._location = location;
|
|
36
|
+
}
|
|
37
|
+
TabLoaderImpl.prototype.initial = function (tabName) {
|
|
38
|
+
var initialTab;
|
|
39
|
+
if (tabName) {
|
|
40
|
+
initialTab = this._tabs.find(function (tab) { return tab.name === tabName; });
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
initialTab = this._tabs[0] || null;
|
|
44
|
+
}
|
|
45
|
+
this.load(initialTab);
|
|
46
|
+
};
|
|
47
|
+
TabLoaderImpl.prototype.load = function (newTab) {
|
|
48
|
+
if (newTab !== this._activeTab) {
|
|
49
|
+
this._tabs.forEach(function (tab) { return tab.deactivate(); });
|
|
50
|
+
this.replaceView(newTab);
|
|
51
|
+
this.replaceUrlState(newTab);
|
|
52
|
+
this.setActive(newTab);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
TabLoaderImpl.prototype.refreshView = function () {
|
|
56
|
+
this.replaceView(this._activeTab);
|
|
57
|
+
};
|
|
58
|
+
TabLoaderImpl.prototype.replaceView = function (tab) {
|
|
59
|
+
var componentFactory = this._componentFactoryResolver.resolveComponentFactory(tab.component);
|
|
60
|
+
this._viewContainerRef.clear();
|
|
61
|
+
if (this._activeTab !== null) {
|
|
62
|
+
this._activeComponent.destroy();
|
|
63
|
+
}
|
|
64
|
+
this._activeComponent = this._viewContainerRef.createComponent(componentFactory);
|
|
65
|
+
};
|
|
66
|
+
TabLoaderImpl.prototype.replaceUrlState = function (tab) {
|
|
67
|
+
var currentUrl = this._router.url;
|
|
68
|
+
var urlParts = currentUrl.split('/');
|
|
69
|
+
urlParts.splice(urlParts.length - 1, 1, tab.name);
|
|
70
|
+
var newUrl = urlParts.join('/');
|
|
71
|
+
this._location.replaceState(newUrl);
|
|
72
|
+
};
|
|
73
|
+
TabLoaderImpl.prototype.setActive = function (tab) {
|
|
74
|
+
tab.activate();
|
|
75
|
+
this._activeTab = tab;
|
|
76
|
+
};
|
|
77
|
+
Object.defineProperty(TabLoaderImpl.prototype, "tabs", {
|
|
78
|
+
get: function () {
|
|
79
|
+
return this._tabs;
|
|
80
|
+
},
|
|
81
|
+
enumerable: false,
|
|
82
|
+
configurable: true
|
|
83
|
+
});
|
|
84
|
+
TabLoaderImpl.prototype.translateTabName = function (tab) {
|
|
85
|
+
return this._translateService.instant('dossier.tabs.' + tab.name);
|
|
86
|
+
};
|
|
87
|
+
return TabLoaderImpl;
|
|
88
|
+
}());
|
|
89
|
+
var TabImpl = /** @class */ (function () {
|
|
90
|
+
function TabImpl(name, sequence, component) {
|
|
91
|
+
this._active = false;
|
|
92
|
+
this._name = name;
|
|
93
|
+
this._sequence = sequence;
|
|
94
|
+
this._component = component;
|
|
95
|
+
}
|
|
96
|
+
Object.defineProperty(TabImpl.prototype, "name", {
|
|
97
|
+
get: function () {
|
|
98
|
+
return this._name;
|
|
99
|
+
},
|
|
100
|
+
enumerable: false,
|
|
101
|
+
configurable: true
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(TabImpl.prototype, "sequence", {
|
|
104
|
+
get: function () {
|
|
105
|
+
return this._sequence;
|
|
106
|
+
},
|
|
107
|
+
enumerable: false,
|
|
108
|
+
configurable: true
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(TabImpl.prototype, "component", {
|
|
111
|
+
get: function () {
|
|
112
|
+
return this._component;
|
|
113
|
+
},
|
|
114
|
+
enumerable: false,
|
|
115
|
+
configurable: true
|
|
116
|
+
});
|
|
117
|
+
TabImpl.prototype.activate = function () {
|
|
118
|
+
this._active = true;
|
|
119
|
+
};
|
|
120
|
+
TabImpl.prototype.deactivate = function () {
|
|
121
|
+
this._active = false;
|
|
122
|
+
};
|
|
123
|
+
TabImpl.prototype.isActive = function () {
|
|
124
|
+
return this._active;
|
|
125
|
+
};
|
|
126
|
+
return TabImpl;
|
|
127
|
+
}());
|
|
128
|
+
|
|
129
|
+
/*
|
|
130
|
+
*
|
|
131
|
+
* * Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
132
|
+
* *
|
|
133
|
+
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
134
|
+
* * you may not use this file except in compliance with the License.
|
|
135
|
+
* * You may obtain a copy of the License at
|
|
136
|
+
* *
|
|
137
|
+
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
138
|
+
* *
|
|
139
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
140
|
+
* * distributed under the License is distributed on an "AS IS" basis,
|
|
141
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
142
|
+
* * See the License for the specific language governing permissions and
|
|
143
|
+
* * limitations under the License.
|
|
144
|
+
*
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
/*! *****************************************************************************
|
|
148
|
+
Copyright (c) Microsoft Corporation.
|
|
149
|
+
|
|
150
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
151
|
+
purpose with or without fee is hereby granted.
|
|
152
|
+
|
|
153
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
154
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
155
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
156
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
157
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
158
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
159
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
160
|
+
***************************************************************************** */
|
|
161
|
+
/* global Reflect, Promise */
|
|
162
|
+
var extendStatics = function (d, b) {
|
|
163
|
+
extendStatics = Object.setPrototypeOf ||
|
|
164
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
165
|
+
function (d, b) { for (var p in b)
|
|
166
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
167
|
+
d[p] = b[p]; };
|
|
168
|
+
return extendStatics(d, b);
|
|
169
|
+
};
|
|
170
|
+
function __extends(d, b) {
|
|
171
|
+
if (typeof b !== "function" && b !== null)
|
|
172
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
173
|
+
extendStatics(d, b);
|
|
174
|
+
function __() { this.constructor = d; }
|
|
175
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
176
|
+
}
|
|
177
|
+
var __assign = function () {
|
|
178
|
+
__assign = Object.assign || function __assign(t) {
|
|
179
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
180
|
+
s = arguments[i];
|
|
181
|
+
for (var p in s)
|
|
182
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
183
|
+
t[p] = s[p];
|
|
184
|
+
}
|
|
185
|
+
return t;
|
|
186
|
+
};
|
|
187
|
+
return __assign.apply(this, arguments);
|
|
188
|
+
};
|
|
189
|
+
function __rest(s, e) {
|
|
190
|
+
var t = {};
|
|
191
|
+
for (var p in s)
|
|
192
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
193
|
+
t[p] = s[p];
|
|
194
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
195
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
196
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
197
|
+
t[p[i]] = s[p[i]];
|
|
198
|
+
}
|
|
199
|
+
return t;
|
|
200
|
+
}
|
|
201
|
+
function __decorate(decorators, target, key, desc) {
|
|
202
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
203
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
204
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
205
|
+
else
|
|
206
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
207
|
+
if (d = decorators[i])
|
|
208
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
209
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
210
|
+
}
|
|
211
|
+
function __param(paramIndex, decorator) {
|
|
212
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
213
|
+
}
|
|
214
|
+
function __metadata(metadataKey, metadataValue) {
|
|
215
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
216
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
217
|
+
}
|
|
218
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
219
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
220
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
221
|
+
function fulfilled(value) { try {
|
|
222
|
+
step(generator.next(value));
|
|
223
|
+
}
|
|
224
|
+
catch (e) {
|
|
225
|
+
reject(e);
|
|
226
|
+
} }
|
|
227
|
+
function rejected(value) { try {
|
|
228
|
+
step(generator["throw"](value));
|
|
229
|
+
}
|
|
230
|
+
catch (e) {
|
|
231
|
+
reject(e);
|
|
232
|
+
} }
|
|
233
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
234
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
function __generator(thisArg, body) {
|
|
238
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
239
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
240
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
241
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
242
|
+
function step(op) {
|
|
243
|
+
if (f)
|
|
244
|
+
throw new TypeError("Generator is already executing.");
|
|
245
|
+
while (_)
|
|
246
|
+
try {
|
|
247
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
248
|
+
return t;
|
|
249
|
+
if (y = 0, t)
|
|
250
|
+
op = [op[0] & 2, t.value];
|
|
251
|
+
switch (op[0]) {
|
|
252
|
+
case 0:
|
|
253
|
+
case 1:
|
|
254
|
+
t = op;
|
|
255
|
+
break;
|
|
256
|
+
case 4:
|
|
257
|
+
_.label++;
|
|
258
|
+
return { value: op[1], done: false };
|
|
259
|
+
case 5:
|
|
260
|
+
_.label++;
|
|
261
|
+
y = op[1];
|
|
262
|
+
op = [0];
|
|
263
|
+
continue;
|
|
264
|
+
case 7:
|
|
265
|
+
op = _.ops.pop();
|
|
266
|
+
_.trys.pop();
|
|
267
|
+
continue;
|
|
268
|
+
default:
|
|
269
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
270
|
+
_ = 0;
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
274
|
+
_.label = op[1];
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
278
|
+
_.label = t[1];
|
|
279
|
+
t = op;
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
if (t && _.label < t[2]) {
|
|
283
|
+
_.label = t[2];
|
|
284
|
+
_.ops.push(op);
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
if (t[2])
|
|
288
|
+
_.ops.pop();
|
|
289
|
+
_.trys.pop();
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
op = body.call(thisArg, _);
|
|
293
|
+
}
|
|
294
|
+
catch (e) {
|
|
295
|
+
op = [6, e];
|
|
296
|
+
y = 0;
|
|
297
|
+
}
|
|
298
|
+
finally {
|
|
299
|
+
f = t = 0;
|
|
300
|
+
}
|
|
301
|
+
if (op[0] & 5)
|
|
302
|
+
throw op[1];
|
|
303
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
307
|
+
if (k2 === undefined)
|
|
308
|
+
k2 = k;
|
|
309
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
310
|
+
}) : (function (o, m, k, k2) {
|
|
311
|
+
if (k2 === undefined)
|
|
312
|
+
k2 = k;
|
|
313
|
+
o[k2] = m[k];
|
|
314
|
+
});
|
|
315
|
+
function __exportStar(m, o) {
|
|
316
|
+
for (var p in m)
|
|
317
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
318
|
+
__createBinding(o, m, p);
|
|
319
|
+
}
|
|
320
|
+
function __values(o) {
|
|
321
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
322
|
+
if (m)
|
|
323
|
+
return m.call(o);
|
|
324
|
+
if (o && typeof o.length === "number")
|
|
325
|
+
return {
|
|
326
|
+
next: function () {
|
|
327
|
+
if (o && i >= o.length)
|
|
328
|
+
o = void 0;
|
|
329
|
+
return { value: o && o[i++], done: !o };
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
333
|
+
}
|
|
334
|
+
function __read(o, n) {
|
|
335
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
336
|
+
if (!m)
|
|
337
|
+
return o;
|
|
338
|
+
var i = m.call(o), r, ar = [], e;
|
|
339
|
+
try {
|
|
340
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
341
|
+
ar.push(r.value);
|
|
342
|
+
}
|
|
343
|
+
catch (error) {
|
|
344
|
+
e = { error: error };
|
|
345
|
+
}
|
|
346
|
+
finally {
|
|
347
|
+
try {
|
|
348
|
+
if (r && !r.done && (m = i["return"]))
|
|
349
|
+
m.call(i);
|
|
350
|
+
}
|
|
351
|
+
finally {
|
|
352
|
+
if (e)
|
|
353
|
+
throw e.error;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return ar;
|
|
357
|
+
}
|
|
358
|
+
/** @deprecated */
|
|
359
|
+
function __spread() {
|
|
360
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
361
|
+
ar = ar.concat(__read(arguments[i]));
|
|
362
|
+
return ar;
|
|
363
|
+
}
|
|
364
|
+
/** @deprecated */
|
|
365
|
+
function __spreadArrays() {
|
|
366
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
367
|
+
s += arguments[i].length;
|
|
368
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
369
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
370
|
+
r[k] = a[j];
|
|
371
|
+
return r;
|
|
372
|
+
}
|
|
373
|
+
function __spreadArray(to, from, pack) {
|
|
374
|
+
if (pack || arguments.length === 2)
|
|
375
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
376
|
+
if (ar || !(i in from)) {
|
|
377
|
+
if (!ar)
|
|
378
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
379
|
+
ar[i] = from[i];
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
383
|
+
}
|
|
384
|
+
function __await(v) {
|
|
385
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
386
|
+
}
|
|
387
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
388
|
+
if (!Symbol.asyncIterator)
|
|
389
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
390
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
391
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
392
|
+
function verb(n) { if (g[n])
|
|
393
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
394
|
+
function resume(n, v) { try {
|
|
395
|
+
step(g[n](v));
|
|
396
|
+
}
|
|
397
|
+
catch (e) {
|
|
398
|
+
settle(q[0][3], e);
|
|
399
|
+
} }
|
|
400
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
401
|
+
function fulfill(value) { resume("next", value); }
|
|
402
|
+
function reject(value) { resume("throw", value); }
|
|
403
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
404
|
+
resume(q[0][0], q[0][1]); }
|
|
405
|
+
}
|
|
406
|
+
function __asyncDelegator(o) {
|
|
407
|
+
var i, p;
|
|
408
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
409
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
410
|
+
}
|
|
411
|
+
function __asyncValues(o) {
|
|
412
|
+
if (!Symbol.asyncIterator)
|
|
413
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
414
|
+
var m = o[Symbol.asyncIterator], i;
|
|
415
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
416
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
417
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
418
|
+
}
|
|
419
|
+
function __makeTemplateObject(cooked, raw) {
|
|
420
|
+
if (Object.defineProperty) {
|
|
421
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
cooked.raw = raw;
|
|
425
|
+
}
|
|
426
|
+
return cooked;
|
|
427
|
+
}
|
|
428
|
+
;
|
|
429
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
430
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
431
|
+
}) : function (o, v) {
|
|
432
|
+
o["default"] = v;
|
|
433
|
+
};
|
|
434
|
+
function __importStar(mod) {
|
|
435
|
+
if (mod && mod.__esModule)
|
|
436
|
+
return mod;
|
|
437
|
+
var result = {};
|
|
438
|
+
if (mod != null)
|
|
439
|
+
for (var k in mod)
|
|
440
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
441
|
+
__createBinding(result, mod, k);
|
|
442
|
+
__setModuleDefault(result, mod);
|
|
443
|
+
return result;
|
|
444
|
+
}
|
|
445
|
+
function __importDefault(mod) {
|
|
446
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
447
|
+
}
|
|
448
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
449
|
+
if (kind === "a" && !f)
|
|
450
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
451
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
452
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
453
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
454
|
+
}
|
|
455
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
456
|
+
if (kind === "m")
|
|
457
|
+
throw new TypeError("Private method is not writable");
|
|
458
|
+
if (kind === "a" && !f)
|
|
459
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
460
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
461
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
462
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
323
463
|
}
|
|
324
464
|
|
|
325
|
-
/*
|
|
326
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
327
|
-
*
|
|
328
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
329
|
-
* you may not use this file except in compliance with the License.
|
|
330
|
-
* You may obtain a copy of the License at
|
|
331
|
-
*
|
|
332
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
333
|
-
*
|
|
334
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
335
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
336
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
337
|
-
* See the License for the specific language governing permissions and
|
|
338
|
-
* limitations under the License.
|
|
339
|
-
*/
|
|
340
|
-
(function (DefaultTabs) {
|
|
341
|
-
DefaultTabs["summary"] = "summary";
|
|
342
|
-
DefaultTabs["progress"] = "progress";
|
|
343
|
-
DefaultTabs["audit"] = "audit";
|
|
344
|
-
DefaultTabs["documents"] = "documents";
|
|
345
|
-
DefaultTabs["contactMoments"] = "contact-moments";
|
|
465
|
+
/*
|
|
466
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
467
|
+
*
|
|
468
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
469
|
+
* you may not use this file except in compliance with the License.
|
|
470
|
+
* You may obtain a copy of the License at
|
|
471
|
+
*
|
|
472
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
473
|
+
*
|
|
474
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
475
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
476
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
477
|
+
* See the License for the specific language governing permissions and
|
|
478
|
+
* limitations under the License.
|
|
479
|
+
*/
|
|
480
|
+
(function (DefaultTabs) {
|
|
481
|
+
DefaultTabs["summary"] = "summary";
|
|
482
|
+
DefaultTabs["progress"] = "progress";
|
|
483
|
+
DefaultTabs["audit"] = "audit";
|
|
484
|
+
DefaultTabs["documents"] = "documents";
|
|
485
|
+
DefaultTabs["contactMoments"] = "contact-moments";
|
|
346
486
|
})(exports.DefaultTabs || (exports.DefaultTabs = {}));
|
|
347
487
|
|
|
348
|
-
/*
|
|
349
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
350
|
-
*
|
|
351
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
352
|
-
* you may not use this file except in compliance with the License.
|
|
353
|
-
* You may obtain a copy of the License at
|
|
354
|
-
*
|
|
355
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
356
|
-
*
|
|
357
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
358
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
359
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
360
|
-
* See the License for the specific language governing permissions and
|
|
361
|
-
* limitations under the License.
|
|
362
|
-
*/
|
|
363
|
-
var DossierService = /** @class */ (function () {
|
|
364
|
-
function DossierService(configService) {
|
|
365
|
-
this.configService = configService;
|
|
366
|
-
this.definitions = configService.config.definitions;
|
|
367
|
-
}
|
|
368
|
-
DossierService.prototype.getImplementationEnvironmentDefinitions = function (name) {
|
|
369
|
-
return this.definitions.dossiers.find(function (definition) { return definition.name === name; });
|
|
370
|
-
};
|
|
371
|
-
DossierService.prototype.getDefinitionColumns = function (definitionNameId) {
|
|
372
|
-
var config = this.configService.config;
|
|
373
|
-
var customDefinitionTable = config.customDefinitionTables[definitionNameId];
|
|
374
|
-
return customDefinitionTable || config.defaultDefinitionTable;
|
|
375
|
-
};
|
|
376
|
-
DossierService.prototype.getInitialSortState = function (columns) {
|
|
377
|
-
var defaultColumn = columns.find(function (column) { return column.default; });
|
|
378
|
-
return {
|
|
379
|
-
isSorting: false,
|
|
380
|
-
state: {
|
|
381
|
-
name: defaultColumn ? defaultColumn.propertyName : columns[0].propertyName,
|
|
382
|
-
direction: 'DESC',
|
|
383
|
-
},
|
|
384
|
-
};
|
|
385
|
-
};
|
|
386
|
-
return DossierService;
|
|
387
|
-
}());
|
|
388
|
-
DossierService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DossierService_Factory() { return new DossierService(i0.ɵɵinject(i1.ConfigService)); }, token: DossierService, providedIn: "root" });
|
|
389
|
-
DossierService.decorators = [
|
|
390
|
-
{ type: i0.Injectable, args: [{
|
|
391
|
-
providedIn: 'root',
|
|
392
|
-
},] }
|
|
393
|
-
];
|
|
394
|
-
DossierService.ctorParameters = function () { return [
|
|
395
|
-
{ type: i1.ConfigService }
|
|
488
|
+
/*
|
|
489
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
490
|
+
*
|
|
491
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
492
|
+
* you may not use this file except in compliance with the License.
|
|
493
|
+
* You may obtain a copy of the License at
|
|
494
|
+
*
|
|
495
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
496
|
+
*
|
|
497
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
498
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
499
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
500
|
+
* See the License for the specific language governing permissions and
|
|
501
|
+
* limitations under the License.
|
|
502
|
+
*/
|
|
503
|
+
var DossierService = /** @class */ (function () {
|
|
504
|
+
function DossierService(configService) {
|
|
505
|
+
this.configService = configService;
|
|
506
|
+
this.definitions = configService.config.definitions;
|
|
507
|
+
}
|
|
508
|
+
DossierService.prototype.getImplementationEnvironmentDefinitions = function (name) {
|
|
509
|
+
return this.definitions.dossiers.find(function (definition) { return definition.name === name; });
|
|
510
|
+
};
|
|
511
|
+
DossierService.prototype.getDefinitionColumns = function (definitionNameId) {
|
|
512
|
+
var config = this.configService.config;
|
|
513
|
+
var customDefinitionTable = config.customDefinitionTables[definitionNameId];
|
|
514
|
+
return customDefinitionTable || config.defaultDefinitionTable;
|
|
515
|
+
};
|
|
516
|
+
DossierService.prototype.getInitialSortState = function (columns) {
|
|
517
|
+
var defaultColumn = columns.find(function (column) { return column.default; });
|
|
518
|
+
return {
|
|
519
|
+
isSorting: false,
|
|
520
|
+
state: {
|
|
521
|
+
name: defaultColumn ? defaultColumn.propertyName : columns[0].propertyName,
|
|
522
|
+
direction: 'DESC',
|
|
523
|
+
},
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
return DossierService;
|
|
527
|
+
}());
|
|
528
|
+
DossierService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DossierService_Factory() { return new DossierService(i0.ɵɵinject(i1.ConfigService)); }, token: DossierService, providedIn: "root" });
|
|
529
|
+
DossierService.decorators = [
|
|
530
|
+
{ type: i0.Injectable, args: [{
|
|
531
|
+
providedIn: 'root',
|
|
532
|
+
},] }
|
|
533
|
+
];
|
|
534
|
+
DossierService.ctorParameters = function () { return [
|
|
535
|
+
{ type: i1.ConfigService }
|
|
396
536
|
]; };
|
|
397
537
|
|
|
398
|
-
/*
|
|
399
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
400
|
-
*
|
|
401
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
402
|
-
* you may not use this file except in compliance with the License.
|
|
403
|
-
* You may obtain a copy of the License at
|
|
404
|
-
*
|
|
405
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
406
|
-
*
|
|
407
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
408
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
409
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
410
|
-
* See the License for the specific language governing permissions and
|
|
411
|
-
* limitations under the License.
|
|
412
|
-
*/
|
|
413
|
-
var moment = moment_;
|
|
414
|
-
moment.locale(localStorage.getItem('langKey') || '');
|
|
415
|
-
var DossierListComponent = /** @class */ (function () {
|
|
416
|
-
function DossierListComponent(route, router, documentService, translateService, dossierService) {
|
|
417
|
-
this.route = route;
|
|
418
|
-
this.router = router;
|
|
419
|
-
this.documentService = documentService;
|
|
420
|
-
this.translateService = translateService;
|
|
421
|
-
this.dossierService = dossierService;
|
|
422
|
-
this.documentDefinitionName = '';
|
|
423
|
-
this.showCreateDocument = false;
|
|
424
|
-
this.items = [];
|
|
425
|
-
this.fields = [];
|
|
426
|
-
this.processDefinitionListFields = [];
|
|
427
|
-
this.processDocumentDefinitions = [];
|
|
428
|
-
this.pagination = {
|
|
429
|
-
collectionSize: 0,
|
|
430
|
-
page: 1,
|
|
431
|
-
size: 10,
|
|
432
|
-
maxPaginationItemSize: 5,
|
|
433
|
-
sort: undefined,
|
|
434
|
-
};
|
|
435
|
-
this.selectedProcessDocumentDefinition = null;
|
|
436
|
-
this.modalListenerAdded = false;
|
|
437
|
-
}
|
|
438
|
-
DossierListComponent.prototype.ngOnInit = function () {
|
|
439
|
-
this.doInit();
|
|
440
|
-
this.routeEvent(this.router);
|
|
441
|
-
this.modalListenerAdded = false;
|
|
442
|
-
};
|
|
443
|
-
DossierListComponent.prototype.ngOnDestroy = function () {
|
|
444
|
-
this.routerSubscription.unsubscribe();
|
|
445
|
-
this.translationSubscription.unsubscribe();
|
|
446
|
-
};
|
|
447
|
-
DossierListComponent.prototype.paginationSet = function () {
|
|
448
|
-
this.getData();
|
|
449
|
-
};
|
|
450
|
-
DossierListComponent.prototype.routeEvent = function (router$1) {
|
|
451
|
-
var _this = this;
|
|
452
|
-
this.routerSubscription = router$1.events.subscribe(function (e) {
|
|
453
|
-
if (e instanceof router.NavigationEnd) {
|
|
454
|
-
_this.doInit();
|
|
455
|
-
_this.getData();
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
};
|
|
459
|
-
DossierListComponent.prototype.doInit = function () {
|
|
460
|
-
var documentDefinitionName = this.route.snapshot.paramMap.get('documentDefinitionName') || '';
|
|
461
|
-
var columns = this.dossierService.getDefinitionColumns(documentDefinitionName);
|
|
462
|
-
this.documentDefinitionName = documentDefinitionName;
|
|
463
|
-
this.initialSortState = this.dossierService.getInitialSortState(columns);
|
|
464
|
-
this.openTranslationSubscription(columns);
|
|
465
|
-
};
|
|
466
|
-
DossierListComponent.prototype.openTranslationSubscription = function (columns) {
|
|
467
|
-
var _this = this;
|
|
468
|
-
this.translationSubscription = rxjs.combineLatest(columns.map(function (column) { return _this.translateService.stream("fieldLabels." + column.translationKey); })).subscribe(function (labels) {
|
|
469
|
-
_this.fields = columns.map(function (column, index) { return (Object.assign({ key: column.propertyName, label: labels[index], sortable: column.sortable }, (column.viewType && { viewType: column.viewType }))); });
|
|
470
|
-
});
|
|
471
|
-
};
|
|
472
|
-
DossierListComponent.prototype.getData = function () {
|
|
473
|
-
this.findDocumentDefinition(this.documentDefinitionName);
|
|
474
|
-
if (this.hasCachedSearchRequest()) {
|
|
475
|
-
var documentSearchRequest = this.getCachedSearch();
|
|
476
|
-
this.globalSearchFilter = documentSearchRequest.globalSearchFilter;
|
|
477
|
-
this.sequence = documentSearchRequest.sequence;
|
|
478
|
-
this.createdBy = documentSearchRequest.createdBy;
|
|
479
|
-
this.findDocuments(documentSearchRequest);
|
|
480
|
-
}
|
|
481
|
-
else {
|
|
482
|
-
this.doSearch();
|
|
483
|
-
}
|
|
484
|
-
this.getAllAssociatedProcessDefinitions();
|
|
485
|
-
};
|
|
486
|
-
DossierListComponent.prototype.doSearch = function () {
|
|
487
|
-
var documentSearchRequest = this.buildDocumentSearchRequest();
|
|
488
|
-
this.findDocuments(documentSearchRequest);
|
|
489
|
-
};
|
|
490
|
-
DossierListComponent.prototype.findDocuments = function (documentSearchRequest) {
|
|
491
|
-
var _this = this;
|
|
492
|
-
return this.documentService.getDocuments(documentSearchRequest).subscribe(function (documents) {
|
|
493
|
-
_this.documents = documents;
|
|
494
|
-
_this.transformDocuments(_this.documents.content);
|
|
495
|
-
_this.pagination.collectionSize = _this.documents.totalElements;
|
|
496
|
-
_this.storeSearch(documentSearchRequest);
|
|
497
|
-
});
|
|
498
|
-
};
|
|
499
|
-
DossierListComponent.prototype.getAllAssociatedProcessDefinitions = function () {
|
|
500
|
-
var _this = this;
|
|
501
|
-
this.documentService
|
|
502
|
-
.findProcessDocumentDefinitions(this.documentDefinitionName)
|
|
503
|
-
.subscribe(function (processDocumentDefinitions) {
|
|
504
|
-
_this.processDocumentDefinitions = processDocumentDefinitions.filter(function (processDocumentDefinition) { return processDocumentDefinition.canInitializeDocument; });
|
|
505
|
-
_this.processDefinitionListFields = [
|
|
506
|
-
{
|
|
507
|
-
key: 'processName',
|
|
508
|
-
label: 'Proces',
|
|
509
|
-
},
|
|
510
|
-
];
|
|
511
|
-
});
|
|
512
|
-
};
|
|
513
|
-
DossierListComponent.prototype.getCachedSearch = function () {
|
|
514
|
-
var json = JSON.parse(this.getCachedDocumentSearchRequest());
|
|
515
|
-
return new document.DocumentSearchRequestImpl(json.definitionName, this.pagination.page - 1, this.pagination.size, json.sequence, json.createdBy, json.globalSearchFilter, json.sort);
|
|
516
|
-
};
|
|
517
|
-
DossierListComponent.prototype.buildDocumentSearchRequest = function () {
|
|
518
|
-
return new document.DocumentSearchRequestImpl(this.documentDefinitionName, this.pagination.page - 1, this.pagination.size, this.sequence, this.createdBy, this.globalSearchFilter, this.pagination.sort && this.pagination.sort.isSorting
|
|
519
|
-
? this.pagination.sort
|
|
520
|
-
: this.initialSortState);
|
|
521
|
-
};
|
|
522
|
-
DossierListComponent.prototype.storeSearch = function (documentSearchRequest) {
|
|
523
|
-
localStorage.setItem(this.getCachedKey(), JSON.stringify(documentSearchRequest));
|
|
524
|
-
};
|
|
525
|
-
DossierListComponent.prototype.getCachedDocumentSearchRequest = function () {
|
|
526
|
-
return localStorage.getItem(this.getCachedKey()) || '';
|
|
527
|
-
};
|
|
528
|
-
DossierListComponent.prototype.hasCachedSearchRequest = function () {
|
|
529
|
-
return localStorage.getItem(this.getCachedKey()) !== null;
|
|
530
|
-
};
|
|
531
|
-
DossierListComponent.prototype.getCachedKey = function () {
|
|
532
|
-
return 'list-search-' + this.documentDefinitionName;
|
|
533
|
-
};
|
|
534
|
-
DossierListComponent.prototype.rowClick = function (document) {
|
|
535
|
-
this.router.navigate([
|
|
536
|
-
"/dossiers/" + this.documentDefinitionName + "/document/" + document.id + "/" + exports.DefaultTabs.summary,
|
|
537
|
-
]);
|
|
538
|
-
};
|
|
539
|
-
DossierListComponent.prototype.startDossier = function () {
|
|
540
|
-
if (this.processDocumentDefinitions.length > 1) {
|
|
541
|
-
$('#startProcess').modal('show');
|
|
542
|
-
}
|
|
543
|
-
else {
|
|
544
|
-
this.selectedProcessDocumentDefinition = this.processDocumentDefinitions[0];
|
|
545
|
-
this.showStartProcessModal();
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
DossierListComponent.prototype.showStartProcessModal = function () {
|
|
549
|
-
if (this.selectedProcessDocumentDefinition !== null) {
|
|
550
|
-
this.processStart.openModal(this.selectedProcessDocumentDefinition);
|
|
551
|
-
this.selectedProcessDocumentDefinition = null;
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
DossierListComponent.prototype.selectProcess = function (processDocumentDefinition) {
|
|
555
|
-
var modal = $('#startProcess');
|
|
556
|
-
if (!this.modalListenerAdded) {
|
|
557
|
-
modal.on('hidden.bs.modal', this.showStartProcessModal.bind(this));
|
|
558
|
-
this.modalListenerAdded = true;
|
|
559
|
-
}
|
|
560
|
-
this.selectedProcessDocumentDefinition = processDocumentDefinition;
|
|
561
|
-
modal.modal('hide');
|
|
562
|
-
};
|
|
563
|
-
DossierListComponent.prototype.findDocumentDefinition = function (documentDefinitionName) {
|
|
564
|
-
var _this = this;
|
|
565
|
-
this.documentService.getDocumentDefinition(documentDefinitionName).subscribe(function (definition) {
|
|
566
|
-
_this.schema = definition.schema;
|
|
567
|
-
});
|
|
568
|
-
};
|
|
569
|
-
DossierListComponent.prototype.transformDocuments = function (documentsContent) {
|
|
570
|
-
this.items = documentsContent.map(function (document) {
|
|
571
|
-
var content = document.content, others = __rest(document, ["content"]);
|
|
572
|
-
return Object.assign(Object.assign({}, content), others);
|
|
573
|
-
});
|
|
574
|
-
};
|
|
575
|
-
DossierListComponent.prototype.paginationClicked = function (page) {
|
|
576
|
-
this.pagination.page = page;
|
|
577
|
-
this.doSearch();
|
|
578
|
-
};
|
|
579
|
-
DossierListComponent.prototype.sortChanged = function (sortState) {
|
|
580
|
-
this.pagination.sort = sortState;
|
|
581
|
-
this.doSearch();
|
|
582
|
-
};
|
|
583
|
-
DossierListComponent.prototype.getInitialSortState = function () {
|
|
584
|
-
if (this.hasCachedSearchRequest()) {
|
|
585
|
-
var cachedRequest = JSON.parse(this.getCachedDocumentSearchRequest());
|
|
586
|
-
return cachedRequest.sort ? cachedRequest.sort : this.initialSortState;
|
|
587
|
-
}
|
|
588
|
-
return this.initialSortState;
|
|
589
|
-
};
|
|
590
|
-
return DossierListComponent;
|
|
591
|
-
}());
|
|
592
|
-
DossierListComponent.decorators = [
|
|
593
|
-
{ type: i0.Component, args: [{
|
|
594
|
-
selector: 'valtimo-dossier-list',
|
|
595
|
-
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<ng-container *ngTemplateOutlet=\"sidebar\"></ng-container>\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div>\n <div class=\"text-right mt-m3px mb-3\">\n <button\n type=\"button\"\n class=\"btn btn-space btn-primary mr-0\"\n (click)=\"startDossier()\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n placement=\"bottom\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n >\n {{ 'Start Dossier' | translate }}\n </button>\n </div>\n\n <div\n class=\"modal fade\"\n id=\"startProcess\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby=\"startProcessLabel\"\n aria-hidden=\"true\"\n >\n <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h3 class=\"modal-title\" id=\"startProcessLabel\">\n {{ 'dashboard.startProcess.title' | translate }}\n </h3>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"table-responsive\">\n <table class=\"table m-0\">\n <tr\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n (click)=\"selectProcess(processDocumentDefinition)\"\n style=\"cursor: pointer\"\n >\n <td>{{ processDocumentDefinition.processName }}</td>\n </tr>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">\n {{ 'cta.close' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"items\"\n [fields]=\"fields\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"dossierList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n [initialSortState]=\"getInitialSortState()\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ schema?.title }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n documents?.content.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n </div>\n <valtimo-dossier-process-start-modal #processStartModal></valtimo-dossier-process-start-modal>\n</div>\n\n<ng-template #sidebar>\n <valtimo-filter-sidebar>\n <h4 class=\"title\">Search</h4>\n <div class=\"mb-4\">\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'dossier.forms.globalSearchPlaceHolder' | translate }}\"\n [(ngModel)]=\"globalSearchFilter\"\n (blur)=\"doSearch()\"\n (keyup.enter)=\"doSearch()\"\n />\n </div>\n\n <div class=\"mb-4\">\n <input\n type=\"number\"\n class=\"form-control\"\n placeholder=\"{{ 'dossier.forms.referenceNumberPlaceHolder' | translate }}\"\n [(ngModel)]=\"sequence\"\n (blur)=\"doSearch()\"\n (keyup.enter)=\"doSearch()\"\n />\n </div>\n </valtimo-filter-sidebar>\n</ng-template>\n",
|
|
596
|
-
styles: [""]
|
|
597
|
-
},] }
|
|
598
|
-
];
|
|
599
|
-
DossierListComponent.ctorParameters = function () { return [
|
|
600
|
-
{ type: router.ActivatedRoute },
|
|
601
|
-
{ type: router.Router },
|
|
602
|
-
{ type: document.DocumentService },
|
|
603
|
-
{ type: core.TranslateService },
|
|
604
|
-
{ type: DossierService }
|
|
605
|
-
]; };
|
|
606
|
-
DossierListComponent.propDecorators = {
|
|
607
|
-
processStart: [{ type: i0.ViewChild, args: ['processStartModal',] }]
|
|
538
|
+
/*
|
|
539
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
540
|
+
*
|
|
541
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
542
|
+
* you may not use this file except in compliance with the License.
|
|
543
|
+
* You may obtain a copy of the License at
|
|
544
|
+
*
|
|
545
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
546
|
+
*
|
|
547
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
548
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
549
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
550
|
+
* See the License for the specific language governing permissions and
|
|
551
|
+
* limitations under the License.
|
|
552
|
+
*/
|
|
553
|
+
var moment = moment_;
|
|
554
|
+
moment.locale(localStorage.getItem('langKey') || '');
|
|
555
|
+
var DossierListComponent = /** @class */ (function () {
|
|
556
|
+
function DossierListComponent(route, router, documentService, translateService, dossierService) {
|
|
557
|
+
this.route = route;
|
|
558
|
+
this.router = router;
|
|
559
|
+
this.documentService = documentService;
|
|
560
|
+
this.translateService = translateService;
|
|
561
|
+
this.dossierService = dossierService;
|
|
562
|
+
this.documentDefinitionName = '';
|
|
563
|
+
this.showCreateDocument = false;
|
|
564
|
+
this.items = [];
|
|
565
|
+
this.fields = [];
|
|
566
|
+
this.processDefinitionListFields = [];
|
|
567
|
+
this.processDocumentDefinitions = [];
|
|
568
|
+
this.pagination = {
|
|
569
|
+
collectionSize: 0,
|
|
570
|
+
page: 1,
|
|
571
|
+
size: 10,
|
|
572
|
+
maxPaginationItemSize: 5,
|
|
573
|
+
sort: undefined,
|
|
574
|
+
};
|
|
575
|
+
this.selectedProcessDocumentDefinition = null;
|
|
576
|
+
this.modalListenerAdded = false;
|
|
577
|
+
}
|
|
578
|
+
DossierListComponent.prototype.ngOnInit = function () {
|
|
579
|
+
this.doInit();
|
|
580
|
+
this.routeEvent(this.router);
|
|
581
|
+
this.modalListenerAdded = false;
|
|
582
|
+
};
|
|
583
|
+
DossierListComponent.prototype.ngOnDestroy = function () {
|
|
584
|
+
this.routerSubscription.unsubscribe();
|
|
585
|
+
this.translationSubscription.unsubscribe();
|
|
586
|
+
};
|
|
587
|
+
DossierListComponent.prototype.paginationSet = function () {
|
|
588
|
+
this.getData();
|
|
589
|
+
};
|
|
590
|
+
DossierListComponent.prototype.routeEvent = function (router$1) {
|
|
591
|
+
var _this = this;
|
|
592
|
+
this.routerSubscription = router$1.events.subscribe(function (e) {
|
|
593
|
+
if (e instanceof router.NavigationEnd) {
|
|
594
|
+
_this.doInit();
|
|
595
|
+
_this.getData();
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
};
|
|
599
|
+
DossierListComponent.prototype.doInit = function () {
|
|
600
|
+
var documentDefinitionName = this.route.snapshot.paramMap.get('documentDefinitionName') || '';
|
|
601
|
+
var columns = this.dossierService.getDefinitionColumns(documentDefinitionName);
|
|
602
|
+
this.documentDefinitionName = documentDefinitionName;
|
|
603
|
+
this.initialSortState = this.dossierService.getInitialSortState(columns);
|
|
604
|
+
this.openTranslationSubscription(columns);
|
|
605
|
+
};
|
|
606
|
+
DossierListComponent.prototype.openTranslationSubscription = function (columns) {
|
|
607
|
+
var _this = this;
|
|
608
|
+
this.translationSubscription = rxjs.combineLatest(columns.map(function (column) { return _this.translateService.stream("fieldLabels." + column.translationKey); })).subscribe(function (labels) {
|
|
609
|
+
_this.fields = columns.map(function (column, index) { return (Object.assign({ key: column.propertyName, label: labels[index], sortable: column.sortable }, (column.viewType && { viewType: column.viewType }))); });
|
|
610
|
+
});
|
|
611
|
+
};
|
|
612
|
+
DossierListComponent.prototype.getData = function () {
|
|
613
|
+
this.findDocumentDefinition(this.documentDefinitionName);
|
|
614
|
+
if (this.hasCachedSearchRequest()) {
|
|
615
|
+
var documentSearchRequest = this.getCachedSearch();
|
|
616
|
+
this.globalSearchFilter = documentSearchRequest.globalSearchFilter;
|
|
617
|
+
this.sequence = documentSearchRequest.sequence;
|
|
618
|
+
this.createdBy = documentSearchRequest.createdBy;
|
|
619
|
+
this.findDocuments(documentSearchRequest);
|
|
620
|
+
}
|
|
621
|
+
else {
|
|
622
|
+
this.doSearch();
|
|
623
|
+
}
|
|
624
|
+
this.getAllAssociatedProcessDefinitions();
|
|
625
|
+
};
|
|
626
|
+
DossierListComponent.prototype.doSearch = function () {
|
|
627
|
+
var documentSearchRequest = this.buildDocumentSearchRequest();
|
|
628
|
+
this.findDocuments(documentSearchRequest);
|
|
629
|
+
};
|
|
630
|
+
DossierListComponent.prototype.findDocuments = function (documentSearchRequest) {
|
|
631
|
+
var _this = this;
|
|
632
|
+
return this.documentService.getDocuments(documentSearchRequest).subscribe(function (documents) {
|
|
633
|
+
_this.documents = documents;
|
|
634
|
+
_this.transformDocuments(_this.documents.content);
|
|
635
|
+
_this.pagination.collectionSize = _this.documents.totalElements;
|
|
636
|
+
_this.storeSearch(documentSearchRequest);
|
|
637
|
+
});
|
|
638
|
+
};
|
|
639
|
+
DossierListComponent.prototype.getAllAssociatedProcessDefinitions = function () {
|
|
640
|
+
var _this = this;
|
|
641
|
+
this.documentService
|
|
642
|
+
.findProcessDocumentDefinitions(this.documentDefinitionName)
|
|
643
|
+
.subscribe(function (processDocumentDefinitions) {
|
|
644
|
+
_this.processDocumentDefinitions = processDocumentDefinitions.filter(function (processDocumentDefinition) { return processDocumentDefinition.canInitializeDocument; });
|
|
645
|
+
_this.processDefinitionListFields = [
|
|
646
|
+
{
|
|
647
|
+
key: 'processName',
|
|
648
|
+
label: 'Proces',
|
|
649
|
+
},
|
|
650
|
+
];
|
|
651
|
+
});
|
|
652
|
+
};
|
|
653
|
+
DossierListComponent.prototype.getCachedSearch = function () {
|
|
654
|
+
var json = JSON.parse(this.getCachedDocumentSearchRequest());
|
|
655
|
+
return new document.DocumentSearchRequestImpl(json.definitionName, this.pagination.page - 1, this.pagination.size, json.sequence, json.createdBy, json.globalSearchFilter, json.sort);
|
|
656
|
+
};
|
|
657
|
+
DossierListComponent.prototype.buildDocumentSearchRequest = function () {
|
|
658
|
+
return new document.DocumentSearchRequestImpl(this.documentDefinitionName, this.pagination.page - 1, this.pagination.size, this.sequence, this.createdBy, this.globalSearchFilter, this.pagination.sort && this.pagination.sort.isSorting
|
|
659
|
+
? this.pagination.sort
|
|
660
|
+
: this.initialSortState);
|
|
661
|
+
};
|
|
662
|
+
DossierListComponent.prototype.storeSearch = function (documentSearchRequest) {
|
|
663
|
+
localStorage.setItem(this.getCachedKey(), JSON.stringify(documentSearchRequest));
|
|
664
|
+
};
|
|
665
|
+
DossierListComponent.prototype.getCachedDocumentSearchRequest = function () {
|
|
666
|
+
return localStorage.getItem(this.getCachedKey()) || '';
|
|
667
|
+
};
|
|
668
|
+
DossierListComponent.prototype.hasCachedSearchRequest = function () {
|
|
669
|
+
return localStorage.getItem(this.getCachedKey()) !== null;
|
|
670
|
+
};
|
|
671
|
+
DossierListComponent.prototype.getCachedKey = function () {
|
|
672
|
+
return 'list-search-' + this.documentDefinitionName;
|
|
673
|
+
};
|
|
674
|
+
DossierListComponent.prototype.rowClick = function (document) {
|
|
675
|
+
this.router.navigate([
|
|
676
|
+
"/dossiers/" + this.documentDefinitionName + "/document/" + document.id + "/" + exports.DefaultTabs.summary,
|
|
677
|
+
]);
|
|
678
|
+
};
|
|
679
|
+
DossierListComponent.prototype.startDossier = function () {
|
|
680
|
+
if (this.processDocumentDefinitions.length > 1) {
|
|
681
|
+
$('#startProcess').modal('show');
|
|
682
|
+
}
|
|
683
|
+
else {
|
|
684
|
+
this.selectedProcessDocumentDefinition = this.processDocumentDefinitions[0];
|
|
685
|
+
this.showStartProcessModal();
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
DossierListComponent.prototype.showStartProcessModal = function () {
|
|
689
|
+
if (this.selectedProcessDocumentDefinition !== null) {
|
|
690
|
+
this.processStart.openModal(this.selectedProcessDocumentDefinition);
|
|
691
|
+
this.selectedProcessDocumentDefinition = null;
|
|
692
|
+
}
|
|
693
|
+
};
|
|
694
|
+
DossierListComponent.prototype.selectProcess = function (processDocumentDefinition) {
|
|
695
|
+
var modal = $('#startProcess');
|
|
696
|
+
if (!this.modalListenerAdded) {
|
|
697
|
+
modal.on('hidden.bs.modal', this.showStartProcessModal.bind(this));
|
|
698
|
+
this.modalListenerAdded = true;
|
|
699
|
+
}
|
|
700
|
+
this.selectedProcessDocumentDefinition = processDocumentDefinition;
|
|
701
|
+
modal.modal('hide');
|
|
702
|
+
};
|
|
703
|
+
DossierListComponent.prototype.findDocumentDefinition = function (documentDefinitionName) {
|
|
704
|
+
var _this = this;
|
|
705
|
+
this.documentService.getDocumentDefinition(documentDefinitionName).subscribe(function (definition) {
|
|
706
|
+
_this.schema = definition.schema;
|
|
707
|
+
});
|
|
708
|
+
};
|
|
709
|
+
DossierListComponent.prototype.transformDocuments = function (documentsContent) {
|
|
710
|
+
this.items = documentsContent.map(function (document) {
|
|
711
|
+
var content = document.content, others = __rest(document, ["content"]);
|
|
712
|
+
return Object.assign(Object.assign({}, content), others);
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
DossierListComponent.prototype.paginationClicked = function (page) {
|
|
716
|
+
this.pagination.page = page;
|
|
717
|
+
this.doSearch();
|
|
718
|
+
};
|
|
719
|
+
DossierListComponent.prototype.sortChanged = function (sortState) {
|
|
720
|
+
this.pagination.sort = sortState;
|
|
721
|
+
this.doSearch();
|
|
722
|
+
};
|
|
723
|
+
DossierListComponent.prototype.getInitialSortState = function () {
|
|
724
|
+
if (this.hasCachedSearchRequest()) {
|
|
725
|
+
var cachedRequest = JSON.parse(this.getCachedDocumentSearchRequest());
|
|
726
|
+
return cachedRequest.sort ? cachedRequest.sort : this.initialSortState;
|
|
727
|
+
}
|
|
728
|
+
return this.initialSortState;
|
|
729
|
+
};
|
|
730
|
+
return DossierListComponent;
|
|
731
|
+
}());
|
|
732
|
+
DossierListComponent.decorators = [
|
|
733
|
+
{ type: i0.Component, args: [{
|
|
734
|
+
selector: 'valtimo-dossier-list',
|
|
735
|
+
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<ng-container *ngTemplateOutlet=\"sidebar\"></ng-container>\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <div>\n <div class=\"text-right mt-m3px mb-3\">\n <button\n type=\"button\"\n class=\"btn btn-space btn-primary mr-0\"\n (click)=\"startDossier()\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n placement=\"bottom\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n >\n {{ 'Start Dossier' | translate }}\n </button>\n </div>\n\n <div\n class=\"modal fade\"\n id=\"startProcess\"\n tabindex=\"-1\"\n role=\"dialog\"\n aria-labelledby=\"startProcessLabel\"\n aria-hidden=\"true\"\n >\n <div class=\"modal-dialog modal-dialog-centered\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h3 class=\"modal-title\" id=\"startProcessLabel\">\n {{ 'dashboard.startProcess.title' | translate }}\n </h3>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"table-responsive\">\n <table class=\"table m-0\">\n <tr\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n (click)=\"selectProcess(processDocumentDefinition)\"\n style=\"cursor: pointer\"\n >\n <td>{{ processDocumentDefinition.processName }}</td>\n </tr>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">\n {{ 'cta.close' | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-list\n [items]=\"items\"\n [fields]=\"fields\"\n (rowClicked)=\"rowClick($event)\"\n [pagination]=\"pagination\"\n [viewMode]=\"true\"\n [header]=\"true\"\n paginationIdentifier=\"dossierList\"\n (paginationClicked)=\"paginationClicked($event)\"\n (paginationSet)=\"paginationSet()\"\n [initialSortState]=\"getInitialSortState()\"\n (sortChanged)=\"sortChanged($event)\"\n >\n <div header>\n <h3 class=\"list-header-title\">\n {{ schema?.title }}\n <sup class=\"ml-1 badge badge-pill badge-primary\">{{\n documents?.content.length || 0\n }}</sup>\n </h3>\n </div>\n </valtimo-list>\n </valtimo-widget>\n </div>\n </div>\n <valtimo-dossier-process-start-modal #processStartModal></valtimo-dossier-process-start-modal>\n</div>\n\n<ng-template #sidebar>\n <valtimo-filter-sidebar>\n <h4 class=\"title\">Search</h4>\n <div class=\"mb-4\">\n <input\n type=\"text\"\n class=\"form-control\"\n placeholder=\"{{ 'dossier.forms.globalSearchPlaceHolder' | translate }}\"\n [(ngModel)]=\"globalSearchFilter\"\n (blur)=\"doSearch()\"\n (keyup.enter)=\"doSearch()\"\n />\n </div>\n\n <div class=\"mb-4\">\n <input\n type=\"number\"\n class=\"form-control\"\n placeholder=\"{{ 'dossier.forms.referenceNumberPlaceHolder' | translate }}\"\n [(ngModel)]=\"sequence\"\n (blur)=\"doSearch()\"\n (keyup.enter)=\"doSearch()\"\n />\n </div>\n </valtimo-filter-sidebar>\n</ng-template>\n",
|
|
736
|
+
styles: [""]
|
|
737
|
+
},] }
|
|
738
|
+
];
|
|
739
|
+
DossierListComponent.ctorParameters = function () { return [
|
|
740
|
+
{ type: router.ActivatedRoute },
|
|
741
|
+
{ type: router.Router },
|
|
742
|
+
{ type: document.DocumentService },
|
|
743
|
+
{ type: core.TranslateService },
|
|
744
|
+
{ type: DossierService }
|
|
745
|
+
]; };
|
|
746
|
+
DossierListComponent.propDecorators = {
|
|
747
|
+
processStart: [{ type: i0.ViewChild, args: ['processStartModal',] }]
|
|
608
748
|
};
|
|
609
749
|
|
|
610
|
-
var moment$1 = moment_;
|
|
611
|
-
moment$1.locale(localStorage.getItem('langKey') || '');
|
|
612
|
-
moment$1.defaultFormat = 'DD MMM YYYY HH:mm';
|
|
613
|
-
var DossierDetailTabSummaryComponent = /** @class */ (function () {
|
|
614
|
-
function DossierDetailTabSummaryComponent(router, documentService, taskService, processService, el, renderer, route, formService, userProviderService) {
|
|
615
|
-
this.router = router;
|
|
616
|
-
this.documentService = documentService;
|
|
617
|
-
this.taskService = taskService;
|
|
618
|
-
this.processService = processService;
|
|
619
|
-
this.el = el;
|
|
620
|
-
this.renderer = renderer;
|
|
621
|
-
this.route = route;
|
|
622
|
-
this.formService = formService;
|
|
623
|
-
this.userProviderService = userProviderService;
|
|
624
|
-
this.processDocumentInstances = [];
|
|
625
|
-
this.tasks = [];
|
|
626
|
-
this.formDefinition = null;
|
|
627
|
-
this.roles = [];
|
|
628
|
-
this.snapshot = this.route.snapshot.paramMap;
|
|
629
|
-
this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
|
|
630
|
-
this.documentId = this.snapshot.get('documentId') || '';
|
|
631
|
-
this.options = new
|
|
632
|
-
this.options.disableAlerts = true;
|
|
633
|
-
}
|
|
634
|
-
DossierDetailTabSummaryComponent.prototype.ngOnInit = function () {
|
|
635
|
-
this.moment = moment$1;
|
|
636
|
-
this.init();
|
|
637
|
-
};
|
|
638
|
-
DossierDetailTabSummaryComponent.prototype.init = function () {
|
|
639
|
-
var _this = this;
|
|
640
|
-
this.documentService.getDocument(this.documentId).subscribe(function (document) {
|
|
641
|
-
_this.document = document;
|
|
642
|
-
});
|
|
643
|
-
this.formService
|
|
644
|
-
.getFormDefinitionByNamePreFilled(this.documentDefinitionName + ".summary", this.documentId)
|
|
645
|
-
.subscribe(function (formDefinition) {
|
|
646
|
-
_this.formDefinition = formDefinition;
|
|
647
|
-
});
|
|
648
|
-
this.userProviderService.getUserSubject().subscribe(function (user) {
|
|
649
|
-
_this.roles = user.roles;
|
|
650
|
-
_this.tasks = [];
|
|
651
|
-
_this.loadProcessDocumentInstances(_this.documentId);
|
|
652
|
-
});
|
|
653
|
-
};
|
|
654
|
-
DossierDetailTabSummaryComponent.prototype.loadProcessDocumentInstances = function (documentId) {
|
|
655
|
-
var _this = this;
|
|
656
|
-
this.documentService
|
|
657
|
-
.findProcessDocumentInstances(documentId)
|
|
658
|
-
.subscribe(function (processDocumentInstances) {
|
|
659
|
-
_this.processDocumentInstances = processDocumentInstances;
|
|
660
|
-
_this.processDocumentInstances.forEach(function (instance) {
|
|
661
|
-
_this.loadProcessInstanceTasks(instance.id.processInstanceId);
|
|
662
|
-
});
|
|
663
|
-
});
|
|
664
|
-
};
|
|
665
|
-
DossierDetailTabSummaryComponent.prototype.loadProcessInstanceTasks = function (processInstanceId) {
|
|
666
|
-
var _this = this;
|
|
667
|
-
this.processService.getProcessInstanceTasks(processInstanceId).subscribe(function (tasks) {
|
|
668
|
-
tasks.forEach(function (task) {
|
|
669
|
-
task.createdUnix = _this.moment(task.created).unix();
|
|
670
|
-
task.created = _this.moment(task.created).format('DD MMM YYYY HH:mm');
|
|
671
|
-
task.isLocked = function () {
|
|
672
|
-
var e_1, _a;
|
|
673
|
-
var locked = true;
|
|
674
|
-
try {
|
|
675
|
-
for (var _b = __values(task.identityLinks), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
676
|
-
var link = _c.value;
|
|
677
|
-
if (link.type === 'candidate' && link.groupId) {
|
|
678
|
-
if (_this.roles.includes(link.groupId)) {
|
|
679
|
-
locked = false;
|
|
680
|
-
break;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
686
|
-
finally {
|
|
687
|
-
try {
|
|
688
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
689
|
-
}
|
|
690
|
-
finally { if (e_1) throw e_1.error; }
|
|
691
|
-
}
|
|
692
|
-
return locked;
|
|
693
|
-
};
|
|
694
|
-
});
|
|
695
|
-
_this.tasks = _this.tasks.concat(tasks);
|
|
696
|
-
_this.tasks.sort(function (t1, t2) { return t2.createdUnix - t1.createdUnix; });
|
|
697
|
-
});
|
|
698
|
-
};
|
|
699
|
-
DossierDetailTabSummaryComponent.prototype.rowTaskClick = function (task) {
|
|
700
|
-
this.taskDetail.openTaskDetails(task);
|
|
701
|
-
};
|
|
702
|
-
return DossierDetailTabSummaryComponent;
|
|
703
|
-
}());
|
|
704
|
-
DossierDetailTabSummaryComponent.decorators = [
|
|
705
|
-
{ type: i0.Component, args: [{
|
|
706
|
-
selector: 'valtimo-dossier-detail-tab-summary',
|
|
707
|
-
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=\"container-fluid\">\n <div class=\"row py-4\">\n <div class=\"col-sm-12 col-md-8 col-xl-9\">\n <div *ngIf=\"document\">\n <div *ngIf=\"formDefinition\" class=\"summaryForm\">\n <div class=\"mb-4\">\n <valtimo-form-io [form]=\"formDefinition\" [options]=\"options\"></valtimo-form-io>\n </div>\n </div>\n </div>\n </div>\n\n <!--Current user tasks right side-->\n <div class=\"col-sm-12 col-md-4 col-xl-3\">\n <h4 class=\"user-tasks-title\">User tasks</h4>\n <ng-container *ngIf=\"!tasks.length\">\n <valtimo-widget>\n <div class=\"p-3\">\n <img class=\"float-left\" src=\"assets/audit-2.png\" height=\"25\" />\n <span class=\"float-right\">{{ 'summary.userTasksDoneState' | translate }}</span>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </ng-container>\n <ng-container *ngFor=\"let task of tasks\">\n <valtimo-widget>\n <div\n class=\"p-3 clickable hoverable\"\n (click)=\"rowTaskClick(task)\"\n *ngIf=\"!task.isLocked()\"\n >\n <span class=\"float-right badge badge-pill badge-primary\">Open</span>\n <strong>{{ task.name }}</strong>\n <div>Created {{ task.created }}</div>\n </div>\n <div class=\"p-3 hoverable\" *ngIf=\"task.isLocked()\">\n <span\n class=\"float-right badge badge-pill badge-secondary bg-grey\"\n ngbTooltip=\"{{ 'summary.taskLocked' | translate }}\"\n >\n <i class=\"icon mdi mdi-lock\"></i>\n </span>\n <strong>{{ task.name }}</strong>\n <div>Created {{ task.created }}</div>\n </div>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"init()\"\n (assignmentOfTaskChanged)=\"init()\"\n ></valtimo-task-detail-modal>\n </div>\n </div>\n</div>\n",
|
|
708
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
709
|
-
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 */.hoverable:hover{background-color:#eee}.summaryForm .formio-component{margin-bottom:0!important}.summaryForm .formio-component div[ref=element] .form-control{background-color:#fff;border:0;font-size:13px;height:24px!important;margin:0;padding:0!important}.summaryForm .formio-field div[ref=element] .form-control{font-weight:400}.summaryForm .formio-value div[ref=element] .form-control{font-weight:700}.user-tasks-title{color:#000;font-weight:400;height:20px;margin-bottom:12px;margin-top:0}"]
|
|
710
|
-
},] }
|
|
711
|
-
];
|
|
712
|
-
DossierDetailTabSummaryComponent.ctorParameters = function () { return [
|
|
713
|
-
{ type: router.Router },
|
|
714
|
-
{ type: document.DocumentService },
|
|
715
|
-
{ type: task.TaskService },
|
|
716
|
-
{ type: process.ProcessService },
|
|
717
|
-
{ type: i0.ElementRef },
|
|
718
|
-
{ type: i0.Renderer2 },
|
|
719
|
-
{ type: router.ActivatedRoute },
|
|
720
|
-
{ type: form.FormService },
|
|
721
|
-
{ type: security.UserProviderService }
|
|
722
|
-
]; };
|
|
723
|
-
DossierDetailTabSummaryComponent.propDecorators = {
|
|
724
|
-
taskDetail: [{ type: i0.ViewChild, args: ['taskDetail',] }]
|
|
750
|
+
var moment$1 = moment_;
|
|
751
|
+
moment$1.locale(localStorage.getItem('langKey') || '');
|
|
752
|
+
moment$1.defaultFormat = 'DD MMM YYYY HH:mm';
|
|
753
|
+
var DossierDetailTabSummaryComponent = /** @class */ (function () {
|
|
754
|
+
function DossierDetailTabSummaryComponent(router, documentService, taskService, processService, el, renderer, route, formService, userProviderService) {
|
|
755
|
+
this.router = router;
|
|
756
|
+
this.documentService = documentService;
|
|
757
|
+
this.taskService = taskService;
|
|
758
|
+
this.processService = processService;
|
|
759
|
+
this.el = el;
|
|
760
|
+
this.renderer = renderer;
|
|
761
|
+
this.route = route;
|
|
762
|
+
this.formService = formService;
|
|
763
|
+
this.userProviderService = userProviderService;
|
|
764
|
+
this.processDocumentInstances = [];
|
|
765
|
+
this.tasks = [];
|
|
766
|
+
this.formDefinition = null;
|
|
767
|
+
this.roles = [];
|
|
768
|
+
this.snapshot = this.route.snapshot.paramMap;
|
|
769
|
+
this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
|
|
770
|
+
this.documentId = this.snapshot.get('documentId') || '';
|
|
771
|
+
this.options = new components.FormioOptionsImpl();
|
|
772
|
+
this.options.disableAlerts = true;
|
|
773
|
+
}
|
|
774
|
+
DossierDetailTabSummaryComponent.prototype.ngOnInit = function () {
|
|
775
|
+
this.moment = moment$1;
|
|
776
|
+
this.init();
|
|
777
|
+
};
|
|
778
|
+
DossierDetailTabSummaryComponent.prototype.init = function () {
|
|
779
|
+
var _this = this;
|
|
780
|
+
this.documentService.getDocument(this.documentId).subscribe(function (document) {
|
|
781
|
+
_this.document = document;
|
|
782
|
+
});
|
|
783
|
+
this.formService
|
|
784
|
+
.getFormDefinitionByNamePreFilled(this.documentDefinitionName + ".summary", this.documentId)
|
|
785
|
+
.subscribe(function (formDefinition) {
|
|
786
|
+
_this.formDefinition = formDefinition;
|
|
787
|
+
});
|
|
788
|
+
this.userProviderService.getUserSubject().subscribe(function (user) {
|
|
789
|
+
_this.roles = user.roles;
|
|
790
|
+
_this.tasks = [];
|
|
791
|
+
_this.loadProcessDocumentInstances(_this.documentId);
|
|
792
|
+
});
|
|
793
|
+
};
|
|
794
|
+
DossierDetailTabSummaryComponent.prototype.loadProcessDocumentInstances = function (documentId) {
|
|
795
|
+
var _this = this;
|
|
796
|
+
this.documentService
|
|
797
|
+
.findProcessDocumentInstances(documentId)
|
|
798
|
+
.subscribe(function (processDocumentInstances) {
|
|
799
|
+
_this.processDocumentInstances = processDocumentInstances;
|
|
800
|
+
_this.processDocumentInstances.forEach(function (instance) {
|
|
801
|
+
_this.loadProcessInstanceTasks(instance.id.processInstanceId);
|
|
802
|
+
});
|
|
803
|
+
});
|
|
804
|
+
};
|
|
805
|
+
DossierDetailTabSummaryComponent.prototype.loadProcessInstanceTasks = function (processInstanceId) {
|
|
806
|
+
var _this = this;
|
|
807
|
+
this.processService.getProcessInstanceTasks(processInstanceId).subscribe(function (tasks) {
|
|
808
|
+
tasks.forEach(function (task) {
|
|
809
|
+
task.createdUnix = _this.moment(task.created).unix();
|
|
810
|
+
task.created = _this.moment(task.created).format('DD MMM YYYY HH:mm');
|
|
811
|
+
task.isLocked = function () {
|
|
812
|
+
var e_1, _a;
|
|
813
|
+
var locked = true;
|
|
814
|
+
try {
|
|
815
|
+
for (var _b = __values(task.identityLinks), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
816
|
+
var link = _c.value;
|
|
817
|
+
if (link.type === 'candidate' && link.groupId) {
|
|
818
|
+
if (_this.roles.includes(link.groupId)) {
|
|
819
|
+
locked = false;
|
|
820
|
+
break;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
826
|
+
finally {
|
|
827
|
+
try {
|
|
828
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
829
|
+
}
|
|
830
|
+
finally { if (e_1) throw e_1.error; }
|
|
831
|
+
}
|
|
832
|
+
return locked;
|
|
833
|
+
};
|
|
834
|
+
});
|
|
835
|
+
_this.tasks = _this.tasks.concat(tasks);
|
|
836
|
+
_this.tasks.sort(function (t1, t2) { return t2.createdUnix - t1.createdUnix; });
|
|
837
|
+
});
|
|
838
|
+
};
|
|
839
|
+
DossierDetailTabSummaryComponent.prototype.rowTaskClick = function (task) {
|
|
840
|
+
this.taskDetail.openTaskDetails(task);
|
|
841
|
+
};
|
|
842
|
+
return DossierDetailTabSummaryComponent;
|
|
843
|
+
}());
|
|
844
|
+
DossierDetailTabSummaryComponent.decorators = [
|
|
845
|
+
{ type: i0.Component, args: [{
|
|
846
|
+
selector: 'valtimo-dossier-detail-tab-summary',
|
|
847
|
+
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=\"container-fluid\">\n <div class=\"row py-4\">\n <div class=\"col-sm-12 col-md-8 col-xl-9\">\n <div *ngIf=\"document\">\n <div *ngIf=\"formDefinition\" class=\"summaryForm\">\n <div class=\"mb-4\">\n <valtimo-form-io [form]=\"formDefinition\" [options]=\"options\"></valtimo-form-io>\n </div>\n </div>\n </div>\n </div>\n\n <!--Current user tasks right side-->\n <div class=\"col-sm-12 col-md-4 col-xl-3\">\n <h4 class=\"user-tasks-title\">User tasks</h4>\n <ng-container *ngIf=\"!tasks.length\">\n <valtimo-widget>\n <div class=\"p-3\">\n <img class=\"float-left\" src=\"assets/audit-2.png\" height=\"25\" />\n <span class=\"float-right\">{{ 'summary.userTasksDoneState' | translate }}</span>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </ng-container>\n <ng-container *ngFor=\"let task of tasks\">\n <valtimo-widget>\n <div\n class=\"p-3 clickable hoverable\"\n (click)=\"rowTaskClick(task)\"\n *ngIf=\"!task.isLocked()\"\n >\n <span class=\"float-right badge badge-pill badge-primary\">Open</span>\n <strong>{{ task.name }}</strong>\n <div>Created {{ task.created }}</div>\n </div>\n <div class=\"p-3 hoverable\" *ngIf=\"task.isLocked()\">\n <span\n class=\"float-right badge badge-pill badge-secondary bg-grey\"\n ngbTooltip=\"{{ 'summary.taskLocked' | translate }}\"\n >\n <i class=\"icon mdi mdi-lock\"></i>\n </span>\n <strong>{{ task.name }}</strong>\n <div>Created {{ task.created }}</div>\n </div>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"init()\"\n (assignmentOfTaskChanged)=\"init()\"\n ></valtimo-task-detail-modal>\n </div>\n </div>\n</div>\n",
|
|
848
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
849
|
+
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 */.hoverable:hover{background-color:#eee}.summaryForm .formio-component{margin-bottom:0!important}.summaryForm .formio-component div[ref=element] .form-control{background-color:#fff;border:0;font-size:13px;height:24px!important;margin:0;padding:0!important}.summaryForm .formio-field div[ref=element] .form-control{font-weight:400}.summaryForm .formio-value div[ref=element] .form-control{font-weight:700}.user-tasks-title{color:#000;font-weight:400;height:20px;margin-bottom:12px;margin-top:0}"]
|
|
850
|
+
},] }
|
|
851
|
+
];
|
|
852
|
+
DossierDetailTabSummaryComponent.ctorParameters = function () { return [
|
|
853
|
+
{ type: router.Router },
|
|
854
|
+
{ type: document.DocumentService },
|
|
855
|
+
{ type: task.TaskService },
|
|
856
|
+
{ type: process.ProcessService },
|
|
857
|
+
{ type: i0.ElementRef },
|
|
858
|
+
{ type: i0.Renderer2 },
|
|
859
|
+
{ type: router.ActivatedRoute },
|
|
860
|
+
{ type: form.FormService },
|
|
861
|
+
{ type: security.UserProviderService }
|
|
862
|
+
]; };
|
|
863
|
+
DossierDetailTabSummaryComponent.propDecorators = {
|
|
864
|
+
taskDetail: [{ type: i0.ViewChild, args: ['taskDetail',] }]
|
|
725
865
|
};
|
|
726
866
|
|
|
727
|
-
/*
|
|
728
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
729
|
-
*
|
|
730
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
731
|
-
* you may not use this file except in compliance with the License.
|
|
732
|
-
* You may obtain a copy of the License at
|
|
733
|
-
*
|
|
734
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
735
|
-
*
|
|
736
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
737
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
738
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
739
|
-
* See the License for the specific language governing permissions and
|
|
740
|
-
* limitations under the License.
|
|
741
|
-
*/
|
|
742
|
-
var DossierDetailTabProgressComponent = /** @class */ (function () {
|
|
743
|
-
function DossierDetailTabProgressComponent(route, documentService) {
|
|
744
|
-
this.route = route;
|
|
745
|
-
this.documentService = documentService;
|
|
746
|
-
var snapshot = this.route.snapshot.paramMap;
|
|
747
|
-
this.documentId = snapshot.get('documentId') || '';
|
|
748
|
-
}
|
|
749
|
-
DossierDetailTabProgressComponent.prototype.ngOnInit = function () {
|
|
750
|
-
var _this = this;
|
|
751
|
-
this.documentService
|
|
752
|
-
.findProcessDocumentInstances(this.documentId)
|
|
753
|
-
.subscribe(function (processDocumentInstances) {
|
|
754
|
-
_this.processDocumentInstances = processDocumentInstances;
|
|
755
|
-
_this.selectedProcessInstanceId = processDocumentInstances[0].id.processInstanceId;
|
|
756
|
-
});
|
|
757
|
-
};
|
|
758
|
-
DossierDetailTabProgressComponent.prototype.loadProcessInstance = function (processInstanceId) {
|
|
759
|
-
this.selectedProcessInstanceId = processInstanceId;
|
|
760
|
-
};
|
|
761
|
-
return DossierDetailTabProgressComponent;
|
|
762
|
-
}());
|
|
763
|
-
DossierDetailTabProgressComponent.decorators = [
|
|
764
|
-
{ type: i0.Component, args: [{
|
|
765
|
-
selector: 'valtimo-dossier-detail-tab-progress',
|
|
766
|
-
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=\"full-height-tab-content\" *ngIf=\"processDocumentInstances\">\n <div class=\"col-3\">\n <label><strong>Process</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"loadProcessInstance($event.target.value)\">\n <option\n *ngFor=\"let processDocumentInstance of processDocumentInstances\"\n [value]=\"processDocumentInstance.id.processInstanceId\"\n [selected]=\"selectedProcessInstanceId === processDocumentInstance.id.processInstanceId\"\n >\n {{ processDocumentInstance.processName }}\n </option>\n </select>\n </div>\n <valtimo-process-diagram\n [processInstanceId]=\"selectedProcessInstanceId\"\n ></valtimo-process-diagram>\n</div>\n",
|
|
767
|
-
styles: [".full-height-tab-content{height:calc(100vh - 380px);width:100%}"]
|
|
768
|
-
},] }
|
|
769
|
-
];
|
|
770
|
-
DossierDetailTabProgressComponent.ctorParameters = function () { return [
|
|
771
|
-
{ type: router.ActivatedRoute },
|
|
772
|
-
{ type: document.DocumentService }
|
|
867
|
+
/*
|
|
868
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
869
|
+
*
|
|
870
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
871
|
+
* you may not use this file except in compliance with the License.
|
|
872
|
+
* You may obtain a copy of the License at
|
|
873
|
+
*
|
|
874
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
875
|
+
*
|
|
876
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
877
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
878
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
879
|
+
* See the License for the specific language governing permissions and
|
|
880
|
+
* limitations under the License.
|
|
881
|
+
*/
|
|
882
|
+
var DossierDetailTabProgressComponent = /** @class */ (function () {
|
|
883
|
+
function DossierDetailTabProgressComponent(route, documentService) {
|
|
884
|
+
this.route = route;
|
|
885
|
+
this.documentService = documentService;
|
|
886
|
+
var snapshot = this.route.snapshot.paramMap;
|
|
887
|
+
this.documentId = snapshot.get('documentId') || '';
|
|
888
|
+
}
|
|
889
|
+
DossierDetailTabProgressComponent.prototype.ngOnInit = function () {
|
|
890
|
+
var _this = this;
|
|
891
|
+
this.documentService
|
|
892
|
+
.findProcessDocumentInstances(this.documentId)
|
|
893
|
+
.subscribe(function (processDocumentInstances) {
|
|
894
|
+
_this.processDocumentInstances = processDocumentInstances;
|
|
895
|
+
_this.selectedProcessInstanceId = processDocumentInstances[0].id.processInstanceId;
|
|
896
|
+
});
|
|
897
|
+
};
|
|
898
|
+
DossierDetailTabProgressComponent.prototype.loadProcessInstance = function (processInstanceId) {
|
|
899
|
+
this.selectedProcessInstanceId = processInstanceId;
|
|
900
|
+
};
|
|
901
|
+
return DossierDetailTabProgressComponent;
|
|
902
|
+
}());
|
|
903
|
+
DossierDetailTabProgressComponent.decorators = [
|
|
904
|
+
{ type: i0.Component, args: [{
|
|
905
|
+
selector: 'valtimo-dossier-detail-tab-progress',
|
|
906
|
+
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=\"full-height-tab-content\" *ngIf=\"processDocumentInstances\">\n <div class=\"col-3\">\n <label><strong>Process</strong></label\n ><br />\n <select class=\"form-control\" (change)=\"loadProcessInstance($event.target.value)\">\n <option\n *ngFor=\"let processDocumentInstance of processDocumentInstances\"\n [value]=\"processDocumentInstance.id.processInstanceId\"\n [selected]=\"selectedProcessInstanceId === processDocumentInstance.id.processInstanceId\"\n >\n {{ processDocumentInstance.processName }}\n </option>\n </select>\n </div>\n <valtimo-process-diagram\n [processInstanceId]=\"selectedProcessInstanceId\"\n ></valtimo-process-diagram>\n</div>\n",
|
|
907
|
+
styles: [".full-height-tab-content{height:calc(100vh - 380px);width:100%}"]
|
|
908
|
+
},] }
|
|
909
|
+
];
|
|
910
|
+
DossierDetailTabProgressComponent.ctorParameters = function () { return [
|
|
911
|
+
{ type: router.ActivatedRoute },
|
|
912
|
+
{ type: document.DocumentService }
|
|
773
913
|
]; };
|
|
774
914
|
|
|
775
|
-
/*
|
|
776
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
777
|
-
*
|
|
778
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
779
|
-
* you may not use this file except in compliance with the License.
|
|
780
|
-
* You may obtain a copy of the License at
|
|
781
|
-
*
|
|
782
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
783
|
-
*
|
|
784
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
785
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
786
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
787
|
-
* See the License for the specific language governing permissions and
|
|
788
|
-
* limitations under the License.
|
|
789
|
-
*/
|
|
790
|
-
var moment$2 = moment_;
|
|
791
|
-
moment$2.locale(localStorage.getItem('langKey') || '');
|
|
792
|
-
moment$2.defaultFormat = 'DD MMM YYYY HH:mm';
|
|
793
|
-
var DossierDetailTabAuditComponent = /** @class */ (function () {
|
|
794
|
-
function DossierDetailTabAuditComponent(route, documentService, spinnerService) {
|
|
795
|
-
this.route = route;
|
|
796
|
-
this.documentService = documentService;
|
|
797
|
-
this.spinnerService = spinnerService;
|
|
798
|
-
this.paginationClicked = new i0.EventEmitter();
|
|
799
|
-
this.defaultAuditPage = 0;
|
|
800
|
-
this.spinnerService.show('auditSpinner');
|
|
801
|
-
var snapshot = this.route.snapshot.paramMap;
|
|
802
|
-
this.documentId = snapshot.get('documentId') || '';
|
|
803
|
-
}
|
|
804
|
-
DossierDetailTabAuditComponent.getTranslationKey = function (auditEvent) {
|
|
805
|
-
var classNameArray = auditEvent.className.split('.');
|
|
806
|
-
var eventName = classNameArray[classNameArray.length - 1];
|
|
807
|
-
return 'events.' + eventName;
|
|
808
|
-
};
|
|
809
|
-
DossierDetailTabAuditComponent.prototype.ngOnInit = function () {
|
|
810
|
-
this.loadAuditPage(this.defaultAuditPage);
|
|
811
|
-
};
|
|
812
|
-
DossierDetailTabAuditComponent.prototype.loadAuditPage = function (pageNumber) {
|
|
813
|
-
var _this = this;
|
|
814
|
-
this.documentService.getAuditLog(this.documentId, pageNumber).subscribe(function (page) {
|
|
815
|
-
var timelineItems = [];
|
|
816
|
-
page.content.forEach(function (auditRecord) {
|
|
817
|
-
var occurredOn = moment$2(auditRecord.metaData.occurredOn);
|
|
818
|
-
var fromNow = occurredOn.fromNow();
|
|
819
|
-
timelineItems.push(new
|
|
820
|
-
});
|
|
821
|
-
_this.timelineItems = timelineItems;
|
|
822
|
-
_this.spinnerService.hide('auditSpinner');
|
|
823
|
-
_this.pagination = page;
|
|
824
|
-
_this.pagination.number += 1;
|
|
825
|
-
});
|
|
826
|
-
};
|
|
827
|
-
DossierDetailTabAuditComponent.prototype.onChangePagination = function (page) {
|
|
828
|
-
this.paginationClicked.emit(page);
|
|
829
|
-
this.currentAuditPage = page - 1;
|
|
830
|
-
this.loadAuditPage(this.currentAuditPage);
|
|
831
|
-
};
|
|
832
|
-
return DossierDetailTabAuditComponent;
|
|
833
|
-
}());
|
|
834
|
-
DossierDetailTabAuditComponent.decorators = [
|
|
835
|
-
{ type: i0.Component, args: [{
|
|
836
|
-
selector: 'valtimo-dossier-detail-tab-audit',
|
|
837
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div *ngIf=\"timelineItems\">\n <valtimo-timeline [items]=\"timelineItems\"></valtimo-timeline>\n</div>\n<valtimo-spinner\n [useBootstrapSpinner]=\"false\"\n name=\"auditSpinner\"\n bdColor=\"rgba(125, 125, 125, 0.35)\"\n color=\"#264251\"\n type=\"square-jelly-box\"\n>\n</valtimo-spinner>\n<div\n class=\"pagination-holder audit-pagination bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0\"\n *ngIf=\"pagination && pagination.totalElements > pagination.size\"\n>\n <div class=\"float-left page-count col-4\">\n <strong>{{\n 'list.currentPage' | translate: {current: pagination.number, total: pagination.totalPages}\n }}</strong>\n <br />\n {{\n pagination.totalElements === 1\n ? ('list.showingResult' | translate: {number: pagination.content.length})\n : ('list.showingResults'\n | translate: {number: pagination.content.length, total: pagination.totalElements})\n }}\n </div>\n <div class=\"col-8\">\n <ngb-pagination\n *ngIf=\"pagination.totalElements > pagination.size\"\n class=\"float-right\"\n [collectionSize]=\"pagination.totalElements\"\n [(page)]=\"pagination.number\"\n [pageSize]=\"pagination.size\"\n [maxSize]=\"pagination.size\"\n [rotate]=\"true\"\n (pageChange)=\"onChangePagination(pagination.number)\"\n ></ngb-pagination>\n </div>\n</div>\n",
|
|
838
|
-
styles: [".audit-pagination{border-top:1px solid #dee2e6;margin:0 -1.923rem -1.923rem!important}"]
|
|
839
|
-
},] }
|
|
840
|
-
];
|
|
841
|
-
DossierDetailTabAuditComponent.ctorParameters = function () { return [
|
|
842
|
-
{ type: router.ActivatedRoute },
|
|
843
|
-
{ type: document.DocumentService },
|
|
844
|
-
{ type: ngxSpinner.NgxSpinnerService }
|
|
845
|
-
]; };
|
|
846
|
-
DossierDetailTabAuditComponent.propDecorators = {
|
|
847
|
-
paginationClicked: [{ type: i0.Output }]
|
|
915
|
+
/*
|
|
916
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
917
|
+
*
|
|
918
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
919
|
+
* you may not use this file except in compliance with the License.
|
|
920
|
+
* You may obtain a copy of the License at
|
|
921
|
+
*
|
|
922
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
923
|
+
*
|
|
924
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
925
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
926
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
927
|
+
* See the License for the specific language governing permissions and
|
|
928
|
+
* limitations under the License.
|
|
929
|
+
*/
|
|
930
|
+
var moment$2 = moment_;
|
|
931
|
+
moment$2.locale(localStorage.getItem('langKey') || '');
|
|
932
|
+
moment$2.defaultFormat = 'DD MMM YYYY HH:mm';
|
|
933
|
+
var DossierDetailTabAuditComponent = /** @class */ (function () {
|
|
934
|
+
function DossierDetailTabAuditComponent(route, documentService, spinnerService) {
|
|
935
|
+
this.route = route;
|
|
936
|
+
this.documentService = documentService;
|
|
937
|
+
this.spinnerService = spinnerService;
|
|
938
|
+
this.paginationClicked = new i0.EventEmitter();
|
|
939
|
+
this.defaultAuditPage = 0;
|
|
940
|
+
this.spinnerService.show('auditSpinner');
|
|
941
|
+
var snapshot = this.route.snapshot.paramMap;
|
|
942
|
+
this.documentId = snapshot.get('documentId') || '';
|
|
943
|
+
}
|
|
944
|
+
DossierDetailTabAuditComponent.getTranslationKey = function (auditEvent) {
|
|
945
|
+
var classNameArray = auditEvent.className.split('.');
|
|
946
|
+
var eventName = classNameArray[classNameArray.length - 1];
|
|
947
|
+
return 'events.' + eventName;
|
|
948
|
+
};
|
|
949
|
+
DossierDetailTabAuditComponent.prototype.ngOnInit = function () {
|
|
950
|
+
this.loadAuditPage(this.defaultAuditPage);
|
|
951
|
+
};
|
|
952
|
+
DossierDetailTabAuditComponent.prototype.loadAuditPage = function (pageNumber) {
|
|
953
|
+
var _this = this;
|
|
954
|
+
this.documentService.getAuditLog(this.documentId, pageNumber).subscribe(function (page) {
|
|
955
|
+
var timelineItems = [];
|
|
956
|
+
page.content.forEach(function (auditRecord) {
|
|
957
|
+
var occurredOn = moment$2(auditRecord.metaData.occurredOn);
|
|
958
|
+
var fromNow = occurredOn.fromNow();
|
|
959
|
+
timelineItems.push(new components.TimelineItemImpl(occurredOn.format('DD MMM YYYY'), occurredOn.format('HH:mm'), auditRecord.metaData.user, fromNow, DossierDetailTabAuditComponent.getTranslationKey(auditRecord.auditEvent), auditRecord.auditEvent));
|
|
960
|
+
});
|
|
961
|
+
_this.timelineItems = timelineItems;
|
|
962
|
+
_this.spinnerService.hide('auditSpinner');
|
|
963
|
+
_this.pagination = page;
|
|
964
|
+
_this.pagination.number += 1;
|
|
965
|
+
});
|
|
966
|
+
};
|
|
967
|
+
DossierDetailTabAuditComponent.prototype.onChangePagination = function (page) {
|
|
968
|
+
this.paginationClicked.emit(page);
|
|
969
|
+
this.currentAuditPage = page - 1;
|
|
970
|
+
this.loadAuditPage(this.currentAuditPage);
|
|
971
|
+
};
|
|
972
|
+
return DossierDetailTabAuditComponent;
|
|
973
|
+
}());
|
|
974
|
+
DossierDetailTabAuditComponent.decorators = [
|
|
975
|
+
{ type: i0.Component, args: [{
|
|
976
|
+
selector: 'valtimo-dossier-detail-tab-audit',
|
|
977
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div *ngIf=\"timelineItems\">\n <valtimo-timeline [items]=\"timelineItems\"></valtimo-timeline>\n</div>\n<valtimo-spinner\n [useBootstrapSpinner]=\"false\"\n name=\"auditSpinner\"\n bdColor=\"rgba(125, 125, 125, 0.35)\"\n color=\"#264251\"\n type=\"square-jelly-box\"\n>\n</valtimo-spinner>\n<div\n class=\"pagination-holder audit-pagination bg-light px-4 pt-4 pb-2 overflow-auto row mr-0 ml-0\"\n *ngIf=\"pagination && pagination.totalElements > pagination.size\"\n>\n <div class=\"float-left page-count col-4\">\n <strong>{{\n 'list.currentPage' | translate: {current: pagination.number, total: pagination.totalPages}\n }}</strong>\n <br />\n {{\n pagination.totalElements === 1\n ? ('list.showingResult' | translate: {number: pagination.content.length})\n : ('list.showingResults'\n | translate: {number: pagination.content.length, total: pagination.totalElements})\n }}\n </div>\n <div class=\"col-8\">\n <ngb-pagination\n *ngIf=\"pagination.totalElements > pagination.size\"\n class=\"float-right\"\n [collectionSize]=\"pagination.totalElements\"\n [(page)]=\"pagination.number\"\n [pageSize]=\"pagination.size\"\n [maxSize]=\"pagination.size\"\n [rotate]=\"true\"\n (pageChange)=\"onChangePagination(pagination.number)\"\n ></ngb-pagination>\n </div>\n</div>\n",
|
|
978
|
+
styles: [".audit-pagination{border-top:1px solid #dee2e6;margin:0 -1.923rem -1.923rem!important}"]
|
|
979
|
+
},] }
|
|
980
|
+
];
|
|
981
|
+
DossierDetailTabAuditComponent.ctorParameters = function () { return [
|
|
982
|
+
{ type: router.ActivatedRoute },
|
|
983
|
+
{ type: document.DocumentService },
|
|
984
|
+
{ type: ngxSpinner.NgxSpinnerService }
|
|
985
|
+
]; };
|
|
986
|
+
DossierDetailTabAuditComponent.propDecorators = {
|
|
987
|
+
paginationClicked: [{ type: i0.Output }]
|
|
848
988
|
};
|
|
849
989
|
|
|
850
|
-
var DossierDetailTabDocumentsComponent = /** @class */ (function () {
|
|
851
|
-
function DossierDetailTabDocumentsComponent(route, documentService, toastrService, uploadProviderService, downloadService, translateService, configService) {
|
|
852
|
-
var _this = this;
|
|
853
|
-
var _a, _b;
|
|
854
|
-
this.route = route;
|
|
855
|
-
this.documentService = documentService;
|
|
856
|
-
this.toastrService = toastrService;
|
|
857
|
-
this.uploadProviderService = uploadProviderService;
|
|
858
|
-
this.downloadService = downloadService;
|
|
859
|
-
this.translateService = translateService;
|
|
860
|
-
this.configService = configService;
|
|
861
|
-
this.maxFileSize = ((_b = (_a = this.configService) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.caseFileSizeUploadLimitMB) || 5;
|
|
862
|
-
this.refetch$ = new rxjs.BehaviorSubject(null);
|
|
863
|
-
this.relatedFiles$ = this.refetch$.pipe(operators.switchMap(function () { return rxjs.combineLatest([
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
{ key: '
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
{
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
this.
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
this.
|
|
896
|
-
}
|
|
897
|
-
DossierDetailTabDocumentsComponent.prototype.
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
_this.
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
_this.
|
|
909
|
-
_this.uploading$.next(false);
|
|
910
|
-
})
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
_this.toastrService.
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
};
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
]
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
{ type:
|
|
946
|
-
{ type:
|
|
947
|
-
{ type:
|
|
948
|
-
{ type:
|
|
990
|
+
var DossierDetailTabDocumentsComponent = /** @class */ (function () {
|
|
991
|
+
function DossierDetailTabDocumentsComponent(route, documentService, toastrService, uploadProviderService, downloadService, translateService, configService) {
|
|
992
|
+
var _this = this;
|
|
993
|
+
var _a, _b;
|
|
994
|
+
this.route = route;
|
|
995
|
+
this.documentService = documentService;
|
|
996
|
+
this.toastrService = toastrService;
|
|
997
|
+
this.uploadProviderService = uploadProviderService;
|
|
998
|
+
this.downloadService = downloadService;
|
|
999
|
+
this.translateService = translateService;
|
|
1000
|
+
this.configService = configService;
|
|
1001
|
+
this.maxFileSize = ((_b = (_a = this.configService) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.caseFileSizeUploadLimitMB) || 5;
|
|
1002
|
+
this.refetch$ = new rxjs.BehaviorSubject(null);
|
|
1003
|
+
this.relatedFiles$ = this.refetch$.pipe(operators.switchMap(function () { return rxjs.combineLatest([
|
|
1004
|
+
_this.documentService.getDocument(_this.documentId),
|
|
1005
|
+
_this.translateService.stream('key'),
|
|
1006
|
+
]); }), operators.map(function (_c) {
|
|
1007
|
+
var _d = __read(_c, 1), document = _d[0];
|
|
1008
|
+
var relatedFiles = (document === null || document === void 0 ? void 0 : document.relatedFiles) || [];
|
|
1009
|
+
var translatedFiles = relatedFiles.map(function (file) {
|
|
1010
|
+
return Object.assign(Object.assign({}, file), { createdBy: file.createdBy || _this.translateService.instant('list.automaticallyGenerated') });
|
|
1011
|
+
});
|
|
1012
|
+
return translatedFiles || [];
|
|
1013
|
+
}));
|
|
1014
|
+
this.fields = [
|
|
1015
|
+
{ key: 'fileName', label: 'File name' },
|
|
1016
|
+
{ key: 'sizeInBytes', label: 'Size in bytes' },
|
|
1017
|
+
{ key: 'createdOn', label: 'Created on', viewType: 'date' },
|
|
1018
|
+
{ key: 'createdBy', label: 'Created by' },
|
|
1019
|
+
];
|
|
1020
|
+
this.actions = [
|
|
1021
|
+
{
|
|
1022
|
+
columnName: '',
|
|
1023
|
+
iconClass: 'fas fa-external-link-alt',
|
|
1024
|
+
callback: this.downloadDocument.bind(this),
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
columnName: '',
|
|
1028
|
+
iconClass: 'fas fa-trash-alt',
|
|
1029
|
+
callback: this.removeRelatedFile.bind(this),
|
|
1030
|
+
},
|
|
1031
|
+
];
|
|
1032
|
+
this.uploading$ = new rxjs.BehaviorSubject(false);
|
|
1033
|
+
var snapshot = this.route.snapshot.paramMap;
|
|
1034
|
+
this.documentId = snapshot.get('documentId') || '';
|
|
1035
|
+
this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';
|
|
1036
|
+
}
|
|
1037
|
+
DossierDetailTabDocumentsComponent.prototype.ngOnInit = function () {
|
|
1038
|
+
this.refetchDocuments();
|
|
1039
|
+
};
|
|
1040
|
+
DossierDetailTabDocumentsComponent.prototype.fileSelected = function (file) {
|
|
1041
|
+
var _this = this;
|
|
1042
|
+
this.uploading$.next(true);
|
|
1043
|
+
this.uploadProviderService
|
|
1044
|
+
.uploadFile(file, this.documentDefinitionName)
|
|
1045
|
+
.pipe(operators.switchMap(function (resourceFile) { return _this.documentService.assignResource(_this.documentId, resourceFile.data.resourceId); }))
|
|
1046
|
+
.subscribe(function () {
|
|
1047
|
+
_this.toastrService.success('Successfully uploaded document to dossier');
|
|
1048
|
+
_this.refetchDocuments();
|
|
1049
|
+
_this.uploading$.next(false);
|
|
1050
|
+
}, function () {
|
|
1051
|
+
_this.toastrService.error('Failed to upload document to dossier');
|
|
1052
|
+
_this.uploading$.next(false);
|
|
1053
|
+
});
|
|
1054
|
+
};
|
|
1055
|
+
DossierDetailTabDocumentsComponent.prototype.downloadDocument = function (relatedFile) {
|
|
1056
|
+
var _this = this;
|
|
1057
|
+
this.uploadProviderService
|
|
1058
|
+
.getResource(relatedFile.fileId)
|
|
1059
|
+
.subscribe(function (resource) {
|
|
1060
|
+
_this.downloadService.downloadFile(resource.url, resource.resource.name);
|
|
1061
|
+
});
|
|
1062
|
+
};
|
|
1063
|
+
DossierDetailTabDocumentsComponent.prototype.removeRelatedFile = function (relatedFile) {
|
|
1064
|
+
var _this = this;
|
|
1065
|
+
this.documentService.removeResource(this.documentId, relatedFile.fileId).subscribe(function () {
|
|
1066
|
+
_this.toastrService.success('Successfully removed document from dossier');
|
|
1067
|
+
_this.refetchDocuments();
|
|
1068
|
+
}, function () {
|
|
1069
|
+
_this.toastrService.error('Failed to remove document from dossier');
|
|
1070
|
+
});
|
|
1071
|
+
};
|
|
1072
|
+
DossierDetailTabDocumentsComponent.prototype.refetchDocuments = function () {
|
|
1073
|
+
this.refetch$.next(null);
|
|
1074
|
+
};
|
|
1075
|
+
return DossierDetailTabDocumentsComponent;
|
|
1076
|
+
}());
|
|
1077
|
+
DossierDetailTabDocumentsComponent.decorators = [
|
|
1078
|
+
{ type: i0.Component, args: [{
|
|
1079
|
+
selector: 'valtimo-dossier-detail-tab-documents',
|
|
1080
|
+
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-dropzone\n (fileSelected)=\"fileSelected($event)\"\n [acceptedFiles]=\"null\"\n [hideFilePreview]=\"true\"\n [hideTitle]=\"true\"\n [maxFileSize]=\"maxFileSize\"\n [showMaxFileSize]=\"true\"\n [camera]=\"false\"\n [uploading]=\"uploading$ | async\"\n></valtimo-dropzone>\n\n<valtimo-widget>\n <valtimo-list\n [fields]=\"fields\"\n [items]=\"relatedFiles$ | async\"\n [header]=\"true\"\n [isSearchable]=\"true\"\n [viewMode]=\"true\"\n [actions]=\"actions\"\n >\n <div header>\n <h3 class=\"list-header-title\">{{ 'Related documents' | translate }}</h3>\n <h5 class=\"list-header-description\">\n {{ 'Overview of all documents in this dossier' | translate }}\n </h5>\n </div>\n </valtimo-list>\n</valtimo-widget>\n",
|
|
1081
|
+
styles: [""]
|
|
1082
|
+
},] }
|
|
1083
|
+
];
|
|
1084
|
+
DossierDetailTabDocumentsComponent.ctorParameters = function () { return [
|
|
1085
|
+
{ type: router.ActivatedRoute },
|
|
1086
|
+
{ type: document.DocumentService },
|
|
1087
|
+
{ type: ngxToastr.ToastrService },
|
|
1088
|
+
{ type: resource.UploadProviderService },
|
|
1089
|
+
{ type: resource.DownloadService },
|
|
1090
|
+
{ type: core.TranslateService },
|
|
1091
|
+
{ type: i1.ConfigService }
|
|
949
1092
|
]; };
|
|
950
1093
|
|
|
951
|
-
/*
|
|
952
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
953
|
-
*
|
|
954
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
955
|
-
* you may not use this file except in compliance with the License.
|
|
956
|
-
* You may obtain a copy of the License at
|
|
957
|
-
*
|
|
958
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
959
|
-
*
|
|
960
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
961
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
962
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
963
|
-
* See the License for the specific language governing permissions and
|
|
964
|
-
* limitations under the License.
|
|
965
|
-
*/
|
|
966
|
-
var TAB_MAP = new i0.InjectionToken('TabMap');
|
|
967
|
-
var DEFAULT_TABS = new Map([
|
|
968
|
-
[exports.DefaultTabs.summary, DossierDetailTabSummaryComponent],
|
|
969
|
-
[exports.DefaultTabs.progress, DossierDetailTabProgressComponent],
|
|
970
|
-
[exports.DefaultTabs.audit, DossierDetailTabAuditComponent],
|
|
971
|
-
[exports.DefaultTabs.documents, DossierDetailTabDocumentsComponent],
|
|
1094
|
+
/*
|
|
1095
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1096
|
+
*
|
|
1097
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1098
|
+
* you may not use this file except in compliance with the License.
|
|
1099
|
+
* You may obtain a copy of the License at
|
|
1100
|
+
*
|
|
1101
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1102
|
+
*
|
|
1103
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1104
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1105
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1106
|
+
* See the License for the specific language governing permissions and
|
|
1107
|
+
* limitations under the License.
|
|
1108
|
+
*/
|
|
1109
|
+
var TAB_MAP = new i0.InjectionToken('TabMap');
|
|
1110
|
+
var DEFAULT_TABS = new Map([
|
|
1111
|
+
[exports.DefaultTabs.summary, DossierDetailTabSummaryComponent],
|
|
1112
|
+
[exports.DefaultTabs.progress, DossierDetailTabProgressComponent],
|
|
1113
|
+
[exports.DefaultTabs.audit, DossierDetailTabAuditComponent],
|
|
1114
|
+
[exports.DefaultTabs.documents, DossierDetailTabDocumentsComponent],
|
|
972
1115
|
]);
|
|
973
1116
|
|
|
974
|
-
/*
|
|
975
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
976
|
-
*
|
|
977
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
978
|
-
* you may not use this file except in compliance with the License.
|
|
979
|
-
* You may obtain a copy of the License at
|
|
980
|
-
*
|
|
981
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
982
|
-
*
|
|
983
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
984
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
985
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
986
|
-
* See the License for the specific language governing permissions and
|
|
987
|
-
* limitations under the License.
|
|
988
|
-
*/
|
|
989
|
-
var TabService = /** @class */ (function () {
|
|
990
|
-
function TabService(tabMap) {
|
|
991
|
-
var _this = this;
|
|
992
|
-
if (tabMap === void 0) { tabMap = DEFAULT_TABS; }
|
|
993
|
-
this.tabs = [];
|
|
994
|
-
this.tabMap = tabMap;
|
|
995
|
-
var i = 0;
|
|
996
|
-
this.tabMap.forEach(function (component, name, map) {
|
|
997
|
-
_this.tabs.push(new
|
|
998
|
-
i++;
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
TabService.prototype.getTabs = function () {
|
|
1002
|
-
return this.tabs;
|
|
1003
|
-
};
|
|
1004
|
-
return TabService;
|
|
1005
|
-
}());
|
|
1006
|
-
TabService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TabService_Factory() { return new TabService(i0.ɵɵinject(TAB_MAP)); }, token: TabService, providedIn: "root" });
|
|
1007
|
-
TabService.decorators = [
|
|
1008
|
-
{ type: i0.Injectable, args: [{
|
|
1009
|
-
providedIn: 'root',
|
|
1010
|
-
},] }
|
|
1011
|
-
];
|
|
1012
|
-
TabService.ctorParameters = function () { return [
|
|
1013
|
-
{ type: Map, decorators: [{ type: i0.Inject, args: [TAB_MAP,] }] }
|
|
1117
|
+
/*
|
|
1118
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1119
|
+
*
|
|
1120
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1121
|
+
* you may not use this file except in compliance with the License.
|
|
1122
|
+
* You may obtain a copy of the License at
|
|
1123
|
+
*
|
|
1124
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1125
|
+
*
|
|
1126
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1127
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1128
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1129
|
+
* See the License for the specific language governing permissions and
|
|
1130
|
+
* limitations under the License.
|
|
1131
|
+
*/
|
|
1132
|
+
var TabService = /** @class */ (function () {
|
|
1133
|
+
function TabService(tabMap) {
|
|
1134
|
+
var _this = this;
|
|
1135
|
+
if (tabMap === void 0) { tabMap = DEFAULT_TABS; }
|
|
1136
|
+
this.tabs = [];
|
|
1137
|
+
this.tabMap = tabMap;
|
|
1138
|
+
var i = 0;
|
|
1139
|
+
this.tabMap.forEach(function (component, name, map) {
|
|
1140
|
+
_this.tabs.push(new TabImpl(name, i, component));
|
|
1141
|
+
i++;
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
TabService.prototype.getTabs = function () {
|
|
1145
|
+
return this.tabs;
|
|
1146
|
+
};
|
|
1147
|
+
return TabService;
|
|
1148
|
+
}());
|
|
1149
|
+
TabService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TabService_Factory() { return new TabService(i0.ɵɵinject(TAB_MAP)); }, token: TabService, providedIn: "root" });
|
|
1150
|
+
TabService.decorators = [
|
|
1151
|
+
{ type: i0.Injectable, args: [{
|
|
1152
|
+
providedIn: 'root',
|
|
1153
|
+
},] }
|
|
1154
|
+
];
|
|
1155
|
+
TabService.ctorParameters = function () { return [
|
|
1156
|
+
{ type: Map, decorators: [{ type: i0.Inject, args: [TAB_MAP,] }] }
|
|
1014
1157
|
]; };
|
|
1015
1158
|
|
|
1016
|
-
/*
|
|
1017
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1018
|
-
*
|
|
1019
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1020
|
-
* you may not use this file except in compliance with the License.
|
|
1021
|
-
* You may obtain a copy of the License at
|
|
1022
|
-
*
|
|
1023
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1024
|
-
*
|
|
1025
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1026
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1027
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1028
|
-
* See the License for the specific language governing permissions and
|
|
1029
|
-
* limitations under the License.
|
|
1030
|
-
*/
|
|
1031
|
-
var DossierDetailComponent = /** @class */ (function () {
|
|
1032
|
-
function DossierDetailComponent(componentFactoryResolver, translateService, documentService, processService, route, router, location, tabService) {
|
|
1033
|
-
this.componentFactoryResolver = componentFactoryResolver;
|
|
1034
|
-
this.translateService = translateService;
|
|
1035
|
-
this.documentService = documentService;
|
|
1036
|
-
this.processService = processService;
|
|
1037
|
-
this.route = route;
|
|
1038
|
-
this.router = router;
|
|
1039
|
-
this.location = location;
|
|
1040
|
-
this.tabService = tabService;
|
|
1041
|
-
this.document = null;
|
|
1042
|
-
this.tabLoader = null;
|
|
1043
|
-
this.processDefinitionListFields = [];
|
|
1044
|
-
this.processDocumentDefinitions = [];
|
|
1045
|
-
this.snapshot = this.route.snapshot.paramMap;
|
|
1046
|
-
this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
|
|
1047
|
-
this.documentId = this.snapshot.get('documentId') || '';
|
|
1048
|
-
}
|
|
1049
|
-
DossierDetailComponent.prototype.ngOnInit = function () {
|
|
1050
|
-
var _this = this;
|
|
1051
|
-
this.tabLoader = new
|
|
1052
|
-
this.documentService
|
|
1053
|
-
.getDocumentDefinition(this.documentDefinitionName)
|
|
1054
|
-
.subscribe(function (definition) {
|
|
1055
|
-
_this.documentDefinitionNameTitle = definition.schema.title;
|
|
1056
|
-
});
|
|
1057
|
-
this.initialTabName = this.snapshot.get('tab');
|
|
1058
|
-
this.tabLoader.initial(this.initialTabName);
|
|
1059
|
-
this.getAllAssociatedProcessDefinitions();
|
|
1060
|
-
};
|
|
1061
|
-
DossierDetailComponent.prototype.getAllAssociatedProcessDefinitions = function () {
|
|
1062
|
-
var _this = this;
|
|
1063
|
-
this.documentService
|
|
1064
|
-
.findProcessDocumentDefinitions(this.documentDefinitionName)
|
|
1065
|
-
.subscribe(function (processDocumentDefinitions) {
|
|
1066
|
-
_this.processDocumentDefinitions = processDocumentDefinitions.filter(function (processDocumentDefinition) { return processDocumentDefinition.startableByUser; });
|
|
1067
|
-
_this.processDefinitionListFields = [
|
|
1068
|
-
{
|
|
1069
|
-
key: 'processName',
|
|
1070
|
-
label: 'Proces',
|
|
1071
|
-
},
|
|
1072
|
-
];
|
|
1073
|
-
});
|
|
1074
|
-
};
|
|
1075
|
-
DossierDetailComponent.prototype.startProcess = function (processDocumentDefinition) {
|
|
1076
|
-
this.supportingProcessStart.openModal(processDocumentDefinition, this.documentId);
|
|
1077
|
-
};
|
|
1078
|
-
return DossierDetailComponent;
|
|
1079
|
-
}());
|
|
1080
|
-
DossierDetailComponent.decorators = [
|
|
1081
|
-
{ type: i0.Component, args: [{
|
|
1082
|
-
selector: 'valtimo-dossier-detail',
|
|
1083
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div class=\"card-header bg-light card-header-divider pb-5\">\n {{ documentDefinitionNameTitle }}\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <valtimo-extension\n module=\"dossier\"\n page=\"dossier-detail\"\n section=\"card-header\"\n ></valtimo-extension>\n <div class=\"dropdown\">\n <button\n class=\"btn btn-primary dropdown-toggle\"\n type=\"button\"\n id=\"startProcessDropdown\"\n placement=\"bottom\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n <span>Start</span>\n <i class=\"pl-2 fas fa-caret-down\"></i>\n </button>\n <div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"startProcessDropdown\">\n <button\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n class=\"dropdown-item p\"\n href=\"#\"\n (click)=\"startProcess(processDocumentDefinition)\"\n >\n {{ processDocumentDefinition.processName }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\" *ngFor=\"let tab of tabLoader.tabs\">\n <a\n id=\"{{ tab.name }}-tab\"\n class=\"nav-link clickable\"\n [ngClass]=\"{active: tab.isActive()}\"\n data-toggle=\"tab\"\n (click)=\"tabLoader.load(tab)\"\n >\n {{ tabLoader.translateTabName(tab) }}\n </a>\n </li>\n </ul>\n <div class=\"card-body bg-white p-5 position-relative tab-container\">\n <ng-template #tabContainer>Loading...</ng-template>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </div>\n <valtimo-dossier-supporting-process-start-modal\n (formSubmit)=\"tabLoader.refreshView()\"\n #supportingProcessStartModal\n ></valtimo-dossier-supporting-process-start-modal>\n </div>\n</div>\n",
|
|
1084
|
-
styles: [".tab-container{min-height:300px}"]
|
|
1085
|
-
},] }
|
|
1086
|
-
];
|
|
1087
|
-
DossierDetailComponent.ctorParameters = function () { return [
|
|
1088
|
-
{ type: i0.ComponentFactoryResolver },
|
|
1089
|
-
{ type: core.TranslateService },
|
|
1090
|
-
{ type: document.DocumentService },
|
|
1091
|
-
{ type: process.ProcessService },
|
|
1092
|
-
{ type: router.ActivatedRoute },
|
|
1093
|
-
{ type: router.Router },
|
|
1094
|
-
{ type: common.Location },
|
|
1095
|
-
{ type: TabService }
|
|
1096
|
-
]; };
|
|
1097
|
-
DossierDetailComponent.propDecorators = {
|
|
1098
|
-
viewContainerRef: [{ type: i0.ViewChild, args: ['tabContainer', { read: i0.ViewContainerRef, static: true },] }],
|
|
1099
|
-
supportingProcessStart: [{ type: i0.ViewChild, args: ['supportingProcessStartModal',] }]
|
|
1159
|
+
/*
|
|
1160
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1161
|
+
*
|
|
1162
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1163
|
+
* you may not use this file except in compliance with the License.
|
|
1164
|
+
* You may obtain a copy of the License at
|
|
1165
|
+
*
|
|
1166
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1167
|
+
*
|
|
1168
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1169
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1170
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1171
|
+
* See the License for the specific language governing permissions and
|
|
1172
|
+
* limitations under the License.
|
|
1173
|
+
*/
|
|
1174
|
+
var DossierDetailComponent = /** @class */ (function () {
|
|
1175
|
+
function DossierDetailComponent(componentFactoryResolver, translateService, documentService, processService, route, router, location, tabService) {
|
|
1176
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
1177
|
+
this.translateService = translateService;
|
|
1178
|
+
this.documentService = documentService;
|
|
1179
|
+
this.processService = processService;
|
|
1180
|
+
this.route = route;
|
|
1181
|
+
this.router = router;
|
|
1182
|
+
this.location = location;
|
|
1183
|
+
this.tabService = tabService;
|
|
1184
|
+
this.document = null;
|
|
1185
|
+
this.tabLoader = null;
|
|
1186
|
+
this.processDefinitionListFields = [];
|
|
1187
|
+
this.processDocumentDefinitions = [];
|
|
1188
|
+
this.snapshot = this.route.snapshot.paramMap;
|
|
1189
|
+
this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
|
|
1190
|
+
this.documentId = this.snapshot.get('documentId') || '';
|
|
1191
|
+
}
|
|
1192
|
+
DossierDetailComponent.prototype.ngOnInit = function () {
|
|
1193
|
+
var _this = this;
|
|
1194
|
+
this.tabLoader = new TabLoaderImpl(this.tabService.getTabs(), this.componentFactoryResolver, this.viewContainerRef, this.translateService, this.router, this.location);
|
|
1195
|
+
this.documentService
|
|
1196
|
+
.getDocumentDefinition(this.documentDefinitionName)
|
|
1197
|
+
.subscribe(function (definition) {
|
|
1198
|
+
_this.documentDefinitionNameTitle = definition.schema.title;
|
|
1199
|
+
});
|
|
1200
|
+
this.initialTabName = this.snapshot.get('tab');
|
|
1201
|
+
this.tabLoader.initial(this.initialTabName);
|
|
1202
|
+
this.getAllAssociatedProcessDefinitions();
|
|
1203
|
+
};
|
|
1204
|
+
DossierDetailComponent.prototype.getAllAssociatedProcessDefinitions = function () {
|
|
1205
|
+
var _this = this;
|
|
1206
|
+
this.documentService
|
|
1207
|
+
.findProcessDocumentDefinitions(this.documentDefinitionName)
|
|
1208
|
+
.subscribe(function (processDocumentDefinitions) {
|
|
1209
|
+
_this.processDocumentDefinitions = processDocumentDefinitions.filter(function (processDocumentDefinition) { return processDocumentDefinition.startableByUser; });
|
|
1210
|
+
_this.processDefinitionListFields = [
|
|
1211
|
+
{
|
|
1212
|
+
key: 'processName',
|
|
1213
|
+
label: 'Proces',
|
|
1214
|
+
},
|
|
1215
|
+
];
|
|
1216
|
+
});
|
|
1217
|
+
};
|
|
1218
|
+
DossierDetailComponent.prototype.startProcess = function (processDocumentDefinition) {
|
|
1219
|
+
this.supportingProcessStart.openModal(processDocumentDefinition, this.documentId);
|
|
1220
|
+
};
|
|
1221
|
+
return DossierDetailComponent;
|
|
1222
|
+
}());
|
|
1223
|
+
DossierDetailComponent.decorators = [
|
|
1224
|
+
{ type: i0.Component, args: [{
|
|
1225
|
+
selector: 'valtimo-dossier-detail',
|
|
1226
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div class=\"card-header bg-light card-header-divider pb-5\">\n {{ documentDefinitionNameTitle }}\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <valtimo-extension\n module=\"dossier\"\n page=\"dossier-detail\"\n section=\"card-header\"\n ></valtimo-extension>\n <div class=\"dropdown\">\n <button\n class=\"btn btn-primary dropdown-toggle\"\n type=\"button\"\n id=\"startProcessDropdown\"\n placement=\"bottom\"\n [ngbTooltip]=\"processDocumentDefinitions.length === 0 ? 'No action' : null\"\n [disabled]=\"processDocumentDefinitions.length === 0\"\n data-toggle=\"dropdown\"\n aria-haspopup=\"true\"\n aria-expanded=\"false\"\n >\n <span>Start</span>\n <i class=\"pl-2 fas fa-caret-down\"></i>\n </button>\n <div class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"startProcessDropdown\">\n <button\n *ngFor=\"let processDocumentDefinition of processDocumentDefinitions\"\n class=\"dropdown-item p\"\n href=\"#\"\n (click)=\"startProcess(processDocumentDefinition)\"\n >\n {{ processDocumentDefinition.processName }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <ul class=\"nav nav-tabs\">\n <li class=\"nav-item\" *ngFor=\"let tab of tabLoader.tabs\">\n <a\n id=\"{{ tab.name }}-tab\"\n class=\"nav-link clickable\"\n [ngClass]=\"{active: tab.isActive()}\"\n data-toggle=\"tab\"\n (click)=\"tabLoader.load(tab)\"\n >\n {{ tabLoader.translateTabName(tab) }}\n </a>\n </li>\n </ul>\n <div class=\"card-body bg-white p-5 position-relative tab-container\">\n <ng-template #tabContainer>Loading...</ng-template>\n <div class=\"clearfix\"></div>\n </div>\n </valtimo-widget>\n </div>\n <valtimo-dossier-supporting-process-start-modal\n (formSubmit)=\"tabLoader.refreshView()\"\n #supportingProcessStartModal\n ></valtimo-dossier-supporting-process-start-modal>\n </div>\n</div>\n",
|
|
1227
|
+
styles: [".tab-container{min-height:300px}"]
|
|
1228
|
+
},] }
|
|
1229
|
+
];
|
|
1230
|
+
DossierDetailComponent.ctorParameters = function () { return [
|
|
1231
|
+
{ type: i0.ComponentFactoryResolver },
|
|
1232
|
+
{ type: core.TranslateService },
|
|
1233
|
+
{ type: document.DocumentService },
|
|
1234
|
+
{ type: process.ProcessService },
|
|
1235
|
+
{ type: router.ActivatedRoute },
|
|
1236
|
+
{ type: router.Router },
|
|
1237
|
+
{ type: common.Location },
|
|
1238
|
+
{ type: TabService }
|
|
1239
|
+
]; };
|
|
1240
|
+
DossierDetailComponent.propDecorators = {
|
|
1241
|
+
viewContainerRef: [{ type: i0.ViewChild, args: ['tabContainer', { read: i0.ViewContainerRef, static: true },] }],
|
|
1242
|
+
supportingProcessStart: [{ type: i0.ViewChild, args: ['supportingProcessStartModal',] }]
|
|
1100
1243
|
};
|
|
1101
1244
|
|
|
1102
|
-
var moment$3 = moment_;
|
|
1103
|
-
moment$3.locale(localStorage.getItem('langKey') || '');
|
|
1104
|
-
var DossierDetailTabContactMomentsComponent = /** @class */ (function () {
|
|
1105
|
-
function DossierDetailTabContactMomentsComponent(contactMomentService, alertService, translateService) {
|
|
1106
|
-
var _this = this;
|
|
1107
|
-
this.contactMomentService = contactMomentService;
|
|
1108
|
-
this.alertService = alertService;
|
|
1109
|
-
this.translateService = translateService;
|
|
1110
|
-
this.refetchContactMoments$ = new rxjs.BehaviorSubject('');
|
|
1111
|
-
this.contactMoments$ = this.refetchContactMoments$.pipe(operators.switchMap(function () { return _this.contactMomentService.getContactMoments(); }), operators.map(function (contactMoments) { return contactMoments.map(function (contactMoment) {
|
|
1112
|
-
var registratieDatum = moment$3(contactMoment.registratiedatum);
|
|
1113
|
-
return new
|
|
1114
|
-
}); }));
|
|
1115
|
-
this.text$ = new rxjs.BehaviorSubject('');
|
|
1116
|
-
this.channel$ = new rxjs.BehaviorSubject('MAIL');
|
|
1117
|
-
this.requestData$ = rxjs.combineLatest([this.text$, this.channel$]);
|
|
1118
|
-
this.valid$ = this.requestData$.pipe(operators.map(function (_a) {
|
|
1119
|
-
var _b = __read(_a, 2), text = _b[0], channel = _b[1];
|
|
1120
|
-
return !!(text && channel);
|
|
1121
|
-
}));
|
|
1122
|
-
this.disabled$ = new rxjs.BehaviorSubject(false);
|
|
1123
|
-
}
|
|
1124
|
-
DossierDetailTabContactMomentsComponent.prototype.textChange = function (text) {
|
|
1125
|
-
this.text$.next(text);
|
|
1126
|
-
};
|
|
1127
|
-
DossierDetailTabContactMomentsComponent.prototype.buttonClick = function () {
|
|
1128
|
-
this.modal.show();
|
|
1129
|
-
};
|
|
1130
|
-
DossierDetailTabContactMomentsComponent.prototype.saveNote = function () {
|
|
1131
|
-
var _this = this;
|
|
1132
|
-
this.disable();
|
|
1133
|
-
this.requestData$.pipe(operators.take(1)).subscribe(function (_a) {
|
|
1134
|
-
var _b = __read(_a, 2), text = _b[0], channel = _b[1];
|
|
1135
|
-
_this.contactMomentService.saveContactMoment({ kanaal: channel, tekst: text }).subscribe(function () {
|
|
1136
|
-
_this.alertService.success(_this.translateService.instant('dossier.contactMoments.saveSuccess'));
|
|
1137
|
-
_this.enable();
|
|
1138
|
-
_this.clear();
|
|
1139
|
-
_this.modal.hide();
|
|
1140
|
-
_this.refetchContactMoments();
|
|
1141
|
-
}, function () {
|
|
1142
|
-
_this.enable();
|
|
1143
|
-
});
|
|
1144
|
-
});
|
|
1145
|
-
};
|
|
1146
|
-
DossierDetailTabContactMomentsComponent.prototype.disable = function () {
|
|
1147
|
-
this.disabled$.next(true);
|
|
1148
|
-
};
|
|
1149
|
-
DossierDetailTabContactMomentsComponent.prototype.enable = function () {
|
|
1150
|
-
this.disabled$.next(false);
|
|
1151
|
-
};
|
|
1152
|
-
DossierDetailTabContactMomentsComponent.prototype.clear = function () {
|
|
1153
|
-
this.text$.next('');
|
|
1154
|
-
};
|
|
1155
|
-
DossierDetailTabContactMomentsComponent.prototype.refetchContactMoments = function () {
|
|
1156
|
-
this.refetchContactMoments$.next('');
|
|
1157
|
-
};
|
|
1158
|
-
return DossierDetailTabContactMomentsComponent;
|
|
1159
|
-
}());
|
|
1160
|
-
DossierDetailTabContactMomentsComponent.decorators = [
|
|
1161
|
-
{ type: i0.Component, args: [{
|
|
1162
|
-
selector: 'valtimo-dossier-detail-tab-contact-moments',
|
|
1163
|
-
template: "<!--\n ~ Copyright 2015-2021 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=\"contact-moments-container\">\n <ng-container *ngTemplateOutlet=\"buttons\"></ng-container>\n <ng-container *ngTemplateOutlet=\"moments\"></ng-container>\n</div>\n\n<valtimo-modal\n #contactMomentsNoteModal\n [title]=\"'dossier.contactMoments.popupTitle' | translate\"\n [showFooter]=\"true\"\n [elementId]=\"'contact-moments-modal'\"\n>\n <div class=\"mt-2\" body>\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n </div>\n <div footer>\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #body>\n <form>\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"body\">\n {{ 'dossier.contactMoments.noteText' | translate }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <textarea\n [disabled]=\"disabled$ | async\"\n class=\"form-control\"\n id=\"body\"\n name=\"body\"\n [ngModel]=\"text$ | async\"\n (ngModelChange)=\"textChange($event)\"\n ></textarea>\n </div>\n </div>\n </form>\n</ng-template>\n\n<ng-template #footer>\n <button\n *ngIf=\"(disabled$ | async) === false; else loading\"\n class=\"btn btn-primary\"\n [disabled]=\"(valid$ | async) === false || (disabled$ | async)\"\n (click)=\"saveNote()\"\n >\n {{ 'dossier.contactMoments.saveButtonText' | translate }}\n </button>\n</ng-template>\n\n<ng-template #loading>\n <valtimo-spinner [noMarginTop]=\"true\"></valtimo-spinner>\n</ng-template>\n\n<ng-template #buttons>\n <div class=\"btn-group mt-m3px mb-3 button-container\">\n <button class=\"btn btn-primary btn-space\" (click)=\"buttonClick()\">\n <i class=\"icon mdi mdi-calendar-note\"></i>\n {{ 'dossier.contactMoments.makeNoteButton' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #moments>\n <div *ngIf=\"contactMoments$ | async as contactMoments; else loading\">\n <valtimo-timeline [items]=\"contactMoments\"></valtimo-timeline>\n </div>\n</ng-template>\n",
|
|
1164
|
-
styles: ["/*!\n * Copyright 2015-2021 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 */.contact-moments-container{display:flex;flex-direction:column}.button-container{align-self:flex-end;display:inline}"]
|
|
1165
|
-
},] }
|
|
1166
|
-
];
|
|
1167
|
-
DossierDetailTabContactMomentsComponent.ctorParameters = function () { return [
|
|
1168
|
-
{ type: contactMoment.ContactMomentService },
|
|
1169
|
-
{ type: components.AlertService },
|
|
1170
|
-
{ type: core.TranslateService }
|
|
1171
|
-
]; };
|
|
1172
|
-
DossierDetailTabContactMomentsComponent.propDecorators = {
|
|
1173
|
-
modal: [{ type: i0.ViewChild, args: ['contactMomentsNoteModal',] }]
|
|
1245
|
+
var moment$3 = moment_;
|
|
1246
|
+
moment$3.locale(localStorage.getItem('langKey') || '');
|
|
1247
|
+
var DossierDetailTabContactMomentsComponent = /** @class */ (function () {
|
|
1248
|
+
function DossierDetailTabContactMomentsComponent(contactMomentService, alertService, translateService) {
|
|
1249
|
+
var _this = this;
|
|
1250
|
+
this.contactMomentService = contactMomentService;
|
|
1251
|
+
this.alertService = alertService;
|
|
1252
|
+
this.translateService = translateService;
|
|
1253
|
+
this.refetchContactMoments$ = new rxjs.BehaviorSubject('');
|
|
1254
|
+
this.contactMoments$ = this.refetchContactMoments$.pipe(operators.switchMap(function () { return _this.contactMomentService.getContactMoments(); }), operators.map(function (contactMoments) { return contactMoments.map(function (contactMoment) {
|
|
1255
|
+
var registratieDatum = moment$3(contactMoment.registratiedatum);
|
|
1256
|
+
return new components.TimelineItemImpl(registratieDatum.format('DD MMM YYYY'), registratieDatum.format('HH:mm'), contactMoment.medewerkerIdentificatie.achternaam, contactMoment.kanaal, contactMoment.tekst, null);
|
|
1257
|
+
}); }));
|
|
1258
|
+
this.text$ = new rxjs.BehaviorSubject('');
|
|
1259
|
+
this.channel$ = new rxjs.BehaviorSubject('MAIL');
|
|
1260
|
+
this.requestData$ = rxjs.combineLatest([this.text$, this.channel$]);
|
|
1261
|
+
this.valid$ = this.requestData$.pipe(operators.map(function (_a) {
|
|
1262
|
+
var _b = __read(_a, 2), text = _b[0], channel = _b[1];
|
|
1263
|
+
return !!(text && channel);
|
|
1264
|
+
}));
|
|
1265
|
+
this.disabled$ = new rxjs.BehaviorSubject(false);
|
|
1266
|
+
}
|
|
1267
|
+
DossierDetailTabContactMomentsComponent.prototype.textChange = function (text) {
|
|
1268
|
+
this.text$.next(text);
|
|
1269
|
+
};
|
|
1270
|
+
DossierDetailTabContactMomentsComponent.prototype.buttonClick = function () {
|
|
1271
|
+
this.modal.show();
|
|
1272
|
+
};
|
|
1273
|
+
DossierDetailTabContactMomentsComponent.prototype.saveNote = function () {
|
|
1274
|
+
var _this = this;
|
|
1275
|
+
this.disable();
|
|
1276
|
+
this.requestData$.pipe(operators.take(1)).subscribe(function (_a) {
|
|
1277
|
+
var _b = __read(_a, 2), text = _b[0], channel = _b[1];
|
|
1278
|
+
_this.contactMomentService.saveContactMoment({ kanaal: channel, tekst: text }).subscribe(function () {
|
|
1279
|
+
_this.alertService.success(_this.translateService.instant('dossier.contactMoments.saveSuccess'));
|
|
1280
|
+
_this.enable();
|
|
1281
|
+
_this.clear();
|
|
1282
|
+
_this.modal.hide();
|
|
1283
|
+
_this.refetchContactMoments();
|
|
1284
|
+
}, function () {
|
|
1285
|
+
_this.enable();
|
|
1286
|
+
});
|
|
1287
|
+
});
|
|
1288
|
+
};
|
|
1289
|
+
DossierDetailTabContactMomentsComponent.prototype.disable = function () {
|
|
1290
|
+
this.disabled$.next(true);
|
|
1291
|
+
};
|
|
1292
|
+
DossierDetailTabContactMomentsComponent.prototype.enable = function () {
|
|
1293
|
+
this.disabled$.next(false);
|
|
1294
|
+
};
|
|
1295
|
+
DossierDetailTabContactMomentsComponent.prototype.clear = function () {
|
|
1296
|
+
this.text$.next('');
|
|
1297
|
+
};
|
|
1298
|
+
DossierDetailTabContactMomentsComponent.prototype.refetchContactMoments = function () {
|
|
1299
|
+
this.refetchContactMoments$.next('');
|
|
1300
|
+
};
|
|
1301
|
+
return DossierDetailTabContactMomentsComponent;
|
|
1302
|
+
}());
|
|
1303
|
+
DossierDetailTabContactMomentsComponent.decorators = [
|
|
1304
|
+
{ type: i0.Component, args: [{
|
|
1305
|
+
selector: 'valtimo-dossier-detail-tab-contact-moments',
|
|
1306
|
+
template: "<!--\n ~ Copyright 2015-2021 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=\"contact-moments-container\">\n <ng-container *ngTemplateOutlet=\"buttons\"></ng-container>\n <ng-container *ngTemplateOutlet=\"moments\"></ng-container>\n</div>\n\n<valtimo-modal\n #contactMomentsNoteModal\n [title]=\"'dossier.contactMoments.popupTitle' | translate\"\n [showFooter]=\"true\"\n [elementId]=\"'contact-moments-modal'\"\n>\n <div class=\"mt-2\" body>\n <ng-container *ngTemplateOutlet=\"body\"></ng-container>\n </div>\n <div footer>\n <ng-container *ngTemplateOutlet=\"footer\"></ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #body>\n <form>\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"body\">\n {{ 'dossier.contactMoments.noteText' | translate }}\n </label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <textarea\n [disabled]=\"disabled$ | async\"\n class=\"form-control\"\n id=\"body\"\n name=\"body\"\n [ngModel]=\"text$ | async\"\n (ngModelChange)=\"textChange($event)\"\n ></textarea>\n </div>\n </div>\n </form>\n</ng-template>\n\n<ng-template #footer>\n <button\n *ngIf=\"(disabled$ | async) === false; else loading\"\n class=\"btn btn-primary\"\n [disabled]=\"(valid$ | async) === false || (disabled$ | async)\"\n (click)=\"saveNote()\"\n >\n {{ 'dossier.contactMoments.saveButtonText' | translate }}\n </button>\n</ng-template>\n\n<ng-template #loading>\n <valtimo-spinner [noMarginTop]=\"true\"></valtimo-spinner>\n</ng-template>\n\n<ng-template #buttons>\n <div class=\"btn-group mt-m3px mb-3 button-container\">\n <button class=\"btn btn-primary btn-space\" (click)=\"buttonClick()\">\n <i class=\"icon mdi mdi-calendar-note\"></i>\n {{ 'dossier.contactMoments.makeNoteButton' | translate }}\n </button>\n </div>\n</ng-template>\n\n<ng-template #moments>\n <div *ngIf=\"contactMoments$ | async as contactMoments; else loading\">\n <valtimo-timeline [items]=\"contactMoments\"></valtimo-timeline>\n </div>\n</ng-template>\n",
|
|
1307
|
+
styles: ["/*!\n * Copyright 2015-2021 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 */.contact-moments-container{display:flex;flex-direction:column}.button-container{align-self:flex-end;display:inline}"]
|
|
1308
|
+
},] }
|
|
1309
|
+
];
|
|
1310
|
+
DossierDetailTabContactMomentsComponent.ctorParameters = function () { return [
|
|
1311
|
+
{ type: contactMoment.ContactMomentService },
|
|
1312
|
+
{ type: components.AlertService },
|
|
1313
|
+
{ type: core.TranslateService }
|
|
1314
|
+
]; };
|
|
1315
|
+
DossierDetailTabContactMomentsComponent.propDecorators = {
|
|
1316
|
+
modal: [{ type: i0.ViewChild, args: ['contactMomentsNoteModal',] }]
|
|
1174
1317
|
};
|
|
1175
1318
|
|
|
1176
|
-
/*
|
|
1177
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1178
|
-
*
|
|
1179
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1180
|
-
* you may not use this file except in compliance with the License.
|
|
1181
|
-
* You may obtain a copy of the License at
|
|
1182
|
-
*
|
|
1183
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1184
|
-
*
|
|
1185
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1186
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1187
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1188
|
-
* See the License for the specific language governing permissions and
|
|
1189
|
-
* limitations under the License.
|
|
1190
|
-
*/
|
|
1191
|
-
var moment$4 = moment_;
|
|
1192
|
-
moment$4.locale(localStorage.getItem('langKey') || '');
|
|
1193
|
-
var DossierUpdateComponent = /** @class */ (function () {
|
|
1194
|
-
function DossierUpdateComponent(taskService, documentService, route, toastr, location, dossierService) {
|
|
1195
|
-
this.taskService = taskService;
|
|
1196
|
-
this.documentService = documentService;
|
|
1197
|
-
this.route = route;
|
|
1198
|
-
this.toastr = toastr;
|
|
1199
|
-
this.location = location;
|
|
1200
|
-
this.customDefinitions = {};
|
|
1201
|
-
var snapshot = this.route.snapshot.paramMap;
|
|
1202
|
-
this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';
|
|
1203
|
-
this.documentId = snapshot.get('documentId') || '';
|
|
1204
|
-
this.taskId = snapshot.get('taskId') || '';
|
|
1205
|
-
this.implementationDefinitions = dossierService.getImplementationEnvironmentDefinitions(this.documentDefinitionName);
|
|
1206
|
-
this.loadDocumentDefinition(this.documentDefinitionName);
|
|
1207
|
-
this.loadDocument(this.documentId);
|
|
1208
|
-
}
|
|
1209
|
-
DossierUpdateComponent.prototype.ngOnInit = function () {
|
|
1210
|
-
this.getTask(this.taskId);
|
|
1211
|
-
if (this.implementationDefinitions.definitions.detail.summary) {
|
|
1212
|
-
this.customDefinitions = this.implementationDefinitions.definitions.detail.summary;
|
|
1213
|
-
}
|
|
1214
|
-
};
|
|
1215
|
-
DossierUpdateComponent.prototype.loadDocumentDefinition = function (name) {
|
|
1216
|
-
var _this = this;
|
|
1217
|
-
this.documentService.getDocumentDefinition(name).subscribe(function (definition) {
|
|
1218
|
-
_this.schema = definition.schema;
|
|
1219
|
-
});
|
|
1220
|
-
};
|
|
1221
|
-
DossierUpdateComponent.prototype.loadDocument = function (id) {
|
|
1222
|
-
var _this = this;
|
|
1223
|
-
this.documentService.getDocument(id).subscribe(function (document) {
|
|
1224
|
-
_this.document = document;
|
|
1225
|
-
});
|
|
1226
|
-
};
|
|
1227
|
-
DossierUpdateComponent.prototype.getTask = function (id) {
|
|
1228
|
-
var _this = this;
|
|
1229
|
-
this.taskService.getTask(id).subscribe(function (task) {
|
|
1230
|
-
_this.task = task;
|
|
1231
|
-
_this.task.task.created = moment$4(_this.task.task.created).format('DD MMM YYYY HH:mm');
|
|
1232
|
-
_this.page = {
|
|
1233
|
-
title: _this.task.task.name,
|
|
1234
|
-
subtitle: "Created " + moment$4(_this.task.task.created).fromNow(),
|
|
1235
|
-
};
|
|
1236
|
-
});
|
|
1237
|
-
};
|
|
1238
|
-
DossierUpdateComponent.prototype.reset = function () {
|
|
1239
|
-
this.loadDocument(this.documentId);
|
|
1240
|
-
};
|
|
1241
|
-
DossierUpdateComponent.prototype.back = function () {
|
|
1242
|
-
this.location.back();
|
|
1243
|
-
};
|
|
1244
|
-
DossierUpdateComponent.prototype.save = function () {
|
|
1245
|
-
var _this = this;
|
|
1246
|
-
var document = {
|
|
1247
|
-
documentId: this.document.id,
|
|
1248
|
-
content: this.document.content,
|
|
1249
|
-
versionBasedOn: this.document.version,
|
|
1250
|
-
};
|
|
1251
|
-
this.documentService.modifyDocument(document).subscribe(function (result) {
|
|
1252
|
-
_this.document = result.document;
|
|
1253
|
-
_this.toastr.success('Document aangepast');
|
|
1254
|
-
_this.location.back();
|
|
1255
|
-
});
|
|
1256
|
-
};
|
|
1257
|
-
DossierUpdateComponent.prototype.submit = function (data) {
|
|
1258
|
-
var _this = this;
|
|
1259
|
-
// merge document content with formdata
|
|
1260
|
-
var mergedData = Object.assign({}, this.document.content, data);
|
|
1261
|
-
var documentData = {
|
|
1262
|
-
request: {
|
|
1263
|
-
documentId: this.document.id,
|
|
1264
|
-
content: mergedData,
|
|
1265
|
-
versionBasedOn: this.document.version,
|
|
1266
|
-
},
|
|
1267
|
-
taskId: this.task.task.id,
|
|
1268
|
-
};
|
|
1269
|
-
this.documentService.modifyDocumentAndCompleteTask(documentData).subscribe(function (result) {
|
|
1270
|
-
_this.toastr.success(_this.task.task.name + ' has successfully been completed');
|
|
1271
|
-
_this.location.back();
|
|
1272
|
-
});
|
|
1273
|
-
};
|
|
1274
|
-
DossierUpdateComponent.prototype.returnZero = function () {
|
|
1275
|
-
return 0;
|
|
1276
|
-
};
|
|
1277
|
-
return DossierUpdateComponent;
|
|
1278
|
-
}());
|
|
1279
|
-
DossierUpdateComponent.decorators = [
|
|
1280
|
-
{ type: i0.Component, args: [{
|
|
1281
|
-
selector: 'valtimo-dossier-update',
|
|
1282
|
-
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget [title]=\"page?.title\" [subtitle]=\"page?.subtitle\" [divider]=\"true\">\n <div class=\"card-body\">\n <!--view with custom definitions-->\n <div *ngIf=\"this.customDefinitions\">\n <div\n class=\"mb-4\"\n *ngFor=\"let definition of this.customDefinitions | keyvalue: returnZero\"\n ></div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-sm-12\">\n <div class=\"text-right\">\n <button\n class=\"btn btn-space btn-default float-left\"\n type=\"button\"\n (click)=\"back()\"\n id=\"back-button\"\n >\n Back\n </button>\n <button\n class=\"btn btn-space btn-secondary\"\n type=\"button\"\n (click)=\"reset()\"\n id=\"reset-button\"\n >\n Reset\n </button>\n <button\n class=\"btn btn-space btn-primary\"\n type=\"button\"\n (click)=\"save()\"\n id=\"save-button\"\n >\n Save\n </button>\n <button\n class=\"btn btn-space btn-primary\"\n type=\"submit\"\n (click)=\"submit({})\"\n id=\"submit-button\"\n >\n Submit\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <valtimo-camunda-form\n *ngIf=\"task?.formFields && !this.customDefinitions\"\n (submitted)=\"submit($event)\"\n [formFields]=\"task.formFields\"\n [componentName]=\"task.formLocation\"\n ></valtimo-camunda-form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
|
|
1283
|
-
styles: [""]
|
|
1284
|
-
},] }
|
|
1285
|
-
];
|
|
1286
|
-
DossierUpdateComponent.ctorParameters = function () { return [
|
|
1287
|
-
{ type: task.TaskService },
|
|
1288
|
-
{ type: document.DocumentService },
|
|
1289
|
-
{ type: router.ActivatedRoute },
|
|
1290
|
-
{ type: ngxToastr.ToastrService },
|
|
1291
|
-
{ type: common.Location },
|
|
1292
|
-
{ type: DossierService }
|
|
1319
|
+
/*
|
|
1320
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1321
|
+
*
|
|
1322
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1323
|
+
* you may not use this file except in compliance with the License.
|
|
1324
|
+
* You may obtain a copy of the License at
|
|
1325
|
+
*
|
|
1326
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1327
|
+
*
|
|
1328
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1329
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1330
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1331
|
+
* See the License for the specific language governing permissions and
|
|
1332
|
+
* limitations under the License.
|
|
1333
|
+
*/
|
|
1334
|
+
var moment$4 = moment_;
|
|
1335
|
+
moment$4.locale(localStorage.getItem('langKey') || '');
|
|
1336
|
+
var DossierUpdateComponent = /** @class */ (function () {
|
|
1337
|
+
function DossierUpdateComponent(taskService, documentService, route, toastr, location, dossierService) {
|
|
1338
|
+
this.taskService = taskService;
|
|
1339
|
+
this.documentService = documentService;
|
|
1340
|
+
this.route = route;
|
|
1341
|
+
this.toastr = toastr;
|
|
1342
|
+
this.location = location;
|
|
1343
|
+
this.customDefinitions = {};
|
|
1344
|
+
var snapshot = this.route.snapshot.paramMap;
|
|
1345
|
+
this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';
|
|
1346
|
+
this.documentId = snapshot.get('documentId') || '';
|
|
1347
|
+
this.taskId = snapshot.get('taskId') || '';
|
|
1348
|
+
this.implementationDefinitions = dossierService.getImplementationEnvironmentDefinitions(this.documentDefinitionName);
|
|
1349
|
+
this.loadDocumentDefinition(this.documentDefinitionName);
|
|
1350
|
+
this.loadDocument(this.documentId);
|
|
1351
|
+
}
|
|
1352
|
+
DossierUpdateComponent.prototype.ngOnInit = function () {
|
|
1353
|
+
this.getTask(this.taskId);
|
|
1354
|
+
if (this.implementationDefinitions.definitions.detail.summary) {
|
|
1355
|
+
this.customDefinitions = this.implementationDefinitions.definitions.detail.summary;
|
|
1356
|
+
}
|
|
1357
|
+
};
|
|
1358
|
+
DossierUpdateComponent.prototype.loadDocumentDefinition = function (name) {
|
|
1359
|
+
var _this = this;
|
|
1360
|
+
this.documentService.getDocumentDefinition(name).subscribe(function (definition) {
|
|
1361
|
+
_this.schema = definition.schema;
|
|
1362
|
+
});
|
|
1363
|
+
};
|
|
1364
|
+
DossierUpdateComponent.prototype.loadDocument = function (id) {
|
|
1365
|
+
var _this = this;
|
|
1366
|
+
this.documentService.getDocument(id).subscribe(function (document) {
|
|
1367
|
+
_this.document = document;
|
|
1368
|
+
});
|
|
1369
|
+
};
|
|
1370
|
+
DossierUpdateComponent.prototype.getTask = function (id) {
|
|
1371
|
+
var _this = this;
|
|
1372
|
+
this.taskService.getTask(id).subscribe(function (task) {
|
|
1373
|
+
_this.task = task;
|
|
1374
|
+
_this.task.task.created = moment$4(_this.task.task.created).format('DD MMM YYYY HH:mm');
|
|
1375
|
+
_this.page = {
|
|
1376
|
+
title: _this.task.task.name,
|
|
1377
|
+
subtitle: "Created " + moment$4(_this.task.task.created).fromNow(),
|
|
1378
|
+
};
|
|
1379
|
+
});
|
|
1380
|
+
};
|
|
1381
|
+
DossierUpdateComponent.prototype.reset = function () {
|
|
1382
|
+
this.loadDocument(this.documentId);
|
|
1383
|
+
};
|
|
1384
|
+
DossierUpdateComponent.prototype.back = function () {
|
|
1385
|
+
this.location.back();
|
|
1386
|
+
};
|
|
1387
|
+
DossierUpdateComponent.prototype.save = function () {
|
|
1388
|
+
var _this = this;
|
|
1389
|
+
var document = {
|
|
1390
|
+
documentId: this.document.id,
|
|
1391
|
+
content: this.document.content,
|
|
1392
|
+
versionBasedOn: this.document.version,
|
|
1393
|
+
};
|
|
1394
|
+
this.documentService.modifyDocument(document).subscribe(function (result) {
|
|
1395
|
+
_this.document = result.document;
|
|
1396
|
+
_this.toastr.success('Document aangepast');
|
|
1397
|
+
_this.location.back();
|
|
1398
|
+
});
|
|
1399
|
+
};
|
|
1400
|
+
DossierUpdateComponent.prototype.submit = function (data) {
|
|
1401
|
+
var _this = this;
|
|
1402
|
+
// merge document content with formdata
|
|
1403
|
+
var mergedData = Object.assign({}, this.document.content, data);
|
|
1404
|
+
var documentData = {
|
|
1405
|
+
request: {
|
|
1406
|
+
documentId: this.document.id,
|
|
1407
|
+
content: mergedData,
|
|
1408
|
+
versionBasedOn: this.document.version,
|
|
1409
|
+
},
|
|
1410
|
+
taskId: this.task.task.id,
|
|
1411
|
+
};
|
|
1412
|
+
this.documentService.modifyDocumentAndCompleteTask(documentData).subscribe(function (result) {
|
|
1413
|
+
_this.toastr.success(_this.task.task.name + ' has successfully been completed');
|
|
1414
|
+
_this.location.back();
|
|
1415
|
+
});
|
|
1416
|
+
};
|
|
1417
|
+
DossierUpdateComponent.prototype.returnZero = function () {
|
|
1418
|
+
return 0;
|
|
1419
|
+
};
|
|
1420
|
+
return DossierUpdateComponent;
|
|
1421
|
+
}());
|
|
1422
|
+
DossierUpdateComponent.decorators = [
|
|
1423
|
+
{ type: i0.Component, args: [{
|
|
1424
|
+
selector: 'valtimo-dossier-update',
|
|
1425
|
+
template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget [title]=\"page?.title\" [subtitle]=\"page?.subtitle\" [divider]=\"true\">\n <div class=\"card-body\">\n <!--view with custom definitions-->\n <div *ngIf=\"this.customDefinitions\">\n <div\n class=\"mb-4\"\n *ngFor=\"let definition of this.customDefinitions | keyvalue: returnZero\"\n ></div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-sm-12\">\n <div class=\"text-right\">\n <button\n class=\"btn btn-space btn-default float-left\"\n type=\"button\"\n (click)=\"back()\"\n id=\"back-button\"\n >\n Back\n </button>\n <button\n class=\"btn btn-space btn-secondary\"\n type=\"button\"\n (click)=\"reset()\"\n id=\"reset-button\"\n >\n Reset\n </button>\n <button\n class=\"btn btn-space btn-primary\"\n type=\"button\"\n (click)=\"save()\"\n id=\"save-button\"\n >\n Save\n </button>\n <button\n class=\"btn btn-space btn-primary\"\n type=\"submit\"\n (click)=\"submit({})\"\n id=\"submit-button\"\n >\n Submit\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <valtimo-camunda-form\n *ngIf=\"task?.formFields && !this.customDefinitions\"\n (submitted)=\"submit($event)\"\n [formFields]=\"task.formFields\"\n [componentName]=\"task.formLocation\"\n ></valtimo-camunda-form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
|
|
1426
|
+
styles: [""]
|
|
1427
|
+
},] }
|
|
1428
|
+
];
|
|
1429
|
+
DossierUpdateComponent.ctorParameters = function () { return [
|
|
1430
|
+
{ type: task.TaskService },
|
|
1431
|
+
{ type: document.DocumentService },
|
|
1432
|
+
{ type: router.ActivatedRoute },
|
|
1433
|
+
{ type: ngxToastr.ToastrService },
|
|
1434
|
+
{ type: common.Location },
|
|
1435
|
+
{ type: DossierService }
|
|
1293
1436
|
]; };
|
|
1294
1437
|
|
|
1295
|
-
/*
|
|
1296
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1297
|
-
*
|
|
1298
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1299
|
-
* you may not use this file except in compliance with the License.
|
|
1300
|
-
* You may obtain a copy of the License at
|
|
1301
|
-
*
|
|
1302
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1303
|
-
*
|
|
1304
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1305
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1306
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1307
|
-
* See the License for the specific language governing permissions and
|
|
1308
|
-
* limitations under the License.
|
|
1309
|
-
*/
|
|
1310
|
-
var ɵ0 = { title: 'Dossiers', roles: [
|
|
1311
|
-
title: 'Task details',
|
|
1312
|
-
parentPath: 'dossiers/:documentDefinitionName/document/:documentId/:tab',
|
|
1313
|
-
roles: [
|
|
1314
|
-
};
|
|
1315
|
-
var routes = [
|
|
1316
|
-
{
|
|
1317
|
-
path: 'dossiers/:documentDefinitionName',
|
|
1318
|
-
component: DossierListComponent,
|
|
1319
|
-
canActivate: [security.AuthGuardService],
|
|
1320
|
-
data: ɵ0,
|
|
1321
|
-
},
|
|
1322
|
-
{
|
|
1323
|
-
path: 'dossiers/:documentDefinitionName/document/:documentId/:tab',
|
|
1324
|
-
component: DossierDetailComponent,
|
|
1325
|
-
canActivate: [security.AuthGuardService],
|
|
1326
|
-
data: ɵ1,
|
|
1327
|
-
},
|
|
1328
|
-
{
|
|
1329
|
-
path: 'dossiers/:documentDefinitionName/document/:documentId/:tab/tasks/:taskId',
|
|
1330
|
-
component: DossierUpdateComponent,
|
|
1331
|
-
canActivate: [security.AuthGuardService],
|
|
1332
|
-
data: ɵ2,
|
|
1333
|
-
},
|
|
1334
|
-
];
|
|
1335
|
-
var DossierRoutingModule = /** @class */ (function () {
|
|
1336
|
-
function DossierRoutingModule() {
|
|
1337
|
-
}
|
|
1338
|
-
return DossierRoutingModule;
|
|
1339
|
-
}());
|
|
1340
|
-
DossierRoutingModule.decorators = [
|
|
1341
|
-
{ type: i0.NgModule, args: [{
|
|
1342
|
-
imports: [common.CommonModule, router.RouterModule.forChild(routes)],
|
|
1343
|
-
exports: [router.RouterModule],
|
|
1344
|
-
},] }
|
|
1438
|
+
/*
|
|
1439
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1440
|
+
*
|
|
1441
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1442
|
+
* you may not use this file except in compliance with the License.
|
|
1443
|
+
* You may obtain a copy of the License at
|
|
1444
|
+
*
|
|
1445
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1446
|
+
*
|
|
1447
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1448
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1449
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1450
|
+
* See the License for the specific language governing permissions and
|
|
1451
|
+
* limitations under the License.
|
|
1452
|
+
*/
|
|
1453
|
+
var ɵ0 = { title: 'Dossiers', roles: [i1.ROLE_USER] }, ɵ1 = { title: 'Dossiers', parentPath: 'dossiers/:documentDefinitionName', roles: [i1.ROLE_USER] }, ɵ2 = {
|
|
1454
|
+
title: 'Task details',
|
|
1455
|
+
parentPath: 'dossiers/:documentDefinitionName/document/:documentId/:tab',
|
|
1456
|
+
roles: [i1.ROLE_USER],
|
|
1457
|
+
};
|
|
1458
|
+
var routes = [
|
|
1459
|
+
{
|
|
1460
|
+
path: 'dossiers/:documentDefinitionName',
|
|
1461
|
+
component: DossierListComponent,
|
|
1462
|
+
canActivate: [security.AuthGuardService],
|
|
1463
|
+
data: ɵ0,
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
path: 'dossiers/:documentDefinitionName/document/:documentId/:tab',
|
|
1467
|
+
component: DossierDetailComponent,
|
|
1468
|
+
canActivate: [security.AuthGuardService],
|
|
1469
|
+
data: ɵ1,
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
path: 'dossiers/:documentDefinitionName/document/:documentId/:tab/tasks/:taskId',
|
|
1473
|
+
component: DossierUpdateComponent,
|
|
1474
|
+
canActivate: [security.AuthGuardService],
|
|
1475
|
+
data: ɵ2,
|
|
1476
|
+
},
|
|
1477
|
+
];
|
|
1478
|
+
var DossierRoutingModule = /** @class */ (function () {
|
|
1479
|
+
function DossierRoutingModule() {
|
|
1480
|
+
}
|
|
1481
|
+
return DossierRoutingModule;
|
|
1482
|
+
}());
|
|
1483
|
+
DossierRoutingModule.decorators = [
|
|
1484
|
+
{ type: i0.NgModule, args: [{
|
|
1485
|
+
imports: [common.CommonModule, router.RouterModule.forChild(routes)],
|
|
1486
|
+
exports: [router.RouterModule],
|
|
1487
|
+
},] }
|
|
1345
1488
|
];
|
|
1346
1489
|
|
|
1347
|
-
/*
|
|
1348
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1349
|
-
*
|
|
1350
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1351
|
-
* you may not use this file except in compliance with the License.
|
|
1352
|
-
* You may obtain a copy of the License at
|
|
1353
|
-
*
|
|
1354
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1355
|
-
*
|
|
1356
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1357
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1358
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1359
|
-
* See the License for the specific language governing permissions and
|
|
1360
|
-
* limitations under the License.
|
|
1361
|
-
*/
|
|
1362
|
-
var DossierProcessStartModalComponent = /** @class */ (function () {
|
|
1363
|
-
function DossierProcessStartModalComponent(route, router, processService, documentService, formLinkService, userProviderService, logger) {
|
|
1364
|
-
this.route = route;
|
|
1365
|
-
this.router = router;
|
|
1366
|
-
this.processService = processService;
|
|
1367
|
-
this.documentService = documentService;
|
|
1368
|
-
this.formLinkService = formLinkService;
|
|
1369
|
-
this.userProviderService = userProviderService;
|
|
1370
|
-
this.logger = logger;
|
|
1371
|
-
}
|
|
1372
|
-
DossierProcessStartModalComponent.prototype.ngOnInit = function () {
|
|
1373
|
-
this.isUserAdmin();
|
|
1374
|
-
};
|
|
1375
|
-
DossierProcessStartModalComponent.prototype.loadFormDefinition = function () {
|
|
1376
|
-
var _this = this;
|
|
1377
|
-
this.formDefinition = null;
|
|
1378
|
-
this.formLinkService
|
|
1379
|
-
.getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)
|
|
1380
|
-
.subscribe(function (formDefinition) {
|
|
1381
|
-
_this.formAssociation = formDefinition.formAssociation;
|
|
1382
|
-
var className = _this.formAssociation.formLink.className.split('.');
|
|
1383
|
-
var linkType = className[className.length - 1];
|
|
1384
|
-
switch (linkType) {
|
|
1385
|
-
case 'BpmnElementFormIdLink':
|
|
1386
|
-
_this.formDefinition = formDefinition;
|
|
1387
|
-
_this.modal.show();
|
|
1388
|
-
break;
|
|
1389
|
-
case 'BpmnElementUrlLink':
|
|
1390
|
-
var url = _this.router.serializeUrl(_this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
|
|
1391
|
-
window.open(url, '_blank');
|
|
1392
|
-
break;
|
|
1393
|
-
case 'BpmnElementAngularStateUrlLink':
|
|
1394
|
-
_this.router.navigate([formDefinition.formAssociation.formLink.url]);
|
|
1395
|
-
break;
|
|
1396
|
-
default:
|
|
1397
|
-
_this.logger.fatal('Unsupported class name');
|
|
1398
|
-
}
|
|
1399
|
-
}, function (errors) {
|
|
1400
|
-
_this.modal.show();
|
|
1401
|
-
});
|
|
1402
|
-
};
|
|
1403
|
-
DossierProcessStartModalComponent.prototype.gotoFormLinkScreen = function () {
|
|
1404
|
-
this.modal.hide();
|
|
1405
|
-
this.router.navigate(['form-links'], { queryParams: { process: this.processDefinitionKey } });
|
|
1406
|
-
};
|
|
1407
|
-
Object.defineProperty(DossierProcessStartModalComponent.prototype, "modalTitle", {
|
|
1408
|
-
get: function () {
|
|
1409
|
-
return "Start - " + this.processName;
|
|
1410
|
-
},
|
|
1411
|
-
enumerable: false,
|
|
1412
|
-
configurable: true
|
|
1413
|
-
});
|
|
1414
|
-
DossierProcessStartModalComponent.prototype.openModal = function (processDocumentDefinition) {
|
|
1415
|
-
this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;
|
|
1416
|
-
this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;
|
|
1417
|
-
this.processName = processDocumentDefinition.processName;
|
|
1418
|
-
this.options = new
|
|
1419
|
-
this.options.disableAlerts = true;
|
|
1420
|
-
var formioBeforeSubmit = function (submission, callback) {
|
|
1421
|
-
callback(null, submission);
|
|
1422
|
-
};
|
|
1423
|
-
this.options.setHooks(formioBeforeSubmit);
|
|
1424
|
-
this.loadFormDefinition();
|
|
1425
|
-
};
|
|
1426
|
-
DossierProcessStartModalComponent.prototype.onSubmit = function (submission) {
|
|
1427
|
-
var _this = this;
|
|
1428
|
-
this.formioSubmission = submission;
|
|
1429
|
-
this.formLinkService
|
|
1430
|
-
.onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data)
|
|
1431
|
-
.subscribe(function (formSubmissionResult) {
|
|
1432
|
-
_this.modal.hide();
|
|
1433
|
-
_this.router.navigate([
|
|
1434
|
-
'dossiers',
|
|
1435
|
-
_this.documentDefinitionName,
|
|
1436
|
-
'document',
|
|
1437
|
-
formSubmissionResult.documentId,
|
|
1438
|
-
'summary',
|
|
1439
|
-
]);
|
|
1440
|
-
}, function (errors) {
|
|
1441
|
-
_this.form.showErrors(errors);
|
|
1442
|
-
});
|
|
1443
|
-
};
|
|
1444
|
-
DossierProcessStartModalComponent.prototype.isUserAdmin = function () {
|
|
1445
|
-
var _this = this;
|
|
1446
|
-
this.userProviderService.getUserSubject().subscribe(function (userIdentity) {
|
|
1447
|
-
_this.isAdmin = userIdentity.roles.includes('ROLE_ADMIN');
|
|
1448
|
-
}, function (error) {
|
|
1449
|
-
_this.logger.error('Failed to retrieve user identity', error);
|
|
1450
|
-
_this.isAdmin = false;
|
|
1451
|
-
});
|
|
1452
|
-
};
|
|
1453
|
-
return DossierProcessStartModalComponent;
|
|
1454
|
-
}());
|
|
1455
|
-
DossierProcessStartModalComponent.decorators = [
|
|
1456
|
-
{ type: i0.Component, args: [{
|
|
1457
|
-
selector: 'valtimo-dossier-process-start-modal',
|
|
1458
|
-
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 #processStartModal elementId=\"processStartModal\" [title]=\"modalTitle\">\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io #form [form]=\"formDefinition\" [options]=\"options\" (submit)=\"onSubmit($event)\">\n </valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition && isAdmin\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFoundAdmin'\"\n ></div>\n <div class=\"mb-0 mt-4 p-3 text-center\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n <div body *ngIf=\"!formDefinition && !isAdmin\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFoundUser'\"\n ></div>\n </div>\n</valtimo-modal>\n",
|
|
1459
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1460
|
-
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 */#processStartModal .formio-component-submit{text-align:right}"]
|
|
1461
|
-
},] }
|
|
1462
|
-
];
|
|
1463
|
-
DossierProcessStartModalComponent.ctorParameters = function () { return [
|
|
1464
|
-
{ type: router.ActivatedRoute },
|
|
1465
|
-
{ type: router.Router },
|
|
1466
|
-
{ type: process.ProcessService },
|
|
1467
|
-
{ type: document.DocumentService },
|
|
1468
|
-
{ type: formLink.FormLinkService },
|
|
1469
|
-
{ type: security.UserProviderService },
|
|
1470
|
-
{ type: ngxLogger.NGXLogger }
|
|
1471
|
-
]; };
|
|
1472
|
-
DossierProcessStartModalComponent.propDecorators = {
|
|
1473
|
-
form: [{ type: i0.ViewChild, args: ['form', { static: false },] }],
|
|
1474
|
-
modal: [{ type: i0.ViewChild, args: ['processStartModal', { static: false },] }]
|
|
1490
|
+
/*
|
|
1491
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1492
|
+
*
|
|
1493
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1494
|
+
* you may not use this file except in compliance with the License.
|
|
1495
|
+
* You may obtain a copy of the License at
|
|
1496
|
+
*
|
|
1497
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1498
|
+
*
|
|
1499
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1500
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1501
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1502
|
+
* See the License for the specific language governing permissions and
|
|
1503
|
+
* limitations under the License.
|
|
1504
|
+
*/
|
|
1505
|
+
var DossierProcessStartModalComponent = /** @class */ (function () {
|
|
1506
|
+
function DossierProcessStartModalComponent(route, router, processService, documentService, formLinkService, userProviderService, logger) {
|
|
1507
|
+
this.route = route;
|
|
1508
|
+
this.router = router;
|
|
1509
|
+
this.processService = processService;
|
|
1510
|
+
this.documentService = documentService;
|
|
1511
|
+
this.formLinkService = formLinkService;
|
|
1512
|
+
this.userProviderService = userProviderService;
|
|
1513
|
+
this.logger = logger;
|
|
1514
|
+
}
|
|
1515
|
+
DossierProcessStartModalComponent.prototype.ngOnInit = function () {
|
|
1516
|
+
this.isUserAdmin();
|
|
1517
|
+
};
|
|
1518
|
+
DossierProcessStartModalComponent.prototype.loadFormDefinition = function () {
|
|
1519
|
+
var _this = this;
|
|
1520
|
+
this.formDefinition = null;
|
|
1521
|
+
this.formLinkService
|
|
1522
|
+
.getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)
|
|
1523
|
+
.subscribe(function (formDefinition) {
|
|
1524
|
+
_this.formAssociation = formDefinition.formAssociation;
|
|
1525
|
+
var className = _this.formAssociation.formLink.className.split('.');
|
|
1526
|
+
var linkType = className[className.length - 1];
|
|
1527
|
+
switch (linkType) {
|
|
1528
|
+
case 'BpmnElementFormIdLink':
|
|
1529
|
+
_this.formDefinition = formDefinition;
|
|
1530
|
+
_this.modal.show();
|
|
1531
|
+
break;
|
|
1532
|
+
case 'BpmnElementUrlLink':
|
|
1533
|
+
var url = _this.router.serializeUrl(_this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
|
|
1534
|
+
window.open(url, '_blank');
|
|
1535
|
+
break;
|
|
1536
|
+
case 'BpmnElementAngularStateUrlLink':
|
|
1537
|
+
_this.router.navigate([formDefinition.formAssociation.formLink.url]);
|
|
1538
|
+
break;
|
|
1539
|
+
default:
|
|
1540
|
+
_this.logger.fatal('Unsupported class name');
|
|
1541
|
+
}
|
|
1542
|
+
}, function (errors) {
|
|
1543
|
+
_this.modal.show();
|
|
1544
|
+
});
|
|
1545
|
+
};
|
|
1546
|
+
DossierProcessStartModalComponent.prototype.gotoFormLinkScreen = function () {
|
|
1547
|
+
this.modal.hide();
|
|
1548
|
+
this.router.navigate(['form-links'], { queryParams: { process: this.processDefinitionKey } });
|
|
1549
|
+
};
|
|
1550
|
+
Object.defineProperty(DossierProcessStartModalComponent.prototype, "modalTitle", {
|
|
1551
|
+
get: function () {
|
|
1552
|
+
return "Start - " + this.processName;
|
|
1553
|
+
},
|
|
1554
|
+
enumerable: false,
|
|
1555
|
+
configurable: true
|
|
1556
|
+
});
|
|
1557
|
+
DossierProcessStartModalComponent.prototype.openModal = function (processDocumentDefinition) {
|
|
1558
|
+
this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;
|
|
1559
|
+
this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;
|
|
1560
|
+
this.processName = processDocumentDefinition.processName;
|
|
1561
|
+
this.options = new components.FormioOptionsImpl();
|
|
1562
|
+
this.options.disableAlerts = true;
|
|
1563
|
+
var formioBeforeSubmit = function (submission, callback) {
|
|
1564
|
+
callback(null, submission);
|
|
1565
|
+
};
|
|
1566
|
+
this.options.setHooks(formioBeforeSubmit);
|
|
1567
|
+
this.loadFormDefinition();
|
|
1568
|
+
};
|
|
1569
|
+
DossierProcessStartModalComponent.prototype.onSubmit = function (submission) {
|
|
1570
|
+
var _this = this;
|
|
1571
|
+
this.formioSubmission = submission;
|
|
1572
|
+
this.formLinkService
|
|
1573
|
+
.onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data)
|
|
1574
|
+
.subscribe(function (formSubmissionResult) {
|
|
1575
|
+
_this.modal.hide();
|
|
1576
|
+
_this.router.navigate([
|
|
1577
|
+
'dossiers',
|
|
1578
|
+
_this.documentDefinitionName,
|
|
1579
|
+
'document',
|
|
1580
|
+
formSubmissionResult.documentId,
|
|
1581
|
+
'summary',
|
|
1582
|
+
]);
|
|
1583
|
+
}, function (errors) {
|
|
1584
|
+
_this.form.showErrors(errors);
|
|
1585
|
+
});
|
|
1586
|
+
};
|
|
1587
|
+
DossierProcessStartModalComponent.prototype.isUserAdmin = function () {
|
|
1588
|
+
var _this = this;
|
|
1589
|
+
this.userProviderService.getUserSubject().subscribe(function (userIdentity) {
|
|
1590
|
+
_this.isAdmin = userIdentity.roles.includes('ROLE_ADMIN');
|
|
1591
|
+
}, function (error) {
|
|
1592
|
+
_this.logger.error('Failed to retrieve user identity', error);
|
|
1593
|
+
_this.isAdmin = false;
|
|
1594
|
+
});
|
|
1595
|
+
};
|
|
1596
|
+
return DossierProcessStartModalComponent;
|
|
1597
|
+
}());
|
|
1598
|
+
DossierProcessStartModalComponent.decorators = [
|
|
1599
|
+
{ type: i0.Component, args: [{
|
|
1600
|
+
selector: 'valtimo-dossier-process-start-modal',
|
|
1601
|
+
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 #processStartModal elementId=\"processStartModal\" [title]=\"modalTitle\">\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io #form [form]=\"formDefinition\" [options]=\"options\" (submit)=\"onSubmit($event)\">\n </valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition && isAdmin\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFoundAdmin'\"\n ></div>\n <div class=\"mb-0 mt-4 p-3 text-center\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n <div body *ngIf=\"!formDefinition && !isAdmin\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFoundUser'\"\n ></div>\n </div>\n</valtimo-modal>\n",
|
|
1602
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1603
|
+
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 */#processStartModal .formio-component-submit{text-align:right}"]
|
|
1604
|
+
},] }
|
|
1605
|
+
];
|
|
1606
|
+
DossierProcessStartModalComponent.ctorParameters = function () { return [
|
|
1607
|
+
{ type: router.ActivatedRoute },
|
|
1608
|
+
{ type: router.Router },
|
|
1609
|
+
{ type: process.ProcessService },
|
|
1610
|
+
{ type: document.DocumentService },
|
|
1611
|
+
{ type: formLink.FormLinkService },
|
|
1612
|
+
{ type: security.UserProviderService },
|
|
1613
|
+
{ type: ngxLogger.NGXLogger }
|
|
1614
|
+
]; };
|
|
1615
|
+
DossierProcessStartModalComponent.propDecorators = {
|
|
1616
|
+
form: [{ type: i0.ViewChild, args: ['form', { static: false },] }],
|
|
1617
|
+
modal: [{ type: i0.ViewChild, args: ['processStartModal', { static: false },] }]
|
|
1475
1618
|
};
|
|
1476
1619
|
|
|
1477
|
-
/*
|
|
1478
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1479
|
-
*
|
|
1480
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1481
|
-
* you may not use this file except in compliance with the License.
|
|
1482
|
-
* You may obtain a copy of the License at
|
|
1483
|
-
*
|
|
1484
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1485
|
-
*
|
|
1486
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1487
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1488
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1489
|
-
* See the License for the specific language governing permissions and
|
|
1490
|
-
* limitations under the License.
|
|
1491
|
-
*/
|
|
1492
|
-
var DossierSupportingProcessStartModalComponent = /** @class */ (function () {
|
|
1493
|
-
function DossierSupportingProcessStartModalComponent(route, router, processService, documentService, formLinkService, logger) {
|
|
1494
|
-
this.route = route;
|
|
1495
|
-
this.router = router;
|
|
1496
|
-
this.processService = processService;
|
|
1497
|
-
this.documentService = documentService;
|
|
1498
|
-
this.formLinkService = formLinkService;
|
|
1499
|
-
this.logger = logger;
|
|
1500
|
-
this.formSubmit = new i0.EventEmitter();
|
|
1501
|
-
}
|
|
1502
|
-
DossierSupportingProcessStartModalComponent.prototype.loadFormDefinition = function () {
|
|
1503
|
-
var _this = this;
|
|
1504
|
-
this.formDefinition = null;
|
|
1505
|
-
this.formLinkService
|
|
1506
|
-
.getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)
|
|
1507
|
-
.subscribe(function (formDefinition) {
|
|
1508
|
-
_this.formAssociation = formDefinition.formAssociation;
|
|
1509
|
-
var className = _this.formAssociation.formLink.className.split('.');
|
|
1510
|
-
var linkType = className[className.length - 1];
|
|
1511
|
-
switch (linkType) {
|
|
1512
|
-
case 'BpmnElementFormIdLink':
|
|
1513
|
-
_this.formDefinition = formDefinition;
|
|
1514
|
-
_this.documentService.getDocument(_this.documentId).subscribe(function (document) {
|
|
1515
|
-
_this.submission = {
|
|
1516
|
-
data: document.content,
|
|
1517
|
-
};
|
|
1518
|
-
}, function () { return rxjs.noop(); });
|
|
1519
|
-
_this.modal.show();
|
|
1520
|
-
break;
|
|
1521
|
-
case 'BpmnElementUrlLink':
|
|
1522
|
-
var url = _this.router.serializeUrl(_this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
|
|
1523
|
-
window.open(url, '_blank');
|
|
1524
|
-
break;
|
|
1525
|
-
case 'BpmnElementAngularStateUrlLink':
|
|
1526
|
-
_this.route.params.pipe(operators.take(1)).subscribe(function (params) {
|
|
1527
|
-
var documentId = params === null || params === void 0 ? void 0 : params.documentId;
|
|
1528
|
-
_this.router.navigate([formDefinition.formAssociation.formLink.url], {
|
|
1529
|
-
state: Object.assign({}, (documentId && { documentId: documentId })),
|
|
1530
|
-
});
|
|
1531
|
-
});
|
|
1532
|
-
break;
|
|
1533
|
-
default:
|
|
1534
|
-
_this.logger.fatal('Unsupported class name');
|
|
1535
|
-
}
|
|
1536
|
-
}, function (errors) {
|
|
1537
|
-
_this.modal.show();
|
|
1538
|
-
});
|
|
1539
|
-
};
|
|
1540
|
-
Object.defineProperty(DossierSupportingProcessStartModalComponent.prototype, "modalTitle", {
|
|
1541
|
-
get: function () {
|
|
1542
|
-
return "Start - " + this.processName;
|
|
1543
|
-
},
|
|
1544
|
-
enumerable: false,
|
|
1545
|
-
configurable: true
|
|
1546
|
-
});
|
|
1547
|
-
DossierSupportingProcessStartModalComponent.prototype.openModal = function (processDocumentDefinition, documentId) {
|
|
1548
|
-
this.documentId = documentId;
|
|
1549
|
-
this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;
|
|
1550
|
-
this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;
|
|
1551
|
-
this.processName = processDocumentDefinition.processName;
|
|
1552
|
-
this.options = new
|
|
1553
|
-
this.options.disableAlerts = true;
|
|
1554
|
-
var formioBeforeSubmit = function (submission, callback) {
|
|
1555
|
-
callback(null, submission);
|
|
1556
|
-
};
|
|
1557
|
-
this.options.setHooks(formioBeforeSubmit);
|
|
1558
|
-
this.loadFormDefinition();
|
|
1559
|
-
};
|
|
1560
|
-
DossierSupportingProcessStartModalComponent.prototype.onSubmit = function (submission) {
|
|
1561
|
-
var _this = this;
|
|
1562
|
-
this.formioSubmission = submission;
|
|
1563
|
-
this.formLinkService
|
|
1564
|
-
.onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.documentId)
|
|
1565
|
-
.subscribe(function (formSubmissionResult) {
|
|
1566
|
-
_this.modal.hide();
|
|
1567
|
-
_this.formSubmit.emit();
|
|
1568
|
-
}, function (errors) {
|
|
1569
|
-
_this.form.showErrors(errors);
|
|
1570
|
-
});
|
|
1571
|
-
};
|
|
1572
|
-
DossierSupportingProcessStartModalComponent.prototype.gotoFormLinkScreen = function () {
|
|
1573
|
-
this.modal.hide();
|
|
1574
|
-
this.router.navigate(['form-links'], { queryParams: { process: this.processDefinitionKey } });
|
|
1575
|
-
};
|
|
1576
|
-
return DossierSupportingProcessStartModalComponent;
|
|
1577
|
-
}());
|
|
1578
|
-
DossierSupportingProcessStartModalComponent.decorators = [
|
|
1579
|
-
{ type: i0.Component, args: [{
|
|
1580
|
-
selector: 'valtimo-dossier-supporting-process-start-modal',
|
|
1581
|
-
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 #supportingProcessStartModal\n elementId=\"supportingProcessStartModal\"\n [title]=\"modalTitle\"\n>\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io\n #form\n [submission]=\"submission\"\n [form]=\"formDefinition\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFound'\"\n ></div>\n <div class=\"mb-0 mt-4 p-3 text-center\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n",
|
|
1582
|
-
encapsulation: i0.ViewEncapsulation.None,
|
|
1583
|
-
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 */#supportingProcessStartModal .formio-component-submit{text-align:right}"]
|
|
1584
|
-
},] }
|
|
1585
|
-
];
|
|
1586
|
-
DossierSupportingProcessStartModalComponent.ctorParameters = function () { return [
|
|
1587
|
-
{ type: router.ActivatedRoute },
|
|
1588
|
-
{ type: router.Router },
|
|
1589
|
-
{ type: process.ProcessService },
|
|
1590
|
-
{ type: document.DocumentService },
|
|
1591
|
-
{ type: formLink.FormLinkService },
|
|
1592
|
-
{ type: ngxLogger.NGXLogger }
|
|
1593
|
-
]; };
|
|
1594
|
-
DossierSupportingProcessStartModalComponent.propDecorators = {
|
|
1595
|
-
form: [{ type: i0.ViewChild, args: ['form', { static: false },] }],
|
|
1596
|
-
modal: [{ type: i0.ViewChild, args: ['supportingProcessStartModal', { static: false },] }],
|
|
1597
|
-
formSubmit: [{ type: i0.Output }]
|
|
1620
|
+
/*
|
|
1621
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1622
|
+
*
|
|
1623
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1624
|
+
* you may not use this file except in compliance with the License.
|
|
1625
|
+
* You may obtain a copy of the License at
|
|
1626
|
+
*
|
|
1627
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1628
|
+
*
|
|
1629
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1630
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1631
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1632
|
+
* See the License for the specific language governing permissions and
|
|
1633
|
+
* limitations under the License.
|
|
1634
|
+
*/
|
|
1635
|
+
var DossierSupportingProcessStartModalComponent = /** @class */ (function () {
|
|
1636
|
+
function DossierSupportingProcessStartModalComponent(route, router, processService, documentService, formLinkService, logger) {
|
|
1637
|
+
this.route = route;
|
|
1638
|
+
this.router = router;
|
|
1639
|
+
this.processService = processService;
|
|
1640
|
+
this.documentService = documentService;
|
|
1641
|
+
this.formLinkService = formLinkService;
|
|
1642
|
+
this.logger = logger;
|
|
1643
|
+
this.formSubmit = new i0.EventEmitter();
|
|
1644
|
+
}
|
|
1645
|
+
DossierSupportingProcessStartModalComponent.prototype.loadFormDefinition = function () {
|
|
1646
|
+
var _this = this;
|
|
1647
|
+
this.formDefinition = null;
|
|
1648
|
+
this.formLinkService
|
|
1649
|
+
.getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)
|
|
1650
|
+
.subscribe(function (formDefinition) {
|
|
1651
|
+
_this.formAssociation = formDefinition.formAssociation;
|
|
1652
|
+
var className = _this.formAssociation.formLink.className.split('.');
|
|
1653
|
+
var linkType = className[className.length - 1];
|
|
1654
|
+
switch (linkType) {
|
|
1655
|
+
case 'BpmnElementFormIdLink':
|
|
1656
|
+
_this.formDefinition = formDefinition;
|
|
1657
|
+
_this.documentService.getDocument(_this.documentId).subscribe(function (document) {
|
|
1658
|
+
_this.submission = {
|
|
1659
|
+
data: document.content,
|
|
1660
|
+
};
|
|
1661
|
+
}, function () { return rxjs.noop(); });
|
|
1662
|
+
_this.modal.show();
|
|
1663
|
+
break;
|
|
1664
|
+
case 'BpmnElementUrlLink':
|
|
1665
|
+
var url = _this.router.serializeUrl(_this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
|
|
1666
|
+
window.open(url, '_blank');
|
|
1667
|
+
break;
|
|
1668
|
+
case 'BpmnElementAngularStateUrlLink':
|
|
1669
|
+
_this.route.params.pipe(operators.take(1)).subscribe(function (params) {
|
|
1670
|
+
var documentId = params === null || params === void 0 ? void 0 : params.documentId;
|
|
1671
|
+
_this.router.navigate([formDefinition.formAssociation.formLink.url], {
|
|
1672
|
+
state: Object.assign({}, (documentId && { documentId: documentId })),
|
|
1673
|
+
});
|
|
1674
|
+
});
|
|
1675
|
+
break;
|
|
1676
|
+
default:
|
|
1677
|
+
_this.logger.fatal('Unsupported class name');
|
|
1678
|
+
}
|
|
1679
|
+
}, function (errors) {
|
|
1680
|
+
_this.modal.show();
|
|
1681
|
+
});
|
|
1682
|
+
};
|
|
1683
|
+
Object.defineProperty(DossierSupportingProcessStartModalComponent.prototype, "modalTitle", {
|
|
1684
|
+
get: function () {
|
|
1685
|
+
return "Start - " + this.processName;
|
|
1686
|
+
},
|
|
1687
|
+
enumerable: false,
|
|
1688
|
+
configurable: true
|
|
1689
|
+
});
|
|
1690
|
+
DossierSupportingProcessStartModalComponent.prototype.openModal = function (processDocumentDefinition, documentId) {
|
|
1691
|
+
this.documentId = documentId;
|
|
1692
|
+
this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;
|
|
1693
|
+
this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;
|
|
1694
|
+
this.processName = processDocumentDefinition.processName;
|
|
1695
|
+
this.options = new components.FormioOptionsImpl();
|
|
1696
|
+
this.options.disableAlerts = true;
|
|
1697
|
+
var formioBeforeSubmit = function (submission, callback) {
|
|
1698
|
+
callback(null, submission);
|
|
1699
|
+
};
|
|
1700
|
+
this.options.setHooks(formioBeforeSubmit);
|
|
1701
|
+
this.loadFormDefinition();
|
|
1702
|
+
};
|
|
1703
|
+
DossierSupportingProcessStartModalComponent.prototype.onSubmit = function (submission) {
|
|
1704
|
+
var _this = this;
|
|
1705
|
+
this.formioSubmission = submission;
|
|
1706
|
+
this.formLinkService
|
|
1707
|
+
.onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.documentId)
|
|
1708
|
+
.subscribe(function (formSubmissionResult) {
|
|
1709
|
+
_this.modal.hide();
|
|
1710
|
+
_this.formSubmit.emit();
|
|
1711
|
+
}, function (errors) {
|
|
1712
|
+
_this.form.showErrors(errors);
|
|
1713
|
+
});
|
|
1714
|
+
};
|
|
1715
|
+
DossierSupportingProcessStartModalComponent.prototype.gotoFormLinkScreen = function () {
|
|
1716
|
+
this.modal.hide();
|
|
1717
|
+
this.router.navigate(['form-links'], { queryParams: { process: this.processDefinitionKey } });
|
|
1718
|
+
};
|
|
1719
|
+
return DossierSupportingProcessStartModalComponent;
|
|
1720
|
+
}());
|
|
1721
|
+
DossierSupportingProcessStartModalComponent.decorators = [
|
|
1722
|
+
{ type: i0.Component, args: [{
|
|
1723
|
+
selector: 'valtimo-dossier-supporting-process-start-modal',
|
|
1724
|
+
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 #supportingProcessStartModal\n elementId=\"supportingProcessStartModal\"\n [title]=\"modalTitle\"\n>\n <div body *ngIf=\"formDefinition\">\n <valtimo-form-io\n #form\n [submission]=\"submission\"\n [form]=\"formDefinition\"\n [options]=\"options\"\n (submit)=\"onSubmit($event)\"\n >\n </valtimo-form-io>\n </div>\n <div body *ngIf=\"!formDefinition\">\n <div\n class=\"bg-warning text-black mb-0 p-3 text-center\"\n [translate]=\"'formManagement.noFormDefinitionFound'\"\n ></div>\n <div class=\"mb-0 mt-4 p-3 text-center\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n",
|
|
1725
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1726
|
+
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 */#supportingProcessStartModal .formio-component-submit{text-align:right}"]
|
|
1727
|
+
},] }
|
|
1728
|
+
];
|
|
1729
|
+
DossierSupportingProcessStartModalComponent.ctorParameters = function () { return [
|
|
1730
|
+
{ type: router.ActivatedRoute },
|
|
1731
|
+
{ type: router.Router },
|
|
1732
|
+
{ type: process.ProcessService },
|
|
1733
|
+
{ type: document.DocumentService },
|
|
1734
|
+
{ type: formLink.FormLinkService },
|
|
1735
|
+
{ type: ngxLogger.NGXLogger }
|
|
1736
|
+
]; };
|
|
1737
|
+
DossierSupportingProcessStartModalComponent.propDecorators = {
|
|
1738
|
+
form: [{ type: i0.ViewChild, args: ['form', { static: false },] }],
|
|
1739
|
+
modal: [{ type: i0.ViewChild, args: ['supportingProcessStartModal', { static: false },] }],
|
|
1740
|
+
formSubmit: [{ type: i0.Output }]
|
|
1598
1741
|
};
|
|
1599
1742
|
|
|
1600
|
-
/*
|
|
1601
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1602
|
-
*
|
|
1603
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1604
|
-
* you may not use this file except in compliance with the License.
|
|
1605
|
-
* You may obtain a copy of the License at
|
|
1606
|
-
*
|
|
1607
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1608
|
-
*
|
|
1609
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1610
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1611
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1612
|
-
* See the License for the specific language governing permissions and
|
|
1613
|
-
* limitations under the License.
|
|
1614
|
-
*/
|
|
1615
|
-
var ɵ0$1 =
|
|
1616
|
-
var DossierModule = /** @class */ (function () {
|
|
1617
|
-
function DossierModule() {
|
|
1618
|
-
}
|
|
1619
|
-
DossierModule.forRoot = function (tabsFactory) {
|
|
1620
|
-
return {
|
|
1621
|
-
ngModule: DossierModule,
|
|
1622
|
-
providers: [
|
|
1623
|
-
DossierService,
|
|
1624
|
-
TabService,
|
|
1625
|
-
{
|
|
1626
|
-
provide: TAB_MAP,
|
|
1627
|
-
useFactory: tabsFactory,
|
|
1628
|
-
},
|
|
1629
|
-
{
|
|
1630
|
-
provide: i0.ANALYZE_FOR_ENTRY_COMPONENTS,
|
|
1631
|
-
useValue: Array.from(tabsFactory().values()),
|
|
1632
|
-
multi: true,
|
|
1633
|
-
},
|
|
1634
|
-
],
|
|
1635
|
-
};
|
|
1636
|
-
};
|
|
1637
|
-
return DossierModule;
|
|
1638
|
-
}());
|
|
1639
|
-
DossierModule.decorators = [
|
|
1640
|
-
{ type: i0.NgModule, args: [{
|
|
1641
|
-
declarations: [
|
|
1642
|
-
DossierListComponent,
|
|
1643
|
-
DossierDetailComponent,
|
|
1644
|
-
DossierDetailTabSummaryComponent,
|
|
1645
|
-
DossierDetailTabProgressComponent,
|
|
1646
|
-
DossierDetailTabAuditComponent,
|
|
1647
|
-
DossierDetailTabDocumentsComponent,
|
|
1648
|
-
DossierDetailTabContactMomentsComponent,
|
|
1649
|
-
DossierUpdateComponent,
|
|
1650
|
-
DossierProcessStartModalComponent,
|
|
1651
|
-
DossierSupportingProcessStartModalComponent,
|
|
1652
|
-
],
|
|
1653
|
-
imports: [
|
|
1654
|
-
common.CommonModule,
|
|
1655
|
-
DossierRoutingModule,
|
|
1656
|
-
components.ListModule,
|
|
1657
|
-
components.WidgetModule,
|
|
1658
|
-
components.BpmnJsDiagramModule,
|
|
1659
|
-
components.TimelineModule,
|
|
1660
|
-
components.CamundaFormModule,
|
|
1661
|
-
process.ProcessModule,
|
|
1662
|
-
components.FilterSidebarModule,
|
|
1663
|
-
ngBootstrap.NgbButtonsModule,
|
|
1664
|
-
components.DataListModule,
|
|
1665
|
-
forms.FormsModule,
|
|
1666
|
-
form.FormModule,
|
|
1667
|
-
components.FormIoModule,
|
|
1668
|
-
components.ModalModule,
|
|
1669
|
-
components.SpinnerModule,
|
|
1670
|
-
core.TranslateModule.forRoot({
|
|
1671
|
-
loader: {
|
|
1672
|
-
provide: core.TranslateLoader,
|
|
1673
|
-
useFactory: ɵ0$1,
|
|
1674
|
-
deps: [http.HttpClient],
|
|
1675
|
-
},
|
|
1676
|
-
}),
|
|
1677
|
-
task.TaskModule,
|
|
1678
|
-
components.ModalModule,
|
|
1679
|
-
ngBootstrap.NgbTooltipModule,
|
|
1680
|
-
components.UploaderModule,
|
|
1681
|
-
components.DropzoneModule,
|
|
1682
|
-
ngBootstrap.NgbPaginationModule,
|
|
1683
|
-
i1.ConfigModule,
|
|
1684
|
-
],
|
|
1685
|
-
exports: [DossierListComponent, DossierDetailComponent],
|
|
1686
|
-
entryComponents: [
|
|
1687
|
-
DossierDetailTabSummaryComponent,
|
|
1688
|
-
DossierDetailTabProgressComponent,
|
|
1689
|
-
DossierDetailTabAuditComponent,
|
|
1690
|
-
DossierDetailTabDocumentsComponent,
|
|
1691
|
-
DossierDetailTabContactMomentsComponent,
|
|
1692
|
-
],
|
|
1693
|
-
},] }
|
|
1743
|
+
/*
|
|
1744
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1745
|
+
*
|
|
1746
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1747
|
+
* you may not use this file except in compliance with the License.
|
|
1748
|
+
* You may obtain a copy of the License at
|
|
1749
|
+
*
|
|
1750
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1751
|
+
*
|
|
1752
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1753
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1754
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1755
|
+
* See the License for the specific language governing permissions and
|
|
1756
|
+
* limitations under the License.
|
|
1757
|
+
*/
|
|
1758
|
+
var ɵ0$1 = i1.HttpLoaderFactory;
|
|
1759
|
+
var DossierModule = /** @class */ (function () {
|
|
1760
|
+
function DossierModule() {
|
|
1761
|
+
}
|
|
1762
|
+
DossierModule.forRoot = function (tabsFactory) {
|
|
1763
|
+
return {
|
|
1764
|
+
ngModule: DossierModule,
|
|
1765
|
+
providers: [
|
|
1766
|
+
DossierService,
|
|
1767
|
+
TabService,
|
|
1768
|
+
{
|
|
1769
|
+
provide: TAB_MAP,
|
|
1770
|
+
useFactory: tabsFactory,
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
provide: i0.ANALYZE_FOR_ENTRY_COMPONENTS,
|
|
1774
|
+
useValue: Array.from(tabsFactory().values()),
|
|
1775
|
+
multi: true,
|
|
1776
|
+
},
|
|
1777
|
+
],
|
|
1778
|
+
};
|
|
1779
|
+
};
|
|
1780
|
+
return DossierModule;
|
|
1781
|
+
}());
|
|
1782
|
+
DossierModule.decorators = [
|
|
1783
|
+
{ type: i0.NgModule, args: [{
|
|
1784
|
+
declarations: [
|
|
1785
|
+
DossierListComponent,
|
|
1786
|
+
DossierDetailComponent,
|
|
1787
|
+
DossierDetailTabSummaryComponent,
|
|
1788
|
+
DossierDetailTabProgressComponent,
|
|
1789
|
+
DossierDetailTabAuditComponent,
|
|
1790
|
+
DossierDetailTabDocumentsComponent,
|
|
1791
|
+
DossierDetailTabContactMomentsComponent,
|
|
1792
|
+
DossierUpdateComponent,
|
|
1793
|
+
DossierProcessStartModalComponent,
|
|
1794
|
+
DossierSupportingProcessStartModalComponent,
|
|
1795
|
+
],
|
|
1796
|
+
imports: [
|
|
1797
|
+
common.CommonModule,
|
|
1798
|
+
DossierRoutingModule,
|
|
1799
|
+
components.ListModule,
|
|
1800
|
+
components.WidgetModule,
|
|
1801
|
+
components.BpmnJsDiagramModule,
|
|
1802
|
+
components.TimelineModule,
|
|
1803
|
+
components.CamundaFormModule,
|
|
1804
|
+
process.ProcessModule,
|
|
1805
|
+
components.FilterSidebarModule,
|
|
1806
|
+
ngBootstrap.NgbButtonsModule,
|
|
1807
|
+
components.DataListModule,
|
|
1808
|
+
forms.FormsModule,
|
|
1809
|
+
form.FormModule,
|
|
1810
|
+
components.FormIoModule,
|
|
1811
|
+
components.ModalModule,
|
|
1812
|
+
components.SpinnerModule,
|
|
1813
|
+
core.TranslateModule.forRoot({
|
|
1814
|
+
loader: {
|
|
1815
|
+
provide: core.TranslateLoader,
|
|
1816
|
+
useFactory: ɵ0$1,
|
|
1817
|
+
deps: [http.HttpClient],
|
|
1818
|
+
},
|
|
1819
|
+
}),
|
|
1820
|
+
task.TaskModule,
|
|
1821
|
+
components.ModalModule,
|
|
1822
|
+
ngBootstrap.NgbTooltipModule,
|
|
1823
|
+
components.UploaderModule,
|
|
1824
|
+
components.DropzoneModule,
|
|
1825
|
+
ngBootstrap.NgbPaginationModule,
|
|
1826
|
+
i1.ConfigModule,
|
|
1827
|
+
],
|
|
1828
|
+
exports: [DossierListComponent, DossierDetailComponent],
|
|
1829
|
+
entryComponents: [
|
|
1830
|
+
DossierDetailTabSummaryComponent,
|
|
1831
|
+
DossierDetailTabProgressComponent,
|
|
1832
|
+
DossierDetailTabAuditComponent,
|
|
1833
|
+
DossierDetailTabDocumentsComponent,
|
|
1834
|
+
DossierDetailTabContactMomentsComponent,
|
|
1835
|
+
],
|
|
1836
|
+
},] }
|
|
1694
1837
|
];
|
|
1695
1838
|
|
|
1696
|
-
/*
|
|
1697
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1698
|
-
*
|
|
1699
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1700
|
-
* you may not use this file except in compliance with the License.
|
|
1701
|
-
* You may obtain a copy of the License at
|
|
1702
|
-
*
|
|
1703
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1704
|
-
*
|
|
1705
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
1706
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
1707
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1708
|
-
* See the License for the specific language governing permissions and
|
|
1709
|
-
* limitations under the License.
|
|
1839
|
+
/*
|
|
1840
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
1841
|
+
*
|
|
1842
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
1843
|
+
* you may not use this file except in compliance with the License.
|
|
1844
|
+
* You may obtain a copy of the License at
|
|
1845
|
+
*
|
|
1846
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
1847
|
+
*
|
|
1848
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1849
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
1850
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1851
|
+
* See the License for the specific language governing permissions and
|
|
1852
|
+
* limitations under the License.
|
|
1710
1853
|
*/
|
|
1711
1854
|
|
|
1712
|
-
/**
|
|
1713
|
-
* Generated bundle index. Do not edit.
|
|
1855
|
+
/**
|
|
1856
|
+
* Generated bundle index. Do not edit.
|
|
1714
1857
|
*/
|
|
1715
1858
|
|
|
1716
1859
|
exports.DEFAULT_TABS = DEFAULT_TABS;
|
|
@@ -1724,6 +1867,8 @@
|
|
|
1724
1867
|
exports.DossierModule = DossierModule;
|
|
1725
1868
|
exports.DossierService = DossierService;
|
|
1726
1869
|
exports.TAB_MAP = TAB_MAP;
|
|
1870
|
+
exports.TabImpl = TabImpl;
|
|
1871
|
+
exports.TabLoaderImpl = TabLoaderImpl;
|
|
1727
1872
|
exports.TabService = TabService;
|
|
1728
1873
|
exports.ɵ0 = ɵ0$1;
|
|
1729
1874
|
exports.ɵa = DossierUpdateComponent;
|