diff --git a/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts b/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts index 9d84905918..8ad9141f2d 100644 --- a/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts +++ b/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts @@ -102,7 +102,7 @@ export class ActivitiDemoComponent implements AfterViewInit, OnDestroy, OnInit { taskSchemaColumns: any [] = []; taskPagination: Pagination = { skipCount: 0, - maxItems: 2, + maxItems: 10, totalItems: 0 }; taskPage: number = 0; diff --git a/demo-shell-ng2/app/components/form/form-demo.component.html b/demo-shell-ng2/app/components/form/form-demo.component.html index 8193f015fe..8b41dfbe7c 100644 --- a/demo-shell-ng2/app/components/form/form-demo.component.html +++ b/demo-shell-ng2/app/components/form/form-demo.component.html @@ -1,4 +1,4 @@
- - + +
diff --git a/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.ts b/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.ts index dd4c660d0d..6673a7b996 100644 --- a/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.ts +++ b/ng2-components/ng2-activiti-tasklist/src/components/task-details.component.ts @@ -164,6 +164,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges { if (taskId && !taskId.currentValue) { this.reset(); } else if (taskId && taskId.currentValue) { + this.taskFormName = null; this.loadDetails(taskId.currentValue); } } @@ -197,7 +198,9 @@ export class TaskDetailsComponent implements OnInit, OnChanges { private updateTaskDetails(updateNotification: UpdateNotification) { this.activitiTaskList.updateTask(this.taskId, updateNotification.changed) .subscribe( - () => { this.loadDetails(this.taskId); } + () => { + this.loadDetails(this.taskId); + } ); } @@ -214,7 +217,6 @@ export class TaskDetailsComponent implements OnInit, OnChanges { */ private loadDetails(taskId: string) { this.taskPeople = []; - this.taskFormName = null; this.readOnlyForm = false; if (taskId) { @@ -242,7 +244,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges { } 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 { - this.taskFormName = null; - if (form && form.name) { - this.taskFormName = form.name; - } + this.taskFormName = (form && form.name ? form.name : null); this.formLoaded.emit(form); } @@ -339,7 +338,7 @@ export class TaskDetailsComponent implements OnInit, OnChanges { .subscribe((users) => { users = users.filter((user) => user.id !== this.taskDetails.assignee.id); this.peopleSearchObserver.next(users); - }, error => this.logService.error('Could not load users')); + }, error => this.logService.error('Could not load users')); } onCloseSearch() {