Compare commits

..

3 Commits

99 changed files with 344 additions and 1103 deletions

View File

@@ -1,31 +0,0 @@
import { Directive, HostListener, Input } from '@angular/core';
import { ProductCatalogNavigationService } from '@shared/services';
@Directive({
selector: '[productImageNavigation]',
standalone: true,
})
export class NavigateOnClickDirective {
@Input('productImageNavigation') ean: string;
constructor(private readonly _productCatalogNavigation: ProductCatalogNavigationService) {}
@HostListener('click', ['$event'])
async onClick(event: MouseEvent) {
event.preventDefault();
event.stopPropagation();
if (this.ean) {
await this._navigateToProductSearchDetails();
}
}
private async _navigateToProductSearchDetails() {
await this._productCatalogNavigation
.getArticleDetailsPathByEan({
processId: Date.now(),
ean: this.ean,
extras: { queryParams: { main_qs: this.ean } },
})
.navigate();
}
}

View File

@@ -5,5 +5,4 @@
export * from './lib/product-image.service';
export * from './lib/product-image.module';
export * from './lib/product-image.pipe';
export * from './lib/product-image-navigation.directive';
export * from './lib/tokens';

View File

@@ -1021,11 +1021,7 @@ export class DomainCheckoutService {
//#region Common
// Fix für Ticket #4619 Versand Artikel im Warenkob -> keine Änderung bei Kundendaten erfassen
// Auskommentiert, da dieser Aufruf oftmals mit gleichen Parametern aufgerufen wird (ohne ausgewählten Kunden nur ein leeres Objekt bei customerFeatures)
// memorize macht keinen deepCompare von Objekten und denkt hier, dass immer der gleiche Return Wert zurückkommt, allerdings ist das hier oft nicht der Fall
// und der Decorator memorized dann fälschlicherweise
// @memorize()
@memorize()
canSetCustomer({
processId,
customerFeatures,

View File

@@ -1,60 +1,37 @@
import { Injectable } from '@angular/core';
import { ActionHandler } from '@core/command';
import { DomainPrinterService, Printer } from '@domain/printer';
import { DomainPrinterService } from '@domain/printer';
import { PrintModalComponent, PrintModalData } from '@modal/printer';
import { UiModalService } from '@ui/modal';
import { NativeContainerService } from 'native-container';
import { OrderItemsContext } from './order-items.context';
import { EnvironmentService } from '@core/environment';
@Injectable()
export class PrintCompartmentLabelActionHandler extends ActionHandler<OrderItemsContext> {
constructor(
private uiModal: UiModalService,
private domainPrinterService: DomainPrinterService,
private nativeContainerService: NativeContainerService,
private _environmentSerivce: EnvironmentService
private nativeContainerService: NativeContainerService
) {
super('PRINT_COMPARTMENTLABEL');
}
printCompartmentLabelHelper(printer: string, orderItemSubsetIds: number[]) {
return this.domainPrinterService
.printCompartmentLabel({
printer,
orderItemSubsetIds,
})
.toPromise();
}
async handler(data: OrderItemsContext): Promise<OrderItemsContext> {
const printerList = await this.domainPrinterService.getAvailableLabelPrinters().toPromise();
let printer: Printer;
await this.uiModal
.open({
content: PrintModalComponent,
config: { showScrollbarY: false },
data: {
printImmediately: !this.nativeContainerService.isNative,
printerType: 'Label',
print: (printer) =>
this.domainPrinterService
.printCompartmentLabel({ printer, orderItemSubsetIds: data.items.map((item) => item.orderItemSubsetId) })
.toPromise(),
} as PrintModalData,
})
.afterClosed$.toPromise();
if (Array.isArray(printerList)) {
printer = printerList.find((printer) => printer.selected === true);
}
if (!printer || this._environmentSerivce.matchTablet()) {
await this.uiModal
.open({
content: PrintModalComponent,
config: { showScrollbarY: false },
data: {
printImmediately: !this._environmentSerivce.matchTablet(),
printerType: 'Label',
print: (printer) =>
this.printCompartmentLabelHelper(
printer,
data.items.map((item) => item.orderItemSubsetId)
),
} as PrintModalData,
})
.afterClosed$.toPromise();
} else {
await this.printCompartmentLabelHelper(
printer.key,
data.items.map((item) => item.orderItemSubsetId)
);
}
return data;
}
}

View File

@@ -6,60 +6,45 @@ import { UiModalService } from '@ui/modal';
import { PrintModalComponent, PrintModalData } from '@modal/printer';
import { groupBy } from '@ui/common';
import { NativeContainerService } from 'native-container';
import { ReceiptDTO } from '@swagger/oms';
import { EnvironmentService } from '@core/environment';
@Injectable()
export class PrintShippingNoteActionHandler extends ActionHandler<OrderItemsContext> {
constructor(
private uiModal: UiModalService,
private domainPrinterService: DomainPrinterService,
private nativeContainerService: NativeContainerService,
private _environmentSerivce: EnvironmentService
private nativeContainerService: NativeContainerService
) {
super('PRINT_SHIPPINGNOTE');
}
async printShippingNoteHelper(printer: string, receipts: ReceiptDTO[]) {
try {
for (const group of groupBy(receipts, (receipt) => receipt?.buyer?.buyerNumber)) {
await this.domainPrinterService.printShippingNote({ printer, receipts: group?.items?.map((r) => r?.id) }).toPromise();
}
return {
error: false,
};
} catch (error) {
console.error(error);
return {
error: true,
message: error?.message || error,
};
}
}
async handler(data: OrderItemsContext): Promise<OrderItemsContext> {
const printerList = await this.domainPrinterService.getAvailableLabelPrinters().toPromise();
const receipts = data?.receipts?.filter((r) => r?.receiptType & 1);
let printer: Printer;
if (Array.isArray(printerList)) {
printer = printerList.find((printer) => printer.selected === true);
}
if (!printer || this._environmentSerivce.matchTablet()) {
await this.uiModal
.open({
content: PrintModalComponent,
config: { showScrollbarY: false },
data: {
printImmediately: !this.nativeContainerService.isNative,
printerType: 'Label',
print: async (printer) => await this.printShippingNoteHelper(printer, receipts),
} as PrintModalData,
})
.afterClosed$.toPromise();
} else {
await this.printShippingNoteHelper(printer.key, receipts);
}
await this.uiModal
.open({
content: PrintModalComponent,
config: { showScrollbarY: false },
data: {
printImmediately: !this.nativeContainerService.isNative,
printerType: 'Label',
print: async (printer) => {
try {
const receipts = data?.receipts?.filter((r) => r?.receiptType & 1);
for (const group of groupBy(receipts, (receipt) => receipt?.buyer?.buyerNumber)) {
await this.domainPrinterService.printShippingNote({ printer, receipts: group?.items?.map((r) => r?.id) }).toPromise();
}
return {
error: false,
};
} catch (error) {
console.error(error);
return {
error: true,
message: error?.message || error,
};
}
},
} as PrintModalData,
})
.afterClosed$.toPromise();
return data;
}

View File

@@ -35,7 +35,7 @@ export class PickupShelfOutService extends PickupShelfIOService {
);
}
const { orderdate, supplier_id } = args.filter?.getQueryToken()?.filter ?? {};
const { orderdate } = args.filter?.getQueryToken()?.filter ?? {};
return this._abholfachService.AbholfachWarenausgabe({
input: {
@@ -45,7 +45,6 @@ export class PickupShelfOutService extends PickupShelfIOService {
archive: String(true),
all_branches: String(true),
orderdate,
supplier_id,
},
});
}

View File

@@ -280,11 +280,6 @@
"name": "apps",
"data": "M226-160q-28 0-47-19t-19-47q0-28 19-47t47-19q28 0 47 19t19 47q0 28-19 47t-47 19Zm254 0q-28 0-47-19t-19-47q0-28 19-47t47-19q28 0 47 19t19 47q0 28-19 47t-47 19Zm254 0q-28 0-47-19t-19-47q0-28 19-47t47-19q28 0 47 19t19 47q0 28-19 47t-47 19ZM226-414q-28 0-47-19t-19-47q0-28 19-47t47-19q28 0 47 19t19 47q0 28-19 47t-47 19Zm254 0q-28 0-47-19t-19-47q0-28 19-47t47-19q28 0 47 19t19 47q0 28-19 47t-47 19Zm254 0q-28 0-47-19t-19-47q0-28 19-47t47-19q28 0 47 19t19 47q0 28-19 47t-47 19ZM226-668q-28 0-47-19t-19-47q0-28 19-47t47-19q28 0 47 19t19 47q0 28-19 47t-47 19Zm254 0q-28 0-47-19t-19-47q0-28 19-47t47-19q28 0 47 19t19 47q0 28-19 47t-47 19Zm254 0q-28 0-47-19t-19-47q0-28 19-47t47-19q28 0 47 19t19 47q0 28-19 47t-47 19Z",
"viewBox": "0 -960 960 960"
},
{
"name": "gift",
"data": "M2 21V10H0V4H5.2C5.11667 3.85 5.0625 3.69167 5.0375 3.525C5.0125 3.35833 5 3.18333 5 3C5 2.16667 5.29167 1.45833 5.875 0.875C6.45833 0.291667 7.16667 0 8 0C8.38333 0 8.74167 0.0708333 9.075 0.2125C9.40833 0.354167 9.71667 0.55 10 0.8C10.2833 0.533333 10.5917 0.333333 10.925 0.2C11.2583 0.0666667 11.6167 0 12 0C12.8333 0 13.5417 0.291667 14.125 0.875C14.7083 1.45833 15 2.16667 15 3C15 3.18333 14.9833 3.35417 14.95 3.5125C14.9167 3.67083 14.8667 3.83333 14.8 4H20V10H18V21H2ZM12 2C11.7167 2 11.4792 2.09583 11.2875 2.2875C11.0958 2.47917 11 2.71667 11 3C11 3.28333 11.0958 3.52083 11.2875 3.7125C11.4792 3.90417 11.7167 4 12 4C12.2833 4 12.5208 3.90417 12.7125 3.7125C12.9042 3.52083 13 3.28333 13 3C13 2.71667 12.9042 2.47917 12.7125 2.2875C12.5208 2.09583 12.2833 2 12 2ZM7 3C7 3.28333 7.09583 3.52083 7.2875 3.7125C7.47917 3.90417 7.71667 4 8 4C8.28333 4 8.52083 3.90417 8.7125 3.7125C8.90417 3.52083 9 3.28333 9 3C9 2.71667 8.90417 2.47917 8.7125 2.2875C8.52083 2.09583 8.28333 2 8 2C7.71667 2 7.47917 2.09583 7.2875 2.2875C7.09583 2.47917 7 2.71667 7 3ZM2 6V8H9V6H2ZM9 19V10H4V19H9ZM11 19H16V10H11V19ZM18 8V6H11V8H18Z",
"viewBox": "0 0 20 21"
}
],

View File

@@ -1,5 +0,0 @@
<svg width="48" height="51" viewBox="0 0 48 51" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 4.47368C8 2.01878 9.99009 0 12.445 0L43.555 0C46.0099 0 48 2.01878 48 4.47368H8Z" fill="#172062"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 4.445C0 1.99009 1.99009 0 4.445 0L42.7807 0V43.4808C42.7807 46.7878 39.2981 48.9368 36.3423 47.4537L23.376 40.948C22.1212 40.3183 20.6426 40.3186 19.3879 40.9486L6.4397 47.4505C3.48377 48.9348 0 46.7859 0 43.4782L0 4.445Z" fill="#0556B4"/>
<rect x="19" y="19" width="18" height="17" fill="#0556B4"/>
</svg>

Before

Width:  |  Height:  |  Size: 606 B

View File

@@ -35,11 +35,7 @@
</div>
<div class="branch-actions">
<button
*ngIf="(branch.id | stockInfo: (inStock$ | async))?.availableQuantity > 0 && branch?.isShippingEnabled"
class="cta-reserve"
(click)="reserve(branch)"
>
<button *ngIf="(branch.id | stockInfo: (inStock$ | async))?.availableQuantity > 0" class="cta-reserve" (click)="reserve(branch)">
Reservieren
</button>

View File

@@ -37,7 +37,7 @@ export class ModalAvailabilitiesComponent {
(branch) =>
branch &&
branch?.isOnline &&
// branch?.isShippingEnabled && ------ Rausgenommen aufgrund des Tickets #4712
branch?.isShippingEnabled &&
branch?.isOrderingEnabled &&
branch?.id !== userbranch?.id &&
branch?.branchType === 1

View File

@@ -1,7 +1,7 @@
<div class="page-article-details__wrapper">
<div #detailsContainer class="page-article-details__container px-5" *ngIf="store.item$ | async; let item">
<div class="page-article-details__product-details mb-3">
<div class="page-article-details__product-bookmark flex fixed justify-self-end">
<div class="page-article-details__product-bookmark justify-self-end">
<div *ngIf="showArchivBadge$ | async" class="archiv-badge">
<button [uiOverlayTrigger]="archivTooltip" class="p-0 m-0 outline-none border-none bg-transparent relative -top-[0.3125rem]">
<img src="/assets/images/bookmark_benachrichtigung_archiv.svg" alt="Archiv Badge" />
@@ -30,9 +30,9 @@
</div>
<div *ngIf="showPromotionBadge$ | async" class="promotion-badge">
<button [uiOverlayTrigger]="promotionTooltip" class="p-0 m-0 outline-none border-none bg-transparent relative -top-[0.3125rem]">
<shared-icon-badge icon="gift" alt="Prämienkatalog Badge"></shared-icon-badge>
<ui-icon-badge icon="gift" alt="Prämienkatalog Badge"></ui-icon-badge>
<ui-tooltip yPosition="above" xPosition="after" [yOffset]="-11" [xOffset]="-8" #promotionTooltip [closeable]="true">
Der Artikel ist als Prämie für {{ promotionPoints$ | async }} Punkte erhältlich.
Dieser Artikel befindet sich im Prämienkatalog.
</ui-tooltip>
</button>
</div>

View File

@@ -76,12 +76,7 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy {
showSubscriptionBadge$ = this.store.item$.pipe(map((item) => item?.features?.find((i) => i.key === 'PFO')));
hasPromotionFeature$ = this.store.item$.pipe(map((item) => !!item?.features?.find((i) => i.key === 'Promotion')));
promotionPoints$ = this.store.item$.pipe(map((item) => item?.redemptionPoints));
showPromotionBadge$ = combineLatest([this.hasPromotionFeature$, this.promotionPoints$]).pipe(
map(([hasPromotionFeature, promotionPoints]) => hasPromotionFeature && promotionPoints > 0)
);
showPromotionBadge$ = this.store.item$.pipe(map((item) => item?.features?.find((i) => i.key === 'Promotion')));
showArchivBadge$ = this.store.item$.pipe(map((item) => item?.features?.find((i) => i.key === 'ARC')));
@@ -439,10 +434,11 @@ export class ArticleDetailsComponent implements OnInit, OnDestroy {
async navigateToResultList() {
const processId = this.applicationService.activatedProcessId;
let crumbs = await this.breadcrumb
.getBreadcrumbsByKeyAndTags$(this.applicationService.activatedProcessId, ['catalog', 'details'])
.getBreadcrumbsByKeyAndTags$(this.applicationService.activatedProcessId, ['catalog'])
.pipe(first())
.toPromise();
crumbs = crumbs.filter((crumb) => !crumb.tags?.includes('details'));
const crumb = crumbs[crumbs.length - 1];
if (!!crumb) {
await this._navigationService.getArticleSearchResultsPath(processId, { queryParams: crumb.params }).navigate();

View File

@@ -13,7 +13,6 @@ import { UiCommonModule } from '@ui/common';
import { OrderDeadlinePipeModule } from '@shared/pipes/order-deadline';
import { IconModule } from '@shared/components/icon';
import { ArticleDetailsTextComponent } from './article-details-text/article-details-text.component';
import { IconBadgeComponent } from 'apps/shared/components/icon/src/lib/badge/icon-badge.component';
@NgModule({
imports: [
@@ -29,7 +28,6 @@ import { IconBadgeComponent } from 'apps/shared/components/icon/src/lib/badge/ic
PipesModule,
OrderDeadlinePipeModule,
ArticleDetailsTextComponent,
IconBadgeComponent,
],
exports: [ArticleDetailsComponent, ArticleRecommendationsComponent],
declarations: [ArticleDetailsComponent, ArticleRecommendationsComponent],

View File

@@ -155,7 +155,7 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi
const cleanQueryParams = this.cleanupQueryParams(queryParams);
if (processChanged) {
if (this.route.outlet === 'primary' && processChanged) {
this.scrollToItem(this._getScrollIndexFromCache());
}
@@ -209,6 +209,7 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi
if (searchCompleted.state.hits === 1) {
const item = searchCompleted.state.items.find((f) => f);
const ean = this.route?.snapshot?.params?.ean;
const itemId = this.route?.snapshot?.params?.id ? Number(this.route?.snapshot?.params?.id) : item.id; // Nicht zum ersten Item der Liste springen wenn bereits eines selektiert ist
// Navigation from Cart uses ean
if (!!ean) {
@@ -223,7 +224,7 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi
await this._navigationService
.getArticleDetailsPath({
processId,
itemId: item.id,
itemId,
extras: { queryParams: params },
})
.navigate();
@@ -271,7 +272,7 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy, AfterVi
}
private _getScrollIndexFromCache(): number {
return this.cache.get<number>({ processId: this.getProcessId(), token: this.SCROLL_INDEX_TOKEN }) ?? 0;
return this.cache.get<number>({ processId: this.getProcessId(), token: this.SCROLL_INDEX_TOKEN });
}
scrollToItem(i?: number) {

View File

@@ -32,9 +32,9 @@
<ng-container *ngIf="payer$ | async; let payer">
<div *ngIf="showAddresses$ | async" class="flex flex-row items-start justify-between p-5 pt-0">
<div class="flex flex-row flex-wrap pr-4" data-address-type="Rechnungsadresse" data-which="Rechnungsadresse">
<div class="mr-3" data-what="title">Rechnungsadresse</div>
<div class="font-bold" data-what="address">
<div class="flex flex-row flex-wrap pr-4" data-address-type="Rechnungsadresse">
<div class="mr-3">Rechnungsadresse</div>
<div class="font-bold">
{{ payer | payerAddress }}
</div>
</div>
@@ -47,9 +47,9 @@
<ng-container *ngIf="payer$ | async; let payer">
<div *ngIf="showAddresses$ | async" class="flex flex-row items-start justify-between px-5">
<div class="flex flex-row flex-wrap pr-4" data-address-type="Lieferadresse" data-which="Lieferadresse">
<div class="mr-3" data-what="title">Lieferadresse</div>
<div class="font-bold" data-what="address">
<div class="flex flex-row flex-wrap pr-4" data-address-type="Lieferadresse">
<div class="mr-3">Lieferadresse</div>
<div class="font-bold">
{{ shippingAddress$ | async | shippingAddress }}
</div>
</div>

View File

@@ -19,14 +19,17 @@
placeholder="Eine Anmerkung hinzufügen"
[(ngModel)]="value"
[rows]="rows"
(ngModelChange)="updateValue()"
(blur)="updateValue()"
(ngModelChange)="check()"
(blur)="save()"
></textarea>
<div class="comment-actions py-4">
<button type="reset" class="clear pl-4" *ngIf="!disabled && !!value" (click)="clear(); triggerResize()">
<shared-icon icon="close" [size]="24"></shared-icon>
</button>
<button class="cta-save ml-4" type="submit" *ngIf="!disabled && isDirty" (click)="save()">
Speichern
</button>
</div>
</div>

View File

@@ -61,7 +61,7 @@ export class SpecialCommentComponent implements ControlValueAccessor {
clear() {
this.value = '';
this.updateValue();
this.save();
}
check() {
@@ -80,12 +80,11 @@ export class SpecialCommentComponent implements ControlValueAccessor {
this.cdr.markForCheck();
}
updateValue() {
save() {
this.initialValue = this.value;
this.onChange(this.value);
this.check();
}
setIsDirty(isDirty: boolean) {
this.isDirty = isDirty;
this.isDirtyChange.emit(isDirty);

View File

@@ -228,12 +228,11 @@
<div class="absolute left-1/2 bottom-10 inline-grid grid-flow-col gap-4 justify-center transform -translate-x-1/2">
<button
*ifRole="'Store'"
[disabled]="isPrinting$ | async"
type="button"
class="px-6 py-2 rounded-full border-2 border-solid border-brand text-brand bg-white font-bold text-lg whitespace-nowrap h-14 flex flex-row items-center justify-center print-button"
class="px-6 py-2 rounded-full border-2 border-solid border-brand text-brand bg-white font-bold text-lg whitespace-nowrap h-14"
(click)="printOrderConfirmation()"
>
<ui-spinner class="min-h-4 min-w-4" [show]="isPrinting$ | async"> Bestellbestätigung drucken </ui-spinner>
Bestellbestätigung drucken
</button>
<button

View File

@@ -96,12 +96,6 @@ hr {
}
}
.print-button {
&:disabled {
@apply bg-inactive-branch border-solid border-inactive-branch text-white cursor-not-allowed;
}
}
.last {
@apply pb-5;
}

View File

@@ -135,8 +135,6 @@ export class CheckoutSummaryComponent implements OnInit, OnDestroy {
)
);
isPrinting$ = new BehaviorSubject(false);
totalPriceCurrency$ = this.displayOrders$.pipe(map((displayOrders) => displayOrders[0]?.items[0]?.price?.value?.currency));
containsDeliveryOrder$ = this.displayOrders$.pipe(
@@ -296,9 +294,22 @@ export class CheckoutSummaryComponent implements OnInit, OnDestroy {
if (takeNowOrders.length != 1) return;
try {
await this.router.navigate(this._shelfOutNavigationService.listRoute({ processId: Date.now() }).path, {
queryParams: { main_qs: takeNowOrders[0].orderNumber, filter_supplier_id: '16' },
});
for (const takeNowOrder of takeNowOrders) {
for (const orderItem of takeNowOrder.items.filter((item) => item.features?.orderType === 'Rücklage')) {
await this.omsService
.changeOrderStatus(takeNowOrder.id, orderItem.id, orderItem.subsetItems[0]?.id, {
processingStatus: 128,
})
.toPromise();
}
}
await this.router.navigate(
this._shelfOutNavigationService.detailRoute({
processId: Date.now(),
item: { orderId: takeNowOrders[0].id, orderNumber: takeNowOrders[0].orderNumber, processingStatus: 128 },
}).path
);
} catch (e) {
console.error(e);
}
@@ -311,57 +322,28 @@ export class CheckoutSummaryComponent implements OnInit, OnDestroy {
}
async printOrderConfirmation() {
this.isPrinting$.next(true);
const orders = await this.displayOrders$.pipe(first()).toPromise();
const selectedPrinter = await this.domainPrinterService
.getAvailableLabelPrinters()
.pipe(
first(),
map((printers) => {
if (Array.isArray(printers)) return printers.find((printer) => printer.selected === true);
})
)
.toPromise();
console.log(selectedPrinter);
if (!selectedPrinter || this.isTablet) {
await this.uiModal
.open({
content: PrintModalComponent,
data: {
printerType: 'Label',
printImmediately: !this.isTablet,
print: async (printer) => {
try {
const result = await this.domainPrinterService.printOrder({ orderIds: orders.map((o) => o.id), printer }).toPromise();
this._toaster.open({ type: 'success', message: 'Bestellbestätigung wurde gedruckt' });
return result;
} catch (error) {
this._toaster.open({ type: 'danger', message: 'Fehler beim Drucken der Bestellbestätigung' });
} finally {
this.isPrinting$.next(false);
}
},
} as PrintModalData,
config: {
panelClass: [],
showScrollbarY: false,
await this.uiModal
.open({
content: PrintModalComponent,
data: {
printerType: 'Label',
printImmediately: !this.isTablet,
print: async (printer) => {
try {
const result = await this.domainPrinterService.printOrder({ orderIds: orders.map((o) => o.id), printer }).toPromise();
this._toaster.open({ type: 'success', message: 'Bestellbestätigung wurde gedruckt' });
return result;
} catch (error) {
this._toaster.open({ type: 'danger', message: 'Fehler beim Drucken der Bestellbestätigung' });
}
},
})
.afterClosed$.toPromise();
this.isPrinting$.next(false);
} else {
try {
const result = await this.domainPrinterService
.printOrder({ orderIds: orders.map((o) => o.id), printer: selectedPrinter.key })
.toPromise();
this._toaster.open({ type: 'success', message: 'Bestellbestätigung wurde gedruckt' });
return result;
} catch (error) {
this._toaster.open({ type: 'danger', message: 'Fehler beim Drucken der Bestellbestätigung' });
} finally {
this.isPrinting$.next(false);
}
}
} as PrintModalData,
config: {
panelClass: [],
showScrollbarY: false,
},
})
.afterClosed$.toPromise();
}
}

View File

@@ -140,19 +140,6 @@
</ng-container>
</ng-template>
</div>
<div class="page-customer-order-details-item__tracking-details" *ngIf="getOrderItemTrackingData(orderItem); let trackingData">
<div class="label">{{ trackingData.length > 1 ? 'Sendungsnummern' : 'Sendungsnummer' }}</div>
<ng-container *ngFor="let tracking of trackingData">
<ng-container *ngIf="tracking.trackingProvider === 'DHL' && !isNative; else noTrackingLink">
<a class="value text-[#0556B4]" [href]="getTrackingNumberLink(tracking.trackingNumber)" target="_blank"
>{{ tracking.trackingProvider }}: {{ tracking.trackingNumber }}</a
>
</ng-container>
<ng-template #noTrackingLink>
<p class="value">{{ tracking.trackingProvider }}: {{ tracking.trackingNumber }}</p>
</ng-template>
</ng-container>
</div>
<hr class="border-[#EDEFF0] border-t-2 my-4" />

View File

@@ -55,18 +55,6 @@ button {
}
}
.page-customer-order-details-item__tracking-details {
@apply flex gap-x-7;
.label {
@apply w-[8.125rem];
}
.value {
@apply flex flex-row items-center font-bold;
}
}
.page-customer-order-details-item__comment {
textarea {
@apply w-full flex-grow rounded bg-[#EDEFF0] border-[#AEB7C1] border border-solid outline-none text-p2 p-4;

View File

@@ -18,7 +18,6 @@ import { isEqual } from 'lodash';
import { combineLatest, NEVER, Subject, Observable } from 'rxjs';
import { catchError, filter, first, map, switchMap, withLatestFrom } from 'rxjs/operators';
import { CustomerOrderDetailsStore } from '../customer-order-details.store';
import { EnvironmentService } from '@core/environment';
export interface CustomerOrderDetailsItemComponentState {
orderItem?: OrderItemListItemDTO;
@@ -143,16 +142,11 @@ export class CustomerOrderDetailsItemComponent extends ComponentStore<CustomerOr
private _onDestroy$ = new Subject();
get isNative() {
return this._environment.isNative();
}
constructor(
private _store: CustomerOrderDetailsStore,
private _domainReceiptService: DomainReceiptService,
private _omsService: DomainOmsService,
private _cdr: ChangeDetectorRef,
private _environment: EnvironmentService
private _cdr: ChangeDetectorRef
) {
super({
more: false,
@@ -237,35 +231,6 @@ export class CustomerOrderDetailsItemComponent extends ComponentStore<CustomerOr
return orderItems?.find((orderItem) => orderItem.data.id === orderItemListItem.orderItemId)?.data?.features?.orderType;
}
getOrderItemTrackingData(orderItemListItem: OrderItemListItemDTO): Array<{ trackingProvider: string; trackingNumber: string }> {
const orderItems = this.order?.items;
const completeTrackingInformation = orderItems
?.find((orderItem) => orderItem.data.id === orderItemListItem.orderItemId)
?.data?.subsetItems?.find((subsetItem) => subsetItem.id === orderItemListItem.orderItemSubsetId)?.data?.trackingNumber;
if (!completeTrackingInformation) {
return;
}
// Beispielnummer: 'DHL: 124124' - Bei mehreren Tracking-Informationen muss noch ein Splitter eingebaut werden, je nach dem welcher Trenner verwendet wird
const trackingInformationPairs = completeTrackingInformation.split(':').map((obj) => obj.trim());
return this._trackingTransformationHelper(trackingInformationPairs);
}
// Macht aus einem String Array ein Array von Objekten mit den keys trackingProvider und trackingNumber
private _trackingTransformationHelper(trackingInformationPairs: string[]): Array<{ trackingProvider: string; trackingNumber: string }> {
return trackingInformationPairs.reduce((acc, current, index, array) => {
if (index % 2 === 0) {
acc.push({ trackingProvider: current, trackingNumber: array[index + 1] });
}
return acc;
}, [] as { trackingProvider: string; trackingNumber: string }[]);
}
getTrackingNumberLink(trackingNumber: string) {
return `https://www.dhl.de/de/privatkunden/dhl-sendungsverfolgung.html?piececode=${trackingNumber}`;
}
triggerResize() {
this.autosize.reset();
}

View File

@@ -345,7 +345,7 @@ export class CustomerOrderDetailsComponent implements OnInit, AfterViewInit, OnD
if (action.command.includes('ARRIVED')) {
navigateTo = await this.arrivedActionNavigation();
}
if (action.command.includes('PRINT_PRICEDIFFQRCODELABEL') || action.command.includes('BACKTOSTOCK')) {
if (action.command.includes('PRINT_PRICEDIFFQRCODELABEL')) {
navigateTo = 'main';
}

View File

@@ -38,6 +38,7 @@
(onInit)="addAddressGroup($event)"
(onDestroy)="removeAddressGroup()"
[data]="data?.address"
[tabIndexStart]="nameFormBlock?.tabIndexEnd + 1"
[requiredMarks]="addressRequiredMarks"
[validatorFns]="addressValidatorFns"
[readonly]="readonly"

View File

@@ -1,13 +1,13 @@
import { HttpErrorResponse } from '@angular/common/http';
import { ChangeDetectorRef, Directive, OnDestroy, OnInit, ViewChild, inject } from '@angular/core';
import { AbstractControl, AsyncValidatorFn, UntypedFormControl, UntypedFormGroup, ValidationErrors, ValidatorFn } from '@angular/forms';
import { AbstractControl, AsyncValidatorFn, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { BreadcrumbService } from '@core/breadcrumb';
import { CrmCustomerService } from '@domain/crm';
import { AddressDTO, CustomerDTO, PayerDTO, ShippingAddressDTO } from '@swagger/crm';
import { AddressDTO, CustomerDTO, CustomerInfoDTO, PayerDTO, ShippingAddressDTO } from '@swagger/crm';
import { UiErrorModalComponent, UiModalService } from '@ui/modal';
import { UiValidators } from '@ui/validators';
import { isNull } from 'lodash';
import { isNull, merge } from 'lodash';
import { BehaviorSubject, Observable, of, Subject } from 'rxjs';
import {
first,
@@ -106,8 +106,7 @@ export abstract class AbstractCreateCustomer implements OnInit, OnDestroy {
}
ngOnDestroy(): void {
// Fix für #4676 - Breadcrumb wurde beim Schließen des Prozesses neu erstellt und nicht korrekt gelöscht
// this.updateBreadcrumb(this.latestProcessId, this.formData);
this.updateBreadcrumb(this.latestProcessId, this.formData);
this.onDestroy$.next();
this.onDestroy$.complete();
this.busy$.complete();
@@ -190,47 +189,6 @@ export abstract class AbstractCreateCustomer implements OnInit, OnDestroy {
this.cdr.markForCheck();
}
minBirthDateValidator = (): ValidatorFn => {
return (control: AbstractControl): ValidationErrors | null => {
const minAge = 18; // 18 years
if (!control.value) {
return null;
}
const controlBirthDate = new Date(control.value);
const minBirthDate = new Date();
minBirthDate.setFullYear(minBirthDate.getFullYear() - minAge);
// Check if customer is over 18 years old
if (this._checkIfAgeOver18(controlBirthDate, minBirthDate)) {
return null;
} else {
return { minBirthDate: `Teilnahme ab ${minAge} Jahren` };
}
};
};
private _checkIfAgeOver18(inputDate: Date, minBirthDate: Date): boolean {
// Check year
if (inputDate.getFullYear() < minBirthDate.getFullYear()) {
return true;
}
// Check Year + Month
else if (inputDate.getFullYear() === minBirthDate.getFullYear() && inputDate.getMonth() < minBirthDate.getMonth()) {
return true;
}
// Check Year + Month + Day
else if (
inputDate.getFullYear() === minBirthDate.getFullYear() &&
inputDate.getMonth() === minBirthDate.getMonth() &&
inputDate.getDate() <= minBirthDate.getDate()
) {
return true;
}
return false;
}
emailExistsValidator: AsyncValidatorFn = (control) => {
return of(control.value).pipe(
tap((_) => this.customerExists$.next(false)),
@@ -419,7 +377,7 @@ export abstract class AbstractCreateCustomer implements OnInit, OnDestroy {
} catch (error) {
this.form.enable();
setTimeout(() => {
this.deviatingDeliveryAddressFormBlock.setAddressValidationError(error.error.invalidProperties);
this.addressFormBlock.setAddressValidationError(error.error.invalidProperties);
}, 10);
return;

View File

@@ -70,7 +70,7 @@ export class CreateP4MCustomerComponent extends AbstractCreateCustomer implement
agbValidatorFns = [Validators.requiredTrue];
birthDateValidatorFns = [];
birthDateValidatorFns = [Validators.required];
existingCustomer$: Observable<CustomerInfoDTO | null>;
@@ -138,7 +138,6 @@ export class CreateP4MCustomerComponent extends AbstractCreateCustomer implement
initMarksAndValidators() {
this.asyncLoyaltyCardValidatorFn = [this.checkLoyalityCardValidator];
this.birthDateValidatorFns = [Validators.required, this.minBirthDateValidator()];
if (this._customerType === 'webshop') {
this.emailRequiredMark = true;
this.emailValidatorFn = [Validators.required, Validators.email, validateEmail];

View File

@@ -22,7 +22,7 @@ export class UpdateP4MWebshopCustomerComponent extends AbstractCreateCustomer im
agbValidatorFns = [Validators.requiredTrue];
birthDateValidatorFns = [Validators.required, this.minBirthDateValidator()];
birthDateValidatorFns = [Validators.required];
nameRequiredMarks: (keyof NameFormBlockData)[] = ['gender', 'firstName', 'lastName'];

View File

@@ -42,7 +42,6 @@
<img
class="thumbnail"
loading="lazy"
[productImageNavigation]="orderItem?.product?.ean"
*ngIf="orderItem?.product?.ean | productImage; let productImage"
[src]="productImage"
[alt]="orderItem?.product?.name"

View File

@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NavigateOnClickDirective, ProductImageModule } from 'apps/cdn/product-image/src/public-api';
import { ProductImageModule } from 'apps/cdn/product-image/src/public-api';
import { UiIconModule } from '@ui/icon';
import { UiInputModule } from '@ui/input';
import { FormsModule } from '@angular/forms';
@@ -8,7 +8,7 @@ import { GoodsInListItemComponent } from './goods-in-list-item.component';
import { PipesModule } from 'apps/shared/components/goods-in-out/src/lib/pipes/pipes.module';
@NgModule({
imports: [CommonModule, PipesModule, UiIconModule, ProductImageModule, FormsModule, UiInputModule, NavigateOnClickDirective],
imports: [CommonModule, PipesModule, UiIconModule, ProductImageModule, FormsModule, UiInputModule],
exports: [GoodsInListItemComponent],
declarations: [GoodsInListItemComponent],
providers: [],

View File

@@ -5,7 +5,3 @@
.action-wrapper {
@apply grid grid-flow-col gap-4 justify-center my-6 fixed bottom-24 inset-x-0;
}
.annotation-layout {
@apply col-span-2;
}

View File

@@ -3,7 +3,33 @@
</div>
<ng-container *ngIf="packageDetails$ | async; else loader; let packageDetails" (sharedOnInit)="calculateListHeight()">
<div class="bg-background-liste">
<div class="bg-white text-center text-xl py-10" [innerText]="packageDetails?.package?.features?.['description'] ?? ''"></div>
<div #handlungsAnweisung [ngSwitch]="packageDetails.package.arrivalStatus | arrivalStatus">
<div class="bg-white" *ngSwitchCase="'Falsche Filiale'">
<p class="text-center text-xl py-10">
Stellen Sie dieses Packstück für die andere Filiale bereit. <br />
Der Spediteur holt es zum nächstmöglichen Zeitpunkt ab.
</p>
</div>
<div class="bg-white" *ngSwitchCase="'Offen'">
<p class="text-center text-xl py-10" *ngIf="!(childActions$ | async)">
Können Sie sich erinnern, dass Sie dieses Packstück <br />
ausgepackt haben?
</p>
<p class="text-center text-xl py-10" *ngIf="!!(childActions$ | async)">
Prüfen Sie bitte stichprobenartig den Filialbestand des <br />
dargestellten Artikels. Ist der angezeigte Filialbestand <br />
korrekt?
</p>
</div>
<div class="bg-white" *ngSwitchCase="'Fehlt'">
<p class="text-center text-xl py-10">
Prüfen Sie bitte stichprobenartig den Filialbestand <br />
des dargestellten Artikels. Ist der angezeigte Filialbestand <br />
korrekt?
</p>
</div>
<div class="pt-3" *ngSwitchDefault></div>
</div>
<div class="bg-white rounded-t shadow-card grid grid-flow-row p-4 gap-2">
<div class="grid grid-cols-6">
@@ -12,7 +38,7 @@
<span *ngIf="packageDetails.package.packageNumber && packageDetails.package.deliveryNoteNumber"> | </span>
{{ packageDetails.package.deliveryNoteNumber }}
</div>
<div class="col-span-3" [class.annotation-layout]="packageDetails?.package?.features?.['annotation']">
<div class="col-span-3">
<ng-container *ngIf="packageDetails.package.arrivalStatus !== 8; else irrlauferTmplt">
Filialstopp
<span class="font-bold ml-2">
@@ -26,7 +52,7 @@
</span>
</ng-template>
</div>
<div data-which="Statusmeldung" class="text-right" *ngIf="!packageDetails?.package?.features?.['annotation']; else annotationTmpl">
<div class="text-right">
<ng-container *ngIf="(packageDetails.package.arrivalStatus | arrivalStatus) === 'Fehlt'">
<button
class="isa-icon-button mr-2"
@@ -52,16 +78,10 @@
<div
class="isa-label text-white font-bold page-package-details__arrival-status"
[class]="packageDetails.package.arrivalStatus | arrivalStatusColorClass"
data-what="arrival-status"
>
{{ packageDetails.package.arrivalStatus | arrivalStatus }}
</div>
</div>
<ng-template #annotationTmpl>
<div class="page-package-details__annotation text-right text-[#5A728A] col-span-2" data-what="annotation">
{{ packageDetails?.package?.features?.['annotation'] }}
</div>
</ng-template>
</div>
<div class="grid grid-cols-6">
<div class="col-span-2">

View File

@@ -148,7 +148,7 @@ export class PackageDetailsComponent {
@HostListener('window:resize')
calculateListHeight() {
const handlungsAnweisungHeight = this.handlungsAnweisung?.nativeElement?.offsetHeight ?? 0;
const handlungsAnweisungHeight = this.handlungsAnweisung?.nativeElement.offsetHeight;
const windowHeight = window.innerHeight;
this.detailsListHeight = windowHeight - handlungsAnweisungHeight - 516;
this._cdr.markForCheck();

View File

@@ -5,13 +5,14 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { Breadcrumb, BreadcrumbService } from '@core/breadcrumb';
import { take } from 'rxjs/operators';
import { NavigationRoute } from '@shared/services';
import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString, ListResponseArgsOfDBHOrderItemListItemDTO } from '@swagger/oms';
import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString } from '@swagger/oms';
import { isEmpty } from 'lodash';
import { Observable } from 'rxjs';
import { RunCheckTrigger } from './trigger';
import { OrderItemsContext } from '@domain/oms';
import { ActionHandlerService } from './services/action-handler.service';
import { Config } from '@core/config';
import { debounce } from '@utils/common';
export type GetNameForBreadcrumbData = {
processId: number;
@@ -116,8 +117,31 @@ export abstract class PickupShelfBaseComponent implements OnInit {
return queryParams;
}
// Fix Ticket #4688 Navigation behaves different based on section PickUpShelfOut and PickUpShelfIn
abstract regsiterFetchListResponseHandler(): void | Promise<void>;
regsiterFetchListResponseHandler() {
this.listStore.fetchListResponse$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async ({ processId, queryParams, response }) => {
/**
* Wenn die Suche erfolgreich war, wird der Benutzer auf die Liste oder Detailseite des gefundenen Artikels weitergeleitet.
*/
const filterQueryParams = this.listStore.filter.getQueryParams();
// Only Update QueryParams if the user is already on the details, edit or history page
// const view: string = this.activatedRoute.snapshot.data.view;
// if (['filter', 'details', 'edit', 'history'].includes(view)) {
// await this.router.navigate([], { queryParams: { ...queryParams, ...filterQueryParams }, skipLocationChange: true });
// return;
// }
if (response.hits === 1) {
const detailsPath = await this.getPathForDetail(response.result[0]).pipe(take(1)).toPromise();
await this.router.navigate(detailsPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...detailsPath.queryParams } });
} else if (response.hits > 1) {
const listPath = await this.getPathFoListBreadcrumb({ processId, queryParams });
await this.router.navigate(listPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...listPath.queryParams } });
} else {
await this.router.navigate([], { queryParams: { ...queryParams, ...filterQueryParams } });
}
});
}
/**
* Sucht die Breadcrumb anhand des Tags.

View File

@@ -43,7 +43,6 @@ export abstract class PickupShelfDetailsBaseComponent {
this.store.resetCoverItems();
}
this.store.fetchOrder({ orderId: Number(params.orderId) });
this.store.fetchOrderItems({
orderNumber: params.orderNumber ? decodeURIComponent(params.orderNumber) : undefined,
compartmentCode: params.compartmentCode ? decodeURIComponent(params.compartmentCode) : undefined,
@@ -125,7 +124,6 @@ export abstract class PickupShelfDetailsBaseComponent {
processingStatus: updatedItem.processingStatus,
compartmentCode: updatedItem.compartmentCode,
compartmentInfo: updatedItem.compartmentInfo,
quantity: updatedItem.quantity,
},
});
});

View File

@@ -36,22 +36,12 @@
<page-pickup-shelf-details-tags class="mb-px-2" *ngIf="showTagsComponent$ | async"></page-pickup-shelf-details-tags>
<ng-container *ngIf="fetchingCoverItems$ | async; else coverItemsTmpl">
<div class="bg-white grid grid-flow-col gap-5 justify-center items-center h-40">
<shared-skeleton-loader class="h-16 w-12"></shared-skeleton-loader>
<shared-skeleton-loader class="h-16 w-12"></shared-skeleton-loader>
<shared-skeleton-loader class="h-16 w-12"></shared-skeleton-loader>
</div>
</ng-container>
<ng-template #coverItemsTmpl>
<page-pickup-shelf-details-covers
*ngIf="(coverOrderItems$ | async)?.length > 0"
[coverItems]="coverOrderItems$ | async"
[selectedOrderItem]="selectedItem$ | async"
(coverClick)="coverClick($event)"
></page-pickup-shelf-details-covers>
</ng-template>
<page-pickup-shelf-details-covers
*ngIf="(coverOrderItems$ | async)?.length > 0"
[coverItems]="coverOrderItems$ | async"
[selectedOrderItem]="selectedItem$ | async"
(coverClick)="coverClick($event)"
></page-pickup-shelf-details-covers>
</div>
<div class="page-pickup-shelf-in-details__action-wrapper">

View File

@@ -10,15 +10,13 @@ import { UiSpinnerModule } from '@ui/spinner';
import { OnInitDirective } from '@shared/directives/element-lifecycle';
import { PickupShelfInNavigationService } from '@shared/services';
import { BehaviorSubject, asapScheduler, combineLatest } from 'rxjs';
import { distinctUntilChanged, map, shareReplay } from 'rxjs/operators';
import { map, shareReplay } from 'rxjs/operators';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString } from '@swagger/oms';
import { UiErrorModalComponent, UiModalService } from '@ui/modal';
import { ActivatedRoute } from '@angular/router';
import { RunCheckTrigger } from '../../trigger';
import { PickUpShelfDetailsItemsGroupComponent } from '../../shared/pickup-shelf-details-items-group/pickup-shelf-details-items-group.component';
import { isEqual } from 'lodash';
import { SkeletonLoaderComponent } from '@shared/components/loader';
@Component({
selector: 'page-pickup-shelf-in-details',
@@ -39,7 +37,6 @@ import { SkeletonLoaderComponent } from '@shared/components/loader';
PickupShelfAddToPreviousCompartmentCodeLabelPipe,
UiSpinnerModule,
OnInitDirective,
SkeletonLoaderComponent,
],
})
export class PickupShelfInDetailsComponent extends PickupShelfDetailsBaseComponent implements OnInit, AfterViewInit {
@@ -52,16 +49,16 @@ export class PickupShelfInDetailsComponent extends PickupShelfDetailsBaseCompone
order$ = this.store.order$;
orderItems$ = this.store.orderItems$.pipe(shareReplay(1));
orderItems$ = this.store.orderItems$.pipe(shareReplay());
noOrderItemsFound$ = this.store.noOrderItemsFound$;
fetchingOrder$ = this.store.fetchingOrder$;
fetching$ = this.store.fetchingOrder$;
fetchingItems$ = this.store.fetchingOrderItems$;
fetchingCoverItems$ = this.store.fetchingCoverOrderItems$;
viewFetching$ = combineLatest([this.fetchingItems$, this.orderItems$]).pipe(
map(([fetchingItems, orderItems]) => fetchingItems && orderItems.length === 0)
viewFetching$ = combineLatest([this.fetching$, this.fetchingItems$, this.fetchingCoverItems$]).pipe(
map(([fetching, fetchingItems, fetchingCoverItems]) => fetching || fetchingItems || fetchingCoverItems)
);
selectedCompartmentInfo = this.store.selectedCompartmentInfo;
@@ -105,7 +102,7 @@ export class PickupShelfInDetailsComponent extends PickupShelfDetailsBaseCompone
}
ngOnInit() {
combineLatest([this._activatedRoute.params.pipe(distinctUntilChanged(isEqual)), this.orderItems$.pipe(distinctUntilChanged(isEqual))])
combineLatest([this._activatedRoute.params, this.orderItems$])
.pipe(takeUntilDestroyed(this.destroyRef))
.subscribe(([params, items]) => {
const orderItemSubsetId = +params?.orderItemSubsetId;
@@ -117,15 +114,9 @@ export class PickupShelfInDetailsComponent extends PickupShelfDetailsBaseCompone
if (!!selectedItem && this.store.selectPreviousSelectedOrderItemSubsetId !== orderItemSubsetId) {
this.store.setPreviousSelectedOrderItemSubsetId(orderItemSubsetId); // Wichtig das die ID im Store vorhanden bleibt um z.B. für die Filter eine zurücknavigation zu ermöglichen
this.store.selectOrderItem(selectedItem, true); // Wird automatisch unselected wenn die Details Seite verlassen wird
this.store.fetchCoverOrderItems();
}
});
// Fix #4696 - Always Fetch Cover Order Items
this._activatedRoute.params.pipe(distinctUntilChanged(isEqual), takeUntilDestroyed(this.destroyRef)).subscribe((_) => {
if (!this.store.coverOrderItems || this.store.coverOrderItems.length === 0) {
this.store.fetchCoverOrderItems();
}
});
}
ngAfterViewInit() {
@@ -150,14 +141,11 @@ export class PickupShelfInDetailsComponent extends PickupShelfDetailsBaseCompone
try {
this.changeActionLoader$.next(action.command);
this.store.setDisableHeaderStatusDropdown(true);
const context = await this.execAction({ action, latestCompartmentCode, latestCompartmentInfo });
if (!!context) {
if (
action.command.includes('ARRIVED') ||
action.command.includes('PRINT_PRICEDIFFQRCODELABEL') ||
action.command.includes('BACKTOSTOCK')
) {
if (action.command.includes('ARRIVED') || action.command.includes('PRINT_PRICEDIFFQRCODELABEL')) {
asapScheduler.schedule(async () => {
await this.navigateBasedOnCurrentView();
}, 100);
@@ -220,20 +208,19 @@ export class PickupShelfInDetailsComponent extends PickupShelfDetailsBaseCompone
}
updateDate({ date, type }: { date: Date; type?: 'delivery' | 'pickup' | 'preferred' }) {
this.store.updateOrderItemSubsetLoading(true);
switch (type) {
case 'delivery':
this.store.selectedOrderItems.forEach((item) =>
this.store.orderItems.forEach((item) =>
this.store.patchOrderItemSubset({ item, changes: { estimatedShippingDate: date.toISOString() } })
);
break;
case 'pickup':
this.store.selectedOrderItems.forEach((item) =>
this.store.orderItems.forEach((item) =>
this.store.patchOrderItemSubset({ item, changes: { compartmentStop: date.toISOString() } })
);
break;
case 'preferred':
this.store.selectedOrderItems.forEach((item) =>
this.store.orderItems.forEach((item) =>
this.store.patchOrderItemSubset({ item, changes: { preferredPickUpDate: date.toISOString() } })
);
break;

View File

@@ -1,7 +1,5 @@
<ng-container *ngIf="store.selectedOrderItem$ | async; let item">
<shared-goods-in-out-order-edit
*ngIf="item"
(navigation)="navigateToShelfInDetailsPage($event)"
[items]="[item]"
></shared-goods-in-out-order-edit>
</ng-container>
<shared-goods-in-out-order-edit
*ngIf="store.orderItems$ | async; let items"
(navigation)="navigateToShelfInDetailsPage($event)"
[items]="items"
></shared-goods-in-out-order-edit>

View File

@@ -20,23 +20,15 @@ export class PickupShelfInEditComponent extends PickupShelfDetailsBaseComponent
constructor() {
super();
}
this.listStore;
}
async navigateToShelfInDetailsPage(changes?: Partial<DBHOrderItemListItemDTO>) {
const orderId = (await this.store.orderItems$.pipe(first()).toPromise())?.find((_) => true)?.orderId;
const orderNumber = decodeURIComponent(this.activatedRoute?.snapshot?.params?.orderNumber);
let compartmentCode = changes?.compartmentCode ?? this.activatedRoute?.snapshot?.params?.compartmentCode;
const orderNumber = this.activatedRoute?.snapshot?.params?.orderNumber;
const compartmentCode = changes?.compartmentCode ?? this.activatedRoute?.snapshot?.params?.compartmentCode;
const processingStatus = changes?.processingStatus ?? this.activatedRoute.snapshot.params.orderItemProcessingStatus;
let compartmentInfo = changes?.compartmentInfo ?? this.activatedRoute.snapshot.params.compartmentInfo;
const item = this.store?.selectedOrderItem;
if (compartmentCode) {
compartmentCode = decodeURIComponent(compartmentCode);
}
if (compartmentInfo) {
compartmentInfo = decodeURIComponent(compartmentInfo);
}
const compartmentInfo = changes?.compartmentInfo ?? this.activatedRoute.snapshot.params.compartmentInfo;
await this.router.navigate(
this.shelfInNavigation.detailRoute({
@@ -46,7 +38,7 @@ export class PickupShelfInEditComponent extends PickupShelfDetailsBaseComponent
compartmentCode,
processingStatus,
compartmentInfo,
orderItemSubsetId: item?.orderItemSubsetId,
orderItemSubsetId: this.store?.selectPreviousSelectedOrderItemSubsetId,
},
side: this.side,
}).path,

View File

@@ -16,7 +16,6 @@ import { map, take } from 'rxjs/operators';
import { ApplicationService } from '@core/application';
import { FilterAutocompleteProvider } from '@shared/components/filter';
import { PickUpShelfInAutocompleteProvider } from './providers/pickup-shelf-in-autocomplete.provider';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
selector: 'page-pickup-shelf-in',
@@ -97,10 +96,6 @@ export class PickupShelfInComponent extends PickupShelfBaseComponent {
const order = await this.detailsStore.order$.pipe(take(1)).toPromise();
if (!order) {
return;
}
if (order?.orderNumber) {
return order?.orderNumber;
}
@@ -115,12 +110,6 @@ export class PickupShelfInComponent extends PickupShelfBaseComponent {
const orderItemSubsetId = this.detailsStore.orderItemSubsetId;
const compartmentInfo = this.detailsStore.compartmentInfo;
// Ticket #4692 - Wenn keine Order vorhanden ist, dann soll Breadcrumb nicht erstellt werden
// Dies kann z.B. passieren bei Datenbankproblemen wenn das Fetchen der Order sehr lange braucht
if (!order) {
return;
}
return this._pickupShelfInNavigationService.detailRoute({
item: {
orderId: order?.id,
@@ -216,23 +205,4 @@ export class PickupShelfInComponent extends PickupShelfBaseComponent {
async getNameForHistoryBreadcrumb(data: GetNameForBreadcrumbData): Promise<string> {
return 'Historie';
}
async regsiterFetchListResponseHandler() {
this.listStore.fetchListResponse$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async ({ processId, queryParams, response }) => {
/**
* Wenn die Suche erfolgreich war, wird der Benutzer auf die Liste oder Detailseite des gefundenen Artikels weitergeleitet.
*/
const filterQueryParams = this.listStore.filter.getQueryParams();
if (response.hits === 1) {
const detailsPath = await this.getPathForDetail(response.result[0]).pipe(take(1)).toPromise();
await this.router.navigate(detailsPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...detailsPath.queryParams } });
} else if (response.hits > 1) {
const listPath = await this.getPathFoListBreadcrumb({ processId, queryParams });
await this.router.navigate(listPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...listPath.queryParams } });
} else {
await this.router.navigate([], { queryParams: { ...queryParams, ...filterQueryParams } });
}
});
}
}

View File

@@ -46,9 +46,7 @@ export class PickupShelfOutDetailsComponent extends PickupShelfDetailsBaseCompon
order$ = this.store.order$;
orderItems$ = this.store.orderItems$;
groupedItems$: Observable<Array<{ type: string; items: DBHOrderItemListItemDTO[] }>> = this.orderItems$.pipe(
groupedItems$: Observable<Array<{ type: string; items: DBHOrderItemListItemDTO[] }>> = this.store.orderItems$.pipe(
map((items) => {
const groups: Array<{ type: string; items: DBHOrderItemListItemDTO[] }> = [];
@@ -68,12 +66,10 @@ export class PickupShelfOutDetailsComponent extends PickupShelfDetailsBaseCompon
})
);
fetchingOrder$ = this.store.fetchingOrder$;
fetching$ = this.store.fetchingOrder$;
fetchingItems$ = this.store.fetchingOrderItems$;
viewFetching$ = combineLatest([this.orderItems$, this.fetchingItems$]).pipe(
map(([orderItems, fetchingItems]) => orderItems?.length === 0 && fetchingItems)
);
viewFetching$ = combineLatest([this.fetching$, this.fetchingItems$]).pipe(map(([fetching, fetchingItems]) => fetching || fetchingItems));
selectedCompartmentInfo = this.store.selectedCompartmentInfo;
@@ -88,7 +84,7 @@ export class PickupShelfOutDetailsComponent extends PickupShelfDetailsBaseCompon
addToPreviousCompartmentAction$ = this.store.addToPreviousCompartmentAction$;
mainActions$ = this.store.mainShelfOutActions$;
mainActions$ = this.store.mainActions$;
trackByFnGroupDBHOrderItemListItemDTO = (index: number, group: { type: string; items: DBHOrderItemListItemDTO[] }) => group.type;
@@ -109,11 +105,7 @@ export class PickupShelfOutDetailsComponent extends PickupShelfDetailsBaseCompon
const context = await this.execAction({ action });
if (!!context) {
if (
action.command.includes('ARRIVED') ||
action.command.includes('PRINT_PRICEDIFFQRCODELABEL') ||
action.command.includes('BACKTOSTOCK')
) {
if (action.command.includes('ARRIVED') || action.command.includes('PRINT_PRICEDIFFQRCODELABEL')) {
const nav = this._pickupShelfOutNavigationService.defaultRoute({ processId: this.processId });
await this.router.navigate(nav.path, { queryParams: nav.queryParams, queryParamsHandling: 'preserve' });
} else {
@@ -152,7 +144,6 @@ export class PickupShelfOutDetailsComponent extends PickupShelfDetailsBaseCompon
}
updateDate({ date, type }: { date: Date; type?: 'delivery' | 'pickup' | 'preferred' }) {
this.store.updateOrderItemSubsetLoading(true);
switch (type) {
case 'delivery': // vsl. Lieferdatum
this.store.orderItems.forEach((item) =>

View File

@@ -26,18 +26,10 @@ export class PickupShelfOutEditComponent extends PickupShelfDetailsBaseComponent
async navigateToShelfOutDetailsPage(changes: Partial<DBHOrderItemListItemDTO>) {
const orderId = (await this.store.orderItems$.pipe(first()).toPromise())?.find((_) => true)?.orderId;
const orderNumber = decodeURIComponent(this.activatedRoute?.snapshot?.params?.orderNumber);
let compartmentCode = changes?.compartmentCode ?? this.activatedRoute?.snapshot?.params?.compartmentCode;
const orderNumber = this.activatedRoute?.snapshot?.params?.orderNumber;
const compartmentCode = changes?.compartmentCode ?? this.activatedRoute?.snapshot?.params?.compartmentCode;
const processingStatus = changes?.processingStatus ?? this.activatedRoute.snapshot.params.orderItemProcessingStatus;
let compartmentInfo = changes?.compartmentInfo ?? this.activatedRoute.snapshot.params.compartmentInfo;
if (compartmentCode) {
compartmentCode = decodeURIComponent(compartmentCode);
}
if (compartmentInfo) {
compartmentInfo = decodeURIComponent(compartmentInfo);
}
const compartmentInfo = changes?.compartmentInfo ?? this.activatedRoute.snapshot.params.compartmentInfo;
await this.router.navigate(
this.shelfOutNavigation.detailRoute({

View File

@@ -15,7 +15,6 @@ import { ActionHandlerServices } from '@domain/oms';
import { ActionHandlerService } from '../services/action-handler.service';
import { FilterAutocompleteProvider } from '@shared/components/filter';
import { PickUpShelfOutAutocompleteProvider } from './providers/pickup-shelf-out-autocomplete.provider';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
selector: 'page-pickup-shelf-out',
@@ -204,33 +203,4 @@ export class PickupShelfOutComponent extends PickupShelfBaseComponent {
async getNameForHistoryBreadcrumb(data: GetNameForBreadcrumbData): Promise<string> {
return 'Historie';
}
async regsiterFetchListResponseHandler() {
this.listStore.fetchListResponse$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(async ({ processId, queryParams, response }) => {
/**
* Wenn die Suche erfolgreich war, wird der Benutzer auf die Liste oder Detailseite des gefundenen Artikels weitergeleitet.
*/
const filterQueryParams = this.listStore.filter.getQueryParams();
if (response.hits === 1) {
const detailsPath = await this.getPathForDetail(response.result[0]).pipe(take(1)).toPromise();
await this.router.navigate(detailsPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...detailsPath.queryParams } });
} else if (response.hits > 1) {
const listPath = await this.getPathFoListBreadcrumb({ processId, queryParams });
await this.router.navigate(listPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...listPath.queryParams } });
} else {
await this.router.navigate([], { queryParams: { ...queryParams, ...filterQueryParams } });
}
});
}
// Ticket 4720 WA // Trefferliste wird übersprungen - Bei mehreren Bestellposten pro Bestellung soll IMMER auf Trefferliste navigiert werden
// Damit werden #4684 und #4688 überflüssig
// REMOVED: Fix Ticket #4684 Navigate on Details if items contain same OrderNumber
// private _hasSameOrderNumber(response: ListResponseArgsOfDBHOrderItemListItemDTO) {
// if (response.hits === 0) return false;
// const orderNumbers = new Set(response.result.map((item) => item.orderNumber));
// return orderNumbers.size === 1;
// }
}

View File

@@ -1,13 +1,11 @@
<ng-container *ngIf="orderItem$ | async; let orderItem">
<div class="grid grid-flow-row gap-px-2">
<div class="bg-[#F5F7FA] flex flex-row justify-between items-center p-4 rounded-t">
<div class="grid grid-flow-col gap-[0.4375rem] items-center" *ngIf="fetchingCustomerDone$ | async; else featureLoading">
<ng-container *ngIf="features$ | async; let features">
<shared-icon *ngIf="features?.length > 0" [size]="24" icon="person"></shared-icon>
<div class="grid grid-flow-col gap-2 items-center font-bold text-p2" *ngFor="let feature of features">
{{ feature?.description }}
</div>
</ng-container>
<div class="grid grid-flow-col gap-[0.4375rem] items-center" *ngIf="features$ | async; let features; else: featureLoading">
<shared-icon *ngIf="features?.length > 0" [size]="24" icon="person"></shared-icon>
<div class="grid grid-flow-col gap-2 items-center font-bold text-p2" *ngFor="let feature of features">
{{ feature?.description }}
</div>
</div>
<button
@@ -98,12 +96,7 @@
</div>
<div class="flex flex-row page-pickup-shelf-details-header__order-source" data-detail-id="Bestellkanal">
<div class="min-w-[9rem]">Bestellkanal</div>
<div class="flex flex-row font-bold">
<shared-skeleton-loader class="w-32" *ngIf="fetchingOrder$ | async; else orderSourceTmpl"></shared-skeleton-loader>
<ng-template #orderSourceTmpl>
{{ order()?.features?.orderSource }}
</ng-template>
</div>
<div class="flex flex-row font-bold">{{ order?.features?.orderSource }}</div>
</div>
<div
class="flex flex-row page-pickup-shelf-details-header__change-date justify-between"
@@ -144,21 +137,24 @@
data-detail-id="Benachrichtigung"
>
<div class="min-w-[9rem]">Benachrichtigung</div>
<div class="flex flex-row font-bold">
<shared-skeleton-loader class="w-32" *ngIf="fetchingOrder$ | async; else notificationsChannelTpl"></shared-skeleton-loader>
<ng-template #notificationsChannelTpl>
{{ (notificationsChannel$ | async | notificationsChannel) || '-' }}
</ng-template>
</div>
<div class="flex flex-row font-bold">{{ (notificationsChannel$ | async | notificationsChannel) || '-' }}</div>
</div>
</div>
</div>
</div>
</div>
<ng-template #featureLoading>
<div class="fetch-wrapper">
<div class="fetching"></div>
<div class="fetching"></div>
<div class="fetching"></div>
</div>
</ng-template>
<ng-template #abholfrist>
<div class="min-w-[9rem]">Abholfrist</div>
<div *ngIf="!(orderItemSubsetLoading$ | async); else featureLoading" class="flex flex-row font-bold">
<div *ngIf="!(changeDateLoader$ | async)" class="flex flex-row font-bold">
<button
[uiOverlayTrigger]="deadlineDatepicker"
#deadlineDatepickerTrigger="uiOverlayTrigger"
@@ -182,11 +178,12 @@
>
</ui-datepicker>
</div>
<ui-spinner *ngIf="changeDateLoader$ | async; let loader" class="flex flex-row font-bold loader" [show]="loader"></ui-spinner>
</ng-template>
<ng-template #preferredPickUpDate>
<div class="min-w-[9rem]">Zurücklegen bis</div>
<div *ngIf="!(orderItemSubsetLoading$ | async); else featureLoading" class="flex flex-row font-bold">
<div *ngIf="!(changePreferredDateLoader$ | async)" class="flex flex-row font-bold">
<button
[uiOverlayTrigger]="preferredPickUpDatePicker"
#preferredPickUpDatePickerTrigger="uiOverlayTrigger"
@@ -213,11 +210,12 @@
>
</ui-datepicker>
</div>
<ui-spinner *ngIf="changePreferredDateLoader$ | async; let loader" class="flex flex-row font-bold loader" [show]="loader"> </ui-spinner>
</ng-template>
<ng-template #vslLieferdatum>
<div class="min-w-[9rem]">vsl. Lieferdatum</div>
<div *ngIf="!(orderItemSubsetLoading$ | async); else featureLoading" class="flex flex-row font-bold">
<div *ngIf="!(changeDateLoader$ | async)" class="flex flex-row font-bold">
<button
class="cta-datepicker"
[disabled]="changeDateDisabled$ | async"
@@ -241,9 +239,6 @@
>
</ui-datepicker>
</div>
<ui-spinner *ngIf="changeDateLoader$ | async; let loader" class="flex flex-row font-bold loader" [show]="loader"></ui-spinner>
</ng-template>
</ng-container>
<ng-template #featureLoading>
<shared-skeleton-loader class="w-64 h-6"></shared-skeleton-loader>
</ng-template>

View File

@@ -2,7 +2,7 @@ import { AsyncPipe, DatePipe, NgFor, NgIf, NgSwitch, NgSwitchCase, NgTemplateOut
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output, inject } from '@angular/core';
import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString, NotificationChannel, OrderDTO } from '@swagger/oms';
import { PickupShelfDetailsStore } from '../../store';
import { map, shareReplay, tap, withLatestFrom } from 'rxjs/operators';
import { map, shareReplay, withLatestFrom } from 'rxjs/operators';
import { BehaviorSubject, Observable, combineLatest } from 'rxjs';
import { DateAdapter, UiCommonModule } from '@ui/common';
import { IconModule } from '@shared/components/icon';
@@ -12,8 +12,6 @@ import { PickupShelfNotificationsChannelPipe } from '../pipes/notifications-chan
import { PickupShelfProcessingStatusPipe } from '../pipes/processing-status.pipe';
import { UiDatepickerModule } from '@ui/datepicker';
import { PickUpShelfDetailsHeaderNavMenuComponent } from '../pickup-shelf-details-header-nav-menu/pickup-shelf-details-header-nav-menu.component';
import { SkeletonLoaderComponent } from '@shared/components/loader';
import { toSignal } from '@angular/core/rxjs-interop';
@Component({
selector: 'page-pickup-shelf-details-header',
@@ -38,7 +36,6 @@ import { toSignal } from '@angular/core/rxjs-interop';
UiCommonModule,
UiDatepickerModule,
PickUpShelfDetailsHeaderNavMenuComponent,
SkeletonLoaderComponent,
],
})
export class PickUpShelfDetailsHeaderComponent {
@@ -53,13 +50,13 @@ export class PickUpShelfDetailsHeaderComponent {
@Output()
updateDate = new EventEmitter<{ date: Date; type?: 'delivery' | 'pickup' | 'preferred' }>();
orderItemSubsetLoading$ = this._store.orderItemSubsetLoading$;
get order$(): Observable<OrderDTO> {
return this._store.order$;
}
fetchingOrder$ = this._store.fetchingOrder$;
order$ = this._store.order$;
order = toSignal(this.order$);
get order(): OrderDTO {
return this._store.order;
}
findLatestPreferredPickUpDate$: Observable<Date> = this.order$.pipe(
withLatestFrom(this._store.selectedOrderItemIds$),
@@ -89,17 +86,13 @@ export class PickUpShelfDetailsHeaderComponent {
processId?: number;
get isKulturpass() {
return this.order()?.features?.orderSource === 'KulturPass';
return this.order?.features?.orderSource === 'KulturPass';
}
minDateDatepicker = this.dateAdapter.addCalendarDays(this.dateAdapter.today(), -1);
today = this.dateAdapter.today();
// Daten die im Header Angezeigt werden sollen
orderItem$ = combineLatest([
this._store.selectedOrderItem$, // Wenn man im Abholfach ist muss das ausgewählte OrderItem genommen werden
this._store.selectedOrderItems$.pipe(map((orderItems) => orderItems?.find((_) => true))), // Wenn man in der Warenausgabe ist muss man das erste OrderItem nehmen
]).pipe(map(([selectedOrderItem, selectedOrderItems]) => selectedOrderItem || selectedOrderItems));
orderItem$ = this._store.orderItems$.pipe(map((orderItems) => orderItems?.find((_) => true)));
changeDateLoader$ = new BehaviorSubject<boolean>(false);
changePreferredDateLoader$ = new BehaviorSubject<boolean>(false);
@@ -108,8 +101,6 @@ export class PickUpShelfDetailsHeaderComponent {
changeDateDisabled$ = this.changeStatusDisabled$;
fetchingCustomerDone$ = this._store.fetchingCustomer$.pipe(map((fetchingCustomer) => !fetchingCustomer));
customer$ = this._store.customer$;
features$ = this.customer$.pipe(

View File

@@ -32,11 +32,7 @@
</div>
<div class="page-pickup-shelf-details-item__item-container">
<div class="page-pickup-shelf-details-item__thumbnail">
<img
[productImageNavigation]="orderItem?.product?.ean"
[src]="orderItem.product?.ean | productImage"
[alt]="orderItem.product?.name"
/>
<img [src]="orderItem.product?.ean | productImage" [alt]="orderItem.product?.name" />
</div>
<div class="page-pickup-shelf-details-item__details">
<div class="flex flex-row justify-between items-start mb-[1.3125rem]">

View File

@@ -12,7 +12,7 @@ import {
inject,
} from '@angular/core';
import { FormsModule, ReactiveFormsModule, UntypedFormControl } from '@angular/forms';
import { NavigateOnClickDirective, ProductImageModule } from '@cdn/product-image';
import { ProductImageModule } from '@cdn/product-image';
import { DBHOrderItemListItemDTO, OrderDTO, ReceiptDTO } from '@swagger/oms';
import { UiCommonModule } from '@ui/common';
import { UiTooltipModule } from '@ui/tooltip';
@@ -57,7 +57,6 @@ export interface PickUpShelfDetailsItemComponentState {
IconModule,
UiQuantityDropdownModule,
NotificationTypePipe,
NavigateOnClickDirective,
],
})
export class PickUpShelfDetailsItemComponent extends ComponentStore<PickUpShelfDetailsItemComponentState> implements OnInit {
@@ -78,10 +77,7 @@ export class PickUpShelfDetailsItemComponent extends ComponentStore<PickUpShelfD
set orderItem(orderItem: DBHOrderItemListItemDTO) {
if (!isEqual(this.orderItem, orderItem)) {
// Remove Prev OrderItem from selected list
if (this.orderItem?.orderItemSubsetId !== orderItem?.orderItemSubsetId) {
this._store.selectOrderItem(this.orderItem, false);
}
this._store.selectOrderItem(this.orderItem, false);
this.patchState({ orderItem, quantity: orderItem?.quantity, more: false });
this.specialCommentControl.reset(orderItem?.specialComment);
// Add New OrderItem to selected list if selected was set to true by its input

View File

@@ -4,7 +4,7 @@
*ngIf="historyItem$ | async; let item"
class="self-end"
type="button"
(click)="listStore.processId !== 7000 ? navigateToShelfOutDetailsPage(item) : navigateToShelfInDetailsPage(item)"
(click)="store.processId !== 7000 ? navigateToShelfOutDetailsPage(item) : navigateToShelfInDetailsPage(item)"
>
<shared-icon icon="close" [size]="26"></shared-icon>
</button>

View File

@@ -1,5 +1,5 @@
import { AsyncPipe, NgIf } from '@angular/common';
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { DomainOmsService } from '@domain/oms';
import { PickupShelfIOService } from '@domain/pickup-shelf';
@@ -9,8 +9,8 @@ import { PickUpShelfOutNavigationService, PickupShelfInNavigationService } from
import { DBHOrderItemListItemDTO } from '@swagger/oms';
import { Observable, combineLatest } from 'rxjs';
import { map, shareReplay, switchMap, take } from 'rxjs/operators';
import { PickupShelfStore } from '../../store';
import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { PickupShelfDetailsBaseComponent } from '../../pickup-shelf-details-base.component';
@Component({
selector: 'page-pickup-shelf-history',
@@ -21,7 +21,9 @@ import { PickupShelfDetailsBaseComponent } from '../../pickup-shelf-details-base
host: { class: 'page-pickup-shelf-history' },
imports: [AsyncPipe, NgIf, SharedHistoryListModule, IconModule],
})
export class PickUpShelfHistoryComponent extends PickupShelfDetailsBaseComponent {
export class PickUpShelfHistoryComponent {
store = inject(PickupShelfStore);
compartmentCode$: Observable<string> = this._activatedRoute.params.pipe(
map((params) => decodeURIComponent(params?.compartmentCode ?? '') || undefined)
);
@@ -60,14 +62,12 @@ export class PickUpShelfHistoryComponent extends PickupShelfDetailsBaseComponent
private _shelfInNavigation: PickupShelfInNavigationService,
private _omsService: DomainOmsService,
private _pickupShelfIOService: PickupShelfIOService
) {
super();
}
) {}
async navigateToShelfOutDetailsPage(item: DBHOrderItemListItemDTO) {
await this._router.navigate(
this._shelfOutNavigation.detailRoute({
processId: this.listStore.processId,
processId: this.store.processId,
item: {
compartmentCode: item.compartmentCode,
orderId: item.orderId,

View File

@@ -3,7 +3,7 @@
[routerLink]="itemDetailsLink"
[routerLinkActive]="!isTablet && !primaryOutletActive ? 'active' : ''"
queryParamsHandling="preserve"
(click)="onDetailsClick()"
(click)="isDesktopLarge ? scrollIntoView() : ''"
>
<div
class="page-pickup-shelf-list-item__item-grid-container"
@@ -15,7 +15,6 @@
class="page-pickup-shelf-list-item__item-image w-[3.125rem] max-h-[4.9375rem]"
loading="lazy"
*ngIf="item?.product?.ean | productImage; let productImage"
[productImageNavigation]="item?.product?.ean"
[src]="productImage"
[alt]="item?.product?.name"
/>

View File

@@ -1,7 +1,7 @@
import { CurrencyPipe, DatePipe, NgFor, NgIf } from '@angular/common';
import { ChangeDetectionStrategy, Component, ElementRef, Input, inject } from '@angular/core';
import { RouterLink, RouterLinkActive } from '@angular/router';
import { NavigateOnClickDirective, ProductImageModule } from '@cdn/product-image';
import { ProductImageModule } from '@cdn/product-image';
import { EnvironmentService } from '@core/environment';
import { IconModule } from '@shared/components/icon';
import { DBHOrderItemListItemDTO } from '@swagger/oms';
@@ -10,7 +10,6 @@ import { PickupShelfProcessingStatusPipe } from '../pipes/processing-status.pipe
import { FormsModule } from '@angular/forms';
import { PickupShelfStore } from '../../store';
import { map } from 'rxjs/operators';
import { CacheService } from '@core/cache';
@Component({
selector: 'page-pickup-shelf-list-item',
@@ -31,13 +30,10 @@ import { CacheService } from '@core/cache';
ProductImageModule,
UiCommonModule,
PickupShelfProcessingStatusPipe,
NavigateOnClickDirective,
],
providers: [PickupShelfProcessingStatusPipe],
})
export class PickUpShelfListItemComponent {
private cache = inject(CacheService);
store = inject(PickupShelfStore);
@Input() item: DBHOrderItemListItemDTO;
@@ -89,45 +85,6 @@ export class PickUpShelfListItemComponent {
private _processingStatusPipe: PickupShelfProcessingStatusPipe
) {}
onDetailsClick() {
if (this.isDesktopLarge) {
this.scrollIntoView();
}
if (!this.hasOrderItemInCache()) {
this.addOrderItemIntoCache();
}
}
hasOrderItemInCache() {
const items =
this.cache.get<DBHOrderItemListItemDTO[]>({
name: 'orderItems',
orderId: this.item.orderId,
compartmentCode: this.item.compartmentCode,
compartmentInfo: this.item.compartmentInfo,
orderItemProcessingStatus: this.item.processingStatus,
store: 'PickupShelfDetailsStore',
}) ?? [];
return items.some((i) => i.orderItemSubsetId === this.item.orderItemSubsetId);
}
addOrderItemIntoCache() {
this.cache.set(
{
name: 'orderItems',
orderId: this.item.orderId,
compartmentCode: this.item.compartmentCode,
compartmentInfo: this.item.compartmentInfo,
orderItemProcessingStatus: this.item.processingStatus,
store: 'PickupShelfDetailsStore',
},
[this.item],
{ persist: false, ttl: 1000 }
);
}
scrollIntoView() {
this._elRef.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
}

View File

@@ -1,5 +1,5 @@
import { PickupShelfDetailsState } from './pickup-shelf-details.state';
import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString } from '@swagger/oms';
import { DBHOrderItemListItemDTO } from '@swagger/oms';
export const selectOrder = (s: PickupShelfDetailsState) => s.order;
@@ -89,8 +89,6 @@ export const selectSelectedOrderItemIds = (s: PickupShelfDetailsState) => s.sele
export const selectPreviousSelectedOrderItemSubsetId = (s: PickupShelfDetailsState) => s.previousSelectedOrderItemSubsetId;
export const selectOrderItemSubsetLoading = (s: PickupShelfDetailsState) => s.orderItemSubsetLoading;
export const selectDisableHeaderStatusDropdown = (s: PickupShelfDetailsState) => s.disableHeaderStatusDropdown;
export const selectedOrderItems = (s: PickupShelfDetailsState) => {
@@ -102,9 +100,9 @@ export const selectedOrderItems = (s: PickupShelfDetailsState) => {
export const selectedOrderItem = (s: PickupShelfDetailsState) => {
const orderItems = selectOrderItems(s);
const displayedOrderItemSubsetId = selectDisplayedOrderItemSubsetId(s);
const selectedOrderItemId = selectPreviousSelectedOrderItemSubsetId(s);
return orderItems?.find((oi) => oi?.orderItemSubsetId === displayedOrderItemSubsetId);
return orderItems?.find((oi) => oi?.orderItemSubsetId === selectedOrderItemId);
};
export const selectSelectedOrderItemQuantity = (s: PickupShelfDetailsState) => {
@@ -247,26 +245,6 @@ export const selectMainActions = (s: PickupShelfDetailsState) => {
?.filter((action) => (fetchPartial ? !action.command.includes('FETCHED_PARTIAL') : true));
};
export const selectShelfOutMainActions = (s: PickupShelfDetailsState) => {
const items = selectOrderItems(s);
const fetchPartial = selectFetchPartial(s);
// Ticket #4690 Consider every Item for selecting the main actions in Details View - Only for PickUpShelfOut
const actions: KeyValueDTOOfStringAndString[] = [];
for (const item of items) {
const actionsFromItem = item?.actions
?.filter((action) => typeof action?.enabled !== 'boolean')
?.filter((action) => (fetchPartial ? !action.command.includes('FETCHED_PARTIAL') : true));
for (const action of actionsFromItem) {
if (!actions.find((a) => a.command === action.command)) {
actions.push(action);
}
}
}
return actions;
};
export const selectCustomerNumber = (s: PickupShelfDetailsState) => {
const order = selectOrder(s);
return order?.buyer?.buyerNumber;

View File

@@ -34,7 +34,6 @@ export interface PickupShelfDetailsState {
fetchingOrderItemSubsetTasks: { [orderItemSubsetId: number]: boolean };
orderItemSubsetTasks: { [orderItemSubsetId: number]: OrderItemSubsetTaskListItemDTO[] };
orderItemSubsetLoading?: boolean;
coverOrderItems?: DBHOrderItemListItemDTO[];
fetchingCoverOrderItems?: boolean;

View File

@@ -1,6 +1,6 @@
import { ComponentStore, tapResponse } from '@ngrx/component-store';
import { PickupShelfDetailsState } from './pickup-shelf-details.state';
import { Observable, combineLatest } from 'rxjs';
import { Observable } from 'rxjs';
import {
DBHOrderItemListItemDTO,
EntityDTOContainerOfOrderItemSubsetDTO,
@@ -18,7 +18,7 @@ import {
} from '@swagger/oms';
import { PickupShelfIOService, PickupShelfService } from '@domain/pickup-shelf';
import { Injectable, inject } from '@angular/core';
import { delayWhen, filter, map, mergeMap, switchMap, take, tap, withLatestFrom } from 'rxjs/operators';
import { delayWhen, filter, mergeMap, switchMap, take, tap, withLatestFrom } from 'rxjs/operators';
import { UiModalService } from '@ui/modal';
import { CrmCustomerService } from '@domain/crm';
import * as Selectors from './pickup-shelf-details.selectors';
@@ -56,20 +56,10 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
return this.get(Selectors.selectFetchingOrder);
}
// orderItems$ = this.select(Selectors.selectOrderItems);
// get orderItems() {
// return this.get(Selectors.selectOrderItems);
// }
orderItems$ = combineLatest([
this.select(Selectors.selectOrderItems),
this.select((s) => s).pipe(switchMap((s) => this._listStore.itemsForPreview$(s))),
]).pipe(map(([orderItems, itemsForPreview]) => (orderItems?.length ? orderItems : itemsForPreview)));
orderItems$ = this.select(Selectors.selectOrderItems);
get orderItems() {
const orderItems = this.get(Selectors.selectOrderItems);
return orderItems?.length ? orderItems : this.get((s) => this._listStore.itemsForPreview(s));
return this.get(Selectors.selectOrderItems);
}
fetchingOrderItems$ = this.select(Selectors.selectFetchingOrderItems);
@@ -221,12 +211,6 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
return this.get(Selectors.selectMainActions);
}
mainShelfOutActions$ = this.select(Selectors.selectShelfOutMainActions);
get mainShelfOutActions() {
return this.get(Selectors.selectShelfOutMainActions);
}
customerNumber$ = this.select(Selectors.selectCustomerNumber);
get customerNumber() {
@@ -245,12 +229,6 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
return this.get(Selectors.selectCoverOrderItems);
}
orderItemSubsetLoading$ = this.select(Selectors.selectOrderItemSubsetLoading);
get orderItemSubsetLoading() {
return this.get(Selectors.selectOrderItemSubsetLoading);
}
// Wird benöitgt um das Status Dropdown in der Details Header Komponente zu disablen wenn eine Action gehandled wird
disableHeaderStatusDropdown$ = this.select(Selectors.selectDisableHeaderStatusDropdown);
@@ -354,8 +332,8 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
fetchOrder = this.effect((trigger$: Observable<{ orderId: number }>) =>
trigger$.pipe(
filter(({ orderId }) => this.order?.id !== orderId),
tap(({ orderId }) => this.beforeFetchOrder(orderId)),
// delay(10000),
switchMap(({ orderId }) =>
this._pickupShelfService.getOrderByOrderId(orderId).pipe(tapResponse(this.fetchOrderSuccess, this.fetchOrderFailed))
)
@@ -363,7 +341,7 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
);
private beforeFetchOrder = (orderId) => {
const order = this._cacheService.get<OrderDTO>({ name: 'order', orderId, store: 'PickupShelfDetailsStore' }) ?? { id: orderId };
const order = this._cacheService.get<OrderDTO>({ name: 'order', orderId, store: 'PickupShelfDetailsStore' });
const customer = this._cacheService.get<CustomerInfoDTO>({
name: 'customer',
orderId,
@@ -496,7 +474,7 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
fetchCustomer = this.effect((trigger$: Observable<{ buyerNumber: string }>) =>
trigger$.pipe(
filter(({ buyerNumber }) => this.customer?.customerNumber !== buyerNumber),
tap(() => this.beforeFetchCustomer()),
tap(this.beforeFetchCustomer),
switchMap(({ buyerNumber }) =>
this._customerService.getCustomers(buyerNumber).pipe(tapResponse(this.fetchCustomerSuccess, this.fetchCustomerFailed))
)
@@ -509,7 +487,7 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
orderId: this.order.id,
store: 'PickupShelfDetailsStore',
});
this.patchState({ fetchingCustomer: !customer, customer: customer });
this.patchState({ fetchingCustomer: true, customer });
};
fetchCustomerSuccess = (res: ListResponseArgsOfCustomerInfoDTO) => {
@@ -518,7 +496,6 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
// check if response contains exactly one customer
if (customers.length > 1) {
this._modal.error('Fehler beim Laden des Kunden', new Error('Es wurde mehr als ein Kunde gefunden.'));
this.patchState({ fetchingCustomer: false });
return;
}
@@ -535,7 +512,6 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
// also check if the order is a KulturPass order, then there may be no customer
if (!isKulturpass && customer?.customerNumber !== this.order.buyer.buyerNumber) {
this._modal.error('Fehler beim Laden des Kunden', new Error('Der Kunde ist nicht der Bestellung zugeordnet.'));
this.patchState({ fetchingCustomer: false });
return;
}
@@ -585,8 +561,6 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
if (res.result.preferredPickUpDate) {
this.patchPreferredPickUpDateOnOrderSubsetItemInState({ item, newPreferredPickUpDate: res.result.preferredPickUpDate });
}
this.updateOrderItemSubsetLoading(false);
};
private patchOrderItemSubsetError = (err: any) => {
@@ -731,10 +705,6 @@ export class PickupShelfDetailsStore extends ComponentStore<PickupShelfDetailsSt
this.patchState({ fetchingCoverOrderItems: true });
};
updateOrderItemSubsetLoading(orderItemSubsetLoading: boolean) {
this.patchState({ orderItemSubsetLoading });
}
private fetchCoverOrderItemsDone = (res: ListResponseArgsOfDBHOrderItemListItemDTO) => {
this.patchState({ fetchingCoverOrderItems: false, coverOrderItems: res.result });
};

View File

@@ -1,13 +1,6 @@
import { Filter } from '@shared/components/filter';
import { PickupShelfState } from './pickup-shelf.state';
import { isEmpty } from 'lodash';
import { PickupShelfDetailsState } from './pickup-shelf-details.state';
import {
selectDisplayedCompartmentCode,
selectDisplayedCompartmentInfo,
selectDisplayedOrderItemProcessingStatus,
selectOrder,
} from './pickup-shelf-details.selectors';
export function selectProcessId(state: PickupShelfState) {
return state.processId;
@@ -71,27 +64,3 @@ export function selectListHits(state: PickupShelfState) {
export function selectSelectedListItems(state: PickupShelfState) {
return state.selectedListItems ?? [];
}
export const selectItemsForPreview = (detailsState: PickupShelfDetailsState) => (state: PickupShelfState) => {
const orderId = selectOrder(detailsState)?.id;
let items = state.list.filter((item) => item.orderId === orderId);
const processingStatus = selectDisplayedOrderItemProcessingStatus(detailsState);
if (processingStatus) {
items = items?.filter((oi) => oi.processingStatus === processingStatus);
}
const compartmentCode = selectDisplayedCompartmentCode(detailsState);
if (compartmentCode) {
items = items?.filter((oi) => oi.compartmentCode === compartmentCode);
const compartmentInfo = selectDisplayedCompartmentInfo(detailsState);
if (compartmentInfo) {
items = items?.filter((oi) => oi.compartmentInfo === compartmentInfo);
}
}
return items;
};

View File

@@ -28,7 +28,6 @@ import * as Selectors from './pickup-shelf.selectors';
import { Observable, Subject, combineLatest } from 'rxjs';
import { CacheService } from '@core/cache';
import { Filter } from '@shared/components/filter';
import { PickupShelfDetailsState } from './pickup-shelf-details.state';
@Injectable()
export class PickupShelfStore extends ComponentStore<PickupShelfState> implements OnStoreInit {
@@ -105,10 +104,6 @@ export class PickupShelfStore extends ComponentStore<PickupShelfState> implement
return this.get(Selectors.selectSelectedListItems);
}
itemsForPreview$ = (state: PickupShelfDetailsState) => this.select(Selectors.selectItemsForPreview(state));
itemsForPreview = (state: PickupShelfDetailsState) => this.get(Selectors.selectItemsForPreview(state));
constructor() {
// Nicht entfernen sonst wird der Store nicht initialisiert
super({});
@@ -242,17 +237,16 @@ export class PickupShelfStore extends ComponentStore<PickupShelfState> implement
private beforeFetchList = (emitFetchListResponse: boolean, filter: Filter, processId: number) => {
this.cancelListRequests();
this.patchState({ fetchingList: true });
const queryToken = filter.getQueryParams();
const cachedListResponse = this._cacheService.get<ListResponseArgsOfDBHOrderItemListItemDTO>({ processId, queryToken });
let list: DBHOrderItemListItemDTO[] = [];
if (!!cachedListResponse) {
this.patchState({ list: cachedListResponse.result, listHits: cachedListResponse.hits });
this.patchState({ fetchingList: false, list: cachedListResponse.result, listHits: cachedListResponse.hits });
list = cachedListResponse.result;
} else {
this.patchState({ list: [], listHits: 0 });
this.patchState({ fetchingList: true, list: [], listHits: 0 });
}
return { emitFetchListResponse, filter, processId, list };

View File

@@ -11,7 +11,6 @@ import { UiTooltipModule } from '@ui/tooltip';
import { UiCommonModule } from '@ui/common';
import { UiDropdownModule } from '@ui/dropdown';
import { UiIconModule } from '@ui/icon';
import { SharedProductGroupPipe } from '@shared/pipes/product-group';
@NgModule({
imports: [
@@ -26,7 +25,6 @@ import { SharedProductGroupPipe } from '@shared/pipes/product-group';
UiTooltipModule,
UiDropdownModule,
UiIconModule,
SharedProductGroupPipe,
],
exports: [AddProductModalComponent],
declarations: [AddProductModalComponent],

View File

@@ -1 +1,2 @@
export * from './product-group.pipe';
export * from './remission-pipe.module';

View File

@@ -6,9 +6,8 @@ import { distinctUntilChanged, map, switchMap } from 'rxjs/operators';
@Pipe({
name: 'productGroup',
pure: false,
standalone: true,
})
export class SharedProductGroupPipe implements PipeTransform, OnDestroy {
export class ProductGroupPipe implements PipeTransform, OnDestroy {
result: string;
productGroup$ = new Subject<string>();

View File

@@ -1,10 +1,11 @@
import { NgModule } from '@angular/core';
import { AssortmentPipe } from './assortment.pipe';
import { ProductGroupPipe } from './product-group.pipe';
import { ShortReceiptNumberPipe } from './short-receipt-number.pipe';
import { SupplierPipe } from './supplier.pipe';
@NgModule({
declarations: [AssortmentPipe, ShortReceiptNumberPipe, SupplierPipe],
exports: [AssortmentPipe, ShortReceiptNumberPipe, SupplierPipe],
declarations: [ProductGroupPipe, AssortmentPipe, ShortReceiptNumberPipe, SupplierPipe],
exports: [ProductGroupPipe, AssortmentPipe, ShortReceiptNumberPipe, SupplierPipe],
})
export class RemissionPipeModule {}

View File

@@ -31,6 +31,6 @@ export class RemissionFilterComponent implements OnDestroy {
}
resetFilter() {
this.store.loadFilter({ loadDefault: true });
this.store.loadFilter();
}
}

View File

@@ -21,17 +21,15 @@
</div>
<div class="product-data-grid grid gap-6 items-start">
<div>
<img
[productImageNavigation]="item?.ean"
class="max-w-full max-h-full shadow rounded"
src="{{ item.ean | productImage }}"
alt="item.dto.product.name"
/>
<img class="max-w-full max-h-full shadow rounded" src="{{ item.ean | productImage }}" alt="item.dto.product.name" />
</div>
<div class="grid grid-flow-row gap-1 w-48">
<div class="overflow-hidden overflow-ellipsis whitespace-nowrap" *ngIf="checkFormatAvailable()">
<img *ngIf="iconExists()" class="inline" [src]="formatIconUrl" [alt]="item.formatDetail" />
<div
class="overflow-hidden overflow-ellipsis whitespace-nowrap"
*ngIf="!!item.format && !!item.formatDetail && item.format !== 'UNKNOWN'"
>
<img class="inline" src="/assets/images/Icon_{{ item.dto.product.format }}.svg" [alt]="item.formatDetail" />
<span class="ml-1 font-bold format-detail">{{ item.formatDetail }}</span>
</div>
<div class="font-bold ean">

View File

@@ -10,12 +10,11 @@ import {
} from '@swagger/remi';
import { UiErrorModalComponent, UiModalService } from '@ui/modal';
import { mapFromReturnItemDTO, mapFromReturnSuggestionDTO } from 'apps/domain/remission/src/lib/mappings';
import { Subject } from 'rxjs';
import { BehaviorSubject, Subject } from 'rxjs';
import { first, takeUntil } from 'rxjs/operators';
import { AddProductToShippingDocumentModalComponent } from '../../modals/add-product-to-shipping-document-modal/add-product-to-shipping-document-modal.component';
import { RemissionListComponentStore } from '../remission-list.component-store';
import { RemissionListComponent } from '../remission-list.component';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'page-remission-list-item',
@@ -56,15 +55,10 @@ export class RemissionListItemComponent implements OnDestroy {
loading$ = this._listComponent.remittingItem$.asObservable();
get formatIconUrl() {
return `/assets/images/Icon_${this.item.dto.product.format}.svg`;
}
constructor(
private _modal: UiModalService,
private _remissionService: DomainRemissionService,
private _store: RemissionListComponentStore,
private readonly _http: HttpClient,
@Host() private _listComponent: RemissionListComponent
) {}
@@ -73,19 +67,6 @@ export class RemissionListItemComponent implements OnDestroy {
this._onDestroy$.complete();
}
checkFormatAvailable() {
return !!this.item.format && !!this.item.formatDetail && this.item.format !== 'UNKNOWN';
}
async iconExists(): Promise<boolean> {
try {
const response = await this._http.head(this.formatIconUrl, { observe: 'response' }).pipe(first()).toPromise();
return response?.status === 200;
} catch {
return false;
}
}
addProductToShippingDocument() {
const modal = this._modal.open({
content: AddProductToShippingDocumentModalComponent,

View File

@@ -2,13 +2,12 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RemissionListItemComponent } from './remission-list-item.component';
import { NavigateOnClickDirective, ProductImageModule } from '@cdn/product-image';
import { ProductImageModule } from '@cdn/product-image';
import { RemissionPipeModule } from '../../pipes';
import { UiTooltipModule } from '@ui/tooltip';
import { UiCommonModule } from '@ui/common';
import { AddProductToShippingDocumentModalModule } from '../../modals/add-product-to-shipping-document-modal/add-product-to-shipping-document-modal.module';
import { UiSpinnerModule } from '@ui/spinner';
import { SharedProductGroupPipe } from '@shared/pipes/product-group';
@NgModule({
imports: [
@@ -19,8 +18,6 @@ import { SharedProductGroupPipe } from '@shared/pipes/product-group';
RemissionPipeModule,
UiTooltipModule,
AddProductToShippingDocumentModalModule,
SharedProductGroupPipe,
NavigateOnClickDirective,
],
exports: [RemissionListItemComponent],
declarations: [RemissionListItemComponent],

View File

@@ -163,7 +163,7 @@ export class RemissionListComponentStore extends ComponentStore<RemissionState>
combineLatest([this.selectedSource$, this.selectedSupplier$])
.pipe(takeUntil(this._onDestroy$))
.subscribe(() => {
this.loadFilter({});
this.loadFilter();
});
}
@@ -227,12 +227,12 @@ export class RemissionListComponentStore extends ComponentStore<RemissionState>
)
);
loadFilter = this.effect((options$: Observable<{ loadDefault?: boolean }>) =>
options$.pipe(
loadFilter = this.effect(($) =>
$.pipe(
// tap((_) => (this.getCachedData()?.hits === 0 ? this.setFetching(true) : null)),
withLatestFrom(this.selectedSupplier$, this.selectedSource$, this._activatedRoute.queryParams),
filter(([loadDefault, selectedSupplier, selectedSource]) => !!selectedSupplier?.id && !!selectedSource),
switchMap(([loadDefault, selectedSupplier, selectedSource, queryParams]) =>
filter(([, selectedSupplier, selectedSource]) => !!selectedSupplier?.id && !!selectedSource),
switchMap(([, selectedSupplier, selectedSource, queryParams]) =>
this._domainRemissionService
.getQuerySettings({
supplierId: selectedSupplier.id,
@@ -245,8 +245,7 @@ export class RemissionListComponentStore extends ComponentStore<RemissionState>
settings?.filter?.forEach((filter) => (filter.input = filter.input?.filter((input) => input.options?.values?.length > 0)));
const filter = UiFilter.create(settings);
if (!!queryParams && !loadDefault) {
if (!!queryParams) {
filter?.fromQueryParams(queryParams);
}

View File

@@ -5,10 +5,9 @@ import { UiSpinnerModule } from '@ui/spinner';
import { RemissionPipeModule } from '../../pipes';
import { SharedShippingDocumentDetailsItemComponent } from './shipping-document-details-item/shipping-document-details-item.component';
import { SharedShippingDocumentDetailsComponent } from './shipping-document-details.component';
import { SharedProductGroupPipe } from '@shared/pipes/product-group';
@NgModule({
imports: [CommonModule, RemissionPipeModule, ProductImageModule, UiSpinnerModule, SharedProductGroupPipe],
imports: [CommonModule, RemissionPipeModule, ProductImageModule, UiSpinnerModule],
exports: [SharedShippingDocumentDetailsComponent, SharedShippingDocumentDetailsItemComponent],
declarations: [SharedShippingDocumentDetailsComponent, SharedShippingDocumentDetailsItemComponent],
providers: [],

View File

@@ -16,29 +16,9 @@
</div>
<div class="goods-in-out-order-group-item-details">
<div class="goods-in-out-order-group-item-details-thumbnail">
<img
[productImageNavigation]="item?.product?.ean"
loading="lazy"
*ngIf="item?.product?.ean | productImage; let productImage"
[src]="productImage"
[alt]="item?.product?.name"
/>
<img loading="lazy" *ngIf="item?.product?.ean | productImage; let productImage" [src]="productImage" [alt]="item?.product?.name" />
</div>
<div data-which="item-details-data" class="goods-in-out-order-group-item-details-data">
<div
data-what="product-group"
*ngIf="item?.product?.productGroup"
class="goods-in-out-order-group-item-details__product-group flex flex-row justify-end items-center text-p3"
>
{{ item?.product?.productGroup }}: {{ item?.product?.productGroup | productGroup }}
</div>
<div
*ngIf="compartmentFromStock"
data-what="compartment"
class="goods-in-out-order-group-item-details__compartment flex flex-row justify-end items-center text-p3"
>
{{ compartmentFromStock }}
</div>
<div class="goods-in-out-order-group-item-details-data">
<div class="item-top-row">
<div class="item-title">{{ [item.product.contributors, item.product.name] | title }}</div>
<div class="item-processing-status">

View File

@@ -78,15 +78,7 @@ export class GoodsInOutOrderGroupItemComponent extends ComponentStore<GoodsInOut
showSupplier: boolean;
@Input()
showInStock?: StockInfoDTO[];
get stockInfoForItem() {
return this.showInStock?.find((stock) => stock?.ean === this.item?.product?.ean);
}
get compartmentFromStock() {
return this.stockInfoForItem?.compartment;
}
showInStock: StockInfoDTO[];
get cruda() {
return (this.item as any)?.cruda;

View File

@@ -4,13 +4,12 @@ import { CommonModule } from '@angular/common';
import { GoodsInOutOrderGroupComponent } from './goods-in-out-order-group.component';
import { GoodsInOutOrderGroupItemComponent } from './goods-in-out-order-group-item.component';
import { UiIconModule } from '@ui/icon';
import { NavigateOnClickDirective, ProductImageModule } from '@cdn/product-image';
import { ProductImageModule } from '@cdn/product-image';
import { PipesModule } from '../pipes/pipes.module';
import { UiSelectBulletModule } from '@ui/select-bullet';
import { FormsModule } from '@angular/forms';
import { UiQuantityDropdownModule } from '@ui/quantity-dropdown';
import { UiSpinnerModule } from 'apps/ui/spinner/src/lib/ui-spinner.module';
import { SharedProductGroupPipe } from '@shared/pipes/product-group';
@NgModule({
imports: [
@@ -22,8 +21,6 @@ import { SharedProductGroupPipe } from '@shared/pipes/product-group';
FormsModule,
UiQuantityDropdownModule,
UiSpinnerModule,
SharedProductGroupPipe,
NavigateOnClickDirective,
],
exports: [GoodsInOutOrderGroupComponent, GoodsInOutOrderGroupItemComponent],
declarations: [GoodsInOutOrderGroupComponent, GoodsInOutOrderGroupItemComponent],

View File

@@ -1,2 +0,0 @@
<img [src]="'/assets/images/bookmark_responsive.svg'" [alt]="alt" />
<shared-icon [icon]="icon" [size]="20"></shared-icon>

View File

@@ -1,13 +0,0 @@
:host {
@apply flex relative;
}
img {
@apply relative;
}
shared-icon {
@apply absolute text-white;
top: calc(50% - 1rem);
left: calc(50% - 0.785rem);
}

View File

@@ -1,18 +0,0 @@
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { IconModule } from '../icon.module';
@Component({
selector: 'shared-icon-badge',
templateUrl: 'icon-badge.component.html',
styleUrls: ['icon-badge.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
standalone: true,
imports: [IconModule],
})
export class IconBadgeComponent {
@Input()
icon: string;
@Input()
alt: string;
}

View File

@@ -1,20 +1,16 @@
:host {
@apply inline-block min-h-[1rem] min-w-[2rem] overflow-hidden rounded;
background: rgb(238, 238, 238);
}
.gr-bar {
@apply w-full h-full;
@apply inline-block min-h-[1rem] min-w-[2rem] bg-gray-500;
animation: load 1s ease-in-out infinite;
background: linear-gradient(75deg, rgba(238, 238, 238, 1) 0%, rgba(190, 190, 190, 1) 50%, rgba(238, 238, 238, 1) 100%);
}
@keyframes load {
0% {
transform: translateX(-100%);
opacity: 0;
}
30% {
opacity: 0.5;
}
100% {
transform: translateX(100%);
opacity: 0;
}
}

View File

@@ -1 +0,0 @@
<div class="gr-bar"></div>

View File

@@ -2,7 +2,3 @@
@apply flex flex-row justify-between items-center bg-white rounded mt-px-2 px-4 font-bold;
height: 53px;
}
:host.has-annotation {
@apply text-[#5A728A];
}

View File

@@ -11,18 +11,11 @@
{{ package?.estimatedDeliveryDate | date }}
</div>
<div class="w-32 page-package-list-item__items-count">{{ package?.items ?? '-' }} <span class="font-normal">Exemplare</span></div>
<div data-which="Statusmeldung" class="text-right grow">
<div class="text-right grow">
<div
*ngIf="!hasAnnotation; else annotationTmpl"
class="rounded inline-block px-4 text-white page-package-list-item__arrival-status whitespace-nowrap"
data-what="arrival-status"
[class]="package?.arrivalStatus | arrivalStatusColorClass"
>
{{ package?.arrivalStatus | arrivalStatus }}
</div>
<ng-template #annotationTmpl>
<div data-what="annotation" class="page-package-list-item__annotation">
{{ annotation }}
</div>
</ng-template>
</div>

View File

@@ -1,4 +1,4 @@
import { Component, ChangeDetectionStrategy, Input, OnChanges, SimpleChanges, HostBinding } from '@angular/core';
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
import { PackageDTO2 } from '@swagger/wws';
@Component({
@@ -7,19 +7,9 @@ import { PackageDTO2 } from '@swagger/wws';
styleUrls: ['package-list-item.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PackageListItemComponent implements OnChanges {
export class PackageListItemComponent {
@Input()
package: PackageDTO2;
annotation: string | undefined;
@HostBinding('class.has-annotation')
hasAnnotation = false;
ngOnChanges(changes: SimpleChanges) {
if (changes.package) {
this.annotation = this.package?.features?.['annotation'] ?? undefined;
this.hasAnnotation = !!this.annotation;
}
}
constructor() {}
}

View File

@@ -1,6 +0,0 @@
{
"$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1 +0,0 @@
export * from './lib/product-group.pipe';

View File

@@ -2,7 +2,6 @@ import { Injectable, inject } from '@angular/core';
import { NavigationRoute } from './defs/navigation-route';
import { Router } from '@angular/router';
import { OrderItemProcessingStatusValue } from '@swagger/oms';
import { isBoolean } from 'lodash';
@Injectable({ providedIn: 'root' })
export class PickUpShelfOutNavigationService {

View File

@@ -226,40 +226,15 @@ export class ShellSideMenuComponent {
}
}, undefined);
if (!lastCrumb) {
if (!lastCrumb || lastCrumb?.path?.includes('undefined') || lastCrumb?.path?.includes('null')) {
return fallback;
}
// #4692 Return Fallback if Values contain undefined or null values, regardless if path is from type string or array
if (typeof lastCrumb?.path === 'string') {
if (lastCrumb?.path?.includes('undefined') || lastCrumb?.path?.includes('null')) {
return fallback;
}
} else {
let valuesToCheck = [];
for (const value of lastCrumb?.path) {
if (value?.outlets && value?.outlets?.primary && value?.outlets?.side) {
valuesToCheck.push(...Object.values(value?.outlets?.primary), ...Object.values(value?.outlets?.side));
} else {
valuesToCheck.push(value);
}
}
if (this.checkIfArrayContainsUndefinedOrNull(valuesToCheck)) {
return fallback;
}
}
return { path: lastCrumb.path, queryParams: lastCrumb.params };
})
);
}
checkIfArrayContainsUndefinedOrNull(array: any[]) {
return array?.includes(undefined) || array?.includes('undefined') || array?.includes(null) || array?.includes('null');
}
getLastActivatedCustomerProcessId$() {
return this._app.getProcesses$('customer').pipe(
map((processes) => {

View File

@@ -4,6 +4,7 @@ export { DialogOfString } from './models/dialog-of-string';
export { DialogSettings } from './models/dialog-settings';
export { DialogContentType } from './models/dialog-content-type';
export { KeyValueDTOOfStringAndString } from './models/key-value-dtoof-string-and-string';
export { IPublicUserInfo } from './models/ipublic-user-info';
export { ProblemDetails } from './models/problem-details';
export { LesepunkteRequest } from './models/lesepunkte-request';
export { ListResponseArgsOfItemDTO } from './models/list-response-args-of-item-dto';
@@ -28,11 +29,9 @@ export { AvailabilityType } from './models/availability-type';
export { StockInfoDTO } from './models/stock-info-dto';
export { StockStatus } from './models/stock-status';
export { ShelfInfoDTO } from './models/shelf-info-dto';
export { Successor } from './models/successor';
export { ReviewDTO } from './models/review-dto';
export { EntityDTO } from './models/entity-dto';
export { EntityStatus } from './models/entity-status';
export { CRUDA } from './models/cruda';
export { QueryTokenDTO } from './models/query-token-dto';
export { CatalogType } from './models/catalog-type';
export { QueryTokenDTO2 } from './models/query-token-dto2';

View File

@@ -13,11 +13,6 @@ export interface AvailabilityDTO {
*/
at?: string;
/**
* EVT
*/
firstDayOfSale?: string;
/**
* Produkt / Artikel PK
*/

View File

@@ -1,2 +0,0 @@
/* tslint:disable */
export type CRUDA = 0 | 1 | 2 | 4 | 8 | 16;

View File

@@ -1,14 +1,11 @@
/* tslint:disable */
import { TouchedBase } from './touched-base';
import { CRUDA } from './cruda';
import { EntityStatus } from './entity-status';
export interface EntityDTO extends TouchedBase{
changed?: string;
created?: string;
cruda?: CRUDA;
id?: number;
pId?: string;
status?: EntityStatus;
uId?: string;
version?: number;
}

View File

@@ -0,0 +1,7 @@
/* tslint:disable */
export interface IPublicUserInfo {
alias?: string;
displayName?: string;
isAuthenticated: boolean;
username?: string;
}

View File

@@ -8,7 +8,6 @@ import { ReviewDTO } from './review-dto';
import { ShelfInfoDTO } from './shelf-info-dto';
import { SpecDTO } from './spec-dto';
import { StockInfoDTO } from './stock-info-dto';
import { Successor } from './successor';
import { TextDTO } from './text-dto';
import { ItemType } from './item-type';
export interface ItemDTO extends EntityDTO{
@@ -58,11 +57,6 @@ export interface ItemDTO extends EntityDTO{
*/
promoPoints?: number;
/**
* Einlöse-Prämienpunkte
*/
redemptionPoints?: number;
/**
* Rezensionen
*/
@@ -101,7 +95,7 @@ export interface ItemDTO extends EntityDTO{
/**
* Nachfolgeartikel
*/
successor?: Successor;
successor?: ItemDTO;
/**
* Texte

View File

@@ -14,7 +14,6 @@ export interface ProductDTO extends TouchedBase{
manufacturer?: string;
name?: string;
productGroup?: string;
productGroupDetails?: string;
publicationDate?: string;
serial?: string;
size?: SizeOfString;

View File

@@ -1,9 +1,11 @@
/* tslint:disable */
import { DialogOfString } from './dialog-of-string';
import { IPublicUserInfo } from './ipublic-user-info';
export interface ResponseArgs {
dialog?: DialogOfString;
error: boolean;
invalidProperties?: {[key: string]: string};
message?: string;
requestId?: number;
userInfo?: IPublicUserInfo;
}

View File

@@ -1,14 +0,0 @@
/* tslint:disable */
import { ProductDTO } from './product-dto';
export interface Successor extends ProductDTO{
/**
* PK
*/
id?: number;
/**
* Ab
*/
start?: string;
}

View File

@@ -30,6 +30,7 @@ export { DialogOfString } from './models/dialog-of-string';
export { DialogSettings } from './models/dialog-settings';
export { DialogContentType } from './models/dialog-content-type';
export { KeyValueDTOOfStringAndString } from './models/key-value-dtoof-string-and-string';
export { IPublicUserInfo } from './models/ipublic-user-info';
export { ProblemDetails } from './models/problem-details';
export { ResponseArgsOfPackageDTO } from './models/response-args-of-package-dto';
export { ResponseArgsOfNullableBoolean } from './models/response-args-of-nullable-boolean';
@@ -84,11 +85,11 @@ export { VATValueDTO } from './models/vatvalue-dto';
export { VATType } from './models/vattype';
export { QuantityValueDTO } from './models/quantity-value-dto';
export { QueryTokenDTO } from './models/query-token-dto';
export { ResponseArgsOfProductListDTO } from './models/response-args-of-product-list-dto';
export { ResponseArgsOfString } from './models/response-args-of-string';
export { DocumentPayloadOfIEnumerableOfProductListItemDTO } from './models/document-payload-of-ienumerable-of-product-list-item-dto';
export { ListResponseArgsOfProductListDTO } from './models/list-response-args-of-product-list-dto';
export { ResponseArgsOfIEnumerableOfProductListDTO } from './models/response-args-of-ienumerable-of-product-list-dto';
export { ResponseArgsOfProductListDTO } from './models/response-args-of-product-list-dto';
export { ResponseArgsOfProductListItemDTO } from './models/response-args-of-product-list-item-dto';
export { BatchResponseArgsOfProductListItemDTOAndString } from './models/batch-response-args-of-product-list-item-dtoand-string';
export { KeyValuePairOfStringAndProductListItemDTO } from './models/key-value-pair-of-string-and-product-list-item-dto';

View File

@@ -0,0 +1,7 @@
/* tslint:disable */
export interface IPublicUserInfo {
alias?: string;
displayName?: string;
isAuthenticated: boolean;
username?: string;
}

View File

@@ -4,7 +4,6 @@ export interface PackageDTO2 extends PackageArrivalStatusDTO{
app?: string;
complainedEmail?: string;
creditRequestedEmail?: string;
features?: {[key: string]: string};
items?: number;
itemsOrdered?: number;
missing?: string;

View File

@@ -10,7 +10,6 @@ export interface ProductListDTO2 extends EntityDTOBase{
command?: string;
commandData?: string;
description?: string;
key?: string;
name?: string;
organizationalUnit?: string;
parent?: EntityDTOContainerOfProductListDTO2;

View File

@@ -12,7 +12,6 @@ export interface ProductListItemDTO2 extends EntityDTOBase{
command?: string;
commandData?: string;
description?: string;
key?: string;
name?: string;
organizationalUnit?: string;
parent?: EntityDTOContainerOfProductListItemDTO2;

View File

@@ -1,9 +1,11 @@
/* tslint:disable */
import { DialogOfString } from './dialog-of-string';
import { IPublicUserInfo } from './ipublic-user-info';
export interface ResponseArgs {
dialog?: DialogOfString;
error: boolean;
invalidProperties?: {[key: string]: string};
message?: string;
requestId?: number;
userInfo?: IPublicUserInfo;
}

View File

@@ -10,13 +10,13 @@ import { map as __map, filter as __filter } from 'rxjs/operators';
import { ResponseArgsOfQuerySettingsDTO } from '../models/response-args-of-query-settings-dto';
import { ListResponseArgsOfProductListItemDTO } from '../models/list-response-args-of-product-list-item-dto';
import { QueryTokenDTO } from '../models/query-token-dto';
import { ResponseArgsOfProductListDTO } from '../models/response-args-of-product-list-dto';
import { ProductListDTO } from '../models/product-list-dto';
import { ProductListItemDTO } from '../models/product-list-item-dto';
import { ResponseArgsOfString } from '../models/response-args-of-string';
import { DocumentPayloadOfIEnumerableOfProductListItemDTO } from '../models/document-payload-of-ienumerable-of-product-list-item-dto';
import { ListResponseArgsOfProductListDTO } from '../models/list-response-args-of-product-list-dto';
import { ResponseArgsOfProductListDTO } from '../models/response-args-of-product-list-dto';
import { ProductListDTO } from '../models/product-list-dto';
import { ResponseArgsOfProductListItemDTO } from '../models/response-args-of-product-list-item-dto';
import { ProductListItemDTO } from '../models/product-list-item-dto';
import { BatchResponseArgsOfProductListItemDTOAndString } from '../models/batch-response-args-of-product-list-item-dtoand-string';
@Injectable({
providedIn: 'root',
@@ -24,9 +24,6 @@ import { BatchResponseArgsOfProductListItemDTOAndString } from '../models/batch-
class ProductListService extends __BaseService {
static readonly ProductListQueryProductListItemsSettingsPath = '/inventory/productlist/items/s/settings';
static readonly ProductListQueryProductListItemPath = '/inventory/productlist/items/s';
static readonly ProductListGetProductListPath = '/inventory/productlist/key/{key}';
static readonly ProductListCreateOrUpdateProductlistPath = '/inventory/productlist/{key}';
static readonly ProductListAddOrUpdateProductListItemsPath = '/inventory/productlist/{key}/items';
static readonly ProductListProductListItemPdfAsBase64Path = '/inventory/productlist/items/pdf/base64';
static readonly ProductListQueryProductListPath = '/inventory/productlist/s';
static readonly ProductListCreateProductListPath = '/inventory/productlist';
@@ -112,132 +109,6 @@ class ProductListService extends __BaseService {
);
}
/**
* Productliste by key
* @param key undefined
*/
ProductListGetProductListResponse(key: string): __Observable<__StrictHttpResponse<ResponseArgsOfProductListDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
let req = new HttpRequest<any>(
'GET',
this.rootUrl + `/inventory/productlist/key/${encodeURIComponent(String(key))}`,
__body,
{
headers: __headers,
params: __params,
responseType: 'json'
});
return this.http.request<any>(req).pipe(
__filter(_r => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ResponseArgsOfProductListDTO>;
})
);
}
/**
* Productliste by key
* @param key undefined
*/
ProductListGetProductList(key: string): __Observable<ResponseArgsOfProductListDTO> {
return this.ProductListGetProductListResponse(key).pipe(
__map(_r => _r.body as ResponseArgsOfProductListDTO)
);
}
/**
* Create or Update Productlist
* @param params The `ProductListService.ProductListCreateOrUpdateProductlistParams` containing the following parameters:
*
* - `payload`:
*
* - `key`:
*/
ProductListCreateOrUpdateProductlistResponse(params: ProductListService.ProductListCreateOrUpdateProductlistParams): __Observable<__StrictHttpResponse<ResponseArgsOfProductListDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
__body = params.payload;
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/inventory/productlist/${encodeURIComponent(String(params.key))}`,
__body,
{
headers: __headers,
params: __params,
responseType: 'json'
});
return this.http.request<any>(req).pipe(
__filter(_r => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ResponseArgsOfProductListDTO>;
})
);
}
/**
* Create or Update Productlist
* @param params The `ProductListService.ProductListCreateOrUpdateProductlistParams` containing the following parameters:
*
* - `payload`:
*
* - `key`:
*/
ProductListCreateOrUpdateProductlist(params: ProductListService.ProductListCreateOrUpdateProductlistParams): __Observable<ResponseArgsOfProductListDTO> {
return this.ProductListCreateOrUpdateProductlistResponse(params).pipe(
__map(_r => _r.body as ResponseArgsOfProductListDTO)
);
}
/**
* Add Or Update List Items
* @param params The `ProductListService.ProductListAddOrUpdateProductListItemsParams` containing the following parameters:
*
* - `payload`:
*
* - `key`:
*/
ProductListAddOrUpdateProductListItemsResponse(params: ProductListService.ProductListAddOrUpdateProductListItemsParams): __Observable<__StrictHttpResponse<ListResponseArgsOfProductListItemDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
__body = params.payload;
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/inventory/productlist/${encodeURIComponent(String(params.key))}/items`,
__body,
{
headers: __headers,
params: __params,
responseType: 'json'
});
return this.http.request<any>(req).pipe(
__filter(_r => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<ListResponseArgsOfProductListItemDTO>;
})
);
}
/**
* Add Or Update List Items
* @param params The `ProductListService.ProductListAddOrUpdateProductListItemsParams` containing the following parameters:
*
* - `payload`:
*
* - `key`:
*/
ProductListAddOrUpdateProductListItems(params: ProductListService.ProductListAddOrUpdateProductListItemsParams): __Observable<ListResponseArgsOfProductListItemDTO> {
return this.ProductListAddOrUpdateProductListItemsResponse(params).pipe(
__map(_r => _r.body as ListResponseArgsOfProductListItemDTO)
);
}
/**
* Artikelliste als PDF (base64)
* @param payload DocumentPayload mit EANsK
@@ -455,7 +326,7 @@ class ProductListService extends __BaseService {
/**
* @param productlistUId undefined
*/
ProductListProductlistCompletedResponse(productlistUId: string): __Observable<__StrictHttpResponse<ResponseArgsOfProductListDTO>> {
ProductListProductlistCompletedResponse(productlistUId: null | string): __Observable<__StrictHttpResponse<ResponseArgsOfProductListDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
@@ -480,7 +351,7 @@ class ProductListService extends __BaseService {
/**
* @param productlistUId undefined
*/
ProductListProductlistCompleted(productlistUId: string): __Observable<ResponseArgsOfProductListDTO> {
ProductListProductlistCompleted(productlistUId: null | string): __Observable<ResponseArgsOfProductListDTO> {
return this.ProductListProductlistCompletedResponse(productlistUId).pipe(
__map(_r => _r.body as ResponseArgsOfProductListDTO)
);
@@ -580,7 +451,7 @@ class ProductListService extends __BaseService {
/**
* @param productListItemUId undefined
*/
ProductListProductListItemCompletedResponse(productListItemUId: string): __Observable<__StrictHttpResponse<ResponseArgsOfProductListItemDTO>> {
ProductListProductListItemCompletedResponse(productListItemUId: null | string): __Observable<__StrictHttpResponse<ResponseArgsOfProductListItemDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
@@ -605,7 +476,7 @@ class ProductListService extends __BaseService {
/**
* @param productListItemUId undefined
*/
ProductListProductListItemCompleted(productListItemUId: string): __Observable<ResponseArgsOfProductListItemDTO> {
ProductListProductListItemCompleted(productListItemUId: null | string): __Observable<ResponseArgsOfProductListItemDTO> {
return this.ProductListProductListItemCompletedResponse(productListItemUId).pipe(
__map(_r => _r.body as ResponseArgsOfProductListItemDTO)
);
@@ -648,22 +519,6 @@ class ProductListService extends __BaseService {
module ProductListService {
/**
* Parameters for ProductListCreateOrUpdateProductlist
*/
export interface ProductListCreateOrUpdateProductlistParams {
payload: ProductListDTO;
key: string;
}
/**
* Parameters for ProductListAddOrUpdateProductListItems
*/
export interface ProductListAddOrUpdateProductListItemsParams {
payload: Array<ProductListItemDTO>;
key: string;
}
/**
* Parameters for ProductListCreateProductList
*/
@@ -686,7 +541,7 @@ module ProductListService {
* Parameters for ProductListGetProductlistItems
*/
export interface ProductListGetProductlistItemsParams {
productlistUId: string;
productlistUId: null | string;
take?: null | number;
skip?: null | number;
}
@@ -703,7 +558,7 @@ module ProductListService {
* Parameters for ProductListUpdateProductListItem
*/
export interface ProductListUpdateProductListItemParams {
productListItemUId: string;
productListItemUId: null | string;
data: ProductListItemDTO;
locale?: null | string;
}

View File

@@ -684,7 +684,7 @@ module StockService {
/**
* Filial-Nr
*/
branchNumber: string;
branchNumber: null | string;
/**
* Lokalisierung (optional)

View File

@@ -102,7 +102,7 @@ class WareneingangService extends __BaseService {
* Packstück-Details
* @param packageId undefined
*/
WareneingangGetPackageDetailsResponse(packageId: string): __Observable<__StrictHttpResponse<ResponseArgsOfPackageDetailResponseDTO>> {
WareneingangGetPackageDetailsResponse(packageId: null | string): __Observable<__StrictHttpResponse<ResponseArgsOfPackageDetailResponseDTO>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
@@ -128,7 +128,7 @@ class WareneingangService extends __BaseService {
* Packstück-Details
* @param packageId undefined
*/
WareneingangGetPackageDetails(packageId: string): __Observable<ResponseArgsOfPackageDetailResponseDTO> {
WareneingangGetPackageDetails(packageId: null | string): __Observable<ResponseArgsOfPackageDetailResponseDTO> {
return this.WareneingangGetPackageDetailsResponse(packageId).pipe(
__map(_r => _r.body as ResponseArgsOfPackageDetailResponseDTO)
);
@@ -192,8 +192,8 @@ module WareneingangService {
*/
export interface WareneingangChangePackageStatusParams {
payload: PackageArrivalStatusDTO;
packageId: string;
modifier: string;
packageId: null | string;
modifier: null | string;
}
}