Add key filtering
This commit is contained in:
parent
274fa67a53
commit
da53c87a68
|
@ -49,12 +49,13 @@ describe('FilterComponent', () => {
|
|||
});
|
||||
|
||||
it('should be able to clear all fields after pressing clear button', () => {
|
||||
component.filter = new FilterModel('a','a','a','a');
|
||||
component.filter = new FilterModel('a','a','a','a','a');
|
||||
debugElement.querySelector('[title="Clear"]').click();
|
||||
expect(component.filter.name).toBe('');
|
||||
expect(component.filter.description).toBe('');
|
||||
expect(component.filter.owner).toBe('');
|
||||
expect(component.filter.type).toBe('');
|
||||
expect(component.filter.key).toBe('');
|
||||
});
|
||||
|
||||
it('should be able to select a type and return it based on a number', () => {
|
||||
|
|
|
@ -5,11 +5,13 @@ export class FilterModel {
|
|||
name:string;
|
||||
description:string;
|
||||
owner:string;
|
||||
constructor(type:string = '', name:string = '', description:string = '', owner:string = ''){
|
||||
key: string;
|
||||
constructor(type:string = '', name:string = '', description:string = '', owner:string = '', key:string = ''){
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
this.description= description;
|
||||
this.owner = owner;
|
||||
this.key = key;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -116,10 +116,10 @@ describe('WorkbasketListComponent', () => {
|
|||
});
|
||||
|
||||
it('should have performRequest after performFilter is triggered', fakeAsync( () => {
|
||||
let type='PERSONAL', name = 'someName', description = 'someDescription', owner = 'someOwner'
|
||||
let filter = new FilterModel(type, name, description, owner);
|
||||
let type='PERSONAL', name = 'someName', description = 'someDescription', owner = 'someOwner', key = 'someKey';
|
||||
let filter = new FilterModel(type, name, description, owner, key );
|
||||
component.performFilter(filter);
|
||||
expect(workbasketService.getWorkBasketsSummary).toHaveBeenCalledWith('key', 'asc', undefined, name, description, undefined, owner, type );
|
||||
expect(workbasketService.getWorkBasketsSummary).toHaveBeenCalledWith('key', 'asc', undefined, name, description, undefined, owner, type, undefined, key );
|
||||
|
||||
}));
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ export class WorkbasketListComponent implements OnInit {
|
|||
this.workbaskets = undefined;
|
||||
this.workbasketServiceSubscription.add(this.workbasketService.getWorkBasketsSummary(this.sortBy, this.sortDirection, undefined,
|
||||
this.filterBy.name, this.filterBy.description, undefined, this.filterBy.owner,
|
||||
this.filterBy.type).subscribe(resultList => {
|
||||
this.filterBy.type, undefined, this.filterBy.key).subscribe(resultList => {
|
||||
this.workbaskets = resultList;
|
||||
this.requestInProgress = false;
|
||||
}));
|
||||
|
|
|
@ -115,9 +115,8 @@
|
|||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.margin-right
|
||||
{
|
||||
margin-right: 5px;
|
||||
.margin-right {
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.no-border-bottom {
|
||||
|
@ -191,6 +190,10 @@ li > div.row > dl {
|
|||
color: crimson;
|
||||
}
|
||||
|
||||
.dropdown-menu-users >li {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.btn-users-list {
|
||||
border: 0px solid transparent;
|
||||
/* this was 1px earlier */
|
||||
|
|
Loading…
Reference in New Issue