move quick filters
This commit is contained in:
parent
7483c2b49b
commit
7e66364b88
@ -1,8 +0,0 @@
|
||||
<div
|
||||
(click)="filterService.toggleFilter('quickFilters', filter.key)"
|
||||
*ngFor="let filter of quickFilters$ | async"
|
||||
[class.active]="filter.checked"
|
||||
class="quick-filter"
|
||||
>
|
||||
{{ filter.label }}
|
||||
</div>
|
||||
@ -1,34 +0,0 @@
|
||||
@import '../../../../../../assets/styles/variables';
|
||||
|
||||
:host {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.quick-filter {
|
||||
box-sizing: border-box;
|
||||
border: 1px solid $grey-5;
|
||||
border-radius: 17px;
|
||||
background-color: $grey-6;
|
||||
padding: 0 14px;
|
||||
height: 34px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
|
||||
&:hover {
|
||||
background-color: $white;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: $white;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||
import { FilterService } from '@iqser/common-ui';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-quick-filters',
|
||||
templateUrl: './quick-filters.component.html',
|
||||
styleUrls: ['./quick-filters.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class QuickFiltersComponent {
|
||||
readonly quickFilters$ = this.filterService.getFilterModels$('quickFilters');
|
||||
|
||||
constructor(readonly filterService: FilterService) {}
|
||||
}
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
<ng-container [ngTemplateOutlet]="bulkActions"></ng-container>
|
||||
|
||||
<redaction-quick-filters *ngIf="hasQuickFilters$ | async"></redaction-quick-filters>
|
||||
<iqser-quick-filters *ngIf="quickFilters$ | async as quickFilters" [quickFilters]="quickFilters"></iqser-quick-filters>
|
||||
|
||||
<!-- Custom content-->
|
||||
<ng-content></ng-content>
|
||||
|
||||
@ -15,7 +15,7 @@ export class TableHeaderComponent<T extends object> {
|
||||
@Input() selectionEnabled = false;
|
||||
@Input() bulkActions: TemplateRef<any>;
|
||||
|
||||
readonly hasQuickFilters$ = this.filterService.getGroup$('quickFilters').pipe(map(filters => !!filters));
|
||||
readonly quickFilters$ = this.filterService.getFilterModels$('quickFilters').pipe(map(filters => new Set(filters)));
|
||||
|
||||
constructor(readonly entitiesService: EntitiesService<T>, readonly filterService: FilterService) {}
|
||||
}
|
||||
|
||||
@ -27,7 +27,6 @@ import { NavigateLastDossiersScreenDirective } from './directives/navigate-last-
|
||||
import { DictionaryManagerComponent } from './components/dictionary-manager/dictionary-manager.component';
|
||||
import { SideNavComponent } from '@shared/components/side-nav/side-nav.component';
|
||||
import { MonacoEditorModule } from '@materia-ui/ngx-monaco-editor';
|
||||
import { QuickFiltersComponent } from './components/filters/quick-filters/quick-filters.component';
|
||||
import { PopupFilterComponent } from '@shared/components/filters/popup-filter/popup-filter.component';
|
||||
import { AssignUserDropdownComponent } from './components/assign-user-dropdown/assign-user-dropdown.component';
|
||||
import { InputWithActionComponent } from '@shared/components/input-with-action/input-with-action.component';
|
||||
@ -54,7 +53,6 @@ const components = [
|
||||
SelectComponent,
|
||||
SideNavComponent,
|
||||
DictionaryManagerComponent,
|
||||
QuickFiltersComponent,
|
||||
AssignUserDropdownComponent,
|
||||
PageHeaderComponent,
|
||||
|
||||
|
||||
@ -35,5 +35,6 @@ $dark: $black;
|
||||
|
||||
$btn-bg-hover: $grey-4;
|
||||
$btn-bg: $grey-6;
|
||||
$quick-filter-border: $grey-5;
|
||||
|
||||
$separator: rgba(226, 228, 233, 0.9);
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 6811739c7967a5f9fd8bb62f2b62e47e14ce0430
|
||||
Subproject commit f0c440876402cb4f603583537eca36f9038cc6fa
|
||||
Loading…
x
Reference in New Issue
Block a user