Refactor return search component and remove unused dropdown.

- 🛠️ **Refactor**: Updated return search result component for mobile responsiveness
- 🗑️ **Chore**: Removed unused order-by dropdown component and related files
- 📚 **Docs**: Enhanced component documentation for clarity
This commit is contained in:
Lorenz Hilpert
2025-04-11 15:24:08 +02:00
parent 3e14426d2e
commit 8144253a18
7 changed files with 469 additions and 109 deletions

View File

@@ -1,2 +1 @@
export * from './order-by-toolbar.component';
export * from './order-by-dropdown.component';

View File

@@ -1,18 +0,0 @@
<ui-dropdown
class="w-full"
label="Sortieren nach"
appearance="grey"
[ngModel]="selectedOrderBy()"
(ngModelChange)="setOrderBy($event)"
[showSelectedValue]="false"
[class.active]="selectedOrderBy()"
>
@for (option of orderByOptions(); track option.by + option.dir) {
<ui-dropdown-option [value]="option">
<div>{{ option.label }}</div>
<div>
<ng-icon [name]="option.dir" size="1.25rem"></ng-icon>
</div>
</ui-dropdown-option>
}
</ui-dropdown>

View File

@@ -1,3 +0,0 @@
:host {
@apply inline-flex;
}

View File

@@ -1,26 +0,0 @@
import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';
import { DropdownButtonComponent, DropdownOptionComponent } from '@isa/ui/input-controls';
import { FilterService, OrderByOption } from '../core';
import { FormsModule } from '@angular/forms';
import { NgIconComponent, provideIcons } from '@ng-icons/core';
import { isaSortByDownMedium, isaSortByUpMedium } from '@isa/icons';
@Component({
selector: 'filter-order-by-dropdown',
templateUrl: './order-by-dropdown.component.html',
styleUrls: ['./order-by-dropdown.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [DropdownButtonComponent, DropdownOptionComponent, FormsModule, NgIconComponent],
providers: [provideIcons({ desc: isaSortByDownMedium, asc: isaSortByUpMedium })],
})
export class OrderByDropdownComponent {
#filter = inject(FilterService);
orderByOptions = this.#filter.orderBy;
selectedOrderBy = computed(() => this.orderByOptions().find((o) => o.selected));
setOrderBy(option: OrderByOption) {
this.#filter.setOrderBy(option.by, option.dir);
}
}