@veloceapps/sdk 11.0.0-25 → 11.0.0-27

Sign up to get free protection for your applications and to get access to all the features.
@@ -1342,6 +1342,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
1342
1342
  type: Injectable
1343
1343
  }], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i3$1.FlowInfoService }]; } });
1344
1344
 
1345
+ const resolvePCMModel = () => {
1346
+ const flowInfoService = inject(FlowInfoService);
1347
+ const configurationRuntimeService = inject(ConfigurationRuntimeService);
1348
+ const { productId } = flowInfoService.context;
1349
+ if (!productId) {
1350
+ throw new Error(`Unable to start configuration for 'productId == null'`);
1351
+ }
1352
+ return configurationRuntimeService.init$({ productId });
1353
+ };
1354
+
1345
1355
  class SalesTransactionResolver {
1346
1356
  constructor(router, routerService, flowInfoService, flowStateService, salesTransactionService) {
1347
1357
  this.router = router;
@@ -1397,8 +1407,8 @@ class SalesTransactionResolver {
1397
1407
  }
1398
1408
  else {
1399
1409
  const isAccountMode = this.flowInfoService.context.mode === 'ACCOUNT';
1400
- const { hasAssets, hasProducts } = this.salesTransactionService;
1401
- if (isAccountMode || hasAssets) {
1410
+ const { hasProducts } = this.salesTransactionService;
1411
+ if (isAccountMode) {
1402
1412
  navigateTo = '/assets';
1403
1413
  }
1404
1414
  else if (hasProducts) {
@@ -1474,7 +1484,7 @@ const rootRoute = {
1474
1484
  path: 'product',
1475
1485
  component: ProductComponent,
1476
1486
  runGuardsAndResolvers: 'paramsOrQueryParamsChange',
1477
- resolve: { salesTransaction: SalesTransactionResolver, uiDef: resolveUIDefinition },
1487
+ resolve: { salesTransaction: SalesTransactionResolver, uiDef: resolveUIDefinition, pcm: resolvePCMModel },
1478
1488
  canDeactivate: [ProductUnloadGuard],
1479
1489
  data: { showHeader: true },
1480
1490
  },