2018-07-08 16:46:13 +02:00
|
|
|
import {Component, EventEmitter, Input, Output} from '@angular/core';
|
2018-10-04 10:33:15 +02:00
|
|
|
import {Fraction} from '../../../utils/fraction.enum';
|
2018-07-08 16:46:13 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'cc-list-filter',
|
|
|
|
templateUrl: './list-filter.component.html',
|
2019-02-25 14:32:29 +01:00
|
|
|
styleUrls: ['./list-filter.component.scss']
|
2018-07-08 16:46:13 +02:00
|
|
|
})
|
|
|
|
export class ListFilterComponent {
|
|
|
|
|
|
|
|
@Input() filterButtons: any[];
|
|
|
|
|
|
|
|
@Input() addButton: any;
|
|
|
|
|
|
|
|
@Output() executeSearch = new EventEmitter();
|
|
|
|
|
|
|
|
@Output() openAddFrom = new EventEmitter();
|
|
|
|
|
2018-10-04 10:33:15 +02:00
|
|
|
readonly fraction = Fraction;
|
|
|
|
|
2018-07-08 16:46:13 +02:00
|
|
|
constructor() {
|
|
|
|
}
|
|
|
|
|
|
|
|
execute(group) {
|
|
|
|
this.executeSearch.emit(group);
|
|
|
|
}
|
|
|
|
|
|
|
|
add() {
|
|
|
|
this.openAddFrom.emit();
|
|
|
|
}
|
|
|
|
}
|