@valtimo/task 10.8.0 → 10.8.2

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.
@@ -319,20 +319,26 @@ class TaskDetailModalComponent {
319
319
  this.translateService = translateService;
320
320
  this.formSubmit = new EventEmitter();
321
321
  this.assignmentOfTaskChanged = new EventEmitter();
322
- this.task = null;
323
- this.page = null;
324
- this.errorMessage = null;
322
+ this.task$ = new BehaviorSubject(null);
323
+ this.formDefinition$ = new BehaviorSubject(undefined);
324
+ this.formFlowInstanceId$ = new BehaviorSubject(undefined);
325
+ this.page$ = new BehaviorSubject(null);
326
+ this.formioOptions$ = new BehaviorSubject(null);
327
+ this.errorMessage$ = new BehaviorSubject(undefined);
325
328
  this.isAdmin$ = this.userProviderService
326
329
  .getUserSubject()
327
330
  .pipe(map(userIdentity => userIdentity?.roles?.includes('ROLE_ADMIN')));
331
+ this.formIoFormData$ = new BehaviorSubject(null);
332
+ this.loading$ = new BehaviorSubject(true);
328
333
  this.taskProcessLinkType$ = new BehaviorSubject(null);
329
334
  this.processLinkIsForm$ = this.taskProcessLinkType$.pipe(map(type => type === 'form'));
330
335
  this.processLinkIsFormFlow$ = this.taskProcessLinkType$.pipe(map(type => type === 'form-flow'));
331
- this.formIoFormData$ = new BehaviorSubject(null);
336
+ this.formAssociation$ = new BehaviorSubject(undefined);
337
+ this.processLinkId$ = new BehaviorSubject(undefined);
332
338
  this._subscriptions = new Subscription();
333
- this.loading$ = new BehaviorSubject(true);
334
- this.formioOptions = new FormioOptionsImpl();
335
- this.formioOptions.disableAlerts = true;
339
+ const options = new FormioOptionsImpl();
340
+ options.disableAlerts = true;
341
+ this.formioOptions$.next(options);
336
342
  }
