mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
#4303 Kundensuche - kein Splittscreen
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
QueryList,
|
||||
AfterViewInit,
|
||||
TrackByFunction,
|
||||
inject,
|
||||
} from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { ApplicationService } from '@core/application';
|
||||
@@ -29,6 +30,7 @@ import { EnvironmentService } from '@core/environment';
|
||||
import { CheckoutReviewStore } from './checkout-review.store';
|
||||
import { ToasterService } from '@shared/shell';
|
||||
import { ShoppingCartItemComponent } from './shopping-cart-item/shopping-cart-item.component';
|
||||
import { CustomerSearchNavigation } from '@shared/services';
|
||||
|
||||
@Component({
|
||||
selector: 'page-checkout-review',
|
||||
@@ -37,6 +39,7 @@ import { ShoppingCartItemComponent } from './shopping-cart-item/shopping-cart-it
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class CheckoutReviewComponent implements OnInit, OnDestroy, AfterViewInit {
|
||||
private _customerSearchNavigation = inject(CustomerSearchNavigation);
|
||||
checkingOla$ = new BehaviorSubject<boolean>(false);
|
||||
|
||||
payer$ = this._store.payer$;
|
||||
@@ -467,6 +470,8 @@ export class CheckoutReviewComponent implements OnInit, OnDestroy, AfterViewInit
|
||||
}
|
||||
|
||||
async navigateToCustomerSearch(processId: number) {
|
||||
const nav = this._customerSearchNavigation.defaultRoute({ processId });
|
||||
|
||||
try {
|
||||
const response = await this.customerFeatures$
|
||||
.pipe(
|
||||
@@ -477,11 +482,11 @@ export class CheckoutReviewComponent implements OnInit, OnDestroy, AfterViewInit
|
||||
)
|
||||
.toPromise();
|
||||
|
||||
this.router.navigate(['/kunde', this.applicationService.activatedProcessId, 'customer', 'search'], {
|
||||
this.router.navigate(nav.path, {
|
||||
queryParams: { filter_customertype: response.filter.customertype },
|
||||
});
|
||||
} catch (error) {
|
||||
this.router.navigate(['/kunde', this.applicationService.activatedProcessId, 'customer', 'search']);
|
||||
this.router.navigate(nav.path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -501,7 +506,8 @@ export class CheckoutReviewComponent implements OnInit, OnDestroy, AfterViewInit
|
||||
return;
|
||||
}
|
||||
const customerId = customer.source;
|
||||
this.router.navigate(['/kunde', this.applicationService.activatedProcessId, 'customer', `${customerId}`]);
|
||||
const nav = this._customerSearchNavigation.detailsRoute({ processId, customerId });
|
||||
this.router.navigate(nav.path);
|
||||
}
|
||||
|
||||
async order() {
|
||||
|
||||
Reference in New Issue
Block a user