mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3237] Change and remove form from a task (#3597)
* button added for task standalone * rebase fixed * review fix * test added & fixes * refresh task details * change and remove form added * localize & documentation work * tests added * tests fixes * tests fixes
This commit is contained in:
@@ -21,7 +21,6 @@ import {
|
||||
CardViewUpdateService,
|
||||
ClickNotification,
|
||||
LogService,
|
||||
FormService,
|
||||
UpdateNotification,
|
||||
FormRenderingService,
|
||||
CommentsComponent
|
||||
@@ -97,7 +96,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
||||
|
||||
/** Toggles rendering of the form title. */
|
||||
@Input()
|
||||
showFormTitle: boolean = true;
|
||||
showFormTitle: boolean = false;
|
||||
|
||||
/** Toggles rendering of the `Complete` outcome button. */
|
||||
@Input()
|
||||
@@ -175,6 +174,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
||||
noTaskDetailsTemplateComponent: TemplateRef<any>;
|
||||
|
||||
showAssignee: boolean = false;
|
||||
showAttachForm: boolean = false;
|
||||
|
||||
private peopleSearchObserver: Observer<UserProcessModel[]>;
|
||||
public errorDialogRef: MatDialogRef<TemplateRef<any>>;
|
||||
@@ -187,7 +187,6 @@ 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) {
|
||||
@@ -259,6 +258,9 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
||||
if (clickNotification.target.key === 'assignee') {
|
||||
this.showAssignee = true;
|
||||
}
|
||||
if (clickNotification.target.key === 'formName') {
|
||||
this.showAttachForm = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -290,7 +292,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
||||
}
|
||||
|
||||
isAssigned(): boolean {
|
||||
return this.taskDetails.assignee ? true : false;
|
||||
return !!this.taskDetails.assignee;
|
||||
}
|
||||
|
||||
private hasEmailAddress(): boolean {
|
||||
@@ -364,11 +366,17 @@ 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'));
|
||||
onShowAttachForm() {
|
||||
this.showAttachForm = true;
|
||||
}
|
||||
|
||||
onCancelAttachForm() {
|
||||
this.showAttachForm = false;
|
||||
}
|
||||
|
||||
onCompleteAttachForm() {
|
||||
this.showAttachForm = false;
|
||||
this.loadDetails(this.taskId);
|
||||
}
|
||||
|
||||
onFormContentClick(content: ContentLinkModel): void {
|
||||
|
Reference in New Issue
Block a user