@valtimo/dossier 4.21.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/esm2020/lib/dossier-detail/dossier-detail.component.mjs +115 -0
  2. package/esm2020/lib/dossier-detail/tab/audit/audit.component.mjs +76 -0
  3. package/esm2020/lib/dossier-detail/tab/contact-moments/contact-moments.component.mjs +86 -0
  4. package/esm2020/lib/dossier-detail/tab/documents/documents.component.mjs +115 -0
  5. package/esm2020/lib/dossier-detail/tab/progress/progress.component.mjs +48 -0
  6. package/esm2020/lib/dossier-detail/tab/summary/summary.component.mjs +117 -0
  7. package/esm2020/lib/dossier-detail-tab-enum.mjs +24 -0
  8. package/esm2020/lib/dossier-list/dossier-list.component.mjs +218 -0
  9. package/esm2020/lib/dossier-process-start-modal/dossier-process-start-modal.component.mjs +125 -0
  10. package/esm2020/lib/dossier-routing.module.mjs +62 -0
  11. package/esm2020/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.mjs +122 -0
  12. package/esm2020/lib/dossier-update/dossier-update.component.mjs +113 -0
  13. package/esm2020/lib/dossier.config.mjs +29 -0
  14. package/esm2020/lib/dossier.module.mjs +179 -0
  15. package/esm2020/lib/dossier.service.mjs +51 -0
  16. package/esm2020/lib/models/index.mjs +19 -0
  17. package/esm2020/lib/models/tabs.model.mjs +104 -0
  18. package/esm2020/lib/tab.service.mjs +45 -0
  19. package/esm2020/public_api.mjs +32 -0
  20. package/esm2020/valtimo-dossier.mjs +5 -0
  21. package/fesm2015/valtimo-dossier.mjs +1519 -0
  22. package/fesm2015/valtimo-dossier.mjs.map +1 -0
  23. package/fesm2020/valtimo-dossier.mjs +1535 -0
  24. package/fesm2020/valtimo-dossier.mjs.map +1 -0
  25. package/lib/dossier-detail/dossier-detail.component.d.ts +4 -0
  26. package/lib/dossier-detail/dossier-detail.component.d.ts.map +1 -0
  27. package/lib/dossier-detail/tab/audit/audit.component.d.ts +4 -0
  28. package/lib/dossier-detail/tab/audit/audit.component.d.ts.map +1 -0
  29. package/lib/dossier-detail/tab/contact-moments/contact-moments.component.d.ts +4 -0
  30. package/lib/dossier-detail/tab/contact-moments/contact-moments.component.d.ts.map +1 -0
  31. package/lib/dossier-detail/tab/documents/documents.component.d.ts +4 -0
  32. package/lib/dossier-detail/tab/documents/documents.component.d.ts.map +1 -0
  33. package/lib/dossier-detail/tab/progress/progress.component.d.ts +4 -0
  34. package/lib/dossier-detail/tab/progress/progress.component.d.ts.map +1 -0
  35. package/lib/dossier-detail/tab/summary/summary.component.d.ts +4 -0
  36. package/lib/dossier-detail/tab/summary/summary.component.d.ts.map +1 -0
  37. package/lib/dossier-detail-tab-enum.d.ts +1 -0
  38. package/lib/dossier-detail-tab-enum.d.ts.map +1 -0
  39. package/lib/dossier-list/dossier-list.component.d.ts +4 -0
  40. package/lib/dossier-list/dossier-list.component.d.ts.map +1 -0
  41. package/lib/dossier-process-start-modal/dossier-process-start-modal.component.d.ts +4 -0
  42. package/lib/dossier-process-start-modal/dossier-process-start-modal.component.d.ts.map +1 -0
  43. package/lib/dossier-routing.module.d.ts +7 -0
  44. package/lib/dossier-routing.module.d.ts.map +1 -0
  45. package/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.d.ts +4 -0
  46. package/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.d.ts.map +1 -0
  47. package/lib/dossier-update/dossier-update.component.d.ts +4 -0
  48. package/lib/dossier-update/dossier-update.component.d.ts.map +1 -0
  49. package/lib/dossier.config.d.ts +1 -0
  50. package/lib/dossier.config.d.ts.map +1 -0
  51. package/lib/dossier.module.d.ts +25 -0
  52. package/lib/dossier.module.d.ts.map +1 -0
  53. package/lib/dossier.service.d.ts +4 -0
  54. package/lib/dossier.service.d.ts.map +1 -0
  55. package/lib/models/index.d.ts +1 -0
  56. package/lib/models/index.d.ts.map +1 -0
  57. package/lib/models/tabs.model.d.ts +1 -0
  58. package/lib/models/tabs.model.d.ts.map +1 -0
  59. package/lib/tab.service.d.ts +4 -0
  60. package/lib/tab.service.d.ts.map +1 -0
  61. package/package.json +23 -11
  62. package/public_api.d.ts +1 -0
  63. package/public_api.d.ts.map +1 -0
  64. package/valtimo-dossier.d.ts +2 -4
  65. package/valtimo-dossier.d.ts.map +1 -0
  66. package/bundles/valtimo-dossier.umd.js +0 -1915
  67. package/bundles/valtimo-dossier.umd.js.map +0 -1
  68. package/bundles/valtimo-dossier.umd.min.js +0 -2
  69. package/bundles/valtimo-dossier.umd.min.js.map +0 -1
  70. package/esm2015/lib/dossier-detail/dossier-detail.component.js +0 -125
  71. package/esm2015/lib/dossier-detail/tab/audit/audit.component.js +0 -79
  72. package/esm2015/lib/dossier-detail/tab/contact-moments/contact-moments.component.js +0 -90
  73. package/esm2015/lib/dossier-detail/tab/documents/documents.component.js +0 -122
  74. package/esm2015/lib/dossier-detail/tab/progress/progress.component.js +0 -49
  75. package/esm2015/lib/dossier-detail/tab/summary/summary.component.js +0 -126
  76. package/esm2015/lib/dossier-detail-tab-enum.js +0 -24
  77. package/esm2015/lib/dossier-list/dossier-list.component.js +0 -216
  78. package/esm2015/lib/dossier-process-start-modal/dossier-process-start-modal.component.js +0 -130
  79. package/esm2015/lib/dossier-routing.module.js +0 -58
  80. package/esm2015/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.js +0 -125
  81. package/esm2015/lib/dossier-update/dossier-update.component.js +0 -121
  82. package/esm2015/lib/dossier.config.js +0 -29
  83. package/esm2015/lib/dossier.module.js +0 -121
  84. package/esm2015/lib/dossier.service.js +0 -53
  85. package/esm2015/lib/models/index.js +0 -19
  86. package/esm2015/lib/models/tabs.model.js +0 -104
  87. package/esm2015/lib/tab.service.js +0 -44
  88. package/esm2015/public_api.js +0 -32
  89. package/esm2015/valtimo-dossier.js +0 -9
  90. package/fesm2015/valtimo-dossier.js +0 -1548
  91. package/fesm2015/valtimo-dossier.js.map +0 -1
  92. package/valtimo-dossier.metadata.json +0 -1
