mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4123] Process Cloud Instance Details Header component (#4418)
* [ADF-4123] Added service to get process instance details * [ADF-4123] Added process header component * [ADF-4123] Added more properties to model * [ADF-4123] Exported process sidebar * [ADF-4123] Added new process instance details demo component * [ADF-4123] Added tests for module * [ADF-4123] Added tests for process-header * [ADF-4123] Added documentation
This commit is contained in:
committed by
Eugenio Romano
parent
0b218f0978
commit
574cc9c1a6
@@ -79,6 +79,7 @@ import { TemplateDemoComponent } from './components/template-list/template-demo.
|
||||
import { PeopleGroupCloudDemoComponent } from './components/app-layout/cloud/people-groups-cloud-demo.component';
|
||||
import { CloudSettingsComponent } from './components/app-layout/cloud/cloud-settings.component';
|
||||
import { AppExtensionsModule } from './app-extension.module';
|
||||
import { ProcessDetailsCloudDemoComponent } from './components/app-layout/cloud/process-details-cloud-demo.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -137,6 +138,7 @@ import { AppExtensionsModule } from './app-extension.module';
|
||||
TasksCloudDemoComponent,
|
||||
ProcessesCloudDemoComponent,
|
||||
TaskDetailsCloudDemoComponent,
|
||||
ProcessDetailsCloudDemoComponent,
|
||||
StartTaskCloudDemoComponent,
|
||||
StartProcessCloudDemoComponent,
|
||||
CloudBreadcrumbsComponent,
|
||||
|
@@ -48,6 +48,7 @@ import { StartTaskCloudDemoComponent } from './components/app-layout/cloud/start
|
||||
import { StartProcessCloudDemoComponent } from './components/app-layout/cloud/start-process-cloud-demo.component';
|
||||
import { TemplateDemoComponent } from './components/template-list/template-demo.component';
|
||||
import { PeopleGroupCloudDemoComponent } from './components/app-layout/cloud/people-groups-cloud-demo.component';
|
||||
import { ProcessDetailsCloudDemoComponent } from './components/app-layout/cloud/process-details-cloud-demo.component';
|
||||
|
||||
export const appRoutes: Routes = [
|
||||
{ path: 'login', component: LoginComponent },
|
||||
@@ -182,7 +183,12 @@ export const appRoutes: Routes = [
|
||||
{
|
||||
path: 'task-details/:taskId',
|
||||
component: TaskDetailsCloudDemoComponent
|
||||
},
|
||||
{
|
||||
path: 'process-details/:processInstanceId',
|
||||
component: ProcessDetailsCloudDemoComponent
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
|
@@ -0,0 +1,11 @@
|
||||
|
||||
<button data-automation-id="go-back" mat-icon-button (click)="onGoBack()">
|
||||
<mat-icon>arrow_back</mat-icon> Go Back
|
||||
</button>
|
||||
|
||||
<h4 data-automation-id="process-details-header">Simple page to show the process instance: {{ processInstanceId }} of the app: {{ appName }}</h4>
|
||||
|
||||
<adf-cloud-process-header
|
||||
[appName]="appName"
|
||||
[processInstanceId]="processInstanceId">
|
||||
</adf-cloud-process-header>
|
@@ -0,0 +1,43 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright 2019 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: './process-details-cloud-demo.component.html',
|
||||
styleUrls: ['./process-details-cloud-demo.component.scss']
|
||||
})
|
||||
export class ProcessDetailsCloudDemoComponent {
|
||||
|
||||
processInstanceId: string;
|
||||
appName: string;
|
||||
|
||||
constructor(private route: ActivatedRoute, private router: Router) {
|
||||
this.route.params.subscribe((params) => {
|
||||
this.processInstanceId = params.processInstanceId;
|
||||
});
|
||||
|
||||
this.route.parent.params.subscribe((params) => {
|
||||
this.appName = params.appName;
|
||||
});
|
||||
}
|
||||
|
||||
onGoBack() {
|
||||
this.router.navigate([`/cloud/${this.appName}/`]);
|
||||
}
|
||||
}
|
@@ -100,8 +100,8 @@ export class ProcessesCloudDemoComponent implements OnInit {
|
||||
this.selectedRows = [];
|
||||
}
|
||||
|
||||
onRowClick($event) {
|
||||
this.selectedRow = $event;
|
||||
onRowClick(processInstanceId) {
|
||||
this.router.navigate([`/cloud/${this.appName}/process-details/${processInstanceId}`]);
|
||||
}
|
||||
|
||||
onFilterChange(query: any) {
|
||||
|
Reference in New Issue
Block a user