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

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