Warenausgabe Tabwechsel Bugfix

This commit is contained in:
Andreas Schickinger
2022-07-06 17:47:39 +02:00
parent a4de2391e9
commit 83c0a20d61
2 changed files with 9 additions and 3 deletions

View File

@@ -103,6 +103,7 @@ export class GoodsOutSearchMainComponent implements OnInit, OnDestroy {
this._cdr.markForCheck();
});
this._goodsOutSearchStore.searchOptions = { take: 50, skip: 0 };
this._goodsOutSearchStore.search({});
}

View File

@@ -68,6 +68,8 @@ export class GoodsOutSearchResultsComponent extends ComponentStore<GoodsOutSearc
processId$ = this._activatedRoute.parent.data.pipe(map((data) => +data.processId));
previousProcessId: undefined | number;
private _onDestroy$ = new Subject();
trackByFn = (item: OrderItemListItemDTO) => `${item.orderId}${item.orderItemId}${item.orderItemSubsetId}`;
@@ -96,8 +98,12 @@ export class GoodsOutSearchResultsComponent extends ComponentStore<GoodsOutSearc
this.createBreadcrumb(processId, params);
this.removeBreadcrumbs(processId);
this._goodsOutSearchStore.clearResults();
this._goodsOutSearchStore.search({ siletReload: true });
if (this.previousProcessId && processId !== this.previousProcessId) {
this._goodsOutSearchStore.clearResults();
this._goodsOutSearchStore.search({ siletReload: true });
}
this.previousProcessId = processId;
});
this._goodsOutSearchStore.searchResultCleared.pipe(takeUntil(this._onDestroy$)).subscribe((_) => this.clearSelectedItems());
@@ -198,7 +204,6 @@ export class GoodsOutSearchResultsComponent extends ComponentStore<GoodsOutSearc
}
navigateToDetails(processId: number, orderItem: OrderItemListItemDTO) {
console.log('navigateToDetails', orderItem);
const orderNumber = orderItem.orderNumber;
const processingStatus = orderItem.processingStatus;
const compartmentCode = orderItem.compartmentCode;