mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 2019: fix(customer-details): prioritize cart navigation over reward return URL
fix(customer-details): prioritize cart navigation over reward return URL Fixes issue #5461 where navigating to cart after customer selection would incorrectly route to reward shop page. Changed navigation priority to check for regular shopping cart items before checking for reward return URL context. This ensures that active standard checkout flows take precedence over any lingering reward flow navigation context. Related work items: #5461
This commit is contained in:
committed by
Nino Righi
parent
2e0853c91a
commit
9c989055cb
@@ -419,6 +419,15 @@ export class CustomerDetailsViewMainComponent
|
||||
|
||||
await this._setShippingAddress();
|
||||
|
||||
// #5461 Priority fix: Check for regular shopping cart items BEFORE reward return URL
|
||||
// This ensures that if a user has items in their regular cart, that takes precedence
|
||||
// over any lingering reward flow context
|
||||
if (this.shoppingCartHasItems) {
|
||||
await this.#rewardSelectionPopUpFlow(this.processId);
|
||||
this.setIsBusy(false);
|
||||
return;
|
||||
}
|
||||
|
||||
// #5262 Check for reward selection flow before navigation
|
||||
if (this.hasReturnUrl()) {
|
||||
// Restore from preserved context (auto-scoped to current tab) and clean up
|
||||
@@ -437,16 +446,11 @@ export class CustomerDetailsViewMainComponent
|
||||
return;
|
||||
}
|
||||
|
||||
// Regular checkout navigation
|
||||
if (this.shoppingCartHasItems) {
|
||||
await this.#rewardSelectionPopUpFlow(this.processId);
|
||||
} else {
|
||||
// Navigation zur Artikelsuche
|
||||
const path = this._catalogNavigation.getArticleSearchBasePath(
|
||||
this.processId,
|
||||
).path;
|
||||
await this._router.navigate(path);
|
||||
}
|
||||
// Navigation zur Artikelsuche
|
||||
const path = this._catalogNavigation.getArticleSearchBasePath(
|
||||
this.processId,
|
||||
).path;
|
||||
await this._router.navigate(path);
|
||||
|
||||
this.setIsBusy(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user