#1402 - Navigation vom Warenkorb zum Kunden um Adressen zu ändern

This commit is contained in:
Lorenz Hilpert
2021-02-03 16:31:29 +01:00
parent c6d8aab825
commit 2884e61ccd
3 changed files with 3 additions and 43 deletions

View File

@@ -89,22 +89,8 @@ export class DeliveryB2BCartComponent implements OnInit, OnDestroy {
return null;
}
const customerId = cart.customer.id;
if (customerId) {
const currentRoute = '/customer/edit/' + customerId + '/delivery';
const newBread: Breadcrumb = {
name: 'Lieferadresse',
path: currentRoute,
queryParams: { cart: true, notEditable: true },
};
this.store.dispatch(new SetDetailsCustomer(customerId));
this.store.dispatch(new ChangeCurrentRoute(currentRoute));
this.store.dispatch(new AddBreadcrumb(newBread, 'shoppingCart'));
this.router.navigate([currentRoute], {
queryParams: { cart: true, notEditable: true },
});
}
this.router.navigate(['/customer', customerId]);
}
productDetails(item) {

View File

@@ -89,22 +89,7 @@ export class DeliveryCartComponent implements OnInit, OnDestroy {
return null;
}
const customerId = cart.customer.id;
if (customerId) {
const currentRoute = '/customer/edit/' + customerId + '/delivery';
const newBread: Breadcrumb = {
name: 'Lieferadresse',
path: currentRoute,
queryParams: { cart: true, notEditable: true },
};
this.store.dispatch(new SetDetailsCustomer(customerId));
this.store.dispatch(new ChangeCurrentRoute(currentRoute));
this.store.dispatch(new AddBreadcrumb(newBread, 'shoppingCart'));
this.router.navigate([currentRoute], {
queryParams: { cart: true, notEditable: true },
});
}
this.router.navigate(['/customer', customerId]);
}
productDetails(item) {

View File

@@ -62,18 +62,7 @@ export class InvoiceAddressComponent implements OnInit, OnDestroy {
if (cart.customer) {
const customerId = cart.customer.id;
const currentRoute = '/customer/edit/' + customerId + '/billing';
const newBread: Breadcrumb = {
name: 'Rechnungsadresse',
path: currentRoute,
queryParams: { cart: true, notEditable: true },
};
this.store.dispatch(new SetDetailsCustomer(customerId));
this.store.dispatch(new AddBreadcrumb(newBread, 'shoppingCart'));
this.store.dispatch(new ChangeCurrentRoute(currentRoute));
this.router.navigate([currentRoute], { queryParams: { cart: true, notEditable: true } });
this.router.navigate(['/customer', customerId]);
}
}
}