mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
clean form name in task header only when change task id (#2291)
This commit is contained in:
committed by
Mario Romano
parent
0ff268108f
commit
2cd3c9c233
@@ -102,7 +102,7 @@ export class ActivitiDemoComponent implements AfterViewInit, OnDestroy, OnInit {
|
|||||||
taskSchemaColumns: any [] = [];
|
taskSchemaColumns: any [] = [];
|
||||||
taskPagination: Pagination = {
|
taskPagination: Pagination = {
|
||||||
skipCount: 0,
|
skipCount: 0,
|
||||||
maxItems: 2,
|
maxItems: 10,
|
||||||
totalItems: 0
|
totalItems: 0
|
||||||
};
|
};
|
||||||
taskPage: number = 0;
|
taskPage: number = 0;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<activiti-form [form]="form">
|
<adf-form [form]="form">
|
||||||
</activiti-form>
|
</adf-form>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -164,6 +164,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
|||||||
if (taskId && !taskId.currentValue) {
|
if (taskId && !taskId.currentValue) {
|
||||||
this.reset();
|
this.reset();
|
||||||
} else if (taskId && taskId.currentValue) {
|
} else if (taskId && taskId.currentValue) {
|
||||||
|
this.taskFormName = null;
|
||||||
this.loadDetails(taskId.currentValue);
|
this.loadDetails(taskId.currentValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,7 +198,9 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
|||||||
private updateTaskDetails(updateNotification: UpdateNotification) {
|
private updateTaskDetails(updateNotification: UpdateNotification) {
|
||||||
this.activitiTaskList.updateTask(this.taskId, updateNotification.changed)
|
this.activitiTaskList.updateTask(this.taskId, updateNotification.changed)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
() => { this.loadDetails(this.taskId); }
|
() => {
|
||||||
|
this.loadDetails(this.taskId);
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,7 +217,6 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
|||||||
*/
|
*/
|
||||||
private loadDetails(taskId: string) {
|
private loadDetails(taskId: string) {
|
||||||
this.taskPeople = [];
|
this.taskPeople = [];
|
||||||
this.taskFormName = null;
|
|
||||||
this.readOnlyForm = false;
|
this.readOnlyForm = false;
|
||||||
|
|
||||||
if (taskId) {
|
if (taskId) {
|
||||||
@@ -242,7 +244,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isAssignedToMe(): boolean {
|
isAssignedToMe(): boolean {
|
||||||
return this.taskDetails.assignee.email === this.authService.getBpmUsername() ? true : false;
|
return this.taskDetails.assignee.email === this.authService.getBpmUsername();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -294,10 +296,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onFormLoaded(form: FormModel): void {
|
onFormLoaded(form: FormModel): void {
|
||||||
this.taskFormName = null;
|
this.taskFormName = (form && form.name ? form.name : null);
|
||||||
if (form && form.name) {
|
|
||||||
this.taskFormName = form.name;
|
|
||||||
}
|
|
||||||
this.formLoaded.emit(form);
|
this.formLoaded.emit(form);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user