mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
#1402 - Navigation vom Warenkorb zum Kunden um Adressen zu ändern
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user