mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user