Merged PR 1586: #4183 RD Cart Fix display of data from previous order

#4183 RD Cart Fix display of data from previous order
This commit is contained in:
Nino Righi
2023-07-11 16:53:53 +00:00
committed by Lorenz Hilpert
parent e4c20b953d
commit ad4481cfc7
2 changed files with 4 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ import { ComponentStore, tapResponse } from '@ngrx/component-store';
import { NotificationChannel, PayerDTO, ShoppingCartDTO, ShoppingCartItemDTO } from '@swagger/checkout';
import { UiErrorModalComponent, UiModalService } from '@ui/modal';
import { BehaviorSubject, Subject } from 'rxjs';
import { first, map, shareReplay, switchMap, takeUntil, tap, withLatestFrom } from 'rxjs/operators';
import { first, map, switchMap, takeUntil, tap, withLatestFrom } from 'rxjs/operators';
export interface CheckoutReviewState {
payer: PayerDTO;
@@ -45,14 +45,12 @@ export class CheckoutReviewStore extends ComponentStore<CheckoutReviewState> {
customerFeatures$ = this._application.activatedProcessId$.pipe(
takeUntil(this.orderCompleted),
switchMap((processId) => this._domainCheckoutService.getCustomerFeatures({ processId })),
shareReplay()
switchMap((processId) => this._domainCheckoutService.getCustomerFeatures({ processId }))
);
payer$ = this._application.activatedProcessId$.pipe(
takeUntil(this.orderCompleted),
switchMap((processId) => this._domainCheckoutService.getPayer({ processId })),
shareReplay()
switchMap((processId) => this._domainCheckoutService.getPayer({ processId }))
);
showBillingAddress$ = this.shoppingCartItems$.pipe(

View File

@@ -20,7 +20,7 @@ export class CheckoutReviewDetailsComponent implements OnInit {
customerFeatures$ = this._store.customerFeatures$;
payer$ = this._store.payer$.pipe(shareReplay());
payer$ = this._store.payer$;
showBillingAddress$ = this._store.shoppingCartItems$.pipe(
takeUntil(this._store.orderCompleted),