ordering-ui-react-native 0.22.47-map → 0.22.47-test
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/package.json +4 -4
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +4 -3
- package/themes/business/src/components/NewOrderNotification/index.tsx +3 -4
- package/themes/business/src/components/OrderDetails/Delivery.tsx +14 -2
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +9 -9
- package/themes/business/src/types/index.tsx +1 -0
- package/themes/original/src/components/AddressForm/index.tsx +10 -12
- package/themes/original/src/components/AddressList/index.tsx +0 -13
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +4 -2
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +1 -3
- package/themes/original/src/components/BusinessListingSearch/index.tsx +1 -2
- package/themes/original/src/components/BusinessPreorder/index.tsx +20 -17
- package/themes/original/src/components/Cart/index.tsx +1 -2
- package/themes/original/src/components/CartContent/index.tsx +1 -2
- package/themes/original/src/components/Checkout/index.tsx +29 -17
- package/themes/original/src/components/CitiesControl/index.tsx +0 -3
- package/themes/original/src/components/CouponControl/index.tsx +1 -3
- package/themes/original/src/components/DriverTips/index.tsx +1 -3
- package/themes/original/src/components/Favorite/index.tsx +0 -5
- package/themes/original/src/components/FavoriteList/index.tsx +0 -1
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +4 -10
- package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +15 -17
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +3 -7
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +24 -32
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +7 -9
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +11 -12
- package/themes/original/src/components/GoogleMap/index.tsx +4 -3
- package/themes/original/src/components/Help/index.tsx +0 -5
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +0 -5
- package/themes/original/src/components/HelpGuide/index.tsx +0 -5
- package/themes/original/src/components/HelpOrder/index.tsx +0 -5
- package/themes/original/src/components/Home/index.tsx +1 -10
- package/themes/original/src/components/LoginForm/Otp/index.tsx +0 -3
- package/themes/original/src/components/LoginForm/index.tsx +1 -9
- package/themes/original/src/components/MessageListing/index.tsx +0 -5
- package/themes/original/src/components/MomentOption/index.tsx +6 -10
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +1 -0
- package/themes/original/src/components/MultiCheckout/index.tsx +0 -1
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +1 -0
- package/themes/original/src/components/MyOrders/index.tsx +0 -5
- package/themes/original/src/components/NavBar/index.tsx +1 -4
- package/themes/original/src/components/NetworkError/index.tsx +0 -5
- package/themes/original/src/components/NotFoundSource/index.tsx +0 -3
- package/themes/original/src/components/Notifications/index.tsx +0 -5
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +5 -7
- package/themes/original/src/components/OrderDetails/index.tsx +1 -2
- package/themes/original/src/components/OrderTypeSelector/index.tsx +3 -8
- package/themes/original/src/components/PaymentOptionStripe/index.tsx +0 -5
- package/themes/original/src/components/PaymentOptions/index.tsx +0 -2
- package/themes/original/src/components/PlaceSpot/index.tsx +1 -3
- package/themes/original/src/components/PreviousOrders/index.tsx +1 -4
- package/themes/original/src/components/ProductForm/ActionButton.tsx +4 -5
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +8 -1
- package/themes/original/src/components/ProfessionalProfile/index.tsx +4 -5
- package/themes/original/src/components/Promotions/index.tsx +2 -7
- package/themes/original/src/components/ReviewDriver/index.tsx +1 -6
- package/themes/original/src/components/ReviewOrder/index.tsx +2 -7
- package/themes/original/src/components/ReviewProducts/index.tsx +1 -6
- package/themes/original/src/components/ReviewTrigger/index.tsx +2 -2
- package/themes/original/src/components/ServiceForm/index.tsx +52 -54
- package/themes/original/src/components/Sessions/index.tsx +3 -8
- package/themes/original/src/components/SignupForm/index.tsx +4 -13
- package/themes/original/src/components/SingleOrderCard/index.tsx +0 -1
- package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
- package/themes/original/src/components/StripeCardForm/index.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +9 -1
- package/themes/original/src/components/StripeElementsForm/index.tsx +4 -2
- package/themes/original/src/components/StripeRedirectForm/index.tsx +0 -3
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +1 -3
- package/themes/original/src/components/UserFormDetails/index.tsx +8 -10
- package/themes/original/src/components/UserProfileForm/index.tsx +0 -5
- package/themes/original/src/components/Wallets/index.tsx +1 -3
- package/themes/original/src/components/WebsocketStatus/index.tsx +1 -4
- package/themes/original/src/components/shared/OButton.tsx +3 -2
- package/themes/original/src/types/index.tsx +2 -1
|
@@ -64,7 +64,7 @@ const ForgotPasswordUI = (props: any) => {
|
|
|
64
64
|
handleReCaptcha(null)
|
|
65
65
|
if (reCaptchaValue) return
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
if (!recaptchaConfig?.siteKey) {
|
|
68
68
|
showToast(ToastType.Error, t('NO_RECAPTCHA_SITE_KEY', 'The config doesn\'t have recaptcha site key'));
|
|
69
69
|
return
|
|
70
70
|
}
|
|
@@ -73,7 +73,7 @@ const ForgotPasswordUI = (props: any) => {
|
|
|
73
73
|
return
|
|
74
74
|
}
|
|
75
75
|
recaptchaRef.current.open()
|
|
76
|
-
|
|
76
|
+
}
|
|
77
77
|
|
|
78
78
|
const onRecaptchaVerify = (token: any) => {
|
|
79
79
|
setRecaptchaVerified(true)
|
|
@@ -92,8 +92,8 @@ const ForgotPasswordUI = (props: any) => {
|
|
|
92
92
|
formState.result?.result && showToast(
|
|
93
93
|
ToastType.Error,
|
|
94
94
|
typeof formState.result?.result === 'string'
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
? formState.result?.result
|
|
96
|
+
: formState.result?.result[0]
|
|
97
97
|
)
|
|
98
98
|
return
|
|
99
99
|
}
|
|
@@ -125,11 +125,6 @@ const ForgotPasswordUI = (props: any) => {
|
|
|
125
125
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
126
126
|
titleStyle={{ width: '100%', marginLeft: 0, paddingLeft: 0 }}
|
|
127
127
|
titleWrapStyle={{ paddingHorizontal: 0, paddingStart: 0, flex: 1 }}
|
|
128
|
-
buttonProps={{
|
|
129
|
-
bgColor: theme.colors.white,
|
|
130
|
-
borderColor: theme.colors.white,
|
|
131
|
-
textStyle: { color: theme.colors.btnFont }
|
|
132
|
-
}}
|
|
133
128
|
/>
|
|
134
129
|
<FormSide>
|
|
135
130
|
<OText
|
|
@@ -213,7 +208,6 @@ const ForgotPasswordUI = (props: any) => {
|
|
|
213
208
|
|
|
214
209
|
<OButton
|
|
215
210
|
text={emailSent && !formState.result?.error ? t('LINK_SEND_FORGOT_PASSWORD', 'Link Sent') : t('FRONT_RECOVER_PASSWORD', 'Recover Password')}
|
|
216
|
-
textStyle={{ color: 'white' }}
|
|
217
211
|
bgColor={emailSent && !formState.result?.error ? theme.colors.disabled : theme.colors.primary}
|
|
218
212
|
borderColor={emailSent && !formState.result?.error ? theme.colors.disabled : theme.colors.primary}
|
|
219
213
|
isLoading={formState.loading}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
Container
|
|
13
13
|
} from './styles'
|
|
14
14
|
|
|
15
|
-
export const GiftCardUI =
|
|
15
|
+
export const GiftCardUI = React.memo((props: any) => {
|
|
16
16
|
const {
|
|
17
17
|
navigation
|
|
18
18
|
} = props
|
|
@@ -57,9 +57,7 @@ export const GiftCardUI = React.memo((props: any) => {
|
|
|
57
57
|
<OButton
|
|
58
58
|
onClick={() => setOpenModal('purchase')}
|
|
59
59
|
text={t('PURCHASE', 'Purchase')}
|
|
60
|
-
|
|
61
|
-
borderColor={theme.colors.primary}
|
|
62
|
-
textStyle={{ color: 'white', fontSize: 13 }}
|
|
60
|
+
textStyle={{ fontSize: 13 }}
|
|
63
61
|
imgRightSrc={null}
|
|
64
62
|
style={{ ...style.btnStyle, marginRight: 14 }}
|
|
65
63
|
/>
|
|
@@ -76,26 +74,26 @@ export const GiftCardUI = React.memo((props: any) => {
|
|
|
76
74
|
</View>
|
|
77
75
|
|
|
78
76
|
<OModal
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
open={openModal === 'purchase'}
|
|
78
|
+
onClose={() => setOpenModal(null)}
|
|
79
|
+
entireModal
|
|
82
80
|
customClose
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
>
|
|
82
|
+
<PurchaseGiftCard
|
|
85
83
|
handleCustomGoToCheckout={handleCustomGoToCheckout}
|
|
86
84
|
onClose={() => setOpenModal(null)}
|
|
87
85
|
/>
|
|
88
|
-
|
|
86
|
+
</OModal>
|
|
89
87
|
<OModal
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
open={openModal === 'redeem'}
|
|
89
|
+
onClose={() => setOpenModal(null)}
|
|
90
|
+
entireModal
|
|
93
91
|
customClose
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
>
|
|
93
|
+
<RedeemGiftCard
|
|
96
94
|
onClose={() => setOpenModal(null)}
|
|
97
95
|
/>
|
|
98
|
-
|
|
96
|
+
</OModal>
|
|
99
97
|
</Container>
|
|
100
98
|
)
|
|
101
|
-
})
|
|
99
|
+
})
|
|
@@ -58,12 +58,10 @@ const PurchaseGiftCardUI = (props: any) => {
|
|
|
58
58
|
borderWidth: 0,
|
|
59
59
|
width: 26,
|
|
60
60
|
height: 26,
|
|
61
|
-
backgroundColor: '#FFF',
|
|
62
|
-
borderColor: '#FFF',
|
|
63
|
-
shadowColor: '#FFF',
|
|
64
61
|
paddingLeft: 0,
|
|
65
62
|
paddingRight: 0,
|
|
66
63
|
}}
|
|
64
|
+
useArrow
|
|
67
65
|
onClick={onClose}
|
|
68
66
|
icon={AntDesignIcon}
|
|
69
67
|
iconProps={{
|
|
@@ -113,9 +111,7 @@ const PurchaseGiftCardUI = (props: any) => {
|
|
|
113
111
|
<OButton
|
|
114
112
|
onClick={() => handleAccept()}
|
|
115
113
|
text={t('ACCEPT', 'Accept')}
|
|
116
|
-
|
|
117
|
-
borderColor={theme.colors.primary}
|
|
118
|
-
textStyle={{ color: 'white', fontSize: 13 }}
|
|
114
|
+
textStyle={{ fontSize: 13 }}
|
|
119
115
|
imgRightSrc={null}
|
|
120
116
|
style={style.btnStyle}
|
|
121
117
|
isDisabled={!selectedProduct}
|
|
@@ -130,4 +126,4 @@ export const PurchaseGiftCard = (props: any) => {
|
|
|
130
126
|
UIComponent: PurchaseGiftCardUI
|
|
131
127
|
}
|
|
132
128
|
return <PurchaseGiftCardController {...purchaseGiftCardProps} />
|
|
133
|
-
}
|
|
129
|
+
}
|
|
@@ -36,10 +36,10 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
36
36
|
marginTop: 20
|
|
37
37
|
},
|
|
38
38
|
inputStyle: {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
borderWidth: 1,
|
|
40
|
+
borderColor: theme.colors.border,
|
|
41
|
+
borderRadius: 7.6,
|
|
42
|
+
},
|
|
43
43
|
})
|
|
44
44
|
|
|
45
45
|
const onSubmit = (values) => {
|
|
@@ -65,7 +65,7 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
65
65
|
t('ERROR', 'Error'),
|
|
66
66
|
stringError,
|
|
67
67
|
[
|
|
68
|
-
{ text: t('OK', 'oK'), onPress: () => {} }
|
|
68
|
+
{ text: t('OK', 'oK'), onPress: () => { } }
|
|
69
69
|
]
|
|
70
70
|
)
|
|
71
71
|
}
|
|
@@ -85,7 +85,7 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
85
85
|
t('ERROR', 'Error'),
|
|
86
86
|
stringError,
|
|
87
87
|
[
|
|
88
|
-
{ text: t('OK', 'oK'), onPress: () => {} }
|
|
88
|
+
{ text: t('OK', 'oK'), onPress: () => { } }
|
|
89
89
|
]
|
|
90
90
|
)
|
|
91
91
|
}, [actionState.error])
|
|
@@ -108,12 +108,10 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
108
108
|
borderWidth: 0,
|
|
109
109
|
width: 26,
|
|
110
110
|
height: 26,
|
|
111
|
-
backgroundColor: '#FFF',
|
|
112
|
-
borderColor: '#FFF',
|
|
113
|
-
shadowColor: '#FFF',
|
|
114
111
|
paddingLeft: 0,
|
|
115
112
|
paddingRight: 0,
|
|
116
113
|
}}
|
|
114
|
+
useArrow
|
|
117
115
|
onClick={onClose}
|
|
118
116
|
icon={AntDesignIcon}
|
|
119
117
|
iconProps={{
|
|
@@ -124,25 +122,25 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
124
122
|
}
|
|
125
123
|
}}
|
|
126
124
|
/>
|
|
127
|
-
|
|
125
|
+
<OText color={theme.colors.textNormal} weight='bold' size={20} mLeft={10}>{t('REDEEM_GIFT_CARD', 'Redeem a gift card')}</OText>
|
|
128
126
|
</View>
|
|
129
127
|
<FormController>
|
|
130
128
|
<OText color={theme.colors.textNormal} size={14} mBottom={10}>{t('GIFT_CARD_CODE', 'Gift card code')}</OText>
|
|
131
129
|
<Controller
|
|
132
130
|
control={control}
|
|
133
131
|
render={({ onChange, value }: any) => (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
132
|
+
<OInput
|
|
133
|
+
placeholder='XXXX-XXXX-XXXX-XXXX'
|
|
134
|
+
value={codeValue}
|
|
135
|
+
onChange={(val: any) => {
|
|
136
|
+
onChange(val)
|
|
137
|
+
handleChangeCode(val)
|
|
138
|
+
}}
|
|
139
|
+
autoCapitalize='characters'
|
|
140
|
+
autoCorrect={false}
|
|
141
|
+
blurOnSubmit={false}
|
|
142
|
+
style={style.inputStyle}
|
|
143
|
+
/>
|
|
146
144
|
)}
|
|
147
145
|
name='code'
|
|
148
146
|
rules={{
|
|
@@ -178,9 +176,7 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
178
176
|
<OButton
|
|
179
177
|
onClick={handleSubmit(onSubmit)}
|
|
180
178
|
text={actionState?.loading ? t('LOADING', 'Loading') : t('APPLY_TO_YOUR_BALANCE', 'Apply to your balance')}
|
|
181
|
-
|
|
182
|
-
borderColor={theme.colors.primary}
|
|
183
|
-
textStyle={{ color: 'white', fontSize: 13 }}
|
|
179
|
+
textStyle={{ fontSize: 13 }}
|
|
184
180
|
imgRightSrc={null}
|
|
185
181
|
style={style.btnStyle}
|
|
186
182
|
isDisabled={actionState.loading}
|
|
@@ -202,12 +198,10 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
202
198
|
borderWidth: 0,
|
|
203
199
|
width: 26,
|
|
204
200
|
height: 26,
|
|
205
|
-
backgroundColor: '#FFF',
|
|
206
|
-
borderColor: '#FFF',
|
|
207
|
-
shadowColor: '#FFF',
|
|
208
201
|
paddingLeft: 0,
|
|
209
202
|
paddingRight: 0,
|
|
210
203
|
}}
|
|
204
|
+
useArrow
|
|
211
205
|
onClick={onClose}
|
|
212
206
|
icon={AntDesignIcon}
|
|
213
207
|
iconProps={{
|
|
@@ -218,7 +212,7 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
218
212
|
}
|
|
219
213
|
}}
|
|
220
214
|
/>
|
|
221
|
-
|
|
215
|
+
<OText color={theme.colors.textNormal} weight='bold' size={20} mLeft={10}>{t('GIFT_CARD', 'Gift card')}</OText>
|
|
222
216
|
</View>
|
|
223
217
|
<View>
|
|
224
218
|
<OText color={theme.colors.textNormal} size={14} mBottom={6}>{t('TYPE', 'Type')}: {redeemedGiftCard?.type}</OText>
|
|
@@ -232,9 +226,7 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
232
226
|
onClose()
|
|
233
227
|
}}
|
|
234
228
|
text={t('OK', 'Ok')}
|
|
235
|
-
|
|
236
|
-
borderColor={theme.colors.primary}
|
|
237
|
-
textStyle={{ color: 'white', fontSize: 13 }}
|
|
229
|
+
textStyle={{ fontSize: 13 }}
|
|
238
230
|
imgRightSrc={null}
|
|
239
231
|
style={style.btnStyle}
|
|
240
232
|
/>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect } from 'react'
|
|
2
2
|
import { StyleSheet, Platform, Alert } from 'react-native';
|
|
3
|
-
import { useLanguage, SendGiftCard as SendGiftCardController
|
|
3
|
+
import { useLanguage, SendGiftCard as SendGiftCardController } from 'ordering-components/native';
|
|
4
4
|
import { useTheme } from 'styled-components/native';
|
|
5
5
|
import { OText, OButton, OInput } from '../../shared';
|
|
6
6
|
import { useForm, Controller } from 'react-hook-form'
|
|
@@ -29,10 +29,10 @@ const SendGiftCardUI = (props: any) => {
|
|
|
29
29
|
marginTop: 20
|
|
30
30
|
},
|
|
31
31
|
inputStyle: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
borderWidth: 1,
|
|
33
|
+
borderColor: theme.colors.border,
|
|
34
|
+
borderRadius: 7.6,
|
|
35
|
+
},
|
|
36
36
|
})
|
|
37
37
|
|
|
38
38
|
const onSubmit = (values) => {
|
|
@@ -50,7 +50,7 @@ const SendGiftCardUI = (props: any) => {
|
|
|
50
50
|
t('ERROR', 'Error'),
|
|
51
51
|
stringError,
|
|
52
52
|
[
|
|
53
|
-
{ text: t('OK', 'oK'), onPress: () => {} }
|
|
53
|
+
{ text: t('OK', 'oK'), onPress: () => { } }
|
|
54
54
|
]
|
|
55
55
|
)
|
|
56
56
|
}
|
|
@@ -144,9 +144,7 @@ const SendGiftCardUI = (props: any) => {
|
|
|
144
144
|
<OButton
|
|
145
145
|
onClick={handleSubmit(onSubmit)}
|
|
146
146
|
text={actionState?.loading ? t('LOADING', 'Loading') : t('SEND_GIFT_CARD', 'Send gift card')}
|
|
147
|
-
|
|
148
|
-
borderColor={theme.colors.primary}
|
|
149
|
-
textStyle={{ color: 'white', fontSize: 13 }}
|
|
147
|
+
textStyle={{ fontSize: 13 }}
|
|
150
148
|
imgRightSrc={null}
|
|
151
149
|
style={style.btnStyle}
|
|
152
150
|
isDisabled={actionState.loading}
|
|
@@ -2,9 +2,9 @@ import React, { useEffect } from 'react';
|
|
|
2
2
|
import { useLanguage, GiftCardOrdersList as GiftCardOrdersListController } from 'ordering-components/native';
|
|
3
3
|
import { useTheme } from 'styled-components/native';
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Placeholder,
|
|
6
|
+
PlaceholderLine,
|
|
7
|
+
Fade
|
|
8
8
|
} from 'rn-placeholder';
|
|
9
9
|
import { SingleGiftCard } from '../SingleGiftCard';
|
|
10
10
|
import { OButton, OText } from '../../shared';
|
|
@@ -24,7 +24,7 @@ const VerticalGiftCardOrdersLayoutUI = (props: any) => {
|
|
|
24
24
|
onNavigationRedirect
|
|
25
25
|
} = props
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
const theme = useTheme();
|
|
28
28
|
const [, t] = useLanguage()
|
|
29
29
|
|
|
30
30
|
useEffect(() => {
|
|
@@ -40,8 +40,8 @@ const VerticalGiftCardOrdersLayoutUI = (props: any) => {
|
|
|
40
40
|
<PlaceholderLine width={30} height={16} />
|
|
41
41
|
</Placeholder>
|
|
42
42
|
) : giftCards.list?.length > 0 && (
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
<OText size={16} lineHeight={24} weight={'500'} color={theme.colors.textNormal} mBottom={24} style={{ marginTop: 24 }}>{title}</OText>
|
|
44
|
+
)}
|
|
45
45
|
{giftCards.list.map(card => (
|
|
46
46
|
<SingleGiftCardWrapper key={card.id}>
|
|
47
47
|
<SingleGiftCard
|
|
@@ -62,12 +62,11 @@ const VerticalGiftCardOrdersLayoutUI = (props: any) => {
|
|
|
62
62
|
{paginationProps.totalPages && paginationProps.currentPage < paginationProps.totalPages && (
|
|
63
63
|
<WrappButton>
|
|
64
64
|
<OButton
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/>
|
|
65
|
+
onClick={loadMoreOrders}
|
|
66
|
+
text={t('LOAD_MORE_ORDERS', 'Load more orders')}
|
|
67
|
+
imgRightSrc={null}
|
|
68
|
+
style={{ borderRadius: 7.6, shadowOpacity: 0 }}
|
|
69
|
+
/>
|
|
71
70
|
</WrappButton>
|
|
72
71
|
)}
|
|
73
72
|
</ProductsListContainer>
|
|
@@ -8,7 +8,6 @@ import Alert from '../../../../../src/providers/AlertProvider'
|
|
|
8
8
|
import { OIcon } from '../shared';
|
|
9
9
|
|
|
10
10
|
export const GoogleMap = (props: GoogleMapsParams) => {
|
|
11
|
-
|
|
12
11
|
const {
|
|
13
12
|
location,
|
|
14
13
|
handleChangeAddressMap,
|
|
@@ -21,7 +20,8 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
21
20
|
locations,
|
|
22
21
|
isIntGeoCoder,
|
|
23
22
|
businessZones,
|
|
24
|
-
delta
|
|
23
|
+
delta,
|
|
24
|
+
manualZoom
|
|
25
25
|
} = props
|
|
26
26
|
|
|
27
27
|
const [, t] = useLanguage()
|
|
@@ -197,11 +197,12 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
197
197
|
|
|
198
198
|
useEffect(() => {
|
|
199
199
|
const interval = setInterval(() => {
|
|
200
|
-
if (mapRef.current && locations) {
|
|
200
|
+
if (mapRef.current && locations && !manualZoom) {
|
|
201
201
|
fitAllMarkers()
|
|
202
202
|
}
|
|
203
203
|
}, 1000)
|
|
204
204
|
if (locations) {
|
|
205
|
+
fitAllMarkers()
|
|
205
206
|
SETMARKERS(locations)
|
|
206
207
|
}
|
|
207
208
|
return () => clearInterval(interval)
|
|
@@ -48,11 +48,6 @@ export const Help = (props: HelpParams) => {
|
|
|
48
48
|
onActionLeft={goToBack}
|
|
49
49
|
showCall={false}
|
|
50
50
|
btnStyle={{ paddingLeft: 0 }}
|
|
51
|
-
buttonProps={{
|
|
52
|
-
bgColor: theme.colors.white,
|
|
53
|
-
borderColor: theme.colors.white,
|
|
54
|
-
textStyle: { color: theme.colors.btnFont }
|
|
55
|
-
}}
|
|
56
51
|
/>
|
|
57
52
|
<HelpSubItem
|
|
58
53
|
onPress={() => onRedirect('HelpOrder')}
|
|
@@ -37,11 +37,6 @@ export const HelpAccountAndPayment = (props: HelpAccountAndPaymentParams) => {
|
|
|
37
37
|
onActionLeft={goToBack}
|
|
38
38
|
btnStyle={{ paddingLeft: 0 }}
|
|
39
39
|
showCall={false}
|
|
40
|
-
buttonProps={{
|
|
41
|
-
bgColor: theme.colors.white,
|
|
42
|
-
borderColor: theme.colors.white,
|
|
43
|
-
textStyle: { color: theme.colors.btnFont }
|
|
44
|
-
}}
|
|
45
40
|
/>
|
|
46
41
|
<Content>
|
|
47
42
|
<OText mBottom={20}>
|
|
@@ -43,11 +43,6 @@ export const HelpGuide = (props: HelpGuideParams) => {
|
|
|
43
43
|
onActionLeft={goToBack}
|
|
44
44
|
btnStyle={{ paddingLeft: 0 }}
|
|
45
45
|
showCall={false}
|
|
46
|
-
buttonProps={{
|
|
47
|
-
bgColor: theme.colors.white,
|
|
48
|
-
borderColor: theme.colors.white,
|
|
49
|
-
textStyle: { color: theme.colors.btnFont }
|
|
50
|
-
}}
|
|
51
46
|
/>
|
|
52
47
|
<Content>
|
|
53
48
|
<OText mBottom={15}>
|
|
@@ -39,11 +39,6 @@ export const HelpOrder = (props: HelpOrderParams) => {
|
|
|
39
39
|
onActionLeft={goToBack}
|
|
40
40
|
btnStyle={{ paddingLeft: 0 }}
|
|
41
41
|
showCall={false}
|
|
42
|
-
buttonProps={{
|
|
43
|
-
bgColor: theme.colors.white,
|
|
44
|
-
borderColor: theme.colors.white,
|
|
45
|
-
textStyle: { color: theme.colors.btnFont }
|
|
46
|
-
}}
|
|
47
42
|
/>
|
|
48
43
|
<Content>
|
|
49
44
|
<OText mBottom={20}>
|
|
@@ -18,12 +18,6 @@ export const Home = (props: any) => {
|
|
|
18
18
|
const unaddressedTypes = configs?.unaddressed_order_types_allowed?.value.split('|').map((value: any) => Number(value)) || []
|
|
19
19
|
const isAllowUnaddressOrderType = unaddressedTypes.includes(orderState?.options?.type)
|
|
20
20
|
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
if (isAllowUnaddressOrderType) {
|
|
23
|
-
onNavigationRedirect(!!businessSlug ? 'Business' : 'BusinessList')
|
|
24
|
-
}
|
|
25
|
-
}, [isAllowUnaddressOrderType])
|
|
26
|
-
|
|
27
21
|
return (
|
|
28
22
|
<View style={styles.container}>
|
|
29
23
|
<View>
|
|
@@ -49,11 +43,8 @@ export const Home = (props: any) => {
|
|
|
49
43
|
</OText>
|
|
50
44
|
<OButton
|
|
51
45
|
text={t('LOGIN_NOW', 'Login now')}
|
|
52
|
-
bgColor={theme.colors.primary}
|
|
53
|
-
borderColor={theme.colors.primary}
|
|
54
46
|
style={styles.buttons}
|
|
55
47
|
isCircle={false}
|
|
56
|
-
textStyle={{ color: 'white' }}
|
|
57
48
|
onClick={() => onNavigationRedirect('Login')}
|
|
58
49
|
imgRightSrc={null}
|
|
59
50
|
/>
|
|
@@ -69,7 +60,7 @@ export const Home = (props: any) => {
|
|
|
69
60
|
<TouchableOpacity
|
|
70
61
|
style={{ ...styles.textLink, marginTop: 12 }}
|
|
71
62
|
onPress={() =>
|
|
72
|
-
orderState?.options?.address?.address
|
|
63
|
+
orderState?.options?.address?.address || isAllowUnaddressOrderType
|
|
73
64
|
? onNavigationRedirect(!!businessSlug ? 'Business' : 'BusinessList', { isGuestUser: true })
|
|
74
65
|
: onNavigationRedirect('AddressForm', { isGuestUser: true })
|
|
75
66
|
}>
|
|
@@ -145,9 +145,6 @@ export const Otp = (props: otpParams) => {
|
|
|
145
145
|
</TouchableOpacity>
|
|
146
146
|
<OButton
|
|
147
147
|
onClick={() => handleCloseOtp()}
|
|
148
|
-
bgColor={theme.colors.white}
|
|
149
|
-
borderColor={theme.colors.primary}
|
|
150
|
-
textStyle={{ color: theme.colors.primary }}
|
|
151
148
|
style={{ borderRadius: 8, width: '100%' }}
|
|
152
149
|
text={t('CANCEL', 'Cancel')}
|
|
153
150
|
/>
|
|
@@ -412,11 +412,6 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
412
412
|
btnStyle={{ paddingLeft: 0 }}
|
|
413
413
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
414
414
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
415
|
-
buttonProps={{
|
|
416
|
-
bgColor: theme.colors.white,
|
|
417
|
-
borderColor: theme.colors.white,
|
|
418
|
-
textStyle: { color: theme.colors.btnFont }
|
|
419
|
-
}}
|
|
420
415
|
/>
|
|
421
416
|
)}
|
|
422
417
|
<FormSide>
|
|
@@ -635,6 +630,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
635
630
|
/>
|
|
636
631
|
)
|
|
637
632
|
}
|
|
633
|
+
autoCapitalize='none'
|
|
638
634
|
value={value}
|
|
639
635
|
forwardRef={passwordRef}
|
|
640
636
|
onChange={(val: any) => onChange(val)}
|
|
@@ -711,9 +707,6 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
711
707
|
<OButton
|
|
712
708
|
onClick={handleSubmit(onSubmit)}
|
|
713
709
|
text={loginTab !== 'otp' ? loginButtonText : t('GET_VERIFY_CODE', 'Get verify code')}
|
|
714
|
-
bgColor={theme.colors.primary}
|
|
715
|
-
borderColor={theme.colors.primary}
|
|
716
|
-
textStyle={{ color: 'white' }}
|
|
717
710
|
imgRightSrc={null}
|
|
718
711
|
isLoading={formState.loading}
|
|
719
712
|
style={{ borderRadius: 7.6, marginTop: 10, marginBottom: 25 }}
|
|
@@ -752,7 +745,6 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
752
745
|
<OButton
|
|
753
746
|
onClick={handleVerifyCodeClick}
|
|
754
747
|
text={t('GET_VERIFY_CODE', 'Get Verify Code')}
|
|
755
|
-
borderColor={theme.colors.primary}
|
|
756
748
|
style={loginStyle.btnOutline}
|
|
757
749
|
imgRightSrc={null}
|
|
758
750
|
isLoading={isLoadingVerifyModal}
|
|
@@ -266,11 +266,6 @@ export const MessageListing = (props: MessageListingParams) => {
|
|
|
266
266
|
showCall={false}
|
|
267
267
|
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
268
268
|
btnStyle={{ paddingLeft: 0 }}
|
|
269
|
-
buttonProps={{
|
|
270
|
-
bgColor: theme.colors.white,
|
|
271
|
-
borderColor: theme.colors.white,
|
|
272
|
-
textStyle: { color: theme.colors.btnFont }
|
|
273
|
-
}}
|
|
274
269
|
/>
|
|
275
270
|
<OrderListing
|
|
276
271
|
ordersLength={{ activeOrdersLength: 0, previousOrdersLength: 0 }}
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
TimeItem
|
|
30
30
|
} from './styles';
|
|
31
31
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
32
|
-
import {
|
|
32
|
+
import { monthsEnum, setLocalMoment } from '../../utils';
|
|
33
33
|
|
|
34
34
|
const MomentOptionUI = (props: MomentOptionParams) => {
|
|
35
35
|
const {
|
|
@@ -323,6 +323,10 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
323
323
|
}
|
|
324
324
|
}, [dateSelected, JSON.stringify(hoursList), JSON.stringify(datesWhitelist), cateringPreorder, JSON.stringify(business)])
|
|
325
325
|
|
|
326
|
+
useEffect(() => {
|
|
327
|
+
setLocalMoment(moment, t)
|
|
328
|
+
}, [])
|
|
329
|
+
|
|
326
330
|
return (
|
|
327
331
|
<>
|
|
328
332
|
<Container
|
|
@@ -343,11 +347,6 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
343
347
|
titleAlign={'center'}
|
|
344
348
|
titleStyle={{ fontSize: 20, marginRight: 0, marginLeft: 0 }}
|
|
345
349
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
346
|
-
buttonProps={{
|
|
347
|
-
bgColor: theme.colors.white,
|
|
348
|
-
borderColor: theme.colors.white,
|
|
349
|
-
textStyle: { color: theme.colors.btnFont }
|
|
350
|
-
}}
|
|
351
350
|
/>
|
|
352
351
|
)}
|
|
353
352
|
{(preorderMinimumDays === 0 && preorderLeadTime === 0) || !cateringPreorder && (
|
|
@@ -399,7 +398,6 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
399
398
|
<View style={{ flex: 1 }}>
|
|
400
399
|
{selectDate && datesWhitelist[0]?.start !== null && (
|
|
401
400
|
<CalendarStrip
|
|
402
|
-
locale={locale}
|
|
403
401
|
scrollable
|
|
404
402
|
style={styles.calendar}
|
|
405
403
|
calendarHeaderContainerStyle={styles.calendarHeaderContainer}
|
|
@@ -476,12 +474,10 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
476
474
|
<View style={{ position: 'absolute', bottom: bottom, paddingBottom: 20, paddingHorizontal: 20, backgroundColor: 'white', width: '100%' }}>
|
|
477
475
|
<OButton
|
|
478
476
|
onClick={() => handleChangeMoment()}
|
|
479
|
-
bgColor={theme.colors.primary}
|
|
480
|
-
borderColor={theme.colors.primary}
|
|
481
477
|
isDisabled={!selectedTime}
|
|
482
478
|
text={t('CONTINUE', 'Continue')}
|
|
483
479
|
style={{ borderRadius: 7.6, height: 44, shadowOpacity: 0 }}
|
|
484
|
-
textStyle={{
|
|
480
|
+
textStyle={{ fontSize: 14 }}
|
|
485
481
|
showNextIcon
|
|
486
482
|
/>
|
|
487
483
|
</View>
|
|
@@ -394,7 +394,6 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
394
394
|
</OText>
|
|
395
395
|
<OButton
|
|
396
396
|
text={t('SIGN_UP', 'Sign up')}
|
|
397
|
-
textStyle={{ color: theme.colors.white }}
|
|
398
397
|
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
399
398
|
onClick={() => setOpenModal({ ...openModal, signup: true })}
|
|
400
399
|
/>
|
|
@@ -101,11 +101,6 @@ export const MyOrders = (props: any) => {
|
|
|
101
101
|
showCall={false}
|
|
102
102
|
paddingTop={30}
|
|
103
103
|
btnStyle={{ paddingLeft: 0 }}
|
|
104
|
-
buttonProps={{
|
|
105
|
-
bgColor: theme.colors.white,
|
|
106
|
-
borderColor: theme.colors.white,
|
|
107
|
-
textStyle: { color: theme.colors.btnFont }
|
|
108
|
-
}}
|
|
109
104
|
/>
|
|
110
105
|
)}
|
|
111
106
|
</View>
|
|
@@ -44,7 +44,6 @@ interface Props {
|
|
|
44
44
|
isVertical?: boolean,
|
|
45
45
|
noMargin?: any
|
|
46
46
|
hideArrowLeft?: boolean
|
|
47
|
-
buttonProps?: any
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
const NavBar = (props: Props) => {
|
|
@@ -65,7 +64,7 @@ const NavBar = (props: Props) => {
|
|
|
65
64
|
<Wrapper style={{ paddingTop: props.paddingTop, ...{ flexDirection: props.isVertical ? 'column' : 'row', alignItems: props.isVertical ? 'flex-start' : 'center' }, ...props.style }}>
|
|
66
65
|
{!props.hideArrowLeft && (
|
|
67
66
|
<OButton
|
|
68
|
-
|
|
67
|
+
useArrow
|
|
69
68
|
iconProps={{
|
|
70
69
|
name: 'arrowleft',
|
|
71
70
|
size: 26
|
|
@@ -116,8 +115,6 @@ const NavBar = (props: Props) => {
|
|
|
116
115
|
{props.showCall
|
|
117
116
|
? (<OButton
|
|
118
117
|
isCircle={true}
|
|
119
|
-
bgColor={theme.colors.primary}
|
|
120
|
-
borderColor={theme.colors.primary}
|
|
121
118
|
imgRightSrc={null}
|
|
122
119
|
imgLeftStyle={{ tintColor: 'white', width: 30, height: 30 }}
|
|
123
120
|
imgLeftSrc={theme.images.general.support}
|