mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-1022] Fix components to work on Community environments (#5296)
* [AAE-1022] Fix components to work on Community environments * Remove appName input
This commit is contained in:
committed by
Eugenio Romano
parent
0897d372a6
commit
dead0087f4
@@ -84,10 +84,7 @@ import { environment } from '../environments/environment';
|
||||
import { AppCloudSharedModule } from './components/cloud/shared/cloud.shared.module';
|
||||
import { DemoErrorComponent } from './components/error/demo-error.component';
|
||||
import {
|
||||
ProcessServicesCloudModule,
|
||||
UserPreferenceCloudService,
|
||||
PROCESS_FILTERS_SERVICE_TOKEN,
|
||||
TASK_FILTERS_SERVICE_TOKEN
|
||||
ProcessServicesCloudModule
|
||||
} from '@alfresco/adf-process-services-cloud';
|
||||
|
||||
import { registerLocaleData } from '@angular/common';
|
||||
@@ -199,8 +196,6 @@ registerLocaleData(localeSv);
|
||||
provide: HTTP_INTERCEPTORS, useClass:
|
||||
AuthBearerInterceptor, multi: true
|
||||
},
|
||||
{ provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService },
|
||||
{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService },
|
||||
{ provide: AppConfigService, useClass: DebugAppConfigService }, // not use this service in production
|
||||
{
|
||||
provide: TRANSLATION_PROVIDER,
|
||||
|
@@ -33,8 +33,6 @@ import { CloudLayoutService } from '../services/cloud-layout.service';
|
||||
})
|
||||
export class CommunityCloudComponent {
|
||||
|
||||
appName: string = '';
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
|
@@ -7,7 +7,6 @@
|
||||
</mat-expansion-panel-header>
|
||||
<adf-cloud-task-filters
|
||||
*ngIf="expandTaskFilter"
|
||||
[appName]="appName"
|
||||
[showIcons]="true"
|
||||
[filterParam]="currentTaskFilter$ | async"
|
||||
(filterClick)="onTaskFilterSelected($event)">
|
||||
@@ -22,7 +21,6 @@
|
||||
</mat-expansion-panel-header>
|
||||
<adf-cloud-process-filters
|
||||
*ngIf="expandProcessFilter"
|
||||
[appName]="appName"
|
||||
[showIcons]="true"
|
||||
[filterParam]="currentProcessFilter$ | async"
|
||||
(filterClick)="onProcessFilterSelected($event)">
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, ViewEncapsulation, Input, OnInit } from '@angular/core';
|
||||
import { Component, ViewEncapsulation, OnInit } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { CloudLayoutService } from '../services/cloud-layout.service';
|
||||
@@ -26,9 +26,6 @@ import { CloudLayoutService } from '../services/cloud-layout.service';
|
||||
})
|
||||
export class CommunityCloudFiltersDemoComponent implements OnInit {
|
||||
|
||||
@Input()
|
||||
appName: string = 'community';
|
||||
|
||||
currentTaskFilter$: Observable<any>;
|
||||
currentProcessFilter$: Observable<any>;
|
||||
|
||||
|
@@ -3,14 +3,13 @@
|
||||
<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>
|
||||
<h4 data-automation-id="process-details-header">Simple page to show the process instance: {{ processInstanceId }}</h4>
|
||||
|
||||
<div class="app-process-cloud-container">
|
||||
|
||||
<adf-cloud-task-list
|
||||
fxFlex
|
||||
class="app-cloud-layout-overflow"
|
||||
[appName]="''"
|
||||
[processInstanceId]="processInstanceId"
|
||||
(rowClick)="onRowClick($event)"
|
||||
#taskCloud>
|
||||
@@ -18,7 +17,6 @@
|
||||
|
||||
<adf-cloud-process-header
|
||||
class="app-process-cloud-header"
|
||||
[appName]="''"
|
||||
[processInstanceId]="processInstanceId">
|
||||
</adf-cloud-process-header>
|
||||
</div>
|
||||
|
@@ -25,16 +25,11 @@ import { ActivatedRoute, Router } from '@angular/router';
|
||||
export class CommunityProcessDetailsCloudDemoComponent {
|
||||
|
||||
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() {
|
||||
|
@@ -1,7 +1,6 @@
|
||||
<div fxLayout="column" fxFill fxLayoutGap="2px">
|
||||
<adf-cloud-edit-process-filter
|
||||
[id]="filterId"
|
||||
[appName]="'community'"
|
||||
[filterProperties]="processFilterProperties.filterProperties"
|
||||
[sortProperties]="processFilterProperties.sortProperties"
|
||||
[actions]="processFilterProperties.actions"
|
||||
@@ -11,7 +10,6 @@
|
||||
<div fxLayout="column" fxFlex fxLayoutAlign="space-between" *ngIf="editedFilter">
|
||||
<adf-cloud-process-list #processCloud
|
||||
fxFlex
|
||||
[appName]="''"
|
||||
class="app-cloud-layout-overflow"
|
||||
[initiator]="editedFilter.initiator"
|
||||
[processDefinitionId]="editedFilter.processDefinitionId"
|
||||
|
@@ -44,9 +44,7 @@ export class CommunityProcessesCloudDemoComponent implements OnInit, OnDestroy {
|
||||
@ViewChild('processFiltersCloud')
|
||||
processFiltersCloud: ProcessFiltersCloudComponent;
|
||||
|
||||
appName: string = '';
|
||||
isFilterLoaded: boolean;
|
||||
|
||||
filterId: string = '';
|
||||
sortArray: any = [];
|
||||
selectedRow: any;
|
||||
@@ -79,10 +77,6 @@ export class CommunityProcessesCloudDemoComponent implements OnInit, OnDestroy {
|
||||
ngOnInit() {
|
||||
this.isFilterLoaded = false;
|
||||
|
||||
this.route.parent.params.subscribe((params) => {
|
||||
this.appName = params.appName;
|
||||
});
|
||||
|
||||
this.route.queryParams.subscribe((params) => {
|
||||
if (Object.keys(params).length > 0) {
|
||||
this.isFilterLoaded = true;
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<adf-cloud-start-process
|
||||
[name]="processName"
|
||||
[appName]="''"
|
||||
(error)="openSnackMessage($event)"
|
||||
(success)="onStartProcessSuccess()"
|
||||
(cancel)="onCancelStartProcess()">
|
||||
|
@@ -1,5 +1,4 @@
|
||||
<adf-cloud-start-task
|
||||
[appName]="''"
|
||||
(error)="openSnackMessage($event)"
|
||||
(success)="onStartTaskSuccess()"
|
||||
(cancel)="onCancelStartTask()">
|
||||
|
@@ -1,7 +1,6 @@
|
||||
<div fxLayout="column" fxFill fxLayoutGap="2px">
|
||||
<adf-cloud-edit-task-filter
|
||||
[id]="filterId"
|
||||
[appName]="'community'"
|
||||
[filterProperties]="taskFilterProperties.filterProperties"
|
||||
[sortProperties]="taskFilterProperties.sortProperties"
|
||||
[actions]="taskFilterProperties.actions"
|
||||
@@ -11,7 +10,6 @@
|
||||
<div fxLayout="column" fxFlex fxLayoutAlign="space-between" *ngIf="editedFilter">
|
||||
<adf-cloud-task-list #taskCloud
|
||||
fxFlex
|
||||
[appName]="''"
|
||||
class="app-cloud-layout-overflow"
|
||||
[processDefinitionId]="editedFilter.processDefinitionId"
|
||||
[processInstanceId]="editedFilter.processInstanceId"
|
||||
|
@@ -1,10 +1,9 @@
|
||||
<h4 data-automation-id="task-details-header">Simple page to show the taskId: {{ taskId }} of the app: {{ appName }}</h4>
|
||||
<h4 data-automation-id="task-details-header">Simple page to show the taskId: {{ taskId }}</h4>
|
||||
|
||||
<div fxLayout="column" fxFill fxLayoutGap="2px">
|
||||
<div fxLayout="row" fxFill>
|
||||
<div fxLayout="column" fxFlex="80%">
|
||||
<adf-cloud-task-form
|
||||
[appName]="''"
|
||||
[taskId]="taskId"
|
||||
(cancelClick)="goBack()"
|
||||
(taskClaimed)="onClaimTask()"
|
||||
@@ -14,7 +13,6 @@
|
||||
</adf-cloud-task-form>
|
||||
</div>
|
||||
<adf-cloud-task-header fxFlex
|
||||
[appName]="''"
|
||||
[taskId]="taskId">
|
||||
</adf-cloud-task-header>
|
||||
</div>
|
||||
|
@@ -26,7 +26,6 @@ import { NotificationService } from '@alfresco/adf-core';
|
||||
export class CommunityTaskDetailsCloudDemoComponent {
|
||||
|
||||
taskId: string;
|
||||
appName: string;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
@@ -36,13 +35,10 @@ export class CommunityTaskDetailsCloudDemoComponent {
|
||||
this.route.params.subscribe((params) => {
|
||||
this.taskId = params.taskId;
|
||||
});
|
||||
this.route.parent.params.subscribe((params) => {
|
||||
this.appName = params.appName;
|
||||
});
|
||||
}
|
||||
|
||||
isTaskValid(): boolean {
|
||||
return this.appName !== undefined && this.taskId !== undefined;
|
||||
return this.taskId !== undefined;
|
||||
}
|
||||
|
||||
goBack() {
|
||||
|
Reference in New Issue
Block a user