Compare commits

...

7 Commits

Author SHA1 Message Date
Nino
d5b79dcf6f #4712 Removed isShippingEnabled check from availabilities modal 2024-03-20 11:39:41 +01:00
Nino Righi
afe5d3468a Merged PR 1768: Merge Develop to Release 3.0
Merge Develop to Release 3.0
2024-03-15 10:21:12 +00:00
Nino Righi
65f43d22ee Merged PR 1767: #4706 AHF Fix History Navigation after Switching Tabs
#4706 AHF Fix History Navigation after Switching Tabs
2024-03-13 14:17:15 +00:00
Nino Righi
67203a8506 Merged PR 1766: #4696 Bugfix Cover Items
#4696 Bugfix Cover Items
2024-03-13 14:12:08 +00:00
Nino Righi
8f47163627 Merged PR 1762: #4692 Hotfix Undefined Values in Route Url
#4692 Hotfix Undefined Values in Route Url
2024-03-07 14:33:36 +00:00
Nino Righi
a209d59ea9 Merged PR 1760: #4532 Fallback Route if Url contains Undefined or Null values
#4532 Fallback Route if Url contains Undefined or Null values
2024-03-06 12:13:13 +00:00
Lorenz Hilpert
b838f4c475 Merge branch 'develop' into release/3.0 2024-02-01 18:33:25 +01:00
7 changed files with 57 additions and 18 deletions

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
import { Component, ChangeDetectionStrategy, inject, OnInit, AfterViewInit, ViewChild, OnDestroy } from '@angular/core';
import { Component, ChangeDetectionStrategy, inject, OnInit, AfterViewInit, ViewChild } from '@angular/core';
import { PickupShelfDetailsBaseComponent } from '../../pickup-shelf-details-base.component';
import { AsyncPipe, NgFor, NgIf } from '@angular/common';
import { PickUpShelfDetailsHeaderComponent } from '../../shared/pickup-shelf-details-header/pickup-shelf-details-header.component';
@@ -40,7 +40,7 @@ import { isEqual } from 'lodash';
OnInitDirective,
],
})
export class PickupShelfInDetailsComponent extends PickupShelfDetailsBaseComponent implements OnInit, AfterViewInit, OnDestroy {
export class PickupShelfInDetailsComponent extends PickupShelfDetailsBaseComponent implements OnInit, AfterViewInit {
runCheckTrigger = inject(RunCheckTrigger);
@ViewChild(PickUpShelfDetailsTagsComponent, { static: false })
@@ -115,15 +115,15 @@ 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();
}
});
}
ngOnDestroy(): void {
// Fix #4696 - Clear the previous selected orderItemSubsetId from store after leaving Details page
// Es gab Fälle, in denen beim erneuten Aufruf der Details Seite, die vorherige ID noch im Store vorhanden war und deshalb der code in ngOnInit nicht ausgeführt wurde
this.store.setPreviousSelectedOrderItemSubsetId(undefined);
// 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() {

View File

@@ -97,6 +97,10 @@ export class PickupShelfInComponent extends PickupShelfBaseComponent {
const order = await this.detailsStore.order$.pipe(take(1)).toPromise();
if (!order) {
return;
}
if (order?.orderNumber) {
return order?.orderNumber;
}
@@ -111,6 +115,12 @@ 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,

View File

@@ -4,7 +4,7 @@
*ngIf="historyItem$ | async; let item"
class="self-end"
type="button"
(click)="store.processId !== 7000 ? navigateToShelfOutDetailsPage(item) : navigateToShelfInDetailsPage(item)"
(click)="listStore.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, inject } from '@angular/core';
import { ChangeDetectionStrategy, Component } 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,9 +21,7 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
host: { class: 'page-pickup-shelf-history' },
imports: [AsyncPipe, NgIf, SharedHistoryListModule, IconModule],
})
export class PickUpShelfHistoryComponent {
store = inject(PickupShelfStore);
export class PickUpShelfHistoryComponent extends PickupShelfDetailsBaseComponent {
compartmentCode$: Observable<string> = this._activatedRoute.params.pipe(
map((params) => decodeURIComponent(params?.compartmentCode ?? '') || undefined)
);
@@ -62,12 +60,14 @@ export class PickUpShelfHistoryComponent {
private _shelfInNavigation: PickupShelfInNavigationService,
private _omsService: DomainOmsService,
private _pickupShelfIOService: PickupShelfIOService
) {}
) {
super();
}
async navigateToShelfOutDetailsPage(item: DBHOrderItemListItemDTO) {
await this._router.navigate(
this._shelfOutNavigation.detailRoute({
processId: this.store.processId,
processId: this.listStore.processId,
item: {
compartmentCode: item.compartmentCode,
orderId: item.orderId,

View File

@@ -230,11 +230,36 @@ export class ShellSideMenuComponent {
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) => {