mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Compare commits
5 Commits
tracking
...
fix/4684-B
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c826d8c363 | ||
|
|
01e329b839 | ||
|
|
a5e7411c7d | ||
|
|
5541c4b583 | ||
|
|
706be73e54 |
@@ -296,18 +296,8 @@ export class CheckoutSummaryComponent implements OnInit, OnDestroy {
|
|||||||
if (takeNowOrders.length != 1) return;
|
if (takeNowOrders.length != 1) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
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.listRoute({ processId: Date.now() }).path, {
|
await this.router.navigate(this._shelfOutNavigationService.listRoute({ processId: Date.now() }).path, {
|
||||||
queryParams: { main_qs: takeNowOrders[0].orderNumber },
|
queryParams: { main_qs: takeNowOrders[0].orderNumber, filter_ordersource: 'store' },
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|||||||
@@ -5,14 +5,13 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|||||||
import { Breadcrumb, BreadcrumbService } from '@core/breadcrumb';
|
import { Breadcrumb, BreadcrumbService } from '@core/breadcrumb';
|
||||||
import { take } from 'rxjs/operators';
|
import { take } from 'rxjs/operators';
|
||||||
import { NavigationRoute } from '@shared/services';
|
import { NavigationRoute } from '@shared/services';
|
||||||
import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString } from '@swagger/oms';
|
import { DBHOrderItemListItemDTO, KeyValueDTOOfStringAndString, ListResponseArgsOfDBHOrderItemListItemDTO } from '@swagger/oms';
|
||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { RunCheckTrigger } from './trigger';
|
import { RunCheckTrigger } from './trigger';
|
||||||
import { OrderItemsContext } from '@domain/oms';
|
import { OrderItemsContext } from '@domain/oms';
|
||||||
import { ActionHandlerService } from './services/action-handler.service';
|
import { ActionHandlerService } from './services/action-handler.service';
|
||||||
import { Config } from '@core/config';
|
import { Config } from '@core/config';
|
||||||
import { debounce } from '@utils/common';
|
|
||||||
|
|
||||||
export type GetNameForBreadcrumbData = {
|
export type GetNameForBreadcrumbData = {
|
||||||
processId: number;
|
processId: number;
|
||||||
@@ -131,7 +130,7 @@ export abstract class PickupShelfBaseComponent implements OnInit {
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (response.hits === 1) {
|
if (response.hits === 1 || this._hasSameOrderNumber(response)) {
|
||||||
const detailsPath = await this.getPathForDetail(response.result[0]).pipe(take(1)).toPromise();
|
const detailsPath = await this.getPathForDetail(response.result[0]).pipe(take(1)).toPromise();
|
||||||
await this.router.navigate(detailsPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...detailsPath.queryParams } });
|
await this.router.navigate(detailsPath.path, { queryParams: { ...queryParams, ...filterQueryParams, ...detailsPath.queryParams } });
|
||||||
} else if (response.hits > 1) {
|
} else if (response.hits > 1) {
|
||||||
@@ -143,6 +142,13 @@ export abstract class PickupShelfBaseComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sucht die Breadcrumb anhand des Tags.
|
* Sucht die Breadcrumb anhand des Tags.
|
||||||
* @param tag Der gesuchte Tag
|
* @param tag Der gesuchte Tag
|
||||||
|
|||||||
Reference in New Issue
Block a user