@valtimo/task 10.5.0 → 10.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/models/task.model.mjs +1 -1
- package/esm2020/lib/task-detail-modal/task-detail-modal.component.mjs +103 -88
- package/esm2020/lib/task.module.mjs +7 -3
- package/esm2020/lib/task.service.mjs +7 -1
- package/fesm2015/valtimo-task.mjs +116 -92
- package/fesm2015/valtimo-task.mjs.map +1 -1
- package/fesm2020/valtimo-task.mjs +115 -91
- package/fesm2020/valtimo-task.mjs.map +1 -1
- package/lib/models/task.model.d.ts +3 -0
- package/lib/models/task.model.d.ts.map +1 -1
- package/lib/task-detail-modal/task-detail-modal.component.d.ts +9 -10
- package/lib/task-detail-modal/task-detail-modal.component.d.ts.map +1 -1
- package/lib/task.module.d.ts +2 -1
- package/lib/task.module.d.ts.map +1 -1
- package/lib/task.service.d.ts +1 -0
- package/lib/task.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, EventEmitter, Component, Input, Output, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
|
|
3
|
+
import * as i6 from '@valtimo/security';
|
|
4
|
+
import { InterceptorSkip, AuthGuardService } from '@valtimo/security';
|
|
3
5
|
import * as i1 from '@angular/common/http';
|
|
4
6
|
import { HttpClient } from '@angular/common/http';
|
|
5
7
|
import * as i2 from '@valtimo/config';
|
|
@@ -20,11 +22,10 @@ import moment from 'moment';
|
|
|
20
22
|
import { take, tap, map } from 'rxjs/operators';
|
|
21
23
|
import { BehaviorSubject, Subscription, combineLatest, distinctUntilChanged, tap as tap$1 } from 'rxjs';
|
|
22
24
|
import * as i2$2 from '@valtimo/form-link';
|
|
25
|
+
import { FormLinkModule } from '@valtimo/form-link';
|
|
23
26
|
import * as i3 from '@angular/router';
|
|
24
27
|
import { RouterModule } from '@angular/router';
|
|
25
28
|
import * as i4$1 from 'ngx-logger';
|
|
26
|
-
import * as i6 from '@valtimo/security';
|
|
27
|
-
import { AuthGuardService } from '@valtimo/security';
|
|
28
29
|
import * as i8 from '@valtimo/document';
|
|
29
30
|
import * as i10 from 'carbon-components-angular';
|
|
30
31
|
import { LinkModule } from 'carbon-components-angular';
|
|
@@ -120,6 +121,11 @@ class TaskService {
|
|
|
120
121
|
});
|
|
121
122
|
}
|
|
122
123
|
getTaskProcessLink(taskId) {
|
|
124
|
+
return this.http.get(`${this.valtimoEndpointUri}v2/process-link/task/${taskId}`, {
|
|
125
|
+
headers: { [InterceptorSkip]: '' },
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
getTaskProcessLinkV1(taskId) {
|
|
123
129
|
return this.http.get(`${this.valtimoEndpointUri}v1/process-link/task/${taskId}`);
|
|
124
130
|
}
|
|
125
131
|
getConfigCustomTaskList() {
|
|
@@ -271,9 +277,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
271
277
|
*/
|
|
272
278
|
moment.locale(localStorage.getItem('langKey') || '');
|
|
273
279
|
class TaskDetailModalComponent {
|
|
274
|
-
constructor(toastr, formLinkService, formFlowService, router, logger, route, taskService, userProviderService, modalService, documentService, translateService) {
|
|
280
|
+
constructor(toastr, formLinkService, processLinkService, formFlowService, router, logger, route, taskService, userProviderService, modalService, documentService, translateService) {
|
|
275
281
|
this.toastr = toastr;
|
|
276
282
|
this.formLinkService = formLinkService;
|
|
283
|
+
this.processLinkService = processLinkService;
|
|
277
284
|
this.formFlowService = formFlowService;
|
|
278
285
|
this.router = router;
|
|
279
286
|
this.logger = logger;
|
|
@@ -294,8 +301,6 @@ class TaskDetailModalComponent {
|
|
|
294
301
|
this.taskProcessLinkType$ = new BehaviorSubject(null);
|
|
295
302
|
this.processLinkIsForm$ = this.taskProcessLinkType$.pipe(map(type => type === 'form'));
|
|
296
303
|
this.processLinkIsFormFlow$ = this.taskProcessLinkType$.pipe(map(type => type === 'form-flow'));
|
|
297
|
-
this.formFlowStepType$ = new BehaviorSubject(null);
|
|
298
|
-
this.formFlowStepTypeIsForm$ = this.formFlowStepType$.pipe(map(type => type === 'form'));
|
|
299
304
|
this.formIoFormData$ = new BehaviorSubject(null);
|
|
300
305
|
this._subscriptions = new Subscription();
|
|
301
306
|
this.formioOptions = new FormioOptionsImpl();
|
|
@@ -304,10 +309,9 @@ class TaskDetailModalComponent {
|
|
|
304
309
|
ngAfterViewInit() {
|
|
305
310
|
this._subscriptions.add(this.modal.modalShowing$
|
|
306
311
|
.pipe(distinctUntilChanged(), tap$1(modalShowing => {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
this.formFlowService.save(this.formFlowInstanceId, formIoFormData).subscribe(() => null, errors => this.form.showErrors(errors));
|
|
312
|
+
if (!modalShowing) {
|
|
313
|
+
if (this.formFlow) {
|
|
314
|
+
this.formFlow.saveData();
|
|
311
315
|
}
|
|
312
316
|
}
|
|
313
317
|
}))
|
|
@@ -326,37 +330,41 @@ class TaskDetailModalComponent {
|
|
|
326
330
|
title: task.name,
|
|
327
331
|
subtitle: `${this.translateService.instant('taskDetail.taskCreated')} ${task.created}`,
|
|
328
332
|
};
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
333
|
+
//only load from formlink when process link failed for backwards compatibility
|
|
334
|
+
if (!this.taskProcessLinkType$.getValue()) {
|
|
335
|
+
this.formLinkService
|
|
336
|
+
.getPreFilledFormDefinitionByFormLinkId(task.processDefinitionKey, task.businessKey, task.taskDefinitionKey, task.id // taskInstanceId
|
|
337
|
+
)
|
|
338
|
+
.subscribe(formDefinition => {
|
|
339
|
+
this.formAssociation = formDefinition.formAssociation;
|
|
340
|
+
const className = this.formAssociation.formLink.className.split('.');
|
|
341
|
+
const linkType = className[className.length - 1];
|
|
342
|
+
switch (linkType) {
|
|
343
|
+
case 'BpmnElementFormIdLink':
|
|
344
|
+
this.setFormDefinitionAndOpenModal(formDefinition);
|
|
345
|
+
break;
|
|
346
|
+
case 'BpmnElementFormFlowIdLink':
|
|
347
|
+
// We can't use the formDefinition here because the form definition is provided per form flow step
|
|
348
|
+
// I'm still leaving this in here in case we want to add form flow specific code.
|
|
349
|
+
this.modal.show();
|
|
350
|
+
break;
|
|
351
|
+
case 'BpmnElementUrlLink':
|
|
352
|
+
this.openUrlLink(formDefinition);
|
|
353
|
+
break;
|
|
354
|
+
case 'BpmnElementAngularStateUrlLink':
|
|
355
|
+
this.openAngularStateUrlLink(task, formDefinition);
|
|
356
|
+
break;
|
|
357
|
+
default:
|
|
358
|
+
this.logger.fatal('Unsupported class name');
|
|
359
|
+
}
|
|
360
|
+
}, errors => {
|
|
361
|
+
var _a;
|
|
362
|
+
if ((_a = errors === null || errors === void 0 ? void 0 : errors.error) === null || _a === void 0 ? void 0 : _a.detail) {
|
|
363
|
+
this.errorMessage = errors.error.detail;
|
|
364
|
+
}
|
|
365
|
+
this.modal.show();
|
|
366
|
+
});
|
|
367
|
+
}
|
|
360
368
|
}
|
|
361
369
|
gotoFormLinkScreen() {
|
|
362
370
|
this.modal.hide();
|
|
@@ -372,22 +380,26 @@ class TaskDetailModalComponent {
|
|
|
372
380
|
this.formIoFormData$.next(submission.data);
|
|
373
381
|
}
|
|
374
382
|
if (this.taskProcessLinkType$.getValue() === 'form') {
|
|
375
|
-
this.
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
.submitStep(this.formFlowInstanceId, this.formFlowStepInstanceId, submission.data)
|
|
387
|
-
.subscribe((result) => this.handleFormFlowStep(result), errors => this.form.showErrors(errors));
|
|
383
|
+
if (this.processLinkId) {
|
|
384
|
+
this.processLinkService
|
|
385
|
+
.submitForm(this.processLinkId, submission.data, this.task.businessKey, this.task.id)
|
|
386
|
+
.subscribe({
|
|
387
|
+
next: (_) => {
|
|
388
|
+
this.completeTask();
|
|
389
|
+
},
|
|
390
|
+
error: errors => {
|
|
391
|
+
this.form.showErrors(errors);
|
|
392
|
+
},
|
|
393
|
+
});
|
|
388
394
|
}
|
|
389
|
-
else
|
|
390
|
-
this.
|
|
395
|
+
else {
|
|
396
|
+
this.formLinkService
|
|
397
|
+
.onSubmit(this.task.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.task.businessKey, this.task.id)
|
|
398
|
+
.subscribe((_) => {
|
|
399
|
+
this.completeTask();
|
|
400
|
+
}, errors => {
|
|
401
|
+
this.form.showErrors(errors);
|
|
402
|
+
});
|
|
391
403
|
}
|
|
392
404
|
}
|
|
393
405
|
}
|
|
@@ -395,50 +407,56 @@ class TaskDetailModalComponent {
|
|
|
395
407
|
this.formDefinition = null;
|
|
396
408
|
}
|
|
397
409
|
getTaskProcessLink(taskId) {
|
|
398
|
-
this.taskService.getTaskProcessLink(taskId).subscribe(
|
|
399
|
-
|
|
410
|
+
this.taskService.getTaskProcessLink(taskId).subscribe({
|
|
411
|
+
next: res => {
|
|
412
|
+
if (res != null) {
|
|
413
|
+
switch (res === null || res === void 0 ? void 0 : res.type) {
|
|
414
|
+
case 'form':
|
|
415
|
+
this.taskProcessLinkType$.next('form');
|
|
416
|
+
this.processLinkId = res.processLinkId;
|
|
417
|
+
this.setFormDefinitionAndOpenModal(res.properties.prefilledForm);
|
|
418
|
+
break;
|
|
419
|
+
case 'form-flow':
|
|
420
|
+
this.taskProcessLinkType$.next('form-flow');
|
|
421
|
+
this.formFlowInstanceId = res.properties.formFlowInstanceId;
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
this.getLegacyTaskProcessLink(taskId);
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
error: _ => {
|
|
430
|
+
this.getLegacyTaskProcessLink(taskId);
|
|
431
|
+
},
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
completeTask() {
|
|
435
|
+
this.toastr.success(`${this.task.name} ${this.translateService.instant('taskDetail.taskCompleted')}`);
|
|
436
|
+
this.modal.hide();
|
|
437
|
+
this.task = null;
|
|
438
|
+
this.formSubmit.emit();
|
|
439
|
+
}
|
|
440
|
+
getLegacyTaskProcessLink(taskId) {
|
|
441
|
+
this.taskService.getTaskProcessLinkV1(taskId).subscribe(resV1 => {
|
|
442
|
+
switch (resV1 === null || resV1 === void 0 ? void 0 : resV1.type) {
|
|
400
443
|
case 'form':
|
|
401
444
|
this.taskProcessLinkType$.next('form');
|
|
402
445
|
break;
|
|
403
446
|
case 'form-flow':
|
|
404
447
|
this.taskProcessLinkType$.next('form-flow');
|
|
405
|
-
this.
|
|
448
|
+
this.formFlowInstanceId = resV1.properties.formFlowInstanceId;
|
|
406
449
|
break;
|
|
407
450
|
}
|
|
408
451
|
});
|
|
409
452
|
}
|
|
410
|
-
getFormFlowStep(formFlowInstanceId) {
|
|
411
|
-
this.formFlowService
|
|
412
|
-
.getFormFlowStep(formFlowInstanceId)
|
|
413
|
-
.subscribe((result) => {
|
|
414
|
-
this.handleFormFlowStep(result);
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
handleFormFlowStep(formFlowInstance) {
|
|
418
|
-
if (formFlowInstance.step === null) {
|
|
419
|
-
this.formFlowStepType$.next(null);
|
|
420
|
-
this.formFlowInstanceId = null;
|
|
421
|
-
this.formFlowStepInstanceId = null;
|
|
422
|
-
this.completeTask();
|
|
423
|
-
}
|
|
424
|
-
else {
|
|
425
|
-
this.modalService.scrollToTop();
|
|
426
|
-
this.formFlowStepType$.next(formFlowInstance.step.type);
|
|
427
|
-
this.formFlowInstanceId = formFlowInstance.id;
|
|
428
|
-
this.formFlowStepInstanceId = formFlowInstance.step.id;
|
|
429
|
-
this.setFormDefinitionAndOpenModal(formFlowInstance.step.typeProperties.definition);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
completeTask() {
|
|
433
|
-
this.toastr.success(`${this.task.name} ${this.translateService.instant('taskDetail.taskCompleted')}`);
|
|
434
|
-
this.modal.hide();
|
|
435
|
-
this.task = null;
|
|
436
|
-
this.formSubmit.emit();
|
|
437
|
-
}
|
|
438
453
|
resetTaskProcessLinkType() {
|
|
439
454
|
this.taskProcessLinkType$.next(null);
|
|
455
|
+
this.processLinkId = null;
|
|
456
|
+
this.formAssociation = null;
|
|
440
457
|
}
|
|
441
458
|
setFormDefinitionAndOpenModal(formDefinition) {
|
|
459
|
+
this.taskProcessLinkType$.next('form');
|
|
442
460
|
this.formDefinition = formDefinition;
|
|
443
461
|
this.modal.show();
|
|
444
462
|
}
|
|
@@ -463,14 +481,17 @@ class TaskDetailModalComponent {
|
|
|
463
481
|
});
|
|
464
482
|
}
|
|
465
483
|
}
|
|
466
|
-
TaskDetailModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskDetailModalComponent, deps: [{ token: i1$1.ToastrService }, { token: i2$2.FormLinkService }, { token: i2$2.FormFlowService }, { token: i3.Router }, { token: i4$1.NGXLogger }, { token: i3.ActivatedRoute }, { token: TaskService }, { token: i6.UserProviderService }, { token: i7.ValtimoModalService }, { token: i8.DocumentService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
467
|
-
TaskDetailModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: { formSubmit: "formSubmit", assignmentOfTaskChanged: "assignmentOfTaskChanged" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "modal", first: true, predicate: ["taskDetailModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #taskDetailModal\n elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div
|
|
484
|
+
TaskDetailModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskDetailModalComponent, deps: [{ token: i1$1.ToastrService }, { token: i2$2.FormLinkService }, { token: i2$2.ProcessLinkService }, { token: i2$2.FormFlowService }, { token: i3.Router }, { token: i4$1.NGXLogger }, { token: i3.ActivatedRoute }, { token: TaskService }, { token: i6.UserProviderService }, { token: i7.ValtimoModalService }, { token: i8.DocumentService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
485
|
+
TaskDetailModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TaskDetailModalComponent, selector: "valtimo-task-detail-modal", outputs: { formSubmit: "formSubmit", assignmentOfTaskChanged: "assignmentOfTaskChanged" }, viewQueries: [{ propertyName: "form", first: true, predicate: ["form"], descendants: true }, { propertyName: "formFlow", first: true, predicate: ["formFlow"], descendants: true }, { propertyName: "modal", first: true, predicate: ["taskDetailModal"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #taskDetailModal\n elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"formDefinition && (processLinkIsForm$ | async)\">\n <valtimo-form-io\n #form\n [form]=\"formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"processLinkIsFormFlow$ | async\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"!formDefinition && !formFlowInstanceId && !errorMessage\">\n <div class=\"bg-warning text-black mb-0 p-3 text-center\">\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n </div>\n <div body *ngIf=\"errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!formDefinition\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #assignUserToTask>\n <valtimo-assign-user-to-task\n *ngIf=\"task && assignmentOfTaskChanged\"\n [taskId]=\"task.id\"\n [assigneeEmail]=\"task.assignee\"\n (assignmentOfTaskChanged)=\"assignmentOfTaskChanged.emit()\"\n ></valtimo-assign-user-to-task>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */#taskDetailModal .formio-component-submit{text-align:right}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.FormioComponent, selector: "valtimo-form-io", inputs: ["form", "options", "submission", "readOnly", "formRefresh$"], outputs: ["submit", "change"] }, { kind: "component", type: i7.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "component", type: i2$2.FormFlowComponent, selector: "valtimo-form-flow", inputs: ["formIoFormData", "formFlowInstanceId"], outputs: ["formFlowComplete"] }, { kind: "component", type: AssignUserToTaskComponent, selector: "valtimo-assign-user-to-task", inputs: ["taskId", "assigneeEmail"], outputs: ["assignmentOfTaskChanged"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
468
486
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskDetailModalComponent, decorators: [{
|
|
469
487
|
type: Component,
|
|
470
|
-
args: [{ selector: 'valtimo-task-detail-modal', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #taskDetailModal\n elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div
|
|
471
|
-
}], ctorParameters: function () { return [{ type: i1$1.ToastrService }, { type: i2$2.FormLinkService }, { type: i2$2.FormFlowService }, { type: i3.Router }, { type: i4$1.NGXLogger }, { type: i3.ActivatedRoute }, { type: TaskService }, { type: i6.UserProviderService }, { type: i7.ValtimoModalService }, { type: i8.DocumentService }, { type: i4.TranslateService }]; }, propDecorators: { form: [{
|
|
488
|
+
args: [{ selector: 'valtimo-task-detail-modal', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<valtimo-modal\n #taskDetailModal\n elementId=\"taskDetailModal\"\n [title]=\"page?.title\"\n [subtitle]=\"page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"formDefinition && (processLinkIsForm$ | async)\">\n <valtimo-form-io\n #form\n [form]=\"formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"processLinkIsFormFlow$ | async\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"!formDefinition && !formFlowInstanceId && !errorMessage\">\n <div class=\"bg-warning text-black mb-0 p-3 text-center\">\n {{\n (isAdmin$ | async)\n ? ('formManagement.noFormDefinitionFoundAdmin' | translate)\n : ('formManagement.noFormDefinitionFoundUser' | translate)\n }}\n </div>\n </div>\n <div body *ngIf=\"errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!formDefinition\">\n <button\n class=\"btn btn-secondary btn-space\"\n type=\"button\"\n (click)=\"gotoFormLinkScreen()\"\n id=\"form-link-button\"\n >\n {{ 'formManagement.gotoFormLinksButton' | translate }}\n </button>\n </div>\n </div>\n</valtimo-modal>\n\n<ng-template #assignUserToTask>\n <valtimo-assign-user-to-task\n *ngIf=\"task && assignmentOfTaskChanged\"\n [taskId]=\"task.id\"\n [assigneeEmail]=\"task.assignee\"\n (assignmentOfTaskChanged)=\"assignmentOfTaskChanged.emit()\"\n ></valtimo-assign-user-to-task>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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 */#taskDetailModal .formio-component-submit{text-align:right}\n"] }]
|
|
489
|
+
}], ctorParameters: function () { return [{ type: i1$1.ToastrService }, { type: i2$2.FormLinkService }, { type: i2$2.ProcessLinkService }, { type: i2$2.FormFlowService }, { type: i3.Router }, { type: i4$1.NGXLogger }, { type: i3.ActivatedRoute }, { type: TaskService }, { type: i6.UserProviderService }, { type: i7.ValtimoModalService }, { type: i8.DocumentService }, { type: i4.TranslateService }]; }, propDecorators: { form: [{
|
|
472
490
|
type: ViewChild,
|
|
473
491
|
args: ['form']
|
|
492
|
+
}], formFlow: [{
|
|
493
|
+
type: ViewChild,
|
|
494
|
+
args: ['formFlow']
|
|
474
495
|
}], modal: [{
|
|
475
496
|
type: ViewChild,
|
|
476
497
|
args: ['taskDetailModal']
|
|
@@ -748,7 +769,8 @@ TaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14
|
|
|
748
769
|
FormsModule, i1$1.ToastrModule, i4.TranslateModule, NgbModule,
|
|
749
770
|
FormIoModule,
|
|
750
771
|
ModalModule,
|
|
751
|
-
LinkModule
|
|
772
|
+
LinkModule,
|
|
773
|
+
FormLinkModule], exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent] });
|
|
752
774
|
TaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskModule, imports: [CommonModule,
|
|
753
775
|
TaskRoutingModule,
|
|
754
776
|
ListModule,
|
|
@@ -773,7 +795,8 @@ TaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14
|
|
|
773
795
|
NgbModule,
|
|
774
796
|
FormIoModule,
|
|
775
797
|
ModalModule,
|
|
776
|
-
LinkModule
|
|
798
|
+
LinkModule,
|
|
799
|
+
FormLinkModule] });
|
|
777
800
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskModule, decorators: [{
|
|
778
801
|
type: NgModule,
|
|
779
802
|
args: [{
|
|
@@ -804,6 +827,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
804
827
|
FormIoModule,
|
|
805
828
|
ModalModule,
|
|
806
829
|
LinkModule,
|
|
830
|
+
FormLinkModule,
|
|
807
831
|
],
|
|
808
832
|
exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
|
|
809
833
|
}]
|