mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2788] Filter task url involved (#3243)
* filter task url involved * task filter observer removed * tests fix * clean code
This commit is contained in:
committed by
Maurizio Vitale
parent
e8f1986d5d
commit
b58a24c126
@@ -125,6 +125,11 @@ export const appRoutes: Routes = [
|
||||
component: ProcessServiceComponent,
|
||||
canActivate: [AuthGuardBpm]
|
||||
},
|
||||
{
|
||||
path: 'activiti/apps/:appId/tasks/:filterId',
|
||||
component: ProcessServiceComponent,
|
||||
canActivate: [AuthGuardBpm]
|
||||
},
|
||||
{
|
||||
path: 'activiti/apps/:appId/processes',
|
||||
component: ProcessServiceComponent,
|
||||
|
@@ -17,7 +17,7 @@
|
||||
<adf-accordion-group [heading]="'Tasks'" [isSelected]="true" [isOpen]="true"
|
||||
[headingIcon]="'assignment'">
|
||||
<adf-filters
|
||||
[filterParam]="{name:'MY tasks'}"
|
||||
[filterParam]="filterSelected"
|
||||
[appId]="appId"
|
||||
[hasIcon]="false"
|
||||
(filterClick)="onTaskFilterClick($event)"
|
||||
|
@@ -109,6 +109,9 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
@Input()
|
||||
appId: number = null;
|
||||
|
||||
@Input()
|
||||
filterSelected: object = null;
|
||||
|
||||
@Output()
|
||||
changePageSize: EventEmitter<Pagination> = new EventEmitter();
|
||||
|
||||
@@ -213,6 +216,9 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
}
|
||||
this.sub = this.route.params.subscribe(params => {
|
||||
const applicationId = params['appId'];
|
||||
|
||||
this.filterSelected = params['filterId'] ? { id: params['filterId'] } : { index: 0 };
|
||||
|
||||
if (applicationId && applicationId !== '0') {
|
||||
this.appId = params['appId'];
|
||||
}
|
||||
@@ -234,6 +240,7 @@ export class ProcessServiceComponent implements AfterViewInit, OnDestroy, OnInit
|
||||
onTaskFilterClick(filter: FilterRepresentationModel): void {
|
||||
this.applyTaskFilter(filter);
|
||||
this.resetTaskPaginationPage();
|
||||
this.router.navigate(['/activiti/apps', this.appId || 0, 'tasks', filter.id]);
|
||||
}
|
||||
|
||||
resetTaskPaginationPage() {
|
||||
|
Reference in New Issue
Block a user