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.
- package/_bundles/{0.ordering-ui.82b10af64edad46e950f.js → 0.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
- package/_bundles/{1.ordering-ui.82b10af64edad46e950f.js → 1.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
- package/_bundles/{2.ordering-ui.82b10af64edad46e950f.js → 2.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
- package/_bundles/{4.ordering-ui.82b10af64edad46e950f.js → 4.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
- package/_bundles/{5.ordering-ui.82b10af64edad46e950f.js → 5.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
- package/_bundles/{6.ordering-ui.82b10af64edad46e950f.js → 6.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
- package/_bundles/{7.ordering-ui.82b10af64edad46e950f.js → 7.ordering-ui.c12070c3ccac5ea49732.js} +1 -1
- package/_bundles/{7.ordering-ui.82b10af64edad46e950f.js.LICENSE.txt → 7.ordering-ui.c12070c3ccac5ea49732.js.LICENSE.txt} +0 -0
- package/_bundles/{8.ordering-ui.82b10af64edad46e950f.js → 8.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
- package/_bundles/{9.ordering-ui.82b10af64edad46e950f.js → 9.ordering-ui.c12070c3ccac5ea49732.js} +0 -0
- package/_bundles/ordering-ui.c12070c3ccac5ea49732.js +2 -0
- package/_bundles/{ordering-ui.82b10af64edad46e950f.js.LICENSE.txt → ordering-ui.c12070c3ccac5ea49732.js.LICENSE.txt} +0 -0
- package/_modules/themes/five/src/components/AddressForm/styles.js +1 -1
- package/_modules/themes/five/src/components/BusinessBasicInformation/index.js +8 -8
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +41 -62
- package/_modules/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +10 -18
- package/_modules/themes/five/src/components/CartPopover/index.js +3 -4
- package/_modules/themes/five/src/components/Checkout/index.js +18 -10
- package/_modules/themes/five/src/components/CitiesControl/index.js +69 -0
- package/_modules/themes/five/src/components/CitiesControl/styles.js +18 -0
- package/_modules/themes/five/src/components/DriverTips/index.js +6 -22
- package/_modules/themes/five/src/components/Header/index.js +7 -6
- package/_modules/themes/five/src/components/HeaderOption/index.js +3 -3
- package/_modules/themes/five/src/components/MultiCheckout/index.js +21 -2
- package/_modules/themes/five/src/components/MultiCheckout/styles.js +14 -10
- package/_modules/themes/five/src/components/OrderProgress/index.js +9 -8
- package/_modules/themes/five/src/components/OrderProgress/styles.js +21 -17
- package/_modules/themes/five/src/components/PaymentOptions/index.js +2 -2
- package/_modules/themes/five/src/components/UserPopover/index.js +2 -2
- package/package.json +2 -2
- package/src/themes/five/src/components/AddressForm/styles.js +2 -1
- package/src/themes/five/src/components/BusinessBasicInformation/index.js +2 -2
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/index.js +53 -78
- package/src/themes/five/src/components/BusinessesListing/layouts/OriginalBusinessesListing/styles.js +15 -54
- package/src/themes/five/src/components/CartPopover/index.js +2 -2
- package/src/themes/five/src/components/Checkout/index.js +47 -16
- package/src/themes/five/src/components/CitiesControl/index.js +56 -0
- package/src/themes/five/src/components/CitiesControl/styles.js +32 -0
- package/src/themes/five/src/components/DriverTips/index.js +46 -63
- package/src/themes/five/src/components/Header/index.js +3 -3
- package/src/themes/five/src/components/HeaderOption/index.js +2 -2
- package/src/themes/five/src/components/MultiCheckout/index.js +35 -2
- package/src/themes/five/src/components/MultiCheckout/styles.js +19 -0
- package/src/themes/five/src/components/OrderProgress/index.js +53 -49
- package/src/themes/five/src/components/OrderProgress/styles.js +9 -0
- package/src/themes/five/src/components/PaymentOptions/index.js +1 -1
- package/src/themes/five/src/components/UserPopover/index.js +1 -1
- 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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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 [
|
|
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 === '
|
|
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
|
-
|
|
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 [
|
|
22
|
+
const [orderingTheme] = useOrderingTheme()
|
|
23
23
|
const [, t] = useLanguage()
|
|
24
24
|
const [orderStatus] = useOrder()
|
|
25
|
-
const isChew = orderingTheme?.theme?.header?.components?.layout?.type === '
|
|
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
|
|
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 &&
|
|
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
|
-
<
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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')}: </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
|
+
-
|
|
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 =
|
|
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 === '
|
|
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 },
|