@@ -0,0 +1,1535 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, ViewEncapsulation, ViewChild, EventEmitter, Output, InjectionToken, Inject, ViewContainerRef, NgModule, ANALYZE_FOR_ENTRY_COMPONENTS } from '@angular/core';
3
+ import * as i1 from '@angular/router';
4
+ import { NavigationEnd, RouterModule } from '@angular/router';
5
+ import * as i2$1 from '@valtimo/document';
6
+ import { DocumentSearchRequestImpl } from '@valtimo/document';
7
+ import * as moment from 'moment';
8
+ import moment__default from 'moment';
9
+ import { combineLatest, BehaviorSubject, noop } from 'rxjs';
10
+ import * as i3 from '@ngx-translate/core';
11
+ import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
12
+ import * as i7 from '@valtimo/config';
13
+ import { ROLE_USER, ConfigModule, HttpLoaderFactory } from '@valtimo/config';
14
+ import * as i7$1 from '@valtimo/components';
15
+ import { FormioOptionsImpl, TimelineItemImpl, ListModule, WidgetModule, BpmnJsDiagramModule, TimelineModule, CamundaFormModule, FilterSidebarModule, DataListModule, FormIoModule, ModalModule, SpinnerModule, UploaderModule, DropzoneModule } from '@valtimo/components';
16
+ import * as i2 from '@valtimo/process';
17
+ import { ProcessModule } from '@valtimo/process';
18
+ import * as i4 from '@valtimo/form-link';
19
+ import * as i5 from '@valtimo/security';
20
+ import { AuthGuardService } from '@valtimo/security';
21
+ import * as i6 from 'ngx-logger';
22
+ import * as i5$1 from '@angular/common';
23
+ import { CommonModule } from '@angular/common';
24
+ import * as i8 from '@ng-bootstrap/ng-bootstrap';
25
+ import { NgbButtonsModule, NgbTooltipModule, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap';
26
+ import * as i5$2 from '@angular/forms';
27
+ import { FormsModule } from '@angular/forms';
28
+ import * as i3$1 from '@valtimo/task';
29
+ import { TaskModule } from '@valtimo/task';
30
+ import * as i5$3 from '@valtimo/form';
31
+ import { FormModule } from '@valtimo/form';
32
+ import * as i3$2 from 'ngx-spinner';
33
+ import { switchMap, map, take } from 'rxjs/operators';
34
+ import * as i3$3 from 'ngx-toastr';
35
+ import * as i4$1 from '@valtimo/resource';
36
+ import * as i1$1 from '@valtimo/contact-moment';
37
+ import { HttpClient } from '@angular/common/http';
38
+
39
+ /*
40
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
41
+ *
42
+ * Licensed under EUPL, Version 1.2 (the "License");
43
+ * you may not use this file except in compliance with the License.
44
+ * You may obtain a copy of the License at
45
+ *
46
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
47
+ *
48
+ * Unless required by applicable law or agreed to in writing, software
49
+ * distributed under the License is distributed on an "AS IS" basis,
50
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51
+ * See the License for the specific language governing permissions and
52
+ * limitations under the License.
53
+ */
54
+ class TabLoaderImpl {
55
+ constructor(tabs, componentFactoryResolver, viewContainerRef, translateService, router, location) {
56
+ this._tabs = null;
57
+ this._componentFactoryResolver = null;
58
+ this._viewContainerRef = null;
59
+ this._activeComponent = null;
60
+ this._activeTab = null;
61
+ this._translateService = null;
62
+ this._tabs = tabs;
63
+ this._componentFactoryResolver = componentFactoryResolver;
64
+ this._viewContainerRef = viewContainerRef;
65
+ this._translateService = translateService;
66
+ this._router = router;
67
+ this._location = location;
68
+ }
69
+ initial(tabName) {
70
+ let initialTab;
71
+ if (tabName) {
72
+ initialTab = this._tabs.find(tab => tab.name === tabName);
73
+ }
74
+ else {
75
+ initialTab = this._tabs[0] || null;
76
+ }
77
+ this.load(initialTab);
78
+ }
79
+ load(newTab) {
80
+ if (newTab !== this._activeTab) {
81
+ this._tabs.forEach(tab => tab.deactivate());
82
+ this.replaceView(newTab);
83
+ this.replaceUrlState(newTab);
84
+ this.setActive(newTab);
85
+ }
86
+ }
87
+ refreshView() {
88
+ this.replaceView(this._activeTab);
89
+ }
90
+ replaceView(tab) {
91
+ const componentFactory = this._componentFactoryResolver.resolveComponentFactory(tab.component);
92
+ this._viewContainerRef.clear();
93
+ if (this._activeTab !== null) {
94
+ this._activeComponent.destroy();
95
+ }
96
+ this._activeComponent = this._viewContainerRef.createComponent(componentFactory);
97
+ }
98
+ replaceUrlState(tab) {
99
+ const currentUrl = this._router.url;
100
+ const urlParts = currentUrl.split('/');
101
+ urlParts.splice(urlParts.length - 1, 1, tab.name);
102
+ const newUrl = urlParts.join('/');
103
+ this._location.replaceState(newUrl);
104
+ }
105
+ setActive(tab) {
106
+ tab.activate();
107
+ this._activeTab = tab;
108
+ }
109
+ get tabs() {
110
+ return this._tabs;
111
+ }
112
+ translateTabName(tab) {
113
+ return this._translateService.instant('dossier.tabs.' + tab.name);
114
+ }
115
+ }
116
+ class TabImpl {
117
+ constructor(name, sequence, component) {
118
+ this._active = false;
119
+ this._name = name;
120
+ this._sequence = sequence;
121
+ this._component = component;
122
+ }
123
+ get name() {
124
+ return this._name;
125
+ }
126
+ get sequence() {
127
+ return this._sequence;
128
+ }
129
+ get component() {
130
+ return this._component;
131
+ }
132
+ activate() {
133
+ this._active = true;
134
+ }
135
+ deactivate() {
136
+ this._active = false;
137
+ }
138
+ isActive() {
139
+ return this._active;
140
+ }
141
+ }
142
+
143
+ /*
144
+ *
145
+ * * Copyright 2015-2020 Ritense BV, the Netherlands.
146
+ * *
147
+ * * Licensed under EUPL, Version 1.2 (the "License");
148
+ * * you may not use this file except in compliance with the License.
149
+ * * You may obtain a copy of the License at
150
+ * *
151
+ * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
152
+ * *
153
+ * * Unless required by applicable law or agreed to in writing, software
154
+ * * distributed under the License is distributed on an "AS IS" basis,
155
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
156
+ * * See the License for the specific language governing permissions and
157
+ * * limitations under the License.
158
+ *
159
+ */
160
+
161
+ /*
162
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
163
+ *
164
+ * Licensed under EUPL, Version 1.2 (the "License");
165
+ * you may not use this file except in compliance with the License.
166
+ * You may obtain a copy of the License at
167
+ *
168
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
169
+ *
170
+ * Unless required by applicable law or agreed to in writing, software
171
+ * distributed under the License is distributed on an "AS IS" basis,
172
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
173
+ * See the License for the specific language governing permissions and
174
+ * limitations under the License.
175
+ */
176
+ var DefaultTabs;
177
+ (function (DefaultTabs) {
178
+ DefaultTabs["summary"] = "summary";
179
+ DefaultTabs["progress"] = "progress";
180
+ DefaultTabs["audit"] = "audit";
181
+ DefaultTabs["documents"] = "documents";
182
+ DefaultTabs["contactMoments"] = "contact-moments";
183
+ })(DefaultTabs || (DefaultTabs = {}));
184
+
185
+ /*
186
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
187
+ *
188
+ * Licensed under EUPL, Version 1.2 (the "License");
189
+ * you may not use this file except in compliance with the License.
190
+ * You may obtain a copy of the License at
191
+ *
192
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
193
+ *
194
+ * Unless required by applicable law or agreed to in writing, software
195
+ * distributed under the License is distributed on an "AS IS" basis,
196
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
197
+ * See the License for the specific language governing permissions and
198
+ * limitations under the License.
199
+ */
200
+ class DossierService {
201
+ constructor(configService) {
202
+ this.configService = configService;
203
+ this.definitions = configService.config.definitions;
204
+ }
205
+ getImplementationEnvironmentDefinitions(name) {
206
+ return this.definitions.dossiers.find(definition => definition.name === name);
207
+ }
208
+ getDefinitionColumns(definitionNameId) {
209
+ const config = this.configService.config;
210
+ const customDefinitionTable = config.customDefinitionTables[definitionNameId];
211
+ return customDefinitionTable || config.defaultDefinitionTable;
212
+ }
213
+ getInitialSortState(columns) {
214
+ const defaultColumn = columns.find(column => column.default);
215
+ return {
216
+ isSorting: false,
217
+ state: {
218
+ name: defaultColumn ? defaultColumn.propertyName : columns[0].propertyName,
219
+ direction: 'DESC',
220
+ },
221
+ };
222
+ }
223
+ }
224
+ DossierService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierService, deps: [{ token: i7.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
225
+ DossierService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierService, providedIn: 'root' });
226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierService, decorators: [{
227
+ type: Injectable,
228
+ args: [{
229
+ providedIn: 'root',
230
+ }]
231
+ }], ctorParameters: function () { return [{ type: i7.ConfigService }]; } });
232
+
233
+ /*
234
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
235
+ *
236
+ * Licensed under EUPL, Version 1.2 (the "License");
237
+ * you may not use this file except in compliance with the License.
238
+ * You may obtain a copy of the License at
239
+ *
240
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
241
+ *
242
+ * Unless required by applicable law or agreed to in writing, software
243
+ * distributed under the License is distributed on an "AS IS" basis,
244
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
245
+ * See the License for the specific language governing permissions and
246
+ * limitations under the License.
247
+ */
248
+ class DossierProcessStartModalComponent {
249
+ constructor(route, router, processService, documentService, formLinkService, userProviderService, logger) {
250
+ this.route = route;
251
+ this.router = router;
252
+ this.processService = processService;
253
+ this.documentService = documentService;
254
+ this.formLinkService = formLinkService;
255
+ this.userProviderService = userProviderService;
256
+ this.logger = logger;
257
+ }
258
+ ngOnInit() {
259
+ this.isUserAdmin();
260
+ }
261
+ loadFormDefinition() {
262
+ this.formDefinition = null;
263
+ this.formLinkService
264
+ .getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)
265
+ .subscribe(formDefinition => {
266
+ this.formAssociation = formDefinition.formAssociation;
267
+ const className = this.formAssociation.formLink.className.split('.');
268
+ const linkType = className[className.length - 1];
269
+ switch (linkType) {
270
+ case 'BpmnElementFormIdLink':
271
+ this.formDefinition = formDefinition;
272
+ this.modal.show();
273
+ break;
274
+ case 'BpmnElementUrlLink':
275
+ const url = this.router.serializeUrl(this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
276
+ window.open(url, '_blank');
277
+ break;
278
+ case 'BpmnElementAngularStateUrlLink':
279
+ this.router.navigate([formDefinition.formAssociation.formLink.url]);
280
+ break;
281
+ default:
282
+ this.logger.fatal('Unsupported class name');
283
+ }
284
+ }, errors => {
285
+ this.modal.show();
286
+ });
287
+ }
288
+ gotoFormLinkScreen() {
289
+ this.modal.hide();
290
+ this.router.navigate(['form-links'], { queryParams: { process: this.processDefinitionKey } });
291
+ }
292
+ get modalTitle() {
293
+ return `Start - ${this.processName}`;
294
+ }
295
+ openModal(processDocumentDefinition) {
296
+ this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;
297
+ this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;
298
+ this.processName = processDocumentDefinition.processName;
299
+ this.options = new FormioOptionsImpl();
300
+ this.options.disableAlerts = true;
301
+ const formioBeforeSubmit = function (submission, callback) {
302
+ callback(null, submission);
303
+ };
304
+ this.options.setHooks(formioBeforeSubmit);
305
+ this.loadFormDefinition();
306
+ }
307
+ onSubmit(submission) {
308
+ this.formioSubmission = submission;
309
+ this.formLinkService
310
+ .onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data)
311
+ .subscribe((formSubmissionResult) => {
312
+ this.modal.hide();
313
+ this.router.navigate([
314
+ 'dossiers',
315
+ this.documentDefinitionName,
316
+ 'document',
317
+ formSubmissionResult.documentId,
318
+ 'summary',
319
+ ]);
320
+ }, errors => {
321
+ this.form.showErrors(errors);
322
+ });
323
+ }
324
+ isUserAdmin() {
325
+ this.userProviderService.getUserSubject().subscribe(userIdentity => {
326
+ this.isAdmin = userIdentity.roles.includes('ROLE_ADMIN');
327
+ }, error => {
328
+ this.logger.error('Failed to retrieve user identity', error);
329
+ this.isAdmin = false;
330
+ });
331
+ }
332
+ }
333
+ DossierProcessStartModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierProcessStartModalComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i2.ProcessService }, { token: i2$1.DocumentService }, { token: i4.FormLinkService }, { token: i5.UserProviderService }, { token: i6.NGXLogger }], target: i0.ɵɵFactoryTarget.Component });
334
+ DossierProcessStartModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierProcessStartModalComponent, selector: "valtimo-dossier-process-start-modal", viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "modal", first: true, predicate: ["processStartModal"], descendants: true }], ngImport: i0, 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", 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}\n"], components: [{ type: i7$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { type: i7$1.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "formRefresh$"], outputs: ["submit", "change"] }], directives: [{ type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "translate": i3.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierProcessStartModalComponent, decorators: [{
336
+ type: Component,
337
+ args: [{ selector: 'valtimo-dossier-process-start-modal', encapsulation: ViewEncapsulation.None, 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", 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}\n"] }]
338
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i2.ProcessService }, { type: i2$1.DocumentService }, { type: i4.FormLinkService }, { type: i5.UserProviderService }, { type: i6.NGXLogger }]; }, propDecorators: { form: [{
339
+ type: ViewChild,
340
+ args: ['form', { static: false }]
341
+ }], modal: [{
342
+ type: ViewChild,
343
+ args: ['processStartModal', { static: false }]
344
+ }] } });
345
+
346
+ /*
347
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
348
+ *
349
+ * Licensed under EUPL, Version 1.2 (the "License");
350
+ * you may not use this file except in compliance with the License.
351
+ * You may obtain a copy of the License at
352
+ *
353
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
354
+ *
355
+ * Unless required by applicable law or agreed to in writing, software
356
+ * distributed under the License is distributed on an "AS IS" basis,
357
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
358
+ * See the License for the specific language governing permissions and
359
+ * limitations under the License.
360
+ */
361
+ moment__default.locale(localStorage.getItem('langKey') || '');
362
+ class DossierListComponent {
363
+ constructor(route, router, documentService, translateService, dossierService) {
364
+ this.route = route;
365
+ this.router = router;
366
+ this.documentService = documentService;
367
+ this.translateService = translateService;
368
+ this.dossierService = dossierService;
369
+ this.documentDefinitionName = '';
370
+ this.showCreateDocument = false;
371
+ this.items = [];
372
+ this.fields = [];
373
+ this.processDefinitionListFields = [];
374
+ this.processDocumentDefinitions = [];
375
+ this.pagination = {
376
+ collectionSize: 0,
377
+ page: 1,
378
+ size: 10,
379
+ maxPaginationItemSize: 5,
380
+ sort: undefined,
381
+ };
382
+ this.selectedProcessDocumentDefinition = null;
383
+ this.modalListenerAdded = false;
384
+ }
385
+ ngOnInit() {
386
+ this.doInit();
387
+ this.routeEvent(this.router);
388
+ this.modalListenerAdded = false;
389
+ }
390
+ ngOnDestroy() {
391
+ this.routerSubscription.unsubscribe();
392
+ this.translationSubscription.unsubscribe();
393
+ }
394
+ paginationSet() {
395
+ this.getData();
396
+ }
397
+ routeEvent(router) {
398
+ this.routerSubscription = router.events.subscribe(e => {
399
+ if (e instanceof NavigationEnd) {
400
+ this.doInit();
401
+ this.getData();
402
+ }
403
+ });
404
+ }
405
+ doInit() {
406
+ const documentDefinitionName = this.route.snapshot.paramMap.get('documentDefinitionName') || '';
407
+ const columns = this.dossierService.getDefinitionColumns(documentDefinitionName);
408
+ this.documentDefinitionName = documentDefinitionName;
409
+ this.initialSortState = this.dossierService.getInitialSortState(columns);
410
+ this.openTranslationSubscription(columns);
411
+ }
412
+ openTranslationSubscription(columns) {
413
+ this.translationSubscription = combineLatest(columns.map(column => this.translateService.stream(`fieldLabels.${column.translationKey}`))).subscribe(labels => {
414
+ this.fields = columns.map((column, index) => ({
415
+ key: column.propertyName,
416
+ label: labels[index],
417
+ sortable: column.sortable,
418
+ ...(column.viewType && { viewType: column.viewType }),
419
+ }));
420
+ });
421
+ }
422
+ getData() {
423
+ this.findDocumentDefinition(this.documentDefinitionName);
424
+ if (this.hasCachedSearchRequest()) {
425
+ const documentSearchRequest = this.getCachedSearch();
426
+ this.globalSearchFilter = documentSearchRequest.globalSearchFilter;
427
+ this.sequence = documentSearchRequest.sequence;
428
+ this.createdBy = documentSearchRequest.createdBy;
429
+ this.findDocuments(documentSearchRequest);
430
+ }
431
+ else {
432
+ this.doSearch();
433
+ }
434
+ this.getAllAssociatedProcessDefinitions();
435
+ }
436
+ doSearch() {
437
+ const documentSearchRequest = this.buildDocumentSearchRequest();
438
+ this.findDocuments(documentSearchRequest);
439
+ }
440
+ findDocuments(documentSearchRequest) {
441
+ return this.documentService.getDocuments(documentSearchRequest).subscribe(documents => {
442
+ this.documents = documents;
443
+ this.transformDocuments(this.documents.content);
444
+ this.pagination.collectionSize = this.documents.totalElements;
445
+ this.storeSearch(documentSearchRequest);
446
+ });
447
+ }
448
+ getAllAssociatedProcessDefinitions() {
449
+ this.documentService
450
+ .findProcessDocumentDefinitions(this.documentDefinitionName)
451
+ .subscribe(processDocumentDefinitions => {
452
+ this.processDocumentDefinitions = processDocumentDefinitions.filter(processDocumentDefinition => processDocumentDefinition.canInitializeDocument);
453
+ this.processDefinitionListFields = [
454
+ {
455
+ key: 'processName',
456
+ label: 'Proces',
457
+ },
458
+ ];
459
+ });
460
+ }
461
+ getCachedSearch() {
462
+ const json = JSON.parse(this.getCachedDocumentSearchRequest());
463
+ return new DocumentSearchRequestImpl(json.definitionName, this.pagination.page - 1, this.pagination.size, json.sequence, json.createdBy, json.globalSearchFilter, json.sort);
464
+ }
465
+ buildDocumentSearchRequest() {
466
+ return new DocumentSearchRequestImpl(this.documentDefinitionName, this.pagination.page - 1, this.pagination.size, this.sequence, this.createdBy, this.globalSearchFilter, this.pagination.sort && this.pagination.sort.isSorting
467
+ ? this.pagination.sort
468
+ : this.initialSortState);
469
+ }
470
+ storeSearch(documentSearchRequest) {
471
+ localStorage.setItem(this.getCachedKey(), JSON.stringify(documentSearchRequest));
472
+ }
473
+ getCachedDocumentSearchRequest() {
474
+ return localStorage.getItem(this.getCachedKey()) || '';
475
+ }
476
+ hasCachedSearchRequest() {
477
+ return localStorage.getItem(this.getCachedKey()) !== null;
478
+ }
479
+ getCachedKey() {
480
+ return 'list-search-' + this.documentDefinitionName;
481
+ }
482
+ rowClick(document) {
483
+ this.router.navigate([
484
+ `/dossiers/${this.documentDefinitionName}/document/${document.id}/${DefaultTabs.summary}`,
485
+ ]);
486
+ }
487
+ startDossier() {
488
+ if (this.processDocumentDefinitions.length > 1) {
489
+ $('#startProcess').modal('show');
490
+ }
491
+ else {
492
+ this.selectedProcessDocumentDefinition = this.processDocumentDefinitions[0];
493
+ this.showStartProcessModal();
494
+ }
495
+ }
496
+ showStartProcessModal() {
497
+ if (this.selectedProcessDocumentDefinition !== null) {
498
+ this.processStart.openModal(this.selectedProcessDocumentDefinition);
499
+ this.selectedProcessDocumentDefinition = null;
500
+ }
501
+ }
502
+ selectProcess(processDocumentDefinition) {
503
+ const modal = $('#startProcess');
504
+ if (!this.modalListenerAdded) {
505
+ modal.on('hidden.bs.modal', this.showStartProcessModal.bind(this));
506
+ this.modalListenerAdded = true;
507
+ }
508
+ this.selectedProcessDocumentDefinition = processDocumentDefinition;
509
+ modal.modal('hide');
510
+ }
511
+ findDocumentDefinition(documentDefinitionName) {
512
+ this.documentService.getDocumentDefinition(documentDefinitionName).subscribe(definition => {
513
+ this.schema = definition.schema;
514
+ });
515
+ }
516
+ transformDocuments(documentsContent) {
517
+ this.items = documentsContent.map(document => {
518
+ const { content, ...others } = document;
519
+ return { ...content, ...others };
520
+ });
521
+ }
522
+ paginationClicked(page) {
523
+ this.pagination.page = page;
524
+ this.doSearch();
525
+ }
526
+ sortChanged(sortState) {
527
+ this.pagination.sort = sortState;
528
+ this.doSearch();
529
+ }
530
+ getInitialSortState() {
531
+ if (this.hasCachedSearchRequest()) {
532
+ const cachedRequest = JSON.parse(this.getCachedDocumentSearchRequest());
533
+ return cachedRequest.sort ? cachedRequest.sort : this.initialSortState;
534
+ }
535
+ return this.initialSortState;
536
+ }
537
+ }
538
+ DossierListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierListComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i2$1.DocumentService }, { token: i3.TranslateService }, { token: DossierService }], target: i0.ɵɵFactoryTarget.Component });
539
+ DossierListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierListComponent, selector: "valtimo-dossier-list", viewQueries: [{ propertyName: "processStart", first: true, predicate: ["processStartModal"], descendants: true }], ngImport: i0, 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 <i class=\"icon mdi mdi-plus mr-1\"></i>\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\">&times;</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", styles: [""], components: [{ type: i7$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i7$1.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { type: DossierProcessStartModalComponent, selector: "valtimo-dossier-process-start-modal" }, { type: i7$1.FilterSidebarComponent, selector: "valtimo-filter-sidebar" }], directives: [{ type: i5$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5$2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }], pipes: { "translate": i3.TranslatePipe } });
540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierListComponent, decorators: [{
541
+ type: Component,
542
+ args: [{ selector: 'valtimo-dossier-list', 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 <i class=\"icon mdi mdi-plus mr-1\"></i>\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\">&times;</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", styles: [""] }]
543
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i2$1.DocumentService }, { type: i3.TranslateService }, { type: DossierService }]; }, propDecorators: { processStart: [{
544
+ type: ViewChild,
545
+ args: ['processStartModal']
546
+ }] } });
547
+
548
+ /*
549
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
550
+ *
551
+ * Licensed under EUPL, Version 1.2 (the "License");
552
+ * you may not use this file except in compliance with the License.
553
+ * You may obtain a copy of the License at
554
+ *
555
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
556
+ *
557
+ * Unless required by applicable law or agreed to in writing, software
558
+ * distributed under the License is distributed on an "AS IS" basis,
559
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
560
+ * See the License for the specific language governing permissions and
561
+ * limitations under the License.
562
+ */
563
+ moment__default.locale(localStorage.getItem('langKey') || '');
564
+ moment__default.defaultFormat = 'DD MMM YYYY HH:mm';
565
+ class DossierDetailTabSummaryComponent {
566
+ constructor(router, documentService, taskService, processService, el, renderer, route, formService, userProviderService) {
567
+ this.router = router;
568
+ this.documentService = documentService;
569
+ this.taskService = taskService;
570
+ this.processService = processService;
571
+ this.el = el;
572
+ this.renderer = renderer;
573
+ this.route = route;
574
+ this.formService = formService;
575
+ this.userProviderService = userProviderService;
576
+ this.processDocumentInstances = [];
577
+ this.tasks = [];
578
+ this.formDefinition = null;
579
+ this.roles = [];
580
+ this.snapshot = this.route.snapshot.paramMap;
581
+ this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
582
+ this.documentId = this.snapshot.get('documentId') || '';
583
+ this.options = new FormioOptionsImpl();
584
+ this.options.disableAlerts = true;
585
+ }
586
+ ngOnInit() {
587
+ this.moment = moment__default;
588
+ this.init();
589
+ }
590
+ init() {
591
+ this.documentService.getDocument(this.documentId).subscribe(document => {
592
+ this.document = document;
593
+ });
594
+ this.formService
595
+ .getFormDefinitionByNamePreFilled(`${this.documentDefinitionName}.summary`, this.documentId)
596
+ .subscribe(formDefinition => {
597
+ this.formDefinition = formDefinition;
598
+ });
599
+ this.userProviderService.getUserSubject().subscribe(user => {
600
+ this.roles = user.roles;
601
+ this.tasks = [];
602
+ this.loadProcessDocumentInstances(this.documentId);
603
+ });
604
+ }
605
+ loadProcessDocumentInstances(documentId) {
606
+ this.documentService
607
+ .findProcessDocumentInstances(documentId)
608
+ .subscribe(processDocumentInstances => {
609
+ this.processDocumentInstances = processDocumentInstances;
610
+ this.processDocumentInstances.forEach(instance => {
611
+ this.loadProcessInstanceTasks(instance.id.processInstanceId);
612
+ });
613
+ });
614
+ }
615
+ loadProcessInstanceTasks(processInstanceId) {
616
+ this.processService.getProcessInstanceTasks(processInstanceId).subscribe(tasks => {
617
+ tasks.forEach(task => {
618
+ task.createdUnix = this.moment(task.created).unix();
619
+ task.created = this.moment(task.created).format('DD MMM YYYY HH:mm');
620
+ task.isLocked = () => {
621
+ let locked = true;
622
+ for (const link of task.identityLinks) {
623
+ if (link.type === 'candidate' && link.groupId) {
624
+ if (this.roles.includes(link.groupId)) {
625
+ locked = false;
626
+ break;
627
+ }
628
+ }
629
+ }
630
+ return locked;
631
+ };
632
+ });
633
+ this.tasks = this.tasks.concat(tasks);
634
+ this.tasks.sort((t1, t2) => t2.createdUnix - t1.createdUnix);
635
+ });
636
+ }
637
+ rowTaskClick(task) {
638
+ this.taskDetail.openTaskDetails(task);
639
+ }
640
+ }
641
+ DossierDetailTabSummaryComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailTabSummaryComponent, deps: [{ token: i1.Router }, { token: i2$1.DocumentService }, { token: i3$1.TaskService }, { token: i2.ProcessService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.ActivatedRoute }, { token: i5$3.FormService }, { token: i5.UserProviderService }], target: i0.ɵɵFactoryTarget.Component });
642
+ DossierDetailTabSummaryComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierDetailTabSummaryComponent, selector: "valtimo-dossier-detail-tab-summary", viewQueries: [{ propertyName: "taskDetail", first: true, predicate: ["taskDetail"], descendants: true }], ngImport: i0, 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", 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{height:24px!important;background-color:#fff;border:0px;margin:0;padding:0!important;font-size:13px}.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{margin-top:0;margin-bottom:12px;font-weight:400;color:#000;height:20px}\n"], components: [{ type: i7$1.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "formRefresh$"], outputs: ["submit", "change"] }, { type: i7$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i3$1.TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: ["formSubmit", "assignmentOfTaskChanged"] }], directives: [{ type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }], pipes: { "translate": i3.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
643
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailTabSummaryComponent, decorators: [{
644
+ type: Component,
645
+ args: [{ selector: 'valtimo-dossier-detail-tab-summary', encapsulation: ViewEncapsulation.None, 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", 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{height:24px!important;background-color:#fff;border:0px;margin:0;padding:0!important;font-size:13px}.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{margin-top:0;margin-bottom:12px;font-weight:400;color:#000;height:20px}\n"] }]
646
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i2$1.DocumentService }, { type: i3$1.TaskService }, { type: i2.ProcessService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.ActivatedRoute }, { type: i5$3.FormService }, { type: i5.UserProviderService }]; }, propDecorators: { taskDetail: [{
647
+ type: ViewChild,
648
+ args: ['taskDetail']
649
+ }] } });
650
+
651
+ /*
652
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
653
+ *
654
+ * Licensed under EUPL, Version 1.2 (the "License");
655
+ * you may not use this file except in compliance with the License.
656
+ * You may obtain a copy of the License at
657
+ *
658
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
659
+ *
660
+ * Unless required by applicable law or agreed to in writing, software
661
+ * distributed under the License is distributed on an "AS IS" basis,
662
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
663
+ * See the License for the specific language governing permissions and
664
+ * limitations under the License.
665
+ */
666
+ class DossierDetailTabProgressComponent {
667
+ constructor(route, documentService) {
668
+ this.route = route;
669
+ this.documentService = documentService;
670
+ const snapshot = this.route.snapshot.paramMap;
671
+ this.documentId = snapshot.get('documentId') || '';
672
+ }
673
+ ngOnInit() {
674
+ this.documentService
675
+ .findProcessDocumentInstances(this.documentId)
676
+ .subscribe(processDocumentInstances => {
677
+ this.processDocumentInstances = processDocumentInstances;
678
+ this.selectedProcessInstanceId = processDocumentInstances[0].id.processInstanceId;
679
+ });
680
+ }
681
+ loadProcessInstance(processInstanceId) {
682
+ this.selectedProcessInstanceId = processInstanceId;
683
+ }
684
+ }
685
+ DossierDetailTabProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailTabProgressComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2$1.DocumentService }], target: i0.ɵɵFactoryTarget.Component });
686
+ DossierDetailTabProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierDetailTabProgressComponent, selector: "valtimo-dossier-detail-tab-progress", ngImport: i0, 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", styles: [".full-height-tab-content{height:calc(100vh - 380px);width:100%}\n"], components: [{ type: i2.ProcessDiagramComponent, selector: "valtimo-process-diagram", inputs: ["processDefinitionKey", "processInstanceId"], outputs: ["importDone"] }], directives: [{ type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i5$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
687
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailTabProgressComponent, decorators: [{
688
+ type: Component,
689
+ args: [{ selector: 'valtimo-dossier-detail-tab-progress', 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", styles: [".full-height-tab-content{height:calc(100vh - 380px);width:100%}\n"] }]
690
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2$1.DocumentService }]; } });
691
+
692
+ /*
693
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
694
+ *
695
+ * Licensed under EUPL, Version 1.2 (the "License");
696
+ * you may not use this file except in compliance with the License.
697
+ * You may obtain a copy of the License at
698
+ *
699
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
700
+ *
701
+ * Unless required by applicable law or agreed to in writing, software
702
+ * distributed under the License is distributed on an "AS IS" basis,
703
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
704
+ * See the License for the specific language governing permissions and
705
+ * limitations under the License.
706
+ */
707
+ moment__default.locale(localStorage.getItem('langKey') || '');
708
+ moment__default.defaultFormat = 'DD MMM YYYY HH:mm';
709
+ class DossierDetailTabAuditComponent {
710
+ constructor(route, documentService, spinnerService) {
711
+ this.route = route;
712
+ this.documentService = documentService;
713
+ this.spinnerService = spinnerService;
714
+ this.paginationClicked = new EventEmitter();
715
+ this.defaultAuditPage = 0;
716
+ this.spinnerService.show('auditSpinner');
717
+ const snapshot = this.route.snapshot.paramMap;
718
+ this.documentId = snapshot.get('documentId') || '';
719
+ }
720
+ static getTranslationKey(auditEvent) {
721
+ const classNameArray = auditEvent.className.split('.');
722
+ const eventName = classNameArray[classNameArray.length - 1];
723
+ return 'events.' + eventName;
724
+ }
725
+ ngOnInit() {
726
+ this.loadAuditPage(this.defaultAuditPage);
727
+ }
728
+ loadAuditPage(pageNumber) {
729
+ this.documentService.getAuditLog(this.documentId, pageNumber).subscribe(page => {
730
+ const timelineItems = [];
731
+ page.content.forEach(auditRecord => {
732
+ const occurredOn = moment__default(auditRecord.metaData.occurredOn);
733
+ const fromNow = occurredOn.fromNow();
734
+ timelineItems.push(new TimelineItemImpl(occurredOn.format('DD MMM YYYY'), occurredOn.format('HH:mm'), auditRecord.metaData.user, fromNow, DossierDetailTabAuditComponent.getTranslationKey(auditRecord.auditEvent), auditRecord.auditEvent));
735
+ });
736
+ this.timelineItems = timelineItems;
737
+ this.spinnerService.hide('auditSpinner');
738
+ this.pagination = page;
739
+ this.pagination.number += 1;
740
+ });
741
+ }
742
+ onChangePagination(page) {
743
+ this.paginationClicked.emit(page);
744
+ this.currentAuditPage = page - 1;
745
+ this.loadAuditPage(this.currentAuditPage);
746
+ }
747
+ }
748
+ DossierDetailTabAuditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailTabAuditComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2$1.DocumentService }, { token: i3$2.NgxSpinnerService }], target: i0.ɵɵFactoryTarget.Component });
749
+ DossierDetailTabAuditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierDetailTabAuditComponent, selector: "valtimo-dossier-detail-tab-audit", outputs: { paginationClicked: "paginationClicked" }, ngImport: i0, 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", styles: [".audit-pagination{margin:0 -1.923rem -1.923rem!important;border-top:1px solid #dee2e6}\n"], components: [{ type: i7$1.TimelineComponent, selector: "valtimo-timeline", inputs: ["items"] }, { type: i7$1.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { type: i8.NgbPagination, selector: "ngb-pagination", inputs: ["disabled", "boundaryLinks", "directionLinks", "ellipses", "rotate", "collectionSize", "maxSize", "page", "pageSize", "size"], outputs: ["pageChange"] }], directives: [{ type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3.TranslatePipe } });
750
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailTabAuditComponent, decorators: [{
751
+ type: Component,
752
+ args: [{ selector: 'valtimo-dossier-detail-tab-audit', 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", styles: [".audit-pagination{margin:0 -1.923rem -1.923rem!important;border-top:1px solid #dee2e6}\n"] }]
753
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2$1.DocumentService }, { type: i3$2.NgxSpinnerService }]; }, propDecorators: { paginationClicked: [{
754
+ type: Output
755
+ }] } });
756
+
757
+ /*
758
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
759
+ *
760
+ * Licensed under EUPL, Version 1.2 (the "License");
761
+ * you may not use this file except in compliance with the License.
762
+ * You may obtain a copy of the License at
763
+ *
764
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
765
+ *
766
+ * Unless required by applicable law or agreed to in writing, software
767
+ * distributed under the License is distributed on an "AS IS" basis,
768
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
769
+ * See the License for the specific language governing permissions and
770
+ * limitations under the License.
771
+ */
772
+ class DossierDetailTabDocumentsComponent {
773
+ constructor(route, documentService, toastrService, uploadProviderService, downloadService, translateService, configService) {
774
+ this.route = route;
775
+ this.documentService = documentService;
776
+ this.toastrService = toastrService;
777
+ this.uploadProviderService = uploadProviderService;
778
+ this.downloadService = downloadService;
779
+ this.translateService = translateService;
780
+ this.configService = configService;
781
+ this.maxFileSize = this.configService?.config?.caseFileSizeUploadLimitMB || 5;
782
+ this.refetch$ = new BehaviorSubject(null);
783
+ this.relatedFiles$ = this.refetch$.pipe(switchMap(() => combineLatest([
784
+ this.documentService.getDocument(this.documentId),
785
+ this.translateService.stream('key'),
786
+ ])), map(([document]) => {
787
+ const relatedFiles = document?.relatedFiles || [];
788
+ const translatedFiles = relatedFiles.map(file => ({
789
+ ...file,
790
+ createdBy: file.createdBy || this.translateService.instant('list.automaticallyGenerated'),
791
+ }));
792
+ return translatedFiles || [];
793
+ }));
794
+ this.fields = [
795
+ { key: 'fileName', label: 'File name' },
796
+ { key: 'sizeInBytes', label: 'Size in bytes' },
797
+ { key: 'createdOn', label: 'Created on', viewType: 'date' },
798
+ { key: 'createdBy', label: 'Created by' },
799
+ ];
800
+ this.actions = [
801
+ {
802
+ columnName: '',
803
+ iconClass: 'mdi mdi-open-in-new',
804
+ callback: this.downloadDocument.bind(this),
805
+ },
806
+ {
807
+ columnName: '',
808
+ iconClass: 'mdi mdi-delete',
809
+ callback: this.removeRelatedFile.bind(this),
810
+ },
811
+ ];
812
+ this.uploading$ = new BehaviorSubject(false);
813
+ const snapshot = this.route.snapshot.paramMap;
814
+ this.documentId = snapshot.get('documentId') || '';
815
+ this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';
816
+ }
817
+ ngOnInit() {
818
+ this.refetchDocuments();
819
+ }
820
+ fileSelected(file) {
821
+ this.uploading$.next(true);
822
+ this.uploadProviderService
823
+ .uploadFile(file, this.documentDefinitionName)
824
+ .pipe(switchMap(resourceFile => this.documentService.assignResource(this.documentId, resourceFile.data.resourceId)))
825
+ .subscribe(() => {
826
+ this.toastrService.success('Successfully uploaded document to dossier');
827
+ this.refetchDocuments();
828
+ this.uploading$.next(false);
829
+ }, () => {
830
+ this.toastrService.error('Failed to upload document to dossier');
831
+ this.uploading$.next(false);
832
+ });
833
+ }
834
+ downloadDocument(relatedFile) {
835
+ this.uploadProviderService
836
+ .getResource(relatedFile.fileId)
837
+ .subscribe((resource) => {
838
+ this.downloadService.downloadFile(resource.url, resource.resource.name);
839
+ });
840
+ }
841
+ removeRelatedFile(relatedFile) {
842
+ this.documentService.removeResource(this.documentId, relatedFile.fileId).subscribe(() => {
843
+ this.toastrService.success('Successfully removed document from dossier');
844
+ this.refetchDocuments();
845
+ }, () => {
846
+ this.toastrService.error('Failed to remove document from dossier');
847
+ });
848
+ }
849
+ refetchDocuments() {
850
+ this.refetch$.next(null);
851
+ }
852
+ }
853
+ DossierDetailTabDocumentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailTabDocumentsComponent, deps: [{ token: i1.ActivatedRoute }, { token: i2$1.DocumentService }, { token: i3$3.ToastrService }, { token: i4$1.UploadProviderService }, { token: i4$1.DownloadService }, { token: i3.TranslateService }, { token: i7.ConfigService }], target: i0.ɵɵFactoryTarget.Component });
854
+ DossierDetailTabDocumentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierDetailTabDocumentsComponent, selector: "valtimo-dossier-detail-tab-documents", ngImport: i0, 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", styles: [""], components: [{ type: i7$1.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera"], outputs: ["fileSelected"] }, { type: i7$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i7$1.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }], pipes: { "async": i5$1.AsyncPipe, "translate": i3.TranslatePipe } });
855
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailTabDocumentsComponent, decorators: [{
856
+ type: Component,
857
+ args: [{ selector: 'valtimo-dossier-detail-tab-documents', 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", styles: [""] }]
858
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i2$1.DocumentService }, { type: i3$3.ToastrService }, { type: i4$1.UploadProviderService }, { type: i4$1.DownloadService }, { type: i3.TranslateService }, { type: i7.ConfigService }]; } });
859
+
860
+ /*
861
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
862
+ *
863
+ * Licensed under EUPL, Version 1.2 (the "License");
864
+ * you may not use this file except in compliance with the License.
865
+ * You may obtain a copy of the License at
866
+ *
867
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
868
+ *
869
+ * Unless required by applicable law or agreed to in writing, software
870
+ * distributed under the License is distributed on an "AS IS" basis,
871
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
872
+ * See the License for the specific language governing permissions and
873
+ * limitations under the License.
874
+ */
875
+ const TAB_MAP = new InjectionToken('TabMap');
876
+ const DEFAULT_TABS = new Map([
877
+ [DefaultTabs.summary, DossierDetailTabSummaryComponent],
878
+ [DefaultTabs.progress, DossierDetailTabProgressComponent],
879
+ [DefaultTabs.audit, DossierDetailTabAuditComponent],
880
+ [DefaultTabs.documents, DossierDetailTabDocumentsComponent],
881
+ ]);
882
+
883
+ /*
884
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
885
+ *
886
+ * Licensed under EUPL, Version 1.2 (the "License");
887
+ * you may not use this file except in compliance with the License.
888
+ * You may obtain a copy of the License at
889
+ *
890
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
891
+ *
892
+ * Unless required by applicable law or agreed to in writing, software
893
+ * distributed under the License is distributed on an "AS IS" basis,
894
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
895
+ * See the License for the specific language governing permissions and
896
+ * limitations under the License.
897
+ */
898
+ class TabService {
899
+ constructor(tabMap = DEFAULT_TABS) {
900
+ this.tabs = [];
901
+ this.tabMap = tabMap;
902
+ let i = 0;
903
+ this.tabMap.forEach((component, name, map) => {
904
+ this.tabs.push(new TabImpl(name, i, component));
905
+ i++;
906
+ });
907
+ }
908
+ getTabs() {
909
+ return this.tabs;
910
+ }
911
+ }
912
+ TabService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TabService, deps: [{ token: TAB_MAP }], target: i0.ɵɵFactoryTarget.Injectable });
913
+ TabService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TabService, providedIn: 'root' });
914
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: TabService, decorators: [{
915
+ type: Injectable,
916
+ args: [{
917
+ providedIn: 'root',
918
+ }]
919
+ }], ctorParameters: function () { return [{ type: Map, decorators: [{
920
+ type: Inject,
921
+ args: [TAB_MAP]
922
+ }] }]; } });
923
+
924
+ /*
925
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
926
+ *
927
+ * Licensed under EUPL, Version 1.2 (the "License");
928
+ * you may not use this file except in compliance with the License.
929
+ * You may obtain a copy of the License at
930
+ *
931
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
932
+ *
933
+ * Unless required by applicable law or agreed to in writing, software
934
+ * distributed under the License is distributed on an "AS IS" basis,
935
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
936
+ * See the License for the specific language governing permissions and
937
+ * limitations under the License.
938
+ */
939
+ class DossierSupportingProcessStartModalComponent {
940
+ constructor(route, router, processService, documentService, formLinkService, logger) {
941
+ this.route = route;
942
+ this.router = router;
943
+ this.processService = processService;
944
+ this.documentService = documentService;
945
+ this.formLinkService = formLinkService;
946
+ this.logger = logger;
947
+ this.formSubmit = new EventEmitter();
948
+ }
949
+ loadFormDefinition() {
950
+ this.formDefinition = null;
951
+ this.formLinkService
952
+ .getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)
953
+ .subscribe(formDefinition => {
954
+ this.formAssociation = formDefinition.formAssociation;
955
+ const className = this.formAssociation.formLink.className.split('.');
956
+ const linkType = className[className.length - 1];
957
+ switch (linkType) {
958
+ case 'BpmnElementFormIdLink':
959
+ this.formDefinition = formDefinition;
960
+ this.documentService.getDocument(this.documentId).subscribe(document => {
961
+ this.submission = {
962
+ data: document.content,
963
+ };
964
+ }, () => noop());
965
+ this.modal.show();
966
+ break;
967
+ case 'BpmnElementUrlLink':
968
+ const url = this.router.serializeUrl(this.router.createUrlTree([formDefinition.formAssociation.formLink.url]));
969
+ window.open(url, '_blank');
970
+ break;
971
+ case 'BpmnElementAngularStateUrlLink':
972
+ this.route.params.pipe(take(1)).subscribe(params => {
973
+ const documentId = params?.documentId;
974
+ this.router.navigate([formDefinition.formAssociation.formLink.url], {
975
+ state: { ...(documentId && { documentId }) },
976
+ });
977
+ });
978
+ break;
979
+ default:
980
+ this.logger.fatal('Unsupported class name');
981
+ }
982
+ }, errors => {
983
+ this.modal.show();
984
+ });
985
+ }
986
+ get modalTitle() {
987
+ return `Start - ${this.processName}`;
988
+ }
989
+ openModal(processDocumentDefinition, documentId) {
990
+ this.documentId = documentId;
991
+ this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;
992
+ this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;
993
+ this.processName = processDocumentDefinition.processName;
994
+ this.options = new FormioOptionsImpl();
995
+ this.options.disableAlerts = true;
996
+ const formioBeforeSubmit = function (submission, callback) {
997
+ callback(null, submission);
998
+ };
999
+ this.options.setHooks(formioBeforeSubmit);
1000
+ this.loadFormDefinition();
1001
+ }
1002
+ onSubmit(submission) {
1003
+ this.formioSubmission = submission;
1004
+ this.formLinkService
1005
+ .onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.documentId)
1006
+ .subscribe((formSubmissionResult) => {
1007
+ this.modal.hide();
1008
+ this.formSubmit.emit();
1009
+ }, errors => {
1010
+ this.form.showErrors(errors);
1011
+ });
1012
+ }
1013
+ gotoFormLinkScreen() {
1014
+ this.modal.hide();
1015
+ this.router.navigate(['form-links'], { queryParams: { process: this.processDefinitionKey } });
1016
+ }
1017
+ }
1018
+ DossierSupportingProcessStartModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierSupportingProcessStartModalComponent, deps: [{ token: i1.ActivatedRoute }, { token: i1.Router }, { token: i2.ProcessService }, { token: i2$1.DocumentService }, { token: i4.FormLinkService }, { token: i6.NGXLogger }], target: i0.ɵɵFactoryTarget.Component });
1019
+ DossierSupportingProcessStartModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierSupportingProcessStartModalComponent, selector: "valtimo-dossier-supporting-process-start-modal", outputs: { formSubmit: "formSubmit" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "modal", first: true, predicate: ["supportingProcessStartModal"], descendants: true }], ngImport: i0, 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", 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}\n"], components: [{ type: i7$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { type: i7$1.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "formRefresh$"], outputs: ["submit", "change"] }], directives: [{ type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], pipes: { "translate": i3.TranslatePipe }, encapsulation: i0.ViewEncapsulation.None });
1020
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierSupportingProcessStartModalComponent, decorators: [{
1021
+ type: Component,
1022
+ args: [{ selector: 'valtimo-dossier-supporting-process-start-modal', encapsulation: ViewEncapsulation.None, 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", 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}\n"] }]
1023
+ }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i2.ProcessService }, { type: i2$1.DocumentService }, { type: i4.FormLinkService }, { type: i6.NGXLogger }]; }, propDecorators: { form: [{
1024
+ type: ViewChild,
1025
+ args: ['form', { static: false }]
1026
+ }], modal: [{
1027
+ type: ViewChild,
1028
+ args: ['supportingProcessStartModal', { static: false }]
1029
+ }], formSubmit: [{
1030
+ type: Output
1031
+ }] } });
1032
+
1033
+ /*
1034
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1035
+ *
1036
+ * Licensed under EUPL, Version 1.2 (the "License");
1037
+ * you may not use this file except in compliance with the License.
1038
+ * You may obtain a copy of the License at
1039
+ *
1040
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1041
+ *
1042
+ * Unless required by applicable law or agreed to in writing, software
1043
+ * distributed under the License is distributed on an "AS IS" basis,
1044
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1045
+ * See the License for the specific language governing permissions and
1046
+ * limitations under the License.
1047
+ */
1048
+ class DossierDetailComponent {
1049
+ constructor(componentFactoryResolver, translateService, documentService, processService, route, router, location, tabService, configService) {
1050
+ this.componentFactoryResolver = componentFactoryResolver;
1051
+ this.translateService = translateService;
1052
+ this.documentService = documentService;
1053
+ this.processService = processService;
1054
+ this.route = route;
1055
+ this.router = router;
1056
+ this.location = location;
1057
+ this.tabService = tabService;
1058
+ this.configService = configService;
1059
+ this.document = null;
1060
+ this.tabLoader = null;
1061
+ this.processDefinitionListFields = [];
1062
+ this.processDocumentDefinitions = [];
1063
+ this.customDossierHeaderItems = [];
1064
+ this.snapshot = this.route.snapshot.paramMap;
1065
+ this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';
1066
+ this.documentId = this.snapshot.get('documentId') || '';
1067
+ }
1068
+ ngOnInit() {
1069
+ this.tabLoader = new TabLoaderImpl(this.tabService.getTabs(), this.componentFactoryResolver, this.viewContainerRef, this.translateService, this.router, this.location);
1070
+ this.documentService
1071
+ .getDocumentDefinition(this.documentDefinitionName)
1072
+ .subscribe(definition => {
1073
+ this.documentDefinitionNameTitle = definition.schema.title;
1074
+ });
1075
+ this.getCustomDossierHeader();
1076
+ this.initialTabName = this.snapshot.get('tab');
1077
+ this.tabLoader.initial(this.initialTabName);
1078
+ this.getAllAssociatedProcessDefinitions();
1079
+ }
1080
+ getAllAssociatedProcessDefinitions() {
1081
+ this.documentService
1082
+ .findProcessDocumentDefinitions(this.documentDefinitionName)
1083
+ .subscribe(processDocumentDefinitions => {
1084
+ this.processDocumentDefinitions = processDocumentDefinitions.filter(processDocumentDefinition => processDocumentDefinition.startableByUser);
1085
+ this.processDefinitionListFields = [
1086
+ {
1087
+ key: 'processName',
1088
+ label: 'Proces',
1089
+ },
1090
+ ];
1091
+ });
1092
+ }
1093
+ startProcess(processDocumentDefinition) {
1094
+ this.supportingProcessStart.openModal(processDocumentDefinition, this.documentId);
1095
+ }
1096
+ getCustomDossierHeader() {
1097
+ if (this.configService.config.customDossierHeader?.hasOwnProperty(this.documentDefinitionName.toLowerCase())) {
1098
+ this.documentService.getDocument(this.documentId).subscribe(document => {
1099
+ this.document = document;
1100
+ this.configService.config.customDossierHeader[this.documentDefinitionName.toLowerCase()]?.forEach(item => this.getCustomDossierHeaderItem(item));
1101
+ });
1102
+ }
1103
+ }
1104
+ getCustomDossierHeaderItem(item) {
1105
+ this.customDossierHeaderItems.push({
1106
+ label: item['labelTranslationKey'] || '',
1107
+ columnSize: item['columnSize'] || 3,
1108
+ textSize: item['textSize'] || 'md',
1109
+ customClass: item['customClass'] || '',
1110
+ value: item['propertyPaths']?.reduce((prev, curr) => prev + this.getStringFromDocumentPath(item, curr), ''),
1111
+ });
1112
+ }
1113
+ getStringFromDocumentPath(item, path) {
1114
+ const prefix = item['propertyPaths'].indexOf(path) > 0 ? ' ' : '';
1115
+ const string = path.split('.').reduce((o, i) => o[i], this.document.content) || item['noValueText'] || '';
1116
+ const regex = new RegExp('(T\\d\\d:\\d\\d:\\d\\d[+-])');
1117
+ const formattedString = regex.test(string) ? moment(string).format('DD-MM-YYYY') : string;
1118
+ return prefix + formattedString;
1119
+ }
1120
+ }
1121
+ DossierDetailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailComponent, deps: [{ token: i0.ComponentFactoryResolver }, { token: i3.TranslateService }, { token: i2$1.DocumentService }, { token: i2.ProcessService }, { token: i1.ActivatedRoute }, { token: i1.Router }, { token: i5$1.Location }, { token: TabService }, { token: i7.ConfigService }], target: i0.ɵɵFactoryTarget.Component });
1122
+ DossierDetailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierDetailComponent, selector: "valtimo-dossier-detail", viewQueries: [{ propertyName: "viewContainerRef", first: true, predicate: ["tabContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "supportingProcessStart", first: true, predicate: ["supportingProcessStartModal"], descendants: true }], ngImport: i0, 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-2\">\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"row\" *ngIf=\"customDossierHeaderItems.length > 0; else defaultTitle\">\n <span\n class=\"mb-0 mt-0 pb-2 align-self-end col-xl-{{ item.columnSize }} col-lg-{{\n item.columnSize * 2\n }} {{ item.customClass }}\"\n [ngClass]=\"{\n h1: item.textSize === 'xl',\n h2: item.textSize === 'lg',\n h3: item.textSize === 'md',\n h4: item.textSize === 'sm',\n h5: item.textSize === 'xs'\n }\"\n *ngFor=\"let item of customDossierHeaderItems\"\n >\n <span *ngIf=\"item.label !== ''\">{{ item.label | translate }}</span>\n <span *ngIf=\"item.label !== '' && item.value !== '' && item.value !== null\"\n >:\n </span>\n <strong>{{ item.value }}</strong>\n </span>\n </div>\n <ng-template #defaultTitle>\n {{ documentDefinitionNameTitle }}\n </ng-template>\n </div>\n <div class=\"btn-group mt-m3px mb-3 col-auto\">\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=\"ml-1 mdi mdi-chevron-down\"></i>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-right\"\n aria-labelledby=\"startProcessDropdown\"\n >\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 </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", styles: [".tab-container{min-height:300px}\n"], components: [{ type: i7$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i7.ExtensionComponent, selector: "valtimo-extension", inputs: ["module", "page", "section"] }, { type: DossierSupportingProcessStartModalComponent, selector: "valtimo-dossier-supporting-process-start-modal", outputs: ["formSubmit"] }], directives: [{ type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i8.NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "triggers", "container", "disableTooltip", "tooltipClass", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }], pipes: { "translate": i3.TranslatePipe } });
1123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailComponent, decorators: [{
1124
+ type: Component,
1125
+ args: [{ selector: 'valtimo-dossier-detail', 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-2\">\n <div class=\"row\">\n <div class=\"col\">\n <div class=\"row\" *ngIf=\"customDossierHeaderItems.length > 0; else defaultTitle\">\n <span\n class=\"mb-0 mt-0 pb-2 align-self-end col-xl-{{ item.columnSize }} col-lg-{{\n item.columnSize * 2\n }} {{ item.customClass }}\"\n [ngClass]=\"{\n h1: item.textSize === 'xl',\n h2: item.textSize === 'lg',\n h3: item.textSize === 'md',\n h4: item.textSize === 'sm',\n h5: item.textSize === 'xs'\n }\"\n *ngFor=\"let item of customDossierHeaderItems\"\n >\n <span *ngIf=\"item.label !== ''\">{{ item.label | translate }}</span>\n <span *ngIf=\"item.label !== '' && item.value !== '' && item.value !== null\"\n >:\n </span>\n <strong>{{ item.value }}</strong>\n </span>\n </div>\n <ng-template #defaultTitle>\n {{ documentDefinitionNameTitle }}\n </ng-template>\n </div>\n <div class=\"btn-group mt-m3px mb-3 col-auto\">\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=\"ml-1 mdi mdi-chevron-down\"></i>\n </button>\n <div\n class=\"dropdown-menu dropdown-menu-right\"\n aria-labelledby=\"startProcessDropdown\"\n >\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 </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", styles: [".tab-container{min-height:300px}\n"] }]
1126
+ }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i3.TranslateService }, { type: i2$1.DocumentService }, { type: i2.ProcessService }, { type: i1.ActivatedRoute }, { type: i1.Router }, { type: i5$1.Location }, { type: TabService }, { type: i7.ConfigService }]; }, propDecorators: { viewContainerRef: [{
1127
+ type: ViewChild,
1128
+ args: ['tabContainer', { read: ViewContainerRef, static: true }]
1129
+ }], supportingProcessStart: [{
1130
+ type: ViewChild,
1131
+ args: ['supportingProcessStartModal']
1132
+ }] } });
1133
+
1134
+ /*
1135
+ * Copyright 2015-2021 Ritense BV, the Netherlands.
1136
+ *
1137
+ * Licensed under EUPL, Version 1.2 (the "License");
1138
+ * you may not use this file except in compliance with the License.
1139
+ * You may obtain a copy of the License at
1140
+ *
1141
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1142
+ *
1143
+ * Unless required by applicable law or agreed to in writing, software
1144
+ * distributed under the License is distributed on an "AS IS" basis,
1145
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1146
+ * See the License for the specific language governing permissions and
1147
+ * limitations under the License.
1148
+ */
1149
+ moment__default.locale(localStorage.getItem('langKey') || '');
1150
+ class DossierDetailTabContactMomentsComponent {
1151
+ constructor(contactMomentService, alertService, translateService) {
1152
+ this.contactMomentService = contactMomentService;
1153
+ this.alertService = alertService;
1154
+ this.translateService = translateService;
1155
+ this.refetchContactMoments$ = new BehaviorSubject('');
1156
+ this.contactMoments$ = this.refetchContactMoments$.pipe(switchMap(() => this.contactMomentService.getContactMoments()), map(contactMoments => contactMoments.map(contactMoment => {
1157
+ const registratieDatum = moment__default(contactMoment.registratiedatum);
1158
+ return new TimelineItemImpl(registratieDatum.format('DD MMM YYYY'), registratieDatum.format('HH:mm'), contactMoment.medewerkerIdentificatie.achternaam, contactMoment.kanaal, contactMoment.tekst, null);
1159
+ })));
1160
+ this.text$ = new BehaviorSubject('');
1161
+ this.channel$ = new BehaviorSubject('MAIL');
1162
+ this.requestData$ = combineLatest([this.text$, this.channel$]);
1163
+ this.valid$ = this.requestData$.pipe(map(([text, channel]) => !!(text && channel)));
1164
+ this.disabled$ = new BehaviorSubject(false);
1165
+ }
1166
+ textChange(text) {
1167
+ this.text$.next(text);
1168
+ }
1169
+ buttonClick() {
1170
+ this.modal.show();
1171
+ }
1172
+ saveNote() {
1173
+ this.disable();
1174
+ this.requestData$.pipe(take(1)).subscribe(([text, channel]) => {
1175
+ this.contactMomentService.saveContactMoment({ kanaal: channel, tekst: text }).subscribe(() => {
1176
+ this.alertService.success(this.translateService.instant('dossier.contactMoments.saveSuccess'));
1177
+ this.enable();
1178
+ this.clear();
1179
+ this.modal.hide();
1180
+ this.refetchContactMoments();
1181
+ }, () => {
1182
+ this.enable();
1183
+ });
1184
+ });
1185
+ }
1186
+ disable() {
1187
+ this.disabled$.next(true);
1188
+ }
1189
+ enable() {
1190
+ this.disabled$.next(false);
1191
+ }
1192
+ clear() {
1193
+ this.text$.next('');
1194
+ }
1195
+ refetchContactMoments() {
1196
+ this.refetchContactMoments$.next('');
1197
+ }
1198
+ }
1199
+ DossierDetailTabContactMomentsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailTabContactMomentsComponent, deps: [{ token: i1$1.ContactMomentService }, { token: i7$1.AlertService }, { token: i3.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
1200
+ DossierDetailTabContactMomentsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierDetailTabContactMomentsComponent, selector: "valtimo-dossier-detail-tab-contact-moments", viewQueries: [{ propertyName: "modal", first: true, predicate: ["contactMomentsNoteModal"], descendants: true }], ngImport: i0, 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-note-plus\"></i>\n &nbsp;{{ '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", 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{display:inline;align-self:flex-end}\n"], components: [{ type: i7$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { type: i7$1.SpinnerComponent, selector: "valtimo-spinner", inputs: ["useBootstrapSpinner", "name", "type", "size", "color", "bdColor", "fullScreen", "noMarginTop"] }, { type: i7$1.TimelineComponent, selector: "valtimo-timeline", inputs: ["items"] }], directives: [{ type: i5$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i5$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i5$2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i5$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "translate": i3.TranslatePipe, "async": i5$1.AsyncPipe } });
1201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierDetailTabContactMomentsComponent, decorators: [{
1202
+ type: Component,
1203
+ args: [{ selector: 'valtimo-dossier-detail-tab-contact-moments', 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-note-plus\"></i>\n &nbsp;{{ '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", 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{display:inline;align-self:flex-end}\n"] }]
1204
+ }], ctorParameters: function () { return [{ type: i1$1.ContactMomentService }, { type: i7$1.AlertService }, { type: i3.TranslateService }]; }, propDecorators: { modal: [{
1205
+ type: ViewChild,
1206
+ args: ['contactMomentsNoteModal']
1207
+ }] } });
1208
+
1209
+ /*
1210
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1211
+ *
1212
+ * Licensed under EUPL, Version 1.2 (the "License");
1213
+ * you may not use this file except in compliance with the License.
1214
+ * You may obtain a copy of the License at
1215
+ *
1216
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1217
+ *
1218
+ * Unless required by applicable law or agreed to in writing, software
1219
+ * distributed under the License is distributed on an "AS IS" basis,
1220
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1221
+ * See the License for the specific language governing permissions and
1222
+ * limitations under the License.
1223
+ */
1224
+ moment__default.locale(localStorage.getItem('langKey') || '');
1225
+ class DossierUpdateComponent {
1226
+ constructor(taskService, documentService, route, toastr, location, dossierService) {
1227
+ this.taskService = taskService;
1228
+ this.documentService = documentService;
1229
+ this.route = route;
1230
+ this.toastr = toastr;
1231
+ this.location = location;
1232
+ this.customDefinitions = {};
1233
+ const snapshot = this.route.snapshot.paramMap;
1234
+ this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';
1235
+ this.documentId = snapshot.get('documentId') || '';
1236
+ this.taskId = snapshot.get('taskId') || '';
1237
+ this.implementationDefinitions = dossierService.getImplementationEnvironmentDefinitions(this.documentDefinitionName);
1238
+ this.loadDocumentDefinition(this.documentDefinitionName);
1239
+ this.loadDocument(this.documentId);
1240
+ }
1241
+ ngOnInit() {
1242
+ this.getTask(this.taskId);
1243
+ if (this.implementationDefinitions.definitions.detail.summary) {
1244
+ this.customDefinitions = this.implementationDefinitions.definitions.detail.summary;
1245
+ }
1246
+ }
1247
+ loadDocumentDefinition(name) {
1248
+ this.documentService.getDocumentDefinition(name).subscribe(definition => {
1249
+ this.schema = definition.schema;
1250
+ });
1251
+ }
1252
+ loadDocument(id) {
1253
+ this.documentService.getDocument(id).subscribe(document => {
1254
+ this.document = document;
1255
+ });
1256
+ }
1257
+ getTask(id) {
1258
+ this.taskService.getTask(id).subscribe(task => {
1259
+ this.task = task;
1260
+ this.task.task.created = moment__default(this.task.task.created).format('DD MMM YYYY HH:mm');
1261
+ this.page = {
1262
+ title: this.task.task.name,
1263
+ subtitle: `Created ${moment__default(this.task.task.created).fromNow()}`,
1264
+ };
1265
+ });
1266
+ }
1267
+ reset() {
1268
+ this.loadDocument(this.documentId);
1269
+ }
1270
+ back() {
1271
+ this.location.back();
1272
+ }
1273
+ save() {
1274
+ const document = {
1275
+ documentId: this.document.id,
1276
+ content: this.document.content,
1277
+ versionBasedOn: this.document.version,
1278
+ };
1279
+ this.documentService.modifyDocument(document).subscribe(result => {
1280
+ this.document = result.document;
1281
+ this.toastr.success('Document aangepast');
1282
+ this.location.back();
1283
+ });
1284
+ }
1285
+ submit(data) {
1286
+ // merge document content with formdata
1287
+ const mergedData = Object.assign({}, this.document.content, data);
1288
+ const documentData = {
1289
+ request: {
1290
+ documentId: this.document.id,
1291
+ content: mergedData,
1292
+ versionBasedOn: this.document.version,
1293
+ },
1294
+ taskId: this.task.task.id,
1295
+ };
1296
+ this.documentService.modifyDocumentAndCompleteTask(documentData).subscribe(result => {
1297
+ this.toastr.success(this.task.task.name + ' has successfully been completed');
1298
+ this.location.back();
1299
+ });
1300
+ }
1301
+ returnZero() {
1302
+ return 0;
1303
+ }
1304
+ }
1305
+ DossierUpdateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierUpdateComponent, deps: [{ token: i3$1.TaskService }, { token: i2$1.DocumentService }, { token: i1.ActivatedRoute }, { token: i3$3.ToastrService }, { token: i5$1.Location }, { token: DossierService }], target: i0.ɵɵFactoryTarget.Component });
1306
+ DossierUpdateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.9", type: DossierUpdateComponent, selector: "valtimo-dossier-update", ngImport: i0, 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", styles: [""], components: [{ type: i7$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { type: i7$1.CamundaFormComponent, selector: "valtimo-camunda-form", inputs: ["componentName", "formFields"], outputs: ["submitted"] }], directives: [{ type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "keyvalue": i5$1.KeyValuePipe } });
1307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierUpdateComponent, decorators: [{
1308
+ type: Component,
1309
+ args: [{ selector: 'valtimo-dossier-update', 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", styles: [""] }]
1310
+ }], ctorParameters: function () { return [{ type: i3$1.TaskService }, { type: i2$1.DocumentService }, { type: i1.ActivatedRoute }, { type: i3$3.ToastrService }, { type: i5$1.Location }, { type: DossierService }]; } });
1311
+
1312
+ /*
1313
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1314
+ *
1315
+ * Licensed under EUPL, Version 1.2 (the "License");
1316
+ * you may not use this file except in compliance with the License.
1317
+ * You may obtain a copy of the License at
1318
+ *
1319
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1320
+ *
1321
+ * Unless required by applicable law or agreed to in writing, software
1322
+ * distributed under the License is distributed on an "AS IS" basis,
1323
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1324
+ * See the License for the specific language governing permissions and
1325
+ * limitations under the License.
1326
+ */
1327
+ const routes = [
1328
+ {
1329
+ path: 'dossiers/:documentDefinitionName',
1330
+ component: DossierListComponent,
1331
+ canActivate: [AuthGuardService],
1332
+ data: { title: 'Dossiers', roles: [ROLE_USER] },
1333
+ },
1334
+ {
1335
+ path: 'dossiers/:documentDefinitionName/document/:documentId/:tab',
1336
+ component: DossierDetailComponent,
1337
+ canActivate: [AuthGuardService],
1338
+ data: { title: 'Dossiers', parentPath: 'dossiers/:documentDefinitionName', roles: [ROLE_USER] },
1339
+ },
1340
+ {
1341
+ path: 'dossiers/:documentDefinitionName/document/:documentId/:tab/tasks/:taskId',
1342
+ component: DossierUpdateComponent,
1343
+ canActivate: [AuthGuardService],
1344
+ data: {
1345
+ title: 'Task details',
1346
+ parentPath: 'dossiers/:documentDefinitionName/document/:documentId/:tab',
1347
+ roles: [ROLE_USER],
1348
+ },
1349
+ },
1350
+ ];
1351
+ class DossierRoutingModule {
1352
+ }
1353
+ DossierRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1354
+ DossierRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierRoutingModule, imports: [CommonModule, i1.RouterModule], exports: [RouterModule] });
1355
+ DossierRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierRoutingModule, imports: [[CommonModule, RouterModule.forChild(routes)], RouterModule] });
1356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierRoutingModule, decorators: [{
1357
+ type: NgModule,
1358
+ args: [{
1359
+ imports: [CommonModule, RouterModule.forChild(routes)],
1360
+ exports: [RouterModule],
1361
+ }]
1362
+ }] });
1363
+
1364
+ /*
1365
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1366
+ *
1367
+ * Licensed under EUPL, Version 1.2 (the "License");
1368
+ * you may not use this file except in compliance with the License.
1369
+ * You may obtain a copy of the License at
1370
+ *
1371
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1372
+ *
1373
+ * Unless required by applicable law or agreed to in writing, software
1374
+ * distributed under the License is distributed on an "AS IS" basis,
1375
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1376
+ * See the License for the specific language governing permissions and
1377
+ * limitations under the License.
1378
+ */
1379
+ class DossierModule {
1380
+ static forRoot(tabsFactory) {
1381
+ return {
1382
+ ngModule: DossierModule,
1383
+ providers: [
1384
+ DossierService,
1385
+ TabService,
1386
+ {
1387
+ provide: TAB_MAP,
1388
+ useFactory: tabsFactory,
1389
+ },
1390
+ {
1391
+ provide: ANALYZE_FOR_ENTRY_COMPONENTS,
1392
+ useValue: Array.from(tabsFactory().values()),
1393
+ multi: true,
1394
+ },
1395
+ ],
1396
+ };
1397
+ }
1398
+ }
1399
+ DossierModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1400
+ DossierModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierModule, declarations: [DossierListComponent,
1401
+ DossierDetailComponent,
1402
+ DossierDetailTabSummaryComponent,
1403
+ DossierDetailTabProgressComponent,
1404
+ DossierDetailTabAuditComponent,
1405
+ DossierDetailTabDocumentsComponent,
1406
+ DossierDetailTabContactMomentsComponent,
1407
+ DossierUpdateComponent,
1408
+ DossierProcessStartModalComponent,
1409
+ DossierSupportingProcessStartModalComponent], imports: [CommonModule,
1410
+ DossierRoutingModule,
1411
+ ListModule,
1412
+ WidgetModule,
1413
+ BpmnJsDiagramModule,
1414
+ TimelineModule,
1415
+ CamundaFormModule,
1416
+ ProcessModule,
1417
+ FilterSidebarModule,
1418
+ NgbButtonsModule,
1419
+ DataListModule,
1420
+ FormsModule,
1421
+ FormModule,
1422
+ FormIoModule,
1423
+ ModalModule,
1424
+ SpinnerModule, i3.TranslateModule, TaskModule,
1425
+ ModalModule,
1426
+ NgbTooltipModule,
1427
+ UploaderModule,
1428
+ DropzoneModule,
1429
+ NgbPaginationModule,
1430
+ ConfigModule], exports: [DossierListComponent, DossierDetailComponent] });
1431
+ DossierModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierModule, imports: [[
1432
+ CommonModule,
1433
+ DossierRoutingModule,
1434
+ ListModule,
1435
+ WidgetModule,
1436
+ BpmnJsDiagramModule,
1437
+ TimelineModule,
1438
+ CamundaFormModule,
1439
+ ProcessModule,
1440
+ FilterSidebarModule,
1441
+ NgbButtonsModule,
1442
+ DataListModule,
1443
+ FormsModule,
1444
+ FormModule,
1445
+ FormIoModule,
1446
+ ModalModule,
1447
+ SpinnerModule,
1448
+ TranslateModule.forRoot({
1449
+ loader: {
1450
+ provide: TranslateLoader,
1451
+ useFactory: HttpLoaderFactory,
1452
+ deps: [HttpClient],
1453
+ },
1454
+ }),
1455
+ TaskModule,
1456
+ ModalModule,
1457
+ NgbTooltipModule,
1458
+ UploaderModule,
1459
+ DropzoneModule,
1460
+ NgbPaginationModule,
1461
+ ConfigModule,
1462
+ ]] });
1463
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: DossierModule, decorators: [{
1464
+ type: NgModule,
1465
+ args: [{
1466
+ declarations: [
1467
+ DossierListComponent,
1468
+ DossierDetailComponent,
1469
+ DossierDetailTabSummaryComponent,
1470
+ DossierDetailTabProgressComponent,
1471
+ DossierDetailTabAuditComponent,
1472
+ DossierDetailTabDocumentsComponent,
1473
+ DossierDetailTabContactMomentsComponent,
1474
+ DossierUpdateComponent,
1475
+ DossierProcessStartModalComponent,
1476
+ DossierSupportingProcessStartModalComponent,
1477
+ ],
1478
+ imports: [
1479
+ CommonModule,
1480
+ DossierRoutingModule,
1481
+ ListModule,
1482
+ WidgetModule,
1483
+ BpmnJsDiagramModule,
1484
+ TimelineModule,
1485
+ CamundaFormModule,
1486
+ ProcessModule,
1487
+ FilterSidebarModule,
1488
+ NgbButtonsModule,
1489
+ DataListModule,
1490
+ FormsModule,
1491
+ FormModule,
1492
+ FormIoModule,
1493
+ ModalModule,
1494
+ SpinnerModule,
1495
+ TranslateModule.forRoot({
1496
+ loader: {
1497
+ provide: TranslateLoader,
1498
+ useFactory: HttpLoaderFactory,
1499
+ deps: [HttpClient],
1500
+ },
1501
+ }),
1502
+ TaskModule,
1503
+ ModalModule,
1504
+ NgbTooltipModule,
1505
+ UploaderModule,
1506
+ DropzoneModule,
1507
+ NgbPaginationModule,
1508
+ ConfigModule,
1509
+ ],
1510
+ exports: [DossierListComponent, DossierDetailComponent],
1511
+ }]
1512
+ }] });
1513
+
1514
+ /*
1515
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1516
+ *
1517
+ * Licensed under EUPL, Version 1.2 (the "License");
1518
+ * you may not use this file except in compliance with the License.
1519
+ * You may obtain a copy of the License at
1520
+ *
1521
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1522
+ *
1523
+ * Unless required by applicable law or agreed to in writing, software
1524
+ * distributed under the License is distributed on an "AS IS" basis,
1525
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1526
+ * See the License for the specific language governing permissions and
1527
+ * limitations under the License.
1528
+ */
1529
+
1530
+ /**
1531
+ * Generated bundle index. Do not edit.
1532
+ */
1533
+
1534
+ export { DEFAULT_TABS, DefaultTabs, DossierDetailComponent, DossierDetailTabAuditComponent, DossierDetailTabContactMomentsComponent, DossierDetailTabDocumentsComponent, DossierDetailTabProgressComponent, DossierDetailTabSummaryComponent, DossierListComponent, DossierModule, DossierService, TAB_MAP, TabImpl, TabLoaderImpl, TabService };
1535
+ //# sourceMappingURL=valtimo-dossier.mjs.map