ordering-ui-external 1.8.3 → 1.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/_bundles/{0.ordering-ui.82b10af64edad46e950f.js → 0.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
  2. package/_bundles/{1.ordering-ui.82b10af64edad46e950f.js → 1.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
  3. package/_bundles/{2.ordering-ui.82b10af64edad46e950f.js → 2.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
  4. package/_bundles/{4.ordering-ui.82b10af64edad46e950f.js → 4.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
  5. package/_bundles/{5.ordering-ui.82b10af64edad46e950f.js → 5.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
  6. package/_bundles/{6.ordering-ui.82b10af64edad46e950f.js → 6.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
  7. package/_bundles/{7.ordering-ui.82b10af64edad46e950f.js → 7.ordering-ui.c12070c3ccac5ea49732.js} +1 -1
  8. package/_bundles/{7.ordering-ui.82b10af64edad46e950f.js.LICENSE.txt → 7.ordering-ui.c12070c3ccac5ea49732.js.LICENSE.txt} +0 -0
  9. package/_bundles/{8.ordering-ui.82b10af64edad46e950f.js → 8.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
  10. package/_bundles/{9.ordering-ui.82b10af64edad46e950f.js → 9.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
  11. package/_bundles/ordering-ui.c12070c3ccac5ea49732.js +2 -0
  12. package/_bundles/{ordering-ui.82b10af64edad46e950f.js.LICENSE.txt → ordering-ui.c12070c3ccac5ea49732.js.LICENSE.txt} +0 -0
  13. package/_modules/themes/five/src/components/AddressForm/styles.js +1 -1
  14. package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +8 -8
  15. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +41 -62
  16. package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +10 -18
  17. package/_modules/themes/five/src/components/CartPopover/index.js +3 -4
  18. package/_modules/themes/five/src/components/Checkout/index.js +18 -10
  19. package/_modules/themes/five/src/components/CitiesControl/index.js +69 -0
  20. package/_modules/themes/five/src/components/CitiesControl/styles.js +18 -0
  21. package/_modules/themes/five/src/components/DriverTips/index.js +6 -22
  22. package/_modules/themes/five/src/components/Header/index.js +7 -6
  23. package/_modules/themes/five/src/components/HeaderOption/index.js +3 -3
  24. package/_modules/themes/five/src/components/MultiCheckout/index.js +21 -2
  25. package/_modules/themes/five/src/components/MultiCheckout/styles.js +14 -10
  26. package/_modules/themes/five/src/components/OrderProgress/index.js +9 -8
  27. package/_modules/themes/five/src/components/OrderProgress/styles.js +21 -17
  28. package/_modules/themes/five/src/components/PaymentOptions/index.js +2 -2
  29. package/_modules/themes/five/src/components/UserPopover/index.js +2 -2
  30. package/package.json +2 -2
  31. package/src/themes/five/src/components/AddressForm/styles.js +2 -1
  32. package/src/themes/five/src/components/BusinessBasicInformation/index.js +2 -2
  33. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +53 -78
  34. package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +15 -54
  35. package/src/themes/five/src/components/CartPopover/index.js +2 -2
  36. package/src/themes/five/src/components/Checkout/index.js +47 -16
  37. package/src/themes/five/src/components/CitiesControl/index.js +56 -0
  38. package/src/themes/five/src/components/CitiesControl/styles.js +32 -0
  39. package/src/themes/five/src/components/DriverTips/index.js +46 -63
  40. package/src/themes/five/src/components/Header/index.js +3 -3
  41. package/src/themes/five/src/components/HeaderOption/index.js +2 -2
  42. package/src/themes/five/src/components/MultiCheckout/index.js +35 -2
  43. package/src/themes/five/src/components/MultiCheckout/styles.js +19 -0
  44. package/src/themes/five/src/components/OrderProgress/index.js +53 -49
  45. package/src/themes/five/src/components/OrderProgress/styles.js +9 -0
  46. package/src/themes/five/src/components/PaymentOptions/index.js +1 -1
  47. package/src/themes/five/src/components/UserPopover/index.js +1 -1
  48. package/_bundles/ordering-ui.82b10af64edad46e950f.js +0 -2
@@ -14,6 +14,7 @@ import { Button } from '../../styles/Buttons'
14
14
 
15
15
  const DriverTipsUI = (props) => {
16
16
  const {
17
+ isMulti,
17
18
  driverTip,
18
19
  driverTipsOptions,
19
20
  cart,
@@ -38,69 +39,51 @@ const DriverTipsUI = (props) => {
38
39
  : `0${configs?.format_number_currency?.value}`
39
40
 
40
41
  return (
41
- <>
42
- {props.beforeElements?.map((BeforeElement, i) => (
43
- <React.Fragment key={i}>
44
- {BeforeElement}
45
- </React.Fragment>))}
46
- {props.beforeComponents?.map((BeforeComponent, i) => (
47
- <BeforeComponent key={i} {...props} />))}
48
- <DriverTipContainer id='driver-tip-container'>
49
- <>
50
- {isDriverTipUseCustom ? (
51
- <FormDriverTip>
52
- <WrapperInput>
53
- <Input
54
- name='drivertip'
55
- type='text'
56
- value={value}
57
- placeholder={placeholderCurrency}
58
- onChange={handleChangeDriverTip}
59
- />
60
- <Button
61
- color='primary'
62
- disabled={parseFloat(value || 0) < 0 || parseFloat(value || 0) === driverTip || value === ''}
63
- onClick={() => {
64
- handlerChangeOption(value)
65
- setvalue('')
66
- }}
67
- >
68
- {t('APPLY_TIP', 'Apply Tip')}
69
- </Button>
70
- </WrapperInput>
71
- {parseFloat(driverTip || 0) > 0 && (
72
- <DriverTipMessage>
73
- {t('CURRENT_DRIVER_TIP_AMOUNT', 'Current driver tip amount')}{!isFixedPriceType && ` (${driverTip}%)`}: {isFixedPriceType ? parsePrice(driverTip) : parsePrice(cart?.driver_tip)}
74
- </DriverTipMessage>
75
- )}
76
- </FormDriverTip>
77
- ) : (
78
- <WrapperTips>
79
- {driverTipsOptions.map((option, i) => (
80
- <TipCard
81
- key={i}
82
- className={`${option === driverTip ? 'active' : ''}`}
83
- onClick={() => handlerChangeOption(option)}
84
- >
85
- {`${isFixedPriceType ? parsePrice(option) : `${option}%`}`}
86
- </TipCard>
87
- ))}
88
- </WrapperTips>
89
- )}
90
- </>
91
- {/* {isDriverTipUseCustom && !driverTipsOptions.includes(driverTip) && driverTip > 0 && (
92
- <DriverTipMessage>
93
- {t('CUSTOM_DRIVER_TIP_AMOUNT', 'The driver\'s current tip comes from a custom option')}
94
- </DriverTipMessage>
95
- )} */}
96
- </DriverTipContainer>
97
- {props.afterComponents?.map((AfterComponent, i) => (
98
- <AfterComponent key={i} {...props} />))}
99
- {props.afterElements?.map((AfterElement, i) => (
100
- <React.Fragment key={i}>
101
- {AfterElement}
102
- </React.Fragment>))}
103
- </>
42
+ <DriverTipContainer id='driver-tip-container'>
43
+ <>
44
+ {isDriverTipUseCustom && !isMulti ? (
45
+ <FormDriverTip>
46
+ <WrapperInput>
47
+ <Input
48
+ name='drivertip'
49
+ type='text'
50
+ value={value}
51
+ placeholder={placeholderCurrency}
52
+ onChange={handleChangeDriverTip}
53
+ />
54
+ <Button
55
+ color='primary'
56
+ disabled={parseFloat(value || 0) < 0 || parseFloat(value || 0) === driverTip || value === ''}
57
+ onClick={() => {
58
+ handlerChangeOption(value)
59
+ setvalue('')
60
+ }}
61
+ >
62
+ {t('APPLY_TIP', 'Apply Tip')}
63
+ </Button>
64
+ </WrapperInput>
65
+ {parseFloat(driverTip || 0) > 0 && (
66
+ <DriverTipMessage>
67
+ {t('CURRENT_DRIVER_TIP_AMOUNT', 'Current driver tip amount')}{!isFixedPriceType &&
68
+ ` (${driverTip}%)`}: {isFixedPriceType ? parsePrice(driverTip) : parsePrice(cart?.driver_tip)}
69
+ </DriverTipMessage>
70
+ )}
71
+ </FormDriverTip>
72
+ ) : (
73
+ <WrapperTips>
74
+ {driverTipsOptions.map((option, i) => (
75
+ <TipCard
76
+ key={i}
77
+ className={`${option === driverTip ? 'active' : ''}`}
78
+ onClick={() => handlerChangeOption(option)}
79
+ >
80
+ {`${isFixedPriceType ? parsePrice(option) : `${option}%`}`}
81
+ </TipCard>
82
+ ))}
83
+ </WrapperTips>
84
+ )}
85
+ </>
86
+ </DriverTipContainer>
104
87
  )
105
88
  }
106
89
 
@@ -68,7 +68,7 @@ export const Header = (props) => {
68
68
  const theme = useTheme()
69
69
  const [configState] = useConfig()
70
70
  const [customerState, { deleteUserCustomer }] = useCustomer()
71
- const [{ theme: orderingTheme }] = useOrderingTheme()
71
+ const [orderingTheme] = useOrderingTheme()
72
72
 
73
73
  const clearCustomer = useRef(null)
74
74
  const [modalIsOpen, setModalIsOpen] = useState(false)
@@ -93,7 +93,7 @@ export const Header = (props) => {
93
93
  const orderTypeList = [t('DELIVERY', 'Delivery'), t('PICKUP', 'Pickup'), t('EAT_IN', 'Eat in'), t('CURBSIDE', 'Curbside'), t('DRIVE_THRU', 'Drive thru')]
94
94
  const configTypes = configState?.configs?.order_types_allowed?.value.split('|').map(value => Number(value)) || []
95
95
  const isPreOrderSetting = configState?.configs?.preorder_status_enabled?.value === '1'
96
- const isChew = orderingTheme?.theme?.header?.components?.layout?.type === 'Chew'
96
+ const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
97
97
 
98
98
  const handleSuccessSignup = (user) => {
99
99
  login({
@@ -423,7 +423,7 @@ export const Header = (props) => {
423
423
  )}
424
424
  {modalIsOpen && (
425
425
  <Modal
426
- title={(!auth && modalSelected === 'address') && t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?')}
426
+ {...(!auth && modalSelected === 'address' && { title: t('WHAT_IS_YOUR_ADDRESS', 'What\'s your address?') })}
427
427
  open={modalIsOpen}
428
428
  onClose={() => setModalIsOpen(false)}
429
429
  width={modalSelected === 'address' ? orderState?.options?.user_id ? '70%' : '50%' : '700px'}
@@ -19,10 +19,10 @@ export const HeaderOption = (props) => {
19
19
 
20
20
  const [{ configs }] = useConfig()
21
21
  const [{ parseDate }] = useUtils()
22
- const [{ theme: orderingTheme }] = useOrderingTheme()
22
+ const [orderingTheme] = useOrderingTheme()
23
23
  const [, t] = useLanguage()
24
24
  const [orderStatus] = useOrder()
25
- const isChew = orderingTheme?.theme?.header?.components?.layout?.type === 'Chew'
25
+ const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
26
26
 
27
27
  return (
28
28
  <>
@@ -8,6 +8,7 @@ import {
8
8
  useSession,
9
9
  useValidationFields,
10
10
  useOrder,
11
+ useOrderingTheme,
11
12
  MultiCheckout as MultiCheckoutController
12
13
  } from 'ordering-components-external'
13
14
 
@@ -34,8 +35,10 @@ import {
34
35
  MultiCartPriceContainer,
35
36
  PaymentMethodContainer,
36
37
  WrapperPlaceOrderButton,
37
- WarningText
38
+ WarningText,
39
+ DriverTipContainer
38
40
  } from './styles'
41
+ import { DriverTips } from '../DriverTips'
39
42
 
40
43
  const mapConfigs = {
41
44
  mapZoom: 16,
@@ -63,6 +66,7 @@ const MultiCheckoutUI = (props) => {
63
66
  const [{ configs }] = useConfig()
64
67
  const [{ parsePrice }] = useUtils()
65
68
  const [customerState] = useCustomer()
69
+ const [orderingTheme] = useOrderingTheme()
66
70
  const [validationFields] = useValidationFields()
67
71
  const [{ user }] = useSession()
68
72
  const [orderState] = useOrder()
@@ -74,6 +78,10 @@ const MultiCheckoutUI = (props) => {
74
78
  const maximumCarts = 5
75
79
  const isDisablePlaceOrderButton = !(paymethodSelected?.paymethod_id || paymethodSelected?.wallet_id) || openCarts.length > maximumCarts
76
80
  const walletCarts = (Object.values(orderState?.carts)?.filter(cart => cart?.products && cart?.products?.length && cart?.status !== 2 && cart?.valid_schedule && cart?.valid_products && cart?.valid_address && cart?.valid_maximum && cart?.valid_minimum && cart?.wallets) || null) || []
81
+ const isMultiDriverTips = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
82
+ const driverTipsOptions = typeof configs?.driver_tip_options?.value === 'string'
83
+ ? JSON.parse(configs?.driver_tip_options?.value) || []
84
+ : configs?.driver_tip_options?.value || []
77
85
 
78
86
  const handlePlaceOrder = () => {
79
87
  if (!userErrors.length) {
@@ -193,6 +201,31 @@ const MultiCheckoutUI = (props) => {
193
201
  />
194
202
  </PaymentMethodContainer>
195
203
 
204
+ {
205
+ isMultiDriverTips &&
206
+ orderState?.options.type === 1 &&
207
+ validationFields?.fields?.checkout?.driver_tip?.enabled &&
208
+ openCarts.every(cart => cart.business_id && cart.status !== 2) &&
209
+ driverTipsOptions.length > 0 &&
210
+ (
211
+ <DriverTipContainer>
212
+ <h1>{t('DRIVER_TIPS', 'Driver Tips')}</h1>
213
+ <p>{t('100%_OF_THE_TIP_YOUR_DRIVER', '100% of the tip goes to your driver')}</p>
214
+ <DriverTips
215
+ isMulti
216
+ carts={openCarts}
217
+ businessIds={openCarts.map(cart => cart.business_id)}
218
+ driverTipsOptions={driverTipsOptions}
219
+ isFixedPrice={parseInt(configs?.driver_tip_type?.value, 10) === 1}
220
+ isDriverTipUseCustom={!!parseInt(configs?.driver_tip_use_custom?.value, 10)}
221
+ driverTip={parseInt(configs?.driver_tip_type?.value, 10) === 1
222
+ ? openCarts[0]?.driver_tip
223
+ : openCarts[0]?.driver_tip_rate}
224
+ useOrderContext
225
+ />
226
+ </DriverTipContainer>
227
+ )
228
+ }
196
229
  </WrapperLeftContent>
197
230
  </WrapperLeftContainer>
198
231
  <WrapperRightContainer>
@@ -205,7 +238,7 @@ const MultiCheckoutUI = (props) => {
205
238
  <Cart
206
239
  isCartPending={cart?.status === 2}
207
240
  cart={cart}
208
- isMultiCheckout
241
+ isMultiCheckout={!isMultiDriverTips}
209
242
  isProducts={cart?.products?.length || 0}
210
243
  />
211
244
  <DriverTipDivider />
@@ -63,6 +63,25 @@ export const PaymentMethodContainer = styled.div`
63
63
  color: ${props => props.theme.colors.darkTextColor};
64
64
  }
65
65
  `
66
+
67
+ export const DriverTipContainer = styled.div`
68
+ width: 100%;
69
+ display: flex;
70
+ flex-direction: column;
71
+ margin: 20px 0px 0px;
72
+ h1 {
73
+ margin: 0px;
74
+ font-weight: 500;
75
+ font-size: 20px;
76
+ color: ${props => props.theme.colors.darkTextColor};
77
+ }
78
+ > p {
79
+ margin: 0;
80
+ font-size: 16px;
81
+ color: #909BA9;
82
+ }
83
+ `
84
+
66
85
  export const CartContainer = styled(PaymentMethodContainer)`
67
86
  margin-bottom: 20px;
68
87
  `
@@ -20,7 +20,8 @@ import {
20
20
  ProgressBar,
21
21
  ProgressTextWrapper,
22
22
  StatusWrapper,
23
- TimeWrapper
23
+ TimeWrapper,
24
+ OrderProgressWrapper
24
25
  } from './styles'
25
26
 
26
27
  const OrderProgressUI = (props) => {
@@ -73,10 +74,7 @@ const OrderProgressUI = (props) => {
73
74
  const deliveryTime = lastOrder?.delivery_datetime_utc
74
75
  ? parseDate(lastOrder?.delivery_datetime_utc, { outputFormat: 'YYYY-MM-DD hh:mm A' })
75
76
  : parseDate(lastOrder?.delivery_datetime, { utc: false, outputFormat: 'YYYY-MM-DD hh:mm A' })
76
- const hour = time?.split(':')[0]
77
- const minute = time?.split(':')[1]
78
- const result = time ? (parseInt(hour, 10) * 60) + parseInt(minute, 10) : 0
79
- const returnedDate = moment(new Date(deliveryTime.replace(/-/g, '/'))).add(result, 'minutes').format('hh:mm A')
77
+ const returnedDate = moment(new Date(deliveryTime.replace(/-/g, '/'))).add(time, 'minutes').format('hh:mm A')
80
78
  return returnedDate
81
79
  }
82
80
 
@@ -93,51 +91,57 @@ const OrderProgressUI = (props) => {
93
91
 
94
92
  return (
95
93
  <>
96
- {orderList?.loading && <Skeleton height={150} />}
94
+ {orderList?.loading && (
95
+ <OrderProgressWrapper isChew={props.isChew}>
96
+ <Skeleton height={150} />
97
+ </OrderProgressWrapper>
98
+ )}
97
99
  {!orderList?.loading && orderList?.orders?.length > 0 && lastOrder && (
98
- <OrderProgressContainer>
99
- <OrderInfoWrapper>
100
- <ProgressLogo bgimage={optimizeImage(lastOrder?.business?.logo || theme.images?.dummies?.businessLogo, 'h_91,c_limit')} />
101
- <ProgressDescriptionWrapper>
102
- <h2>{t('ORDER_IN_PROGRESS', 'Order in progress')}</h2>
103
- <p>{t('RESTAURANT_PREPARING_YOUR_ORDER', 'The restaurant is preparing your order')}</p>
104
- <Button
105
- color='primaryContrast'
106
- naked
107
- onClick={() => handleGoToPage(isCustomerMode ? 'order_detail' : 'orders')}
108
- >
109
- {isCustomerMode ? (
110
- <>
111
- {t('GO_TO_THE_ORDER', 'Go to the order')}
112
- </>
113
- ) : (
114
- <>
115
- {t('GO_TO_MY_ORDERS', 'Go to my orders')}
116
- </>
117
- )}
118
- <BsArrowRight />
119
- </Button>
120
- </ProgressDescriptionWrapper>
121
- </OrderInfoWrapper>
122
- <ProgressBarWrapper>
123
- <ProgressContentWrapper>
124
- <ProgressBar style={{ width: getOrderStatus(lastOrder.status)?.percentage ? `${getOrderStatus(lastOrder.status).percentage}%` : '0%' }} />
125
- </ProgressContentWrapper>
126
- <ProgressTextWrapper>
127
- <StatusWrapper>{getOrderStatus(lastOrder?.status)?.value}</StatusWrapper>
128
- <TimeWrapper>
129
- <span>{t('ESTIMATED_DELIVERY', 'Estimated delivery')}:&nbsp;</span>
130
- <span>
131
- {lastOrder?.delivery_datetime_utc
132
- ? parseTime(lastOrder?.delivery_datetime_utc, { outputFormat: 'hh:mm A' })
133
- : parseTime(lastOrder?.delivery_datetime, { utc: false })}
134
- &nbsp;-&nbsp;
135
- {convertDiffToHours(lastOrder.delivery_type === 1 ? lastOrder?.business?.delivery_time : lastOrder?.business?.pickup_time)}
136
- </span>
137
- </TimeWrapper>
138
- </ProgressTextWrapper>
139
- </ProgressBarWrapper>
140
- </OrderProgressContainer>
100
+ <OrderProgressWrapper isChew={props.isChew}>
101
+ <OrderProgressContainer>
102
+ <OrderInfoWrapper>
103
+ <ProgressLogo bgimage={optimizeImage(lastOrder?.business?.logo || theme.images?.dummies?.businessLogo, 'h_91,c_limit')} />
104
+ <ProgressDescriptionWrapper>
105
+ <h2>{t('ORDER_IN_PROGRESS', 'Order in progress')}</h2>
106
+ <p>{t('RESTAURANT_PREPARING_YOUR_ORDER', 'The restaurant is preparing your order')}</p>
107
+ <Button
108
+ color='primaryContrast'
109
+ naked
110
+ onClick={() => handleGoToPage(isCustomerMode ? 'order_detail' : 'orders')}
111
+ >
112
+ {isCustomerMode ? (
113
+ <>
114
+ {t('GO_TO_THE_ORDER', 'Go to the order')}
115
+ </>
116
+ ) : (
117
+ <>
118
+ {t('GO_TO_MY_ORDERS', 'Go to my orders')}
119
+ </>
120
+ )}
121
+ <BsArrowRight />
122
+ </Button>
123
+ </ProgressDescriptionWrapper>
124
+ </OrderInfoWrapper>
125
+ <ProgressBarWrapper>
126
+ <ProgressContentWrapper>
127
+ <ProgressBar style={{ width: getOrderStatus(lastOrder.status)?.percentage ? `${getOrderStatus(lastOrder.status).percentage}%` : '0%' }} />
128
+ </ProgressContentWrapper>
129
+ <ProgressTextWrapper>
130
+ <StatusWrapper>{getOrderStatus(lastOrder?.status)?.value}</StatusWrapper>
131
+ <TimeWrapper>
132
+ <span>{t('ESTIMATED_DELIVERY', 'Estimated delivery')}:&nbsp;</span>
133
+ <span>
134
+ {lastOrder?.delivery_datetime_utc
135
+ ? parseTime(lastOrder?.delivery_datetime_utc, { outputFormat: 'hh:mm A' })
136
+ : parseTime(lastOrder?.delivery_datetime, { utc: false })}
137
+ &nbsp;-&nbsp;
138
+ {convertDiffToHours(lastOrder.eta_time)}
139
+ </span>
140
+ </TimeWrapper>
141
+ </ProgressTextWrapper>
142
+ </ProgressBarWrapper>
143
+ </OrderProgressContainer>
144
+ </OrderProgressWrapper>
141
145
  )}
142
146
  </>
143
147
 
@@ -26,6 +26,15 @@ export const OrderProgressContainer = styled.div`
26
26
  }
27
27
  `
28
28
 
29
+ export const OrderProgressWrapper = styled.div`
30
+ padding: ${props => props.isChew ? '110px 20px 45px' : '45px 20px'};
31
+ margin: 0px;
32
+ @media (min-width: 768px) {
33
+ margin: 0 35px;
34
+ padding: 45px 20px;
35
+ }
36
+ `
37
+
29
38
  export const OrderInfoWrapper = styled.div`
30
39
  display: flex;
31
40
  align-items: center;
@@ -110,7 +110,7 @@ const PaymentOptionsUI = (props) => {
110
110
 
111
111
  const includeKioskPaymethods = ['cash', 'card_delivery']
112
112
 
113
- const list = paymethods ? paymethods?.map(pay => pay.paymethod) : paymethodsList?.paymethods
113
+ const list = paymethodsList ? paymethodsList?.paymethods : paymethods?.map(pay => pay.paymethod)
114
114
 
115
115
  const popupMethods = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect', 'paypal', 'square', 'google_pay', 'apple_pay']
116
116
  const supportedMethods = list?.filter(p => useKioskApp ? includeKioskPaymethods.includes(p.gateway) : p)
@@ -43,7 +43,7 @@ export const UserPopover = (props) => {
43
43
  const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
44
44
  const isPromotionsEnabled = configs?.advanced_offers_module?.value === '1' || configs?.advanced_offers_module?.value === true
45
45
  const isAddressListNewPage = orderingTheme?.theme?.profile?.components?.address_list?.components?.layout?.position === 'new_page'
46
- const isChew = orderingTheme?.theme?.header?.components?.layout?.type === 'Chew'
46
+ const isChew = orderingTheme?.theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
47
47
 
48
48
  const extraOptions = [
49
49
  { name: 'profile', pathname: '/profile', displayName: 'view account', key: 'view_account', isActive: true },