mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3728] Remove the filter name from the custom filter header (#5940)
* [ACA-3728] Remove the filter name from the custom filter header * Updated docs
This commit is contained in:
@@ -49,6 +49,7 @@ Edits task filter details.
|
|||||||
| id | `string` | | (required) ID of the task filter. |
|
| id | `string` | | (required) ID of the task filter. |
|
||||||
| role | `string` | "" | user role. |
|
| role | `string` | "" | user role. |
|
||||||
| showFilterActions | `boolean` | true | Toggles the filter actions. |
|
| showFilterActions | `boolean` | true | Toggles the filter actions. |
|
||||||
|
| showTaskFilterName | `boolean` | true | Toggles display of task filter name |
|
||||||
| showTitle | `boolean` | true | Toggles the title. |
|
| showTitle | `boolean` | true | Toggles the title. |
|
||||||
| sortProperties | `string[]` | | List of sort properties to display. |
|
| sortProperties | `string[]` | | List of sort properties to display. |
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
<mat-expansion-panel (afterExpand)="onExpand()" (closed)="onClose()">
|
<mat-expansion-panel (afterExpand)="onExpand()" (closed)="onClose()">
|
||||||
<mat-expansion-panel-header *ngIf="taskFilter" id="adf-edit-task-filter-expansion-header">
|
<mat-expansion-panel-header *ngIf="taskFilter" id="adf-edit-task-filter-expansion-header">
|
||||||
<ng-container *ngIf="!isLoading; else loadingTemplate">
|
<ng-container *ngIf="!isLoading; else loadingTemplate">
|
||||||
<mat-panel-title fxLayoutAlign="space-between center" id="adf-edit-task-filter-title-id">{{taskFilter.name | translate}}</mat-panel-title>
|
<mat-panel-title *ngIf="showTaskFilterName" fxLayoutAlign="space-between center" id="adf-edit-task-filter-title-id">{{taskFilter.name | translate}}</mat-panel-title>
|
||||||
<mat-panel-description fxLayoutAlign="space-between center" id="adf-edit-task-filter-sub-title-id">
|
<mat-panel-description fxLayoutAlign="space-between center" id="adf-edit-task-filter-sub-title-id">
|
||||||
<span *ngIf="showTitle">{{ 'ADF_CLOUD_EDIT_TASK_FILTER.TITLE' | translate}}</span>
|
<span *ngIf="showTitle">{{ 'ADF_CLOUD_EDIT_TASK_FILTER.TITLE' | translate}}</span>
|
||||||
<div *ngIf="showActions()" class="adf-cloud-edit-task-filter-actions">
|
<div *ngIf="showActions()" class="adf-cloud-edit-task-filter-actions">
|
||||||
|
@@ -99,6 +99,18 @@ describe('EditTaskFilterCloudComponent', () => {
|
|||||||
expect(subTitle.innerText.trim()).toEqual('ADF_CLOUD_EDIT_TASK_FILTER.TITLE');
|
expect(subTitle.innerText.trim()).toEqual('ADF_CLOUD_EDIT_TASK_FILTER.TITLE');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
it('should not display filter name if showFilterName is false', async(() => {
|
||||||
|
const taskFilterIdChange = new SimpleChange(null, 'mock-task-filter-id', true);
|
||||||
|
component.showTaskFilterName = false;
|
||||||
|
component.ngOnChanges({ 'id': taskFilterIdChange });
|
||||||
|
fixture.detectChanges();
|
||||||
|
const title = fixture.debugElement.nativeElement.querySelector('#adf-edit-task-filter-title-id');
|
||||||
|
|
||||||
|
fixture.whenStable().then(() => {
|
||||||
|
expect(title).toBeNull();
|
||||||
|
});
|
||||||
|
}));
|
||||||
|
|
||||||
it('should not display mat-spinner if isloading set to false', async(() => {
|
it('should not display mat-spinner if isloading set to false', async(() => {
|
||||||
const taskFilterIdChange = new SimpleChange(null, 'mock-task-filter-id', true);
|
const taskFilterIdChange = new SimpleChange(null, 'mock-task-filter-id', true);
|
||||||
component.ngOnChanges({ 'id': taskFilterIdChange });
|
component.ngOnChanges({ 'id': taskFilterIdChange });
|
||||||
|
@@ -83,6 +83,10 @@ export class EditTaskFilterCloudComponent implements OnInit, OnChanges, OnDestro
|
|||||||
@Input()
|
@Input()
|
||||||
showTitle = true;
|
showTitle = true;
|
||||||
|
|
||||||
|
/** Toggles display of task filter name */
|
||||||
|
@Input()
|
||||||
|
showTaskFilterName = true;
|
||||||
|
|
||||||
/** Emitted when a task filter property changes. */
|
/** Emitted when a task filter property changes. */
|
||||||
@Output()
|
@Output()
|
||||||
filterChange: EventEmitter<TaskFilterCloudModel> = new EventEmitter();
|
filterChange: EventEmitter<TaskFilterCloudModel> = new EventEmitter();
|
||||||
|
Reference in New Issue
Block a user