[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

@@ -28,7 +28,11 @@ export class TaskStandaloneComponent {
/** Name of the task. */
@Input()
taskName: string;
taskName;
/** Id of the task. */
@Input()
taskId;
/** If true then Task completed message is shown and `Complete` and `Cancel` buttons are hidden. */
@Input()
@@ -50,6 +54,11 @@ export class TaskStandaloneComponent {
@Output()
complete: EventEmitter<void> = new EventEmitter<void>();
@Output()
formAttached: EventEmitter<void> = new EventEmitter<void>();
showAttachForm: boolean = false;
constructor() { }
onCancelButtonClick(): void {
@@ -67,4 +76,21 @@ export class TaskStandaloneComponent {
hasCancelButton(): boolean {
return !this.hideCancelButton && !this.isCompleted;
}
hasAttachFormButton(): boolean {
return !this.isCompleted;
}
onShowAttachForm() {
this.showAttachForm = true;
}
onCancelAttachForm() {
this.showAttachForm = false;
}
onCompleteAttachForm() {
this.showAttachForm = false;
this.formAttached.emit();
}
}