mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
fix(oms-return-details): Dropdown Label and Select Bullet Styling Adjustments
Ref: #5513
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
<ui-dropdown
|
||||
class="quantity-dropdown"
|
||||
[disabled]="!canReturnReceiptItem()"
|
||||
[value]="selectedQuantity()"
|
||||
(valueChange)="setQuantity($event)"
|
||||
[ngModel]="selectedQuantity()"
|
||||
(ngModelChange)="setQuantity($event)"
|
||||
>
|
||||
@for (quantity of quantityDropdownValues(); track quantity) {
|
||||
<ui-dropdown-option [value]="quantity">{{
|
||||
@@ -17,11 +17,11 @@
|
||||
}
|
||||
|
||||
<ui-dropdown
|
||||
label="Produktart"
|
||||
[label]="dropdownLabel()"
|
||||
class="product-dropdown"
|
||||
[disabled]="!canReturnReceiptItem()"
|
||||
[value]="productCategory()"
|
||||
(valueChange)="setProductCategory($event)"
|
||||
[ngModel]="productCategory()"
|
||||
(ngModelChange)="setProductCategory($event)"
|
||||
>
|
||||
@for (kv of availableCategories; track kv.key) {
|
||||
<ui-dropdown-option [value]="kv.key">{{ kv.value }}</ui-dropdown-option>
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
@if (canReturnReceiptItem()) {
|
||||
@if (!canReturnResource.isLoading() && selectable()) {
|
||||
<ui-checkbox appearance="bullet">
|
||||
<ui-checkbox class="min-w-12" appearance="bullet">
|
||||
<input
|
||||
type="checkbox"
|
||||
[ngModel]="selected()"
|
||||
|
||||
@@ -5,27 +5,27 @@ import {
|
||||
inject,
|
||||
input,
|
||||
signal,
|
||||
} from "@angular/core";
|
||||
import { provideLoggerContext } from "@isa/core/logging";
|
||||
} from '@angular/core';
|
||||
import { provideLoggerContext } from '@isa/core/logging';
|
||||
import {
|
||||
canReturnReceiptItem,
|
||||
ProductCategory,
|
||||
ReceiptItem,
|
||||
ReturnDetailsService,
|
||||
ReturnDetailsStore,
|
||||
} from "@isa/oms/data-access";
|
||||
import { IconButtonComponent } from "@isa/ui/buttons";
|
||||
} from '@isa/oms/data-access';
|
||||
import { IconButtonComponent } from '@isa/ui/buttons';
|
||||
import {
|
||||
CheckboxComponent,
|
||||
DropdownButtonComponent,
|
||||
DropdownOptionComponent,
|
||||
} from "@isa/ui/input-controls";
|
||||
import { FormsModule } from "@angular/forms";
|
||||
} from '@isa/ui/input-controls';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: "oms-feature-return-details-order-group-item-controls",
|
||||
templateUrl: "./return-details-order-group-item-controls.component.html",
|
||||
styleUrls: ["./return-details-order-group-item-controls.component.scss"],
|
||||
selector: 'oms-feature-return-details-order-group-item-controls',
|
||||
templateUrl: './return-details-order-group-item-controls.component.html',
|
||||
styleUrls: ['./return-details-order-group-item-controls.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
standalone: true,
|
||||
imports: [
|
||||
@@ -37,7 +37,7 @@ import { FormsModule } from "@angular/forms";
|
||||
],
|
||||
providers: [
|
||||
provideLoggerContext({
|
||||
component: "ReturnDetailsOrderGroupItemControlsComponent",
|
||||
component: 'ReturnDetailsOrderGroupItemControlsComponent',
|
||||
}),
|
||||
],
|
||||
})
|
||||
@@ -89,6 +89,11 @@ export class ReturnDetailsOrderGroupItemControlsComponent {
|
||||
|
||||
canReturnReceiptItem = computed(() => canReturnReceiptItem(this.item()));
|
||||
|
||||
dropdownLabel = computed(() => {
|
||||
const category = this.productCategory();
|
||||
return category ?? 'Produktart';
|
||||
});
|
||||
|
||||
setProductCategory(category: ProductCategory | undefined) {
|
||||
if (!category) {
|
||||
category = ProductCategory.Unknown;
|
||||
|
||||
Reference in New Issue
Block a user