mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Warenkorb Navigation auf Kundensuche mit Filtern
This commit is contained in:
@@ -26,6 +26,8 @@ import { CustomerFeatures } from 'apps/sales/src/app/core/models/customer-featur
|
||||
import { CartService } from '../services/cart.service';
|
||||
import { BranchInfoDTO } from '@swagger/isa';
|
||||
import { AppState } from 'apps/sales/src/app/core/store/state/app.state';
|
||||
import { CheckoutService } from '@domain/checkout';
|
||||
import { ApplicationService } from '@core/application';
|
||||
|
||||
export interface CartReviewItem extends BookData {
|
||||
cartEntryId: number;
|
||||
@@ -121,7 +123,9 @@ export class CartReviewComponent implements OnInit, OnDestroy {
|
||||
private router: Router,
|
||||
private printer: PrinterService,
|
||||
private errorService: ErrorService,
|
||||
private cartService: CartService
|
||||
private cartService: CartService,
|
||||
private checkoutService: CheckoutService,
|
||||
private applicationService: ApplicationService
|
||||
) {
|
||||
this.deliveryCount$ = this.cartData$.pipe(
|
||||
startWith(-1),
|
||||
@@ -359,17 +363,20 @@ export class CartReviewComponent implements OnInit, OnDestroy {
|
||||
this.total.price = totalSum;
|
||||
}
|
||||
|
||||
next() {
|
||||
async next() {
|
||||
if (this.customer) {
|
||||
// Crete order
|
||||
this.continueBtn.startLoading();
|
||||
this.payMethodDialog.directOrder();
|
||||
} else {
|
||||
const response = await this.checkoutService.canSetCustomer(this.applicationService.activatedProcessId, undefined).toPromise();
|
||||
console.log(response);
|
||||
// No customer redirect to search
|
||||
let newBread: Breadcrumb;
|
||||
newBread = {
|
||||
name: 'Kundensuche',
|
||||
path: 'customer/search',
|
||||
queryParams: response.filter,
|
||||
};
|
||||
this.navigate(newBread, 'customer');
|
||||
}
|
||||
@@ -409,7 +416,7 @@ export class CartReviewComponent implements OnInit, OnDestroy {
|
||||
private navigate(bread: Breadcrumb, menu: string) {
|
||||
this.store.dispatch(new ChangeCurrentRoute(bread.path));
|
||||
this.store.dispatch(new AddBreadcrumb(bread, menu));
|
||||
this.router.navigate([bread.path]);
|
||||
this.router.navigate([bread.path], { queryParams: bread.queryParams });
|
||||
}
|
||||
|
||||
enableDisableOrder(disable: boolean) {
|
||||
|
||||
Reference in New Issue
Block a user