mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3881] Able to start form with preselected ACS nodes (#6700)
* Move the node to ps before loading * Add unit test on start process with preseleted nodes * Fix unit test * Wrap calls and improve if * Add type
This commit is contained in:
@@ -127,6 +127,7 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr
|
||||
|
||||
isProcessDefinitionsLoading = true;
|
||||
isAppsLoading = true;
|
||||
movedNodeToPS: FormValues;
|
||||
|
||||
private onDestroy$ = new Subject<boolean>();
|
||||
constructor(private activitiProcess: ProcessService,
|
||||
@@ -364,7 +365,9 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr
|
||||
const currentValue = Array.isArray(this.values[key]) ? this.values[key] : [this.values[key]];
|
||||
const contents = currentValue.filter((value: any) => value && value.isFile)
|
||||
.map((content: MinimalNode) => this.activitiContentService.applyAlfrescoNode(content, null, accountIdentifier));
|
||||
forkJoin(contents).subscribe((res: RelatedContentRepresentation[]) => this.values[key] = [...res] );
|
||||
forkJoin(contents).subscribe((res: RelatedContentRepresentation[]) => {
|
||||
this.movedNodeToPS = { [key]: [...res]};
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user