Merge branch 'release/4.5' into develop

This commit is contained in:
Nino
2025-12-02 17:18:11 +01:00
16 changed files with 599 additions and 112 deletions

View File

@@ -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()"

View File

@@ -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;

View File

@@ -57,21 +57,25 @@
</div>
<div class="text-isa-neutral-900 flex flex-col gap-2" uiItemRowProdcutInfo>
<div class="flex flex-row gap-2 items-center justify-start">
<ng-icon [name]="i.product.format | lowercase"></ng-icon>
@if (!!i?.product?.format) {
<ng-icon [name]="i.product.format | lowercase"></ng-icon>
}
<span class="isa-text-body-2-bold truncate">
{{ i.product.formatDetail }}
{{ i?.product?.formatDetail }}
</span>
</div>
<div
class="text-isa-neutral-600 isa-text-body-2-regular"
data-what="product-info"
[attr.data-which]="i.product.ean"
[attr.data-which]="i?.product?.ean"
>
{{ i.product.manufacturer }} | {{ i.product.ean }}
</div>
<div class="text-isa-neutral-600 isa-text-body-2-regular">
{{ i.product.publicationDate | date: 'dd. MMM yyyy' }}
{{ i?.product?.manufacturer }} | {{ i?.product?.ean }}
</div>
@if (!!i?.product?.publicationDate) {
<div class="text-isa-neutral-600 isa-text-body-2-regular">
{{ i.product.publicationDate | date: 'dd. MMM yyyy' }}
</div>
}
</div>
<oms-feature-return-details-order-group-item-controls [item]="i">
</oms-feature-return-details-order-group-item-controls>