[ACA-3727] - Process Filters add possibility to hide process filter name ()

* [ACA-3727] - Process Filters add possibility to hide process filter name

* update documentation

* remove unnecesary changes in doc

* update doc

Co-authored-by: Silviu Popa <p3701014@L3700101120.ness.com>
This commit is contained in:
Silviu Popa 2020-08-02 01:40:43 +03:00 committed by GitHub
parent 3b4ce819f0
commit bfbb66ea8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 1 deletions
docs/process-services-cloud/components
lib/process-services-cloud/src/lib/process/process-filters/components

@ -49,6 +49,7 @@ Shows/edits process filter details.
| id | `string` | | Id of the process instance filter. |
| role | `string` | "" | roles to filter the apps |
| showFilterActions | `boolean` | true | Toggles editing of process filter actions. |
| showProcessFilterName | `boolean` | true | Toggles the appearance of the process filter name . |
| showTitle | `boolean` | true | Toggles editing of the process filter title. |
| sortProperties | `string[]` | | List of sort properties to display. |

@ -2,7 +2,7 @@
<mat-expansion-panel (afterExpand)="onExpand()" (closed)="onClose()">
<mat-expansion-panel-header *ngIf="processFilter" id="adf-edit-process-filter-expansion-header">
<ng-container *ngIf="!isLoading; else loadingTemplate">
<mat-panel-title fxLayoutAlign="space-between center" id="adf-edit-process-filter-title-id">{{processFilter.name | translate}}</mat-panel-title>
<mat-panel-title *ngIf="showProcessFilterName" fxLayoutAlign="space-between center" id="adf-edit-process-filter-title-id">{{processFilter.name | translate}}</mat-panel-title>
<mat-panel-description fxLayoutAlign="space-between center" id="adf-edit-process-filter-sub-title-id">
<span *ngIf="showTitle"> {{ 'ADF_CLOUD_EDIT_PROCESS_FILTER.TITLE' | translate}}</span>
<div *ngIf="showActions()" class="adf-cloud-edit-process-filter-actions">

@ -113,6 +113,7 @@ describe('EditProcessFilterCloudComponent', () => {
it('should display filter name as title', async(() => {
const processFilterIdChange = new SimpleChange(null, 'mock-process-filter-id', true);
component.showProcessFilterName = true;
component.ngOnChanges({ 'id': processFilterIdChange });
fixture.detectChanges();
const title = fixture.debugElement.nativeElement.querySelector('#adf-edit-process-filter-title-id');
@ -126,6 +127,18 @@ describe('EditProcessFilterCloudComponent', () => {
});
}));
it('should not display filter name as title if the flag is false', async(() => {
const processFilterIdChange = new SimpleChange(null, 'mock-process-filter-id', true);
component.showProcessFilterName = false;
component.ngOnChanges({ 'id': processFilterIdChange });
fixture.detectChanges();
const title = fixture.debugElement.nativeElement.querySelector('#adf-edit-process-filter-title-id');
fixture.whenStable().then(() => {
expect(title).toBeNull();
});
}));
it('should not display mat-spinner if isloading set to false', async(() => {
const processFilterIdChange = new SimpleChange(null, 'mock-process-filter-id', true);
component.ngOnChanges({ 'id': processFilterIdChange });

@ -86,6 +86,10 @@ export class EditProcessFilterCloudComponent implements OnInit, OnChanges, OnDes
@Input()
showTitle = true;
/** Toggles the appearance of the process filter name . */
@Input()
showProcessFilterName = true;
/** Emitted when a process instance filter property changes. */
@Output()
filterChange: EventEmitter<ProcessFilterCloudModel> = new EventEmitter();