diff --git a/apps/storefront/src/App.tsx b/apps/storefront/src/App.tsx index 488187e8..8d9c57d8 100644 --- a/apps/storefront/src/App.tsx +++ b/apps/storefront/src/App.tsx @@ -67,7 +67,7 @@ export default function App() { BcToken, role, logo, - bcChannelId, + currentChannelId, isAgenting, quoteConfig, storefrontConfig, @@ -175,7 +175,7 @@ export default function App() { await loginInfo() } - setChannelStoreType(bcChannelId) + setChannelStoreType(currentChannelId) await Promise.all([getQuoteConfig(), setStorefrontConfig()]) if (!customerId) await getCurrentCustomerInfo(dispatch) diff --git a/apps/storefront/src/components/B3StoreContainer.tsx b/apps/storefront/src/components/B3StoreContainer.tsx index ff308f28..1b707161 100644 --- a/apps/storefront/src/components/B3StoreContainer.tsx +++ b/apps/storefront/src/components/B3StoreContainer.tsx @@ -54,7 +54,7 @@ export const B3StoreContainer = (props: B3StoreContainerProps) => { const { channelId, channelLogo: logo, - b3ChannelId: bcChannelId, + b3ChannelId: b2bChannelId, b2bEnabled: storeEnabled, } = getCurrentStoreInfo((storeBasicInfo as StoreBasicInfo)?.storeSites || []) @@ -64,7 +64,7 @@ export const B3StoreContainer = (props: B3StoreContainerProps) => { logo, storeEnabled, currentChannelId: channelId, - bcChannelId, + b2bChannelId, storeName: storeBasicInfo.storeName, }, }) diff --git a/apps/storefront/src/shared/global/context/config.ts b/apps/storefront/src/shared/global/context/config.ts index 59fd81c9..42680a36 100644 --- a/apps/storefront/src/shared/global/context/config.ts +++ b/apps/storefront/src/shared/global/context/config.ts @@ -103,7 +103,7 @@ export interface GlobalState { storeEnabled: boolean, storeName: string, currentChannelId: number, - bcChannelId: number, + b2bChannelId: number, countriesList?: Country[], productQuoteEnabled: boolean, cartQuoteEnabled: boolean, @@ -166,7 +166,7 @@ export const initState = { storeEnabled: false, storeName: '', currentChannelId: 1, - bcChannelId: 1, + b2bChannelId: 1, countriesList: [], productQuoteEnabled: false, cartQuoteEnabled: false, diff --git a/apps/storefront/src/shared/service/b2b/api/global.ts b/apps/storefront/src/shared/service/b2b/api/global.ts index 666d9389..538b43f5 100644 --- a/apps/storefront/src/shared/service/b2b/api/global.ts +++ b/apps/storefront/src/shared/service/b2b/api/global.ts @@ -27,8 +27,8 @@ export const uploadB2BFile = (data: UploadFileData) => { return B3Request.fileUpload('/api/v2/media/upload', formData) } -export const setChannelStoreType = (bcChannelId: number): CustomFieldItems => B3Request.put('/api/v2/store-configs/channel-storefront-type', RequestType.B2BRest, { - bcChannelId, +export const setChannelStoreType = (channelId: number): CustomFieldItems => B3Request.put('/api/v2/store-configs/channel-storefront-type', RequestType.B2BRest, { + bcChannelId: channelId, storefrontType: 1, storeHash, })