mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3080] Remove selecting first filter by default when no defaults … (#5619)
* [ACA-3080] Remove selecting first filter by default when no defaults are provided * [ACA-3080] Fix demo shell, emit when filter is selected * [ACA-3080] Align demo shell * [ACA-3080] Align task filters demo shell, emit when task filter selected
This commit is contained in:
@@ -63,15 +63,11 @@ export class CloudFiltersDemoComponent implements OnInit {
|
||||
}
|
||||
|
||||
onTaskFilterSelected(filter) {
|
||||
this.cloudLayoutService.setCurrentTaskFilterParam({id: filter && filter.id ? filter.id : ''});
|
||||
const currentFilter = Object.assign({}, filter);
|
||||
this.router.navigate([`/cloud/${this.appName}/tasks/`], { queryParams: currentFilter });
|
||||
this.router.navigate([`/cloud/${this.appName}/tasks/`], { queryParams: filter });
|
||||
}
|
||||
|
||||
onProcessFilterSelected(filter) {
|
||||
this.cloudLayoutService.setCurrentProcessFilterParam({id: filter && filter.id ? filter.id : ''});
|
||||
const currentFilter = Object.assign({}, filter);
|
||||
this.router.navigate([`/cloud/${this.appName}/processes/`], { queryParams: currentFilter });
|
||||
this.router.navigate([`/cloud/${this.appName}/processes/`], { queryParams: filter });
|
||||
}
|
||||
|
||||
onTaskFilterOpen(): boolean {
|
||||
|
@@ -37,6 +37,7 @@ import { Pagination } from '@alfresco/js-api';
|
||||
export class ProcessesCloudDemoComponent implements OnInit, OnDestroy {
|
||||
|
||||
public static ACTION_SAVE_AS = 'saveAs';
|
||||
public static ACTION_DELETE = 'delete';
|
||||
static PROCESS_FILTER_PROPERTY_KEYS = 'adf-edit-process-filter';
|
||||
|
||||
@ViewChild('processCloud')
|
||||
@@ -140,7 +141,12 @@ export class ProcessesCloudDemoComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
onProcessFilterAction(filterAction: any) {
|
||||
this.cloudLayoutService.setCurrentProcessFilterParam({ id: filterAction.filter.id });
|
||||
if (filterAction.actionType === ProcessesCloudDemoComponent.ACTION_DELETE) {
|
||||
this.cloudLayoutService.setCurrentProcessFilterParam({ index: 0 });
|
||||
} else {
|
||||
this.cloudLayoutService.setCurrentProcessFilterParam({ id: filterAction.filter.id });
|
||||
}
|
||||
|
||||
if (filterAction.actionType === ProcessesCloudDemoComponent.ACTION_SAVE_AS) {
|
||||
this.router.navigate([`/cloud/${this.appName}/processes/`], { queryParams: filterAction.filter });
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ import { takeUntil } from 'rxjs/operators';
|
||||
export class TasksCloudDemoComponent implements OnInit, OnDestroy {
|
||||
|
||||
public static ACTION_SAVE_AS = 'saveAs';
|
||||
public static ACTION_DELETE = 'delete';
|
||||
static TASK_FILTER_PROPERTY_KEYS = 'adf-edit-task-filter';
|
||||
|
||||
@ViewChild('taskCloud')
|
||||
@@ -133,7 +134,13 @@ export class TasksCloudDemoComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
onTaskFilterAction(filterAction: any) {
|
||||
this.cloudLayoutService.setCurrentTaskFilterParam({ id: filterAction.filter.id });
|
||||
|
||||
if (filterAction.actionType === TasksCloudDemoComponent.ACTION_DELETE) {
|
||||
this.cloudLayoutService.setCurrentTaskFilterParam({ index: 0 });
|
||||
} else {
|
||||
this.cloudLayoutService.setCurrentTaskFilterParam({ id: filterAction.filter.id });
|
||||
}
|
||||
|
||||
if (filterAction.actionType === TasksCloudDemoComponent.ACTION_SAVE_AS) {
|
||||
this.router.navigate([`/cloud/${this.appName}/tasks/`], { queryParams: filterAction.filter });
|
||||
}
|
||||
|
Reference in New Issue
Block a user