mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
Merge development branch
# Conflicts: # ng2-components/ng2-activiti-tasklist/index.ts # ng2-components/ng2-activiti-tasklist/src/components/activiti-filters.com ponent.spec.ts # ng2-components/ng2-activiti-tasklist/src/components/activiti-task-detail s.component.ts # ng2-components/ng2-activiti-tasklist/src/components/activiti-tasklist.co mponent.spec.ts # ng2-components/ng2-alfresco-login/demo/package.json
This commit is contained in:
@@ -20,7 +20,8 @@ import {
|
||||
AppDefinitionRepresentationModel,
|
||||
FilterRepresentationModel,
|
||||
UserTaskFilterRepresentationModel,
|
||||
ActivitiApps
|
||||
ActivitiApps,
|
||||
ActivitiTaskList
|
||||
} from 'ng2-activiti-tasklist';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Subscription } from 'rxjs/Rx';
|
||||
@@ -40,8 +41,6 @@ declare var componentHandler;
|
||||
})
|
||||
export class ActivitiDemoComponent implements AfterViewChecked {
|
||||
|
||||
currentChoice: string = 'task-list';
|
||||
|
||||
@ViewChild('activitiapps')
|
||||
activitiapps: ActivitiApps;
|
||||
|
||||
@@ -52,7 +51,7 @@ export class ActivitiDemoComponent implements AfterViewChecked {
|
||||
activitidetails: any;
|
||||
|
||||
@ViewChild('activititasklist')
|
||||
activititasklist: any;
|
||||
activititasklist: ActivitiTaskList;
|
||||
|
||||
@ViewChild('activitiprocessfilter')
|
||||
activitiprocessfilter: any;
|
||||
@@ -63,6 +62,15 @@ export class ActivitiDemoComponent implements AfterViewChecked {
|
||||
@ViewChild('activitiprocessdetails')
|
||||
activitiprocessdetails: any;
|
||||
|
||||
@ViewChild('tabmain')
|
||||
tabMain: any;
|
||||
|
||||
@ViewChild('tabheader')
|
||||
tabHeader: any;
|
||||
|
||||
@Input()
|
||||
appId: number;
|
||||
|
||||
layoutType: string;
|
||||
currentTaskId: string;
|
||||
currentProcessInstanceId: string;
|
||||
@@ -78,21 +86,6 @@ export class ActivitiDemoComponent implements AfterViewChecked {
|
||||
dataTasks: ObjectDataTableAdapter;
|
||||
dataProcesses: ObjectDataTableAdapter;
|
||||
|
||||
@Input()
|
||||
appId: number;
|
||||
|
||||
setChoice($event) {
|
||||
this.currentChoice = $event.target.value;
|
||||
}
|
||||
|
||||
isProcessListSelected() {
|
||||
return this.currentChoice === 'process-list';
|
||||
}
|
||||
|
||||
isTaskListSelected() {
|
||||
return this.currentChoice === 'task-list';
|
||||
}
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
this.dataTasks = new ObjectDataTableAdapter(
|
||||
[],
|
||||
@@ -131,6 +124,16 @@ export class ActivitiDemoComponent implements AfterViewChecked {
|
||||
|
||||
this.processFilter = null;
|
||||
this.currentProcessInstanceId = null;
|
||||
|
||||
this.changeTab('apps', 'tasks');
|
||||
}
|
||||
|
||||
changeTab(origin: string, destination: string) {
|
||||
this.tabMain.nativeElement.children[origin].classList.remove('is-active');
|
||||
this.tabMain.nativeElement.children[destination].classList.add('is-active');
|
||||
|
||||
this.tabHeader.nativeElement.children[`${origin}-header`].classList.remove('is-active');
|
||||
this.tabHeader.nativeElement.children[`${destination}-header`].classList.add('is-active');
|
||||
}
|
||||
|
||||
onTaskFilterClick(event: FilterRepresentationModel) {
|
||||
@@ -141,6 +144,10 @@ export class ActivitiDemoComponent implements AfterViewChecked {
|
||||
this.taskFilter = this.activitifilter.getCurrentFilter();
|
||||
}
|
||||
|
||||
onStartTaskSuccess(event: any) {
|
||||
this.activititasklist.reload();
|
||||
}
|
||||
|
||||
onSuccessTaskList(event: UserTaskFilterRepresentationModel) {
|
||||
this.currentTaskId = this.activititasklist.getCurrentTaskId();
|
||||
}
|
||||
|
Reference in New Issue
Block a user