@veloceapps/sdk 8.0.0-148 → 8.0.0-149
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/src/resolvers/quote.resolver.mjs +29 -13
- package/fesm2015/veloceapps-sdk.mjs +26 -10
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +26 -10
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/resolvers/quote.resolver.d.ts +1 -0
@@ -2097,22 +2097,38 @@ class QuoteResolver {
|
|
2097
2097
|
if (flow.properties.suppressInitialNavigation || flow.properties.standalone) {
|
2098
2098
|
return of(true);
|
2099
2099
|
}
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
}
|
2105
|
-
else if (this.quoteDraftService.hasProducts) {
|
2106
|
-
navigateTo = '/cart';
|
2107
|
-
}
|
2108
|
-
if (navigateTo) {
|
2100
|
+
return this.getNavigateTo().pipe(switchMap(navigateTo => {
|
2101
|
+
if (!navigateTo) {
|
2102
|
+
return of(true);
|
2103
|
+
}
|
2109
2104
|
const parentUrl = this.routerService.getFlowRootPath(route);
|
2110
2105
|
return from(this.router.navigate([parentUrl + navigateTo], {
|
2111
2106
|
queryParams: route.queryParams,
|
2112
2107
|
replaceUrl: true,
|
2113
2108
|
}));
|
2109
|
+
}));
|
2110
|
+
}
|
2111
|
+
getNavigateTo() {
|
2112
|
+
const flow = this.flowInfo.flow;
|
2113
|
+
let navigateTo;
|
2114
|
+
if (flow?.properties.stateful) {
|
2115
|
+
return this.flowStateService.select$(UITemplateType.FLOW_ENGINE, 'NAVIGATE_TO').pipe(map(r => {
|
2116
|
+
if (r.success) {
|
2117
|
+
return r.result;
|
2118
|
+
}
|
2119
|
+
return '';
|
2120
|
+
}));
|
2121
|
+
}
|
2122
|
+
else {
|
2123
|
+
const isAccountMode = this.contextService.mode === ConfigurationContextMode.ACCOUNT;
|
2124
|
+
if (isAccountMode || this.quoteDraftService.hasAssets) {
|
2125
|
+
navigateTo = '/assets';
|
2126
|
+
}
|
2127
|
+
else if (this.quoteDraftService.hasProducts) {
|
2128
|
+
navigateTo = '/cart';
|
2129
|
+
}
|
2114
2130
|
}
|
2115
|
-
return of(
|
2131
|
+
return of(navigateTo);
|
2116
2132
|
}
|
2117
2133
|
}
|
2118
2134
|
QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$2.Router }, { token: i2.QuoteDraftService }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|