mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
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:
@@ -1,2 +1 @@
|
||||
export * from './order-by-toolbar.component';
|
||||
export * from './order-by-dropdown.component';
|
||||
|
||||
@@ -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>
|
||||
@@ -1,3 +0,0 @@
|
||||
:host {
|
||||
@apply inline-flex;
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user