mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Fix start process form (#4847)
This commit is contained in:
@@ -20,7 +20,7 @@ import {
|
||||
Output, SimpleChanges, OnDestroy
|
||||
} from '@angular/core';
|
||||
import { Observable, of, forkJoin, Subject } from 'rxjs';
|
||||
import { switchMap, takeUntil } from 'rxjs/operators';
|
||||
import { switchMap, takeUntil, map } from 'rxjs/operators';
|
||||
import { Subscription } from 'rxjs';
|
||||
import {
|
||||
FormBaseComponent,
|
||||
@@ -206,7 +206,13 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
getFormById(appName: string, formId: string) {
|
||||
this.formCloudService
|
||||
.getForm(appName, formId)
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.pipe(
|
||||
map((form: any) => {
|
||||
const flattenForm = {...form.formRepresentation, ...form.formRepresentation.formDefinition};
|
||||
delete flattenForm.formDefinition;
|
||||
return flattenForm;
|
||||
}),
|
||||
takeUntil(this.onDestroy$))
|
||||
.subscribe(
|
||||
(form) => {
|
||||
const parsedForm = this.parseForm(form);
|
||||
|
Reference in New Issue
Block a user