mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-06-02 17:35:08 +00:00
Fix check taskList exist (#2375)
This commit is contained in:
parent
66cd368c52
commit
17d0525c24
@ -92,7 +92,7 @@ export class ActivitiDemoComponent implements AfterViewInit, OnDestroy, OnInit {
|
|||||||
fileShowed: boolean = false;
|
fileShowed: boolean = false;
|
||||||
selectFirstReport: boolean = false;
|
selectFirstReport: boolean = false;
|
||||||
|
|
||||||
private tabs = { tasks : 0 , processes : 1, reports: 2};
|
private tabs = { tasks: 0, processes: 1, reports: 2 };
|
||||||
|
|
||||||
content: Blob;
|
content: Blob;
|
||||||
contentName: string;
|
contentName: string;
|
||||||
@ -101,14 +101,14 @@ export class ActivitiDemoComponent implements AfterViewInit, OnDestroy, OnInit {
|
|||||||
currentTaskId: string;
|
currentTaskId: string;
|
||||||
currentProcessInstanceId: string;
|
currentProcessInstanceId: string;
|
||||||
|
|
||||||
taskSchemaColumns: any [] = [];
|
taskSchemaColumns: any[] = [];
|
||||||
taskPagination: Pagination = {
|
taskPagination: Pagination = {
|
||||||
skipCount: 0,
|
skipCount: 0,
|
||||||
maxItems: 10,
|
maxItems: 10,
|
||||||
totalItems: 0
|
totalItems: 0
|
||||||
};
|
};
|
||||||
taskPage: number = 0;
|
taskPage: number = 0;
|
||||||
processSchemaColumns: any [] = [];
|
processSchemaColumns: any[] = [];
|
||||||
|
|
||||||
activeTab: number = this.tabs.tasks; // tasks|processes|reports
|
activeTab: number = this.tabs.tasks; // tasks|processes|reports
|
||||||
|
|
||||||
@ -212,13 +212,13 @@ export class ActivitiDemoComponent implements AfterViewInit, OnDestroy, OnInit {
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.taskListService.tasksList$.subscribe(
|
this.taskListService.tasksList$.subscribe(
|
||||||
(tasks) => {
|
(tasks) => {
|
||||||
this.taskPagination = {count: tasks.data.length, maxItems: this.taskPagination.maxItems, skipCount: this.taskPagination.skipCount, totalItems: tasks.total};
|
this.taskPagination = { count: tasks.data.length, maxItems: this.taskPagination.maxItems, skipCount: this.taskPagination.skipCount, totalItems: tasks.total };
|
||||||
console.log({count: tasks.data.length, maxItems: this.taskPagination.maxItems, skipCount: this.taskPagination.skipCount, totalItems: tasks.total});
|
console.log({ count: tasks.data.length, maxItems: this.taskPagination.maxItems, skipCount: this.taskPagination.skipCount, totalItems: tasks.total });
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
console.log('err');
|
console.log('err');
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.router.url.includes('processes') ) {
|
if (this.router.url.includes('processes')) {
|
||||||
this.activeTab = this.tabs.processes;
|
this.activeTab = this.tabs.processes;
|
||||||
}
|
}
|
||||||
this.sub = this.route.params.subscribe(params => {
|
this.sub = this.route.params.subscribe(params => {
|
||||||
@ -411,8 +411,10 @@ export class ActivitiDemoComponent implements AfterViewInit, OnDestroy, OnInit {
|
|||||||
created: event.value.created
|
created: event.value.created
|
||||||
});
|
});
|
||||||
this.activitifilter.selectFilter(null);
|
this.activitifilter.selectFilter(null);
|
||||||
this.taskList.setCustomDataSource([processTaskDataRow]);
|
if (this.taskList) {
|
||||||
this.taskList.selectTask(taskId);
|
this.taskList.setCustomDataSource([processTaskDataRow]);
|
||||||
|
this.taskList.selectTask(taskId);
|
||||||
|
}
|
||||||
this.currentTaskId = taskId;
|
this.currentTaskId = taskId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user