[ADF-2494] Task Standalone - Provide a way to attach a form (#3459)

* button added for task standalone

* attach form component added

* slide-toggle position fixed

* tests added

* rebase fixed

* review fix

* test added & fixes

* tests fixes

* refresh task details

* tests fixed

* attachFormToATask test added

* formPreview test fixed

* adf-form test fixed
This commit is contained in:
bbcodrin
2018-06-28 12:39:15 +03:00
committed by Eugenio Romano
parent 9fef181155
commit 8dfd67e037
16 changed files with 323 additions and 20 deletions

View File

@@ -21,6 +21,7 @@ import {
CardViewUpdateService,
ClickNotification,
LogService,
FormService,
UpdateNotification,
FormRenderingService,
CommentsComponent
@@ -186,6 +187,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
private authService: AuthenticationService,
private peopleProcessService: PeopleProcessService,
private formRenderingService: FormRenderingService,
private formService: FormService,
private logService: LogService,
private cardViewUpdateService: CardViewUpdateService,
private dialog: MatDialog) {
@@ -363,6 +365,13 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
);
}
onFormAttached() {
this.formService.getTaskForm(this.taskId)
.subscribe((res) => {
this.loadDetails(this.taskId);
}, error => this.logService.error('Could not load forms'));
}
onFormContentClick(content: ContentLinkModel): void {
this.formContentClicked.emit(content);
}