diff --git a/apps/storefront/src/components/outSideComponents/B3HoverButton.tsx b/apps/storefront/src/components/outSideComponents/B3HoverButton.tsx index 38d9c462..4f2f77cc 100644 --- a/apps/storefront/src/components/outSideComponents/B3HoverButton.tsx +++ b/apps/storefront/src/components/outSideComponents/B3HoverButton.tsx @@ -91,9 +91,7 @@ export const B3HoverButton = (props: B3HoverButtonProps) => { { sx={{ display: 'flex', flexDirection: 'column', - width: '100%', - alignItems: 'flex-end', + width: 'auto', }} > diff --git a/apps/storefront/src/components/outSideComponents/B3MasquradeGobalTip.tsx b/apps/storefront/src/components/outSideComponents/B3MasquradeGobalTip.tsx index a3c8b72f..b69cc2b8 100644 --- a/apps/storefront/src/components/outSideComponents/B3MasquradeGobalTip.tsx +++ b/apps/storefront/src/components/outSideComponents/B3MasquradeGobalTip.tsx @@ -162,11 +162,9 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => { @@ -175,6 +173,7 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => { backgroundColor: '#ED6C02', height: '42px', marginTop: '10px', + ...customStyles, }} onClick={() => { setOpenPage({ @@ -300,7 +299,6 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => { height: '52px', color: '#FFFFFF', ...sx, - ...customStyles, }} anchorOrigin={getLocation(location) || defaultLocation} open diff --git a/apps/storefront/src/hooks/dom/useOpenPDP.ts b/apps/storefront/src/hooks/dom/useOpenPDP.ts index cd04dd6e..47fab15c 100644 --- a/apps/storefront/src/hooks/dom/useOpenPDP.ts +++ b/apps/storefront/src/hooks/dom/useOpenPDP.ts @@ -105,7 +105,9 @@ const useOpenPDP = ({ return } - if (shoppingListEnabled && enabled) { + const isCurrentUserEnabled = roleText ? (shoppingListBtn as CustomFieldItems)[roleText] : '' + + if (shoppingListEnabled && enabled && isCurrentUserEnabled) { addToCartAll.forEach((node: CustomFieldItems) => { shoppingBtnDom = document.createElement('div') shoppingBtnDom.setAttribute('id', `${locationSelector}`) diff --git a/apps/storefront/src/utils/b3Init.ts b/apps/storefront/src/utils/b3Init.ts index 06d2511e..2ff5f09d 100644 --- a/apps/storefront/src/utils/b3Init.ts +++ b/apps/storefront/src/utils/b3Init.ts @@ -30,7 +30,7 @@ export const getQuoteEnabled = ( const quoteEnabled = storefrontConfig.quotes || false - let shoppingListEnabled = storefrontConfig.shoppingLists || false + const shoppingListEnabled = storefrontConfig.shoppingLists quoteConfig.forEach((config) => { if (config.key === 'quote_customer') { @@ -42,7 +42,6 @@ export const getQuoteEnabled = ( if (config.key === 'quote_for_individual_customer') { bcUserEnabled = config.value } - // TODO: check if (config.key === 'quote_for_b2b') { b2bUserEnabled = config.value } @@ -60,14 +59,12 @@ export const getQuoteEnabled = ( if (`${role}` === '100') { // guest productQuoteEnabled = productQuoteEnabled && guestEnabled === '1' cartQuoteEnabled = cartQuoteEnabled && guestEnabled === '1' - shoppingListEnabled = false } else if (isB2BUser) { productQuoteEnabled = b2bUserEnabled === '1' cartQuoteEnabled = b2bUserEnabled === '1' if (`${role}` === '3' && !isAgenting) { productQuoteEnabled = false cartQuoteEnabled = false - shoppingListEnabled = false } } else if (!isB2BUser) { // BCUser productQuoteEnabled = productQuoteEnabled && bcUserEnabled === '1' diff --git a/apps/storefront/src/utils/storefrontConfig.ts b/apps/storefront/src/utils/storefrontConfig.ts index fcbae6fc..5aa29267 100644 --- a/apps/storefront/src/utils/storefrontConfig.ts +++ b/apps/storefront/src/utils/storefrontConfig.ts @@ -111,8 +111,6 @@ const getTemPlateConfig = async (channelId: number, dispatch: any, dispatchGloba } }) - console.log(storefrontConfigs, logo, 'storefrontConfigs') - dispatchGlobal({ type: 'common', payload: {