337
343
  ngAfterViewInit() {
338
344
  this._subscriptions.add(this.modal.modalShowing$
@@ -355,19 +361,19 @@ class TaskDetailModalComponent {
355
361
  this.setDocumentDefinitionNameInService(task);
356
362
  const documentId = task.businessKey;
357
363
  this.stateService.setDocumentId(documentId);
358
- this.task = task;
359
- this.page = {
364
+ this.task$.next(task);
365
+ this.page$.next({
360
366
  title: task.name,
361
367
  subtitle: `${this.translateService.instant('taskDetail.taskCreated')} ${task.created}`,
362
- };
368
+ });
363
369
  //only load from formlink when process link failed for backwards compatibility
364
370
  if (!this.taskProcessLinkType$.getValue()) {
365
371
  this.formLinkService
366
372
  .getPreFilledFormDefinitionByFormLinkId(task.processDefinitionKey, documentId, task.taskDefinitionKey, task.id // taskInstanceId
367
373
  )
368
374
  .subscribe(formDefinition => {
369
- this.formAssociation = formDefinition.formAssociation;
370
- const className = this.formAssociation.formLink.className.split('.');
375
+ this.formAssociation$.next(formDefinition.formAssociation);
376
+ const className = formDefinition.formAssociation.formLink.className.split('.');
371
377
  const linkType = className[className.length - 1];
372
378
  switch (linkType) {
373
379
  case 'BpmnElementFormIdLink':
@@ -389,7 +395,7 @@ class TaskDetailModalComponent {
389
395
  }
390
396
  }, errors => {
391
397
  if (errors?.error?.detail) {
392
- this.errorMessage = errors.error.detail;
398
+ this.errorMessage$.next(errors.error.detail);
393
399
  }
394
400
  this.modal.show();
395
401
  });
@@ -408,32 +414,49 @@ class TaskDetailModalComponent {
408
414
  if (submission.data) {
409
415
  this.formIoFormData$.next(submission.data);
410
416
  }
411
- if (this.taskProcessLinkType$.getValue() === 'form') {
412
- if (this.processLinkId) {
413
- this.processLinkService
414
- .submitForm(this.processLinkId, submission.data, this.task.businessKey, this.task.id)
415
- .subscribe({
416
- next: (_) => {
417
+ combineLatest([
418
+ this.processLinkId$,
419
+ this.taskProcessLinkType$,
420
+ this.task$,
421
+ this.formAssociation$,
422
+ ])
423
+ .pipe(take(1))
424
+ .subscribe(([processLinkId, taskProcessLinkType, task, formAssociation]) => {
425
+ if (taskProcessLinkType === 'form') {
426
+ if (processLinkId) {
427
+ this.processLinkService
428
+ .submitForm(processLinkId, submission.data, task.businessKey, task.id)
429
+ .subscribe({
430
+ next: (_) => {
431
+ this.completeTask();
432
+ },
433
+ error: errors => {
434
+ this.form.showErrors(errors);
435
+ },
436
+ });
437
+ }
438
+ else {
439
+ this.formLinkService
440
+ .onSubmit(task.processDefinitionKey, formAssociation.formLink.id, submission.data, task.businessKey, task.id)
441
+ .subscribe((_) => {
417
442
  this.completeTask();
418
- },
419
- error: errors => {
443
+ }, errors => {
420
444
  this.form.showErrors(errors);
421
- },
422
- });
423
- }
424
- else {
425
- this.formLinkService
426
- .onSubmit(this.task.processDefinitionKey, this.formAssociation.formLink.id, submission.data, this.task.businessKey, this.task.id)
427
- .subscribe((_) => {
428
- this.completeTask();
429
- }, errors => {
430
- this.form.showErrors(errors);
431
- });
445
+ });
446
+ }
432
447
  }
433
- }
448
+ });
449
+ }
450
+ completeTask() {
451
+ this.task$.pipe(take(1)).subscribe(task => {
452
+ this.toastr.success(`${task.name} ${this.translateService.instant('taskDetail.taskCompleted')}`);
453
+ this.modal.hide();
454
+ this.task$.next(null);
455
+ this.formSubmit.emit();
456
+ });
434
457
  }
435
458
  resetFormDefinition() {
436
- this.formDefinition = null;
459
+ this.formDefinition$.next(null);
437
460
  this.loading$.next(true);
438
461
  }
439
462
  getTaskProcessLink(taskId) {
@@ -443,12 +466,12 @@ class TaskDetailModalComponent {
443
466
  switch (res?.type) {
444
467
  case 'form':
445
468
  this.taskProcessLinkType$.next('form');
446
- this.processLinkId = res.processLinkId;
469
+ this.processLinkId$.next(res.processLinkId);
447
470
  this.setFormDefinitionAndOpenModal(res.properties.prefilledForm);
448
471
  break;
449
472
  case 'form-flow':
450
473
  this.taskProcessLinkType$.next('form-flow');
451
- this.formFlowInstanceId = res.properties.formFlowInstanceId;
474
+ this.formFlowInstanceId$.next(res.properties.formFlowInstanceId);
452
475
  break;
453
476
  }
454
477
  this.loading$.next(false);
@@ -462,12 +485,6 @@ class TaskDetailModalComponent {
462
485
  },
463
486
  });
464
487
  }
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
488
  getLegacyTaskProcessLink(taskId) {
472
489
  this.taskService.getTaskProcessLinkV1(taskId).subscribe(resV1 => {
473
490
  switch (resV1?.type) {
@@ -476,7 +493,7 @@ class TaskDetailModalComponent {
476
493
  break;
477
494
  case 'form-flow':
478
495
  this.taskProcessLinkType$.next('form-flow');
479
- this.formFlowInstanceId = resV1.properties.formFlowInstanceId;
496
+ this.formFlowInstanceId$.next(resV1.properties.formFlowInstanceId);
480
497
  break;
481
498
  }
482
499
  this.loading$.next(false);
@@ -484,12 +501,12 @@ class TaskDetailModalComponent {
484
501
  }
485
502
  resetTaskProcessLinkType() {
486
503
  this.taskProcessLinkType$.next(null);
487
- this.processLinkId = null;
488
- this.formAssociation = null;
504
+ this.processLinkId$.next(null);
505
+ this.formAssociation$.next(null);
489
506
  }
490
507
  setFormDefinitionAndOpenModal(formDefinition) {
491
508
  this.taskProcessLinkType$.next('form');
492
- this.formDefinition = formDefinition;
509
+ this.formDefinition$.next(formDefinition);
493
510
  this.modal.show();
494
511
  }
495
512
  openUrlLink(formDefinition) {
@@ -519,10 +536,10 @@ class TaskDetailModalComponent {
519
536
  }
520
537
  }
521
538
  TaskDetailModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", 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: i7.FormIoStateService }, { token: i8.DocumentService }, { token: i4.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
522
- TaskDetailModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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 *ngIf=\"{\n loading: loading$ | async\n } as obs\"\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=\"obs.loading\">\n <div class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n </div>\n <div body *ngIf=\"obs.loading === false && !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 });
539
+ TaskDetailModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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 *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n formDefinition: formDefinition$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async\n } as obs\"\n elementId=\"taskDetailModal\"\n [title]=\"obs.page?.title\"\n [subtitle]=\"obs.page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"obs.formDefinition && obs.processLinkIsForm\">\n <valtimo-form-io\n #form\n [form]=\"obs.formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"obs.processLinkIsFormFlow\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"obs.loading\">\n <div class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n </div>\n <div\n body\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage\n \"\n >\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=\"obs.errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!!obs.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 <ng-container *ngIf=\"task$ | async as task\">\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-container>\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: ["options", "submission", "form", "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 });
523
540
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TaskDetailModalComponent, decorators: [{
524
541
  type: Component,
525
- 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 *ngIf=\"{\n loading: loading$ | async\n } as obs\"\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=\"obs.loading\">\n <div class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n </div>\n <div body *ngIf=\"obs.loading === false && !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"] }]
542
+ 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 *ngIf=\"{\n loading: loading$ | async,\n page: page$ | async,\n task: task$ | async,\n formDefinition: formDefinition$ | async,\n processLinkIsForm: processLinkIsForm$ | async,\n formioOptions: formioOptions$ | async,\n processLinkIsFormFlow: processLinkIsFormFlow$ | async,\n formFlowInstanceId: formFlowInstanceId$ | async,\n errorMessage: errorMessage$ | async\n } as obs\"\n elementId=\"taskDetailModal\"\n [title]=\"obs.page?.title\"\n [subtitle]=\"obs.page?.subtitle\"\n [templateBelowSubtitle]=\"assignUserToTask\"\n>\n <div body *ngIf=\"obs.formDefinition && obs.processLinkIsForm\">\n <valtimo-form-io\n #form\n [form]=\"obs.formDefinition\"\n (submit)=\"onSubmit($event)\"\n (change)=\"onChange($event)\"\n [options]=\"obs.formioOptions\"\n ></valtimo-form-io>\n </div>\n <div body *ngIf=\"obs.processLinkIsFormFlow\">\n <valtimo-form-flow\n #formFlow\n [formIoFormData]=\"formIoFormData$\"\n [formFlowInstanceId]=\"obs.formFlowInstanceId\"\n (formFlowComplete)=\"completeTask()\"\n ></valtimo-form-flow>\n </div>\n <div body *ngIf=\"obs.loading\">\n <div class=\"text-black mb-0 p-3 text-center\">\n {{ 'formManagement.loading' | translate }}\n </div>\n </div>\n <div\n body\n *ngIf=\"\n obs.loading === false && !obs.formDefinition && !obs.formFlowInstanceId && !obs.errorMessage\n \"\n >\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=\"obs.errorMessage\">\n <div class=\"bg-danger text-black mb-0 p-3 text-center\">\n {{ obs.errorMessage }}\n </div>\n </div>\n <div footer>\n <div class=\"mb-0 p-3 text-center\" *ngIf=\"!!obs.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 <ng-container *ngIf=\"task$ | async as task\">\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-container>\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"] }]
526
543
  }], 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: i7.FormIoStateService }, { type: i8.DocumentService }, { type: i4.TranslateService }]; }, propDecorators: { form: [{
527
544
  type: ViewChild,
528
545
  args: ['form']