fix(frontend): added label to some query param selectors
LocationBasedServices/smartguide/pipeline/head This commit looks good

This commit is contained in:
Mats Paul Tončik
2026-07-05 16:15:41 +02:00
parent 0e80cc3fc3
commit b2d965d604
5 changed files with 25 additions and 13 deletions
@@ -12,11 +12,13 @@
<div class="sorting">
<app-query-param-selector
[options]="sortingOptions"
[queryParamKey]="'sort_by'" />
[queryParamKey]="'sort_by'"
label="Sortieren nach" />
<app-query-param-selector
[options]="sortingDirectionOptions"
[queryParamKey]="'sorting_order'" />
[queryParamKey]="'sorting_order'"
label="Sortierreihenfolge" />
</div>
</div>
@@ -25,7 +25,7 @@
.cards {
display: grid;
gap: 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));
padding: 0 1rem;
}
@@ -26,14 +26,11 @@
<mat-chip-option value="USPTO">USPTO</mat-chip-option>
</mat-chip-listbox>
<div class="sorting">
<select
(change)="setSortDirection($any($event.target).value)"
[value]="sortDirection">
<option value="desc">Absteigend</option>
<option value="asc">Aufsteigend</option>
</select>
</div>
<app-query-param-selector
[options]="sortingDirectionOptions"
[queryParamKey]="'sort_direction'"
label="Sortierreihenfolge"
(handleSelectionChange)="setSortDirection($event.value)" />
</div>
</div>
@@ -15,6 +15,10 @@ import { debounceTime, distinctUntilChanged, Subject } from 'rxjs';
import { PatentsService } from '../../api/api/patents.service';
import { PatentEntry } from '../../api/model/patentEntry';
import { IpcClassification } from '../../api';
import {
QueryParamSelectorComponent,
SelectorOption,
} from '../../shared/ui/query-param-selector/query-param-selector.component';
type SourceFilter = 'all' | 'EPO' | 'USPTO';
type ClassificationSystem = 'IPC' | 'CPC';
@@ -44,6 +48,7 @@ const DESCRIPTION_PREVIEW_LENGTH = 140;
MatProgressSpinnerModule,
MatChipsModule,
MatDividerModule,
QueryParamSelectorComponent,
],
templateUrl: './patents.component.html',
styleUrl: './patents.component.scss',
@@ -71,6 +76,12 @@ export class PatentsComponent implements OnInit {
private searchSubject = new Subject<string>();
sortingDirectionOptions: SelectorOption[] = [
{ value: '', display_name: '' },
{ value: 'asc', display_name: 'Aufsteigend' },
{ value: 'desc', display_name: 'Absteigend' },
];
constructor() {
this.searchSubject
.pipe(debounceTime(300), distinctUntilChanged(), takeUntilDestroyed())
@@ -28,11 +28,13 @@
<div class="sorting">
<app-query-param-selector
[options]="sortingOptions"
queryParamKey="sort_by" />
queryParamKey="sort_by"
label="Sortieren nach" />
<app-query-param-selector
[options]="sortingDirectionOptions"
queryParamKey="sorting_order" />
queryParamKey="sorting_order"
label="Sortierreihenfolge" />
</div>
</div>
</div>