mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fix the Task Cloud Filters ordering (#4078)
Navigate on the task details when a row is selected
This commit is contained in:
@@ -69,6 +69,7 @@ import { AppExtensionsModule } from './extensions/extensions.module';
|
||||
import { CloudLayoutComponent } from './components/app-layout/cloud/cloud-layout.component';
|
||||
import { AppsCloudDemoComponent } from './components/app-layout/cloud/apps-cloud-demo.component';
|
||||
import { ProcessesCloudDemoComponent } from './components/app-layout/cloud/processes-cloud-demo.component';
|
||||
import { TaskDetailsCloudDemoComponent } from './components/app-layout/cloud/task-details-cloud-demo.component';
|
||||
import { StartTaskCloudDemoComponent } from './components/app-layout/cloud/start-task-cloud-demo.component';
|
||||
import { CloudBreadcrumbsComponent } from './components/app-layout/cloud/cloud-breadcrumb-component';
|
||||
import { TasksCloudDemoComponent } from './components/app-layout/cloud/tasks-cloud-demo.component';
|
||||
@@ -127,6 +128,7 @@ import { CloudFiltersDemoComponent } from './components/app-layout/cloud/cloud-f
|
||||
AppsCloudDemoComponent,
|
||||
TasksCloudDemoComponent,
|
||||
ProcessesCloudDemoComponent,
|
||||
TaskDetailsCloudDemoComponent,
|
||||
StartTaskCloudDemoComponent,
|
||||
CloudBreadcrumbsComponent,
|
||||
CloudFiltersDemoComponent
|
||||
|
@@ -43,6 +43,7 @@ import { AppComponent } from './app.component';
|
||||
import { TreeViewSampleComponent } from './components/tree-view/tree-view-sample.component';
|
||||
import { CloudLayoutComponent } from './components/app-layout/cloud/cloud-layout.component';
|
||||
import { ProcessesCloudDemoComponent } from './components/app-layout/cloud/processes-cloud-demo.component';
|
||||
import { TaskDetailsCloudDemoComponent } from './components/app-layout/cloud/task-details-cloud-demo.component';
|
||||
import { AppsCloudDemoComponent } from './components/app-layout/cloud/apps-cloud-demo.component';
|
||||
import { TasksCloudDemoComponent } from './components/app-layout/cloud/tasks-cloud-demo.component';
|
||||
import { StartTaskCloudDemoComponent } from './components/app-layout/cloud/start-task-cloud-demo.component';
|
||||
@@ -165,6 +166,10 @@ export const appRoutes: Routes = [
|
||||
{
|
||||
path: 'start-task',
|
||||
component: StartTaskCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'task-details/:taskId',
|
||||
component: TaskDetailsCloudDemoComponent
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -0,0 +1,6 @@
|
||||
|
||||
<button data-automation-id="go-back" mat-icon-button (click)="onGoBack()">
|
||||
<mat-icon>arrow_back</mat-icon> Go Back
|
||||
</button>
|
||||
|
||||
<h4>Simple page to show the taskId: {{ taskId }} of the app: {{ applicationName }}</h4>
|
@@ -0,0 +1,43 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2016 Alfresco Software, Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component } from '@angular/core';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
templateUrl: './task-details-cloud-demo.component.html',
|
||||
styleUrls: ['./task-details-cloud-demo.component.scss']
|
||||
})
|
||||
export class TaskDetailsCloudDemoComponent {
|
||||
|
||||
taskId: string;
|
||||
applicationName: string;
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
this.route.params.subscribe((params) => {
|
||||
this.taskId = params.taskId;
|
||||
});
|
||||
this.route.parent.params.subscribe((params) => {
|
||||
this.applicationName = params.applicationName;
|
||||
});
|
||||
}
|
||||
|
||||
onGoBack() {
|
||||
this.router.navigate([`/cloud/${this.applicationName}/`]);
|
||||
|
||||
}
|
||||
}
|
@@ -18,7 +18,7 @@
|
||||
import { Component, ViewChild, OnInit } from '@angular/core';
|
||||
import { TaskListCloudComponent, TaskListCloudSortingModel, TaskFilterCloudModel } from '@alfresco/adf-process-services-cloud';
|
||||
import { UserPreferencesService } from '@alfresco/adf-core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { CloudLayoutService } from './services/cloud-layout.service';
|
||||
@Component({
|
||||
templateUrl: 'tasks-cloud-demo.component.html',
|
||||
@@ -43,6 +43,7 @@ export class TasksCloudDemoComponent implements OnInit {
|
||||
constructor(
|
||||
private cloudLayoutService: CloudLayoutService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private userPreference: UserPreferencesService) {
|
||||
}
|
||||
|
||||
@@ -63,8 +64,8 @@ export class TasksCloudDemoComponent implements OnInit {
|
||||
this.userPreference.paginationSize = event.maxItems;
|
||||
}
|
||||
|
||||
onRowClick($event) {
|
||||
this.selectedRow = $event;
|
||||
onRowClick(taskId) {
|
||||
this.router.navigate([`/cloud/${this.applicationName}/task-details/${taskId}`]);
|
||||
}
|
||||
|
||||
onFilterChange(filter: any) {
|
||||
|
@@ -153,8 +153,8 @@ export class TaskFilterCloudService {
|
||||
appName: appName,
|
||||
state: 'ASSIGNED',
|
||||
assignment: username,
|
||||
sort: 'id',
|
||||
order: 'ASC'
|
||||
sort: 'createdDate',
|
||||
order: 'DESC'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -171,8 +171,8 @@ export class TaskFilterCloudService {
|
||||
appName: appName,
|
||||
state: 'COMPLETED',
|
||||
assignment: '',
|
||||
sort: 'id',
|
||||
order: 'ASC'
|
||||
sort: 'createdDate',
|
||||
order: 'DESC'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user