mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
[ACA-3727] - Process Filters add possibility to hide process filter name (#5938)
* [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:
parent
3b4ce819f0
commit
bfbb66ea8e
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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user