@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';
|
|
@@ -152,6 +153,11 @@ class TaskService {
|
|
|
152
153
|
});
|
|
153
154
|
}
|
|
154
155
|
getTaskProcessLink(taskId) {
|
|
156
|
+
return this.http.get(`${this.valtimoEndpointUri}v2/process-link/task/${taskId}`, {
|
|
157
|
+
headers: { [InterceptorSkip]: '' },
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
getTaskProcessLinkV1(taskId) {
|
|
155
161
|
return this.http.get(`${this.valtimoEndpointUri}v1/process-link/task/${taskId}`);
|
|
156
162
|
}
|
|
157
163
|
getConfigCustomTaskList() {
|
|
@@ -303,9 +309,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
303
309
|
*/
|
|
304
310
|
moment.locale(localStorage.getItem('langKey') || '');
|
|
305
311
|
class TaskDetailModalComponent {
|
|
306
|
-
constructor(toastr, formLinkService, formFlowService, router, logger, route, taskService, userProviderService, modalService, documentService, translateService) {
|
|
312
|
+
constructor(toastr, formLinkService, processLinkService, formFlowService, router, logger, route, taskService, userProviderService, modalService, documentService, translateService) {
|
|
307
313
|
this.toastr = toastr;
|
|
308
314
|
this.formLinkService = formLinkService;
|
|
315
|
+
this.processLinkService = processLinkService;
|
|
309
316
|
this.formFlowService = formFlowService;
|
|
310
317
|
this.router = router;
|
|
311
318
|
this.logger = logger;
|
|
@@ -326,8 +333,6 @@ class TaskDetailModalComponent {
|
|
|
326
333
|
this.taskProcessLinkType$ = new BehaviorSubject(null);
|
|
327
334
|
this.processLinkIsForm$ = this.taskProcessLinkType$.pipe(map(type => type === 'form'));
|
|
328
335
|
this.processLinkIsFormFlow$ = this.taskProcessLinkType$.pipe(map(type => type === 'form-flow'));
|
|
329
|
-
this.formFlowStepType$ = new BehaviorSubject(null);
|
|
330
|
-
this.formFlowStepTypeIsForm$ = this.formFlowStepType$.pipe(map(type => type === 'form'));
|
|
331
336
|
this.formIoFormData$ = new BehaviorSubject(null);
|
|
332
337
|
this._subscriptions = new Subscription();
|
|
333
338
|
this.formioOptions = new FormioOptionsImpl();
|
|
@@ -336,10 +341,9 @@ class TaskDetailModalComponent {
|
|
|
336
341
|
ngAfterViewInit() {
|
|
337
342
|
this._subscriptions.add(this.modal.modalShowing$
|
|
338
343
|
.pipe(distinctUntilChanged(), tap$1(modalShowing => {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
this.formFlowService.save(this.formFlowInstanceId, formIoFormData).subscribe(() => null, errors => this.form.showErrors(errors));
|
|
344
|
+
if (!modalShowing) {
|
|
345
|
+
if (this.formFlow) {
|
|
346
|
+
this.formFlow.saveData();
|
|
343
347
|
}
|
|
344
348
|
}
|
|
345
349
|
}))
|
|
@@ -358,36 +362,40 @@ class TaskDetailModalComponent {
|
|
|
358
362
|
title: task.name,
|
|
359
363
|
subtitle: `${this.translateService.instant('taskDetail.taskCreated')} ${task.created}`,
|
|
360
364
|
};
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
|
|
365
|
+
//only load from formlink when process link failed for backwards compatibility
|
|
366
|
+
if (!this.taskProcessLinkType$.getValue()) {
|
|
367
|
+
this.formLinkService
|
|
368
|
+
.getPreFilledFormDefinitionByFormLinkId(task.processDefinitionKey, task.businessKey, task.taskDefinitionKey, task.id // taskInstanceId
|
|
369
|
+
)
|
|
370
|
+
.subscribe(formDefinition => {
|
|
371
|
+
this.formAssociation = formDefinition.formAssociation;
|
|
372
|
+
const className = this.formAssociation.formLink.className.split('.');
|
|
373
|
+
const linkType = className[className.length - 1];
|
|
374
|
+
switch (linkType) {
|
|
375
|
+
case 'BpmnElementFormIdLink':
|
|
376
|
+
this.setFormDefinitionAndOpenModal(formDefinition);
|
|
377
|
+
break;
|
|
378
|
+
case 'BpmnElementFormFlowIdLink':
|
|
379
|
+
// We can't use the formDefinition here because the form definition is provided per form flow step
|
|
380
|
+
// I'm still leaving this in here in case we want to add form flow specific code.
|
|
381
|
+
this.modal.show();
|
|
382
|
+
break;
|
|
383
|
+
case 'BpmnElementUrlLink':
|
|
384
|
+
this.openUrlLink(formDefinition);
|
|
385
|
+
break;
|
|
386
|
+
case 'BpmnElementAngularStateUrlLink':
|
|
387
|
+
this.openAngularStateUrlLink(task, formDefinition);
|
|
388
|
+
break;
|
|
389
|
+
default:
|
|
390
|
+
this.logger.fatal('Unsupported class name');
|
|
391
|
+
}
|
|
392
|
+
}, errors => {
|
|
393
|
+
if (errors?.error?.detail) {
|
|
394
|
+
this.errorMessage = errors.error.detail;
|
|
395
|
+
}
|
|
396
|
+
this.modal.show();
|
|
397
|
+
});
|
|
398
|
+
}
|
|
391
399
|
}
|
|
392
400
|
gotoFormLinkScreen() {
|
|
393
401
|
this.modal.hide();
|
|
@@ -403,22 +411,26 @@ class TaskDetailModalComponent {
|
|
|
403
411
|
this.formIoFormData$.next(submission.data);
|
|
404
412
|
}
|
|
405
413
|
if (this.taskProcessLinkType$.getValue() === 'form') {
|
|
406
|
-
this.
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
.submitStep(this.formFlowInstanceId, this.formFlowStepInstanceId, submission.data)
|
|
418
|
-
.subscribe((result) => this.handleFormFlowStep(result), errors => this.form.showErrors(errors));
|
|
414
|
+
if (this.processLinkId) {
|
|
415
|
+
this.processLinkService
|
|
416
|
+
.submitForm(this.processLinkId, submission.data, this.task.businessKey, this.task.id)
|
|
417
|
+
.subscribe({
|
|
418
|
+
next: (_) => {
|
|
419
|
+
this.completeTask();
|
|
420
|
+
},
|
|
421
|
+
error: errors => {
|
|
422
|
+
this.form.showErrors(errors);
|
|
423
|
+
},
|
|
424
|
+
});
|
|
419
425
|
}
|
|
420
|
-
else
|
|
421
|
-
this.
|
|
426
|
+
else {
|
|
427
|
+
this.formLinkService
|
|
428
|
+
.onSubmit(this.task.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.task.businessKey, this.task.id)
|
|
429
|
+
.subscribe((_) => {
|
|
430
|
+
this.completeTask();
|
|
431
|
+
}, errors => {
|
|
432
|
+
this.form.showErrors(errors);
|
|
433
|
+
});
|
|
422
434
|
}
|
|
423
435
|
}
|
|
424
436
|
}
|
|
@@ -426,50 +438,56 @@ class TaskDetailModalComponent {
|
|
|
426
438
|
this.formDefinition = null;
|
|
427
439
|
}
|
|
428
440
|
getTaskProcessLink(taskId) {
|
|
429
|
-
this.taskService.getTaskProcessLink(taskId).subscribe(
|
|
430
|
-
|
|
441
|
+
this.taskService.getTaskProcessLink(taskId).subscribe({
|
|
442
|
+
next: res => {
|
|
443
|
+
if (res != null) {
|
|
444
|
+
switch (res?.type) {
|
|
445
|
+
case 'form':
|
|
446
|
+
this.taskProcessLinkType$.next('form');
|
|
447
|
+
this.processLinkId = res.processLinkId;
|
|
448
|
+
this.setFormDefinitionAndOpenModal(res.properties.prefilledForm);
|
|
449
|
+
break;
|
|
450
|
+
case 'form-flow':
|
|
451
|
+
this.taskProcessLinkType$.next('form-flow');
|
|
452
|
+
this.formFlowInstanceId = res.properties.formFlowInstanceId;
|
|
453
|
+
break;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
this.getLegacyTaskProcessLink(taskId);
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
error: _ => {
|
|
461
|
+
this.getLegacyTaskProcessLink(taskId);
|
|
462
|
+
},
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
completeTask() {
|
|
466
|
+
this.toastr.success(`${this.task.name} ${this.translateService.instant('taskDetail.taskCompleted')}`);
|
|
467
|
+
this.modal.hide();
|
|
468
|
+
this.task = null;
|
|
469
|
+
this.formSubmit.emit();
|
|
470
|
+
}
|
|
471
|
+
getLegacyTaskProcessLink(taskId) {
|
|
472
|
+
this.taskService.getTaskProcessLinkV1(taskId).subscribe(resV1 => {
|
|
473
|
+
switch (resV1?.type) {
|
|
431
474
|
case 'form':
|
|
432
475
|
this.taskProcessLinkType$.next('form');
|
|
433
476
|
break;
|
|
434
477
|
case 'form-flow':
|
|
435
478
|
this.taskProcessLinkType$.next('form-flow');
|
|
436
|
-
this.
|
|
479
|
+
this.formFlowInstanceId = resV1.properties.formFlowInstanceId;
|
|
437
480
|
break;
|
|
438
481
|
}
|
|
439
482
|
});
|
|
440
483
|
}
|
|
441
|
-
getFormFlowStep(formFlowInstanceId) {
|
|
442
|
-
this.formFlowService
|
|
443
|
-
.getFormFlowStep(formFlowInstanceId)
|
|
444
|
-
.subscribe((result) => {
|
|
445
|
-
this.handleFormFlowStep(result);
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
handleFormFlowStep(formFlowInstance) {
|
|
449
|
-
if (formFlowInstance.step === null) {
|
|
450
|
-
this.formFlowStepType$.next(null);
|
|
451
|
-
this.formFlowInstanceId = null;
|
|
452
|
-
this.formFlowStepInstanceId = null;
|
|
453
|
-
this.completeTask();
|
|
454
|
-
}
|
|
455
|
-
else {
|
|
456
|
-
this.modalService.scrollToTop();
|
|
457
|
-
this.formFlowStepType$.next(formFlowInstance.step.type);
|
|
458
|
-
this.formFlowInstanceId = formFlowInstance.id;
|
|
459
|
-
this.formFlowStepInstanceId = formFlowInstance.step.id;
|
|
460
|
-
this.setFormDefinitionAndOpenModal(formFlowInstance.step.typeProperties.definition);
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
completeTask() {
|
|
464
|
-
this.toastr.success(`${this.task.name} ${this.translateService.instant('taskDetail.taskCompleted')}`);
|
|
465
|
-
this.modal.hide();
|
|
466
|
-
this.task = null;
|
|
467
|
-
this.formSubmit.emit();
|
|
468
|
-
}
|
|
469
484
|
resetTaskProcessLinkType() {
|
|
470
485
|
this.taskProcessLinkType$.next(null);
|
|
486
|
+
this.processLinkId = null;
|
|
487
|
+
this.formAssociation = null;
|
|
471
488
|
}
|
|
472
489
|
setFormDefinitionAndOpenModal(formDefinition) {
|
|
490
|
+
this.taskProcessLinkType$.next('form');
|
|
473
491
|
this.formDefinition = formDefinition;
|
|
474
492
|
this.modal.show();
|
|
475
493
|
}
|
|
@@ -497,14 +515,17 @@ class TaskDetailModalComponent {
|
|
|
497
515
|
});
|
|
498
516
|
}
|
|
499
517
|
}
|
|
500
|
-
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 });
|
|
501
|
-
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
|
|
518
|
+
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 });
|
|
519
|
+
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 });
|
|
502
520
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskDetailModalComponent, decorators: [{
|
|
503
521
|
type: Component,
|
|
504
|
-
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
|
|
505
|
-
}], 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: [{
|
|
522
|
+
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"] }]
|
|
523
|
+
}], 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: [{
|
|
506
524
|
type: ViewChild,
|
|
507
525
|
args: ['form']
|
|
526
|
+
}], formFlow: [{
|
|
527
|
+
type: ViewChild,
|
|
528
|
+
args: ['formFlow']
|
|
508
529
|
}], modal: [{
|
|
509
530
|
type: ViewChild,
|
|
510
531
|
args: ['taskDetailModal']
|
|
@@ -786,7 +807,8 @@ TaskModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14
|
|
|
786
807
|
FormsModule, i1$1.ToastrModule, i4.TranslateModule, NgbModule,
|
|
787
808
|
FormIoModule,
|
|
788
809
|
ModalModule,
|
|
789
|
-
LinkModule
|
|
810
|
+
LinkModule,
|
|
811
|
+
FormLinkModule], exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent] });
|
|
790
812
|
TaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskModule, imports: [CommonModule,
|
|
791
813
|
TaskRoutingModule,
|
|
792
814
|
ListModule,
|
|
@@ -811,7 +833,8 @@ TaskModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14
|
|
|
811
833
|
NgbModule,
|
|
812
834
|
FormIoModule,
|
|
813
835
|
ModalModule,
|
|
814
|
-
LinkModule
|
|
836
|
+
LinkModule,
|
|
837
|
+
FormLinkModule] });
|
|
815
838
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TaskModule, decorators: [{
|
|
816
839
|
type: NgModule,
|
|
817
840
|
args: [{
|
|
@@ -842,6 +865,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
842
865
|
FormIoModule,
|
|
843
866
|
ModalModule,
|
|
844
867
|
LinkModule,
|
|
868
|
+
FormLinkModule,
|
|
845
869
|
],
|
|
846
870
|
exports: [TaskListComponent, TaskDetailModalComponent, AssignUserToTaskComponent],
|
|
847
871
|
}]
|