diff options
Diffstat (limited to 'client/src/app/shared/shared-forms/advanced-input-filter.component.ts')
-rw-r--r-- | client/src/app/shared/shared-forms/advanced-input-filter.component.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-forms/advanced-input-filter.component.ts b/client/src/app/shared/shared-forms/advanced-input-filter.component.ts new file mode 100644 index 000000000..394090751 --- /dev/null +++ b/client/src/app/shared/shared-forms/advanced-input-filter.component.ts | |||
@@ -0,0 +1,27 @@ | |||
1 | import { Component, EventEmitter, Input, Output } from '@angular/core' | ||
2 | import { Params } from '@angular/router' | ||
3 | |||
4 | export type AdvancedInputFilter = { | ||
5 | label: string | ||
6 | queryParams: Params | ||
7 | } | ||
8 | |||
9 | @Component({ | ||
10 | selector: 'my-advanced-input-filter', | ||
11 | templateUrl: './advanced-input-filter.component.html', | ||
12 | styleUrls: [ './advanced-input-filter.component.scss' ] | ||
13 | }) | ||
14 | export class AdvancedInputFilterComponent { | ||
15 | @Input() filters: AdvancedInputFilter[] = [] | ||
16 | |||
17 | @Output() resetTableFilter = new EventEmitter<void>() | ||
18 | @Output() search = new EventEmitter<Event>() | ||
19 | |||
20 | onSearch (event: Event) { | ||
21 | this.search.emit(event) | ||
22 | } | ||
23 | |||
24 | onResetTableFilter () { | ||
25 | this.resetTableFilter.emit() | ||
26 | } | ||
27 | } | ||