ordering-ui-react-native 0.22.43 → 0.22.45
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 +1 -1
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +2 -3
- package/themes/original/src/components/AddressForm/index.tsx +12 -4
- package/themes/original/src/components/AddressList/index.tsx +18 -4
- package/themes/original/src/components/Checkout/index.tsx +31 -4
- package/themes/original/src/components/Favorite/index.tsx +5 -0
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +5 -0
- package/themes/original/src/components/Help/index.tsx +7 -0
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +5 -0
- package/themes/original/src/components/HelpGuide/index.tsx +5 -0
- package/themes/original/src/components/HelpOrder/index.tsx +5 -0
- package/themes/original/src/components/LoginForm/index.tsx +7 -2
- package/themes/original/src/components/MessageListing/index.tsx +6 -0
- package/themes/original/src/components/MomentOption/index.tsx +5 -0
- package/themes/original/src/components/MyOrders/index.tsx +5 -0
- package/themes/original/src/components/NavBar/index.tsx +2 -0
- package/themes/original/src/components/Notifications/index.tsx +5 -0
- package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -0
- package/themes/original/src/components/PreviousOrders/index.tsx +2 -0
- package/themes/original/src/components/Promotions/index.tsx +5 -0
- package/themes/original/src/components/ReviewDriver/index.tsx +5 -0
- package/themes/original/src/components/ReviewOrder/index.tsx +5 -0
- package/themes/original/src/components/ReviewProducts/index.tsx +5 -0
- package/themes/original/src/components/Sessions/index.tsx +5 -0
- package/themes/original/src/components/SignupForm/index.tsx +6 -1
- package/themes/original/src/components/UserFormDetails/index.tsx +4 -4
- package/themes/original/src/components/UserProfileForm/index.tsx +5 -0
- package/themes/original/src/components/Wallets/index.tsx +5 -0
- package/themes/original/src/components/shared/OButton.tsx +2 -2
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ const LogoutButtonUI = (props: any) => {
|
|
|
15
15
|
const data = await _retrieveStoreData('notification_state');
|
|
16
16
|
const res = await handleLogoutClick(data);
|
|
17
17
|
if (res) {
|
|
18
|
-
_clearStoreData({ excludedKeys: ['isTutorial'] });
|
|
18
|
+
_clearStoreData({ excludedKeys: ['isTutorial', 'language'] });
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -191,13 +191,13 @@ export const OrderItem = React.memo((props: any) => {
|
|
|
191
191
|
{order?.external_id ?? t('NO_EXTERNAL_ID', 'No external Id ') + t('NO', 'Order No.') + order?.id}
|
|
192
192
|
</OText>
|
|
193
193
|
)}
|
|
194
|
-
|
|
194
|
+
<OText
|
|
195
195
|
style={styles.date}
|
|
196
196
|
color={theme.colors.unselectText}
|
|
197
197
|
numberOfLines={1}
|
|
198
198
|
adjustsFontSizeToFit
|
|
199
199
|
>
|
|
200
|
-
{((!!order?.order_group_id && order?.order_group && isLogisticOrder
|
|
200
|
+
{!showExternalId && ((!!order?.order_group_id && order?.order_group && isLogisticOrder
|
|
201
201
|
? `${order?.order_group?.orders?.length} ${t('ORDERS', 'Orders')}`
|
|
202
202
|
: (t('NO', 'Order No.') + order?.id)
|
|
203
203
|
) + ' · ')}
|
|
@@ -205,7 +205,6 @@ export const OrderItem = React.memo((props: any) => {
|
|
|
205
205
|
? parseDate(order?.delivery_datetime_utc)
|
|
206
206
|
: parseDate(order?.delivery_datetime, { utc: false })}
|
|
207
207
|
</OText>
|
|
208
|
-
}
|
|
209
208
|
{((currentTabSelected === 'pending' || currentTabSelected === 'inProgress') && allowColumns?.timer) && (
|
|
210
209
|
<>
|
|
211
210
|
{!showExternalId && <OText> · </OText>}
|
|
@@ -66,7 +66,8 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
66
66
|
isFromProductsList,
|
|
67
67
|
hasAddressDefault,
|
|
68
68
|
afterSignup,
|
|
69
|
-
businessSlug
|
|
69
|
+
businessSlug,
|
|
70
|
+
isFromCheckout
|
|
70
71
|
} = props;
|
|
71
72
|
|
|
72
73
|
const theme = useTheme();
|
|
@@ -383,9 +384,11 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
383
384
|
auth &&
|
|
384
385
|
!afterSignup
|
|
385
386
|
) {
|
|
386
|
-
|
|
387
|
-
? navigation.
|
|
388
|
-
:
|
|
387
|
+
isFromCheckout
|
|
388
|
+
? navigation.goBack()
|
|
389
|
+
: !isFromProductsList
|
|
390
|
+
? navigation.navigate('BottomTab')
|
|
391
|
+
: navigation.navigate('Business');
|
|
389
392
|
}
|
|
390
393
|
}, [orderState?.options?.address]);
|
|
391
394
|
|
|
@@ -539,6 +542,11 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
539
542
|
style={{ marginTop: Platform.OS === 'ios' ? 0 : 10 }}
|
|
540
543
|
titleWrapStyle={{ paddingHorizontal: 0, width: '100%' }}
|
|
541
544
|
titleStyle={{ marginRight: 0, marginLeft: 0, paddingRight: 5 }}
|
|
545
|
+
buttonProps={{
|
|
546
|
+
bgColor: theme.colors.white,
|
|
547
|
+
borderColor: theme.colors.white,
|
|
548
|
+
textStyle: { color: theme.colors.btnFont }
|
|
549
|
+
}}
|
|
542
550
|
/>
|
|
543
551
|
</View>
|
|
544
552
|
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
|
|
@@ -152,6 +152,11 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
152
152
|
showCall={false}
|
|
153
153
|
paddingTop={10}
|
|
154
154
|
btnStyle={{ paddingLeft: 0 }}
|
|
155
|
+
buttonProps={{
|
|
156
|
+
bgColor: theme.colors.white,
|
|
157
|
+
borderColor: theme.colors.white,
|
|
158
|
+
textStyle: { color: theme.colors.btnFont }
|
|
159
|
+
}}
|
|
155
160
|
/>
|
|
156
161
|
)}
|
|
157
162
|
{
|
|
@@ -173,6 +178,11 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
173
178
|
style={{ marginTop: 0 }}
|
|
174
179
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
175
180
|
titleStyle={{ marginLeft: 0, marginRight: 0 }}
|
|
181
|
+
buttonProps={{
|
|
182
|
+
bgColor: theme.colors.white,
|
|
183
|
+
borderColor: theme.colors.white,
|
|
184
|
+
textStyle: { color: theme.colors.btnFont }
|
|
185
|
+
}}
|
|
176
186
|
/>
|
|
177
187
|
)}
|
|
178
188
|
{addressList.loading && addressList?.addresses?.length === 0 && (
|
|
@@ -217,7 +227,8 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
217
227
|
onSaveAddress: handleSaveAddress,
|
|
218
228
|
isSelectedAfterAdd: true,
|
|
219
229
|
isFromProductsList: isFromProductsList,
|
|
220
|
-
hasAddressDefault: !!orderState.options?.address?.location
|
|
230
|
+
hasAddressDefault: !!orderState.options?.address?.location,
|
|
231
|
+
isFromCheckout: route?.params?.isFromCheckout
|
|
221
232
|
}
|
|
222
233
|
) : onNavigationRedirect(
|
|
223
234
|
'AddressFormInitial',
|
|
@@ -228,7 +239,8 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
228
239
|
onSaveAddress: handleSaveAddress,
|
|
229
240
|
isSelectedAfterAdd: true,
|
|
230
241
|
isFromProductsList: isFromProductsList,
|
|
231
|
-
hasAddressDefault: !!orderState.options?.address?.location
|
|
242
|
+
hasAddressDefault: !!orderState.options?.address?.location,
|
|
243
|
+
isFromCheckout: route?.params?.isFromCheckout
|
|
232
244
|
})}
|
|
233
245
|
>
|
|
234
246
|
<OIcon src={theme.images.general.pencil} width={16} style={{ marginHorizontal: 4 }} />
|
|
@@ -305,7 +317,8 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
305
317
|
addressesList: addressList?.addresses,
|
|
306
318
|
nopadding: true,
|
|
307
319
|
isSelectedAfterAdd: true,
|
|
308
|
-
hasAddressDefault: !!orderState.options?.address?.location
|
|
320
|
+
hasAddressDefault: !!orderState.options?.address?.location,
|
|
321
|
+
isFromCheckout: route?.params?.isFromCheckout
|
|
309
322
|
}) : onNavigationRedirect(
|
|
310
323
|
'AddressFormInitial',
|
|
311
324
|
{
|
|
@@ -314,7 +327,8 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
314
327
|
addressesList: addressList?.addresses,
|
|
315
328
|
nopadding: true,
|
|
316
329
|
isSelectedAfterAdd: true,
|
|
317
|
-
hasAddressDefault: !!orderState.options?.address?.location
|
|
330
|
+
hasAddressDefault: !!orderState.options?.address?.location,
|
|
331
|
+
isFormCheckout: route?.params?.isFromCheckout
|
|
318
332
|
})}
|
|
319
333
|
/>
|
|
320
334
|
</>
|
|
@@ -103,7 +103,8 @@ const CheckoutUI = (props: any) => {
|
|
|
103
103
|
setPlaceSpotNumber,
|
|
104
104
|
maxDate,
|
|
105
105
|
androidAppId,
|
|
106
|
-
urlscheme
|
|
106
|
+
urlscheme,
|
|
107
|
+
checkoutFieldsState
|
|
107
108
|
} = props
|
|
108
109
|
|
|
109
110
|
const theme = useTheme();
|
|
@@ -178,6 +179,7 @@ const CheckoutUI = (props: any) => {
|
|
|
178
179
|
const containerRef = useRef<any>()
|
|
179
180
|
const cardsMethods = ['credomatic']
|
|
180
181
|
const stripePaymethods: any = ['stripe', 'stripe_direct', 'stripe_connect', 'stripe_redirect']
|
|
182
|
+
const notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes', 'comments']
|
|
181
183
|
const placeSpotTypes = [3, 4, 5]
|
|
182
184
|
const placeSpotsEnabled = placeSpotTypes.includes(options?.type)
|
|
183
185
|
const businessConfigs = businessDetails?.business?.configs ?? []
|
|
@@ -270,7 +272,7 @@ const CheckoutUI = (props: any) => {
|
|
|
270
272
|
return
|
|
271
273
|
}
|
|
272
274
|
|
|
273
|
-
if (!userErrors.length && (!requiredFields?.length
|
|
275
|
+
if (!userErrors.length && (!requiredFields?.length) || forcePlace) {
|
|
274
276
|
vibrateApp()
|
|
275
277
|
handlerClickPlaceOrder && handlerClickPlaceOrder(null, { isNative: true }, confirmPayment, NativeStripeSdk?.dismissPlatformPay)
|
|
276
278
|
return
|
|
@@ -310,7 +312,6 @@ const CheckoutUI = (props: any) => {
|
|
|
310
312
|
const checkValidationFields = () => {
|
|
311
313
|
setUserErrors([])
|
|
312
314
|
const errors = []
|
|
313
|
-
const notFields = ['coupon', 'driver_tip', 'mobile_phone', 'address', 'zipcode', 'address_notes', 'comments']
|
|
314
315
|
const _requiredFields: any = []
|
|
315
316
|
|
|
316
317
|
Object.values(validationFields?.fields?.checkout).map((field: any) => {
|
|
@@ -338,6 +339,27 @@ const CheckoutUI = (props: any) => {
|
|
|
338
339
|
setUserErrors(errors)
|
|
339
340
|
}
|
|
340
341
|
|
|
342
|
+
const checkGuestValidationFields = () => {
|
|
343
|
+
const userSelected = user
|
|
344
|
+
const _requiredFields = checkoutFieldsState?.fields
|
|
345
|
+
.filter((field: any) => (field?.order_type_id === options?.type) && field?.enabled && field?.required &&
|
|
346
|
+
!notFields.includes(field?.validation_field?.code) &&
|
|
347
|
+
userSelected && !userSelected[field?.validation_field?.code])
|
|
348
|
+
.map((item: any) => item?.validation_field?.code)
|
|
349
|
+
const guestCheckoutCellPhone = checkoutFieldsState?.fields?.find((field: any) => field.order_type_id === options?.type && field?.validation_field?.code === 'mobile_phone')
|
|
350
|
+
|
|
351
|
+
if (
|
|
352
|
+
userSelected &&
|
|
353
|
+
!userSelected?.cellphone &&
|
|
354
|
+
((guestCheckoutCellPhone?.enabled &&
|
|
355
|
+
guestCheckoutCellPhone?.required) ||
|
|
356
|
+
configs?.verification_phone_required?.value === '1')
|
|
357
|
+
) {
|
|
358
|
+
_requiredFields.push('cellphone')
|
|
359
|
+
}
|
|
360
|
+
setRequiredFields(_requiredFields)
|
|
361
|
+
}
|
|
362
|
+
|
|
341
363
|
const togglePhoneUpdate = (val: boolean) => {
|
|
342
364
|
setPhoneUpdate(val)
|
|
343
365
|
}
|
|
@@ -347,11 +369,16 @@ const CheckoutUI = (props: any) => {
|
|
|
347
369
|
}
|
|
348
370
|
|
|
349
371
|
useEffect(() => {
|
|
350
|
-
if (validationFields && validationFields?.fields?.checkout) {
|
|
372
|
+
if (validationFields && validationFields?.fields?.checkout && !user?.guest_id) {
|
|
351
373
|
checkValidationFields()
|
|
352
374
|
}
|
|
353
375
|
}, [validationFields, user])
|
|
354
376
|
|
|
377
|
+
useEffect(() => {
|
|
378
|
+
if (checkoutFieldsState?.loading || !user?.guest_id) return
|
|
379
|
+
checkGuestValidationFields()
|
|
380
|
+
}, [user, checkoutFieldsState])
|
|
381
|
+
|
|
355
382
|
useEffect(() => {
|
|
356
383
|
if (errors) {
|
|
357
384
|
const errorText = manageErrorsToShow(errors)
|
|
@@ -44,6 +44,11 @@ export const Favorite = (props: any) => {
|
|
|
44
44
|
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
45
45
|
style={{ paddingVertical: 0 }}
|
|
46
46
|
btnStyle={{ paddingLeft: 0 }}
|
|
47
|
+
buttonProps={{
|
|
48
|
+
bgColor: theme.colors.white,
|
|
49
|
+
borderColor: theme.colors.white,
|
|
50
|
+
textStyle: { color: theme.colors.btnFont }
|
|
51
|
+
}}
|
|
47
52
|
/>
|
|
48
53
|
<TabContainer>
|
|
49
54
|
{tabList.map((menu, i) => (
|
|
@@ -125,6 +125,11 @@ 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
|
+
}}
|
|
128
133
|
/>
|
|
129
134
|
<FormSide>
|
|
130
135
|
<OText
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
+
import { useTheme } from 'styled-components/native';
|
|
2
3
|
import { Platform, RefreshControl } from 'react-native'
|
|
3
4
|
import { HelpParams } from '../../types'
|
|
4
5
|
import { useLanguage } from 'ordering-components/native'
|
|
@@ -17,6 +18,7 @@ export const Help = (props: HelpParams) => {
|
|
|
17
18
|
navigation
|
|
18
19
|
} = props
|
|
19
20
|
const [, t] = useLanguage()
|
|
21
|
+
const theme = useTheme()
|
|
20
22
|
const [refreshing] = useState(false);
|
|
21
23
|
const [refresh, setRefresh] = useState(false)
|
|
22
24
|
|
|
@@ -46,6 +48,11 @@ export const Help = (props: HelpParams) => {
|
|
|
46
48
|
onActionLeft={goToBack}
|
|
47
49
|
showCall={false}
|
|
48
50
|
btnStyle={{ paddingLeft: 0 }}
|
|
51
|
+
buttonProps={{
|
|
52
|
+
bgColor: theme.colors.white,
|
|
53
|
+
borderColor: theme.colors.white,
|
|
54
|
+
textStyle: { color: theme.colors.btnFont }
|
|
55
|
+
}}
|
|
49
56
|
/>
|
|
50
57
|
<HelpSubItem
|
|
51
58
|
onPress={() => onRedirect('HelpOrder')}
|
|
@@ -37,6 +37,11 @@ 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
|
+
}}
|
|
40
45
|
/>
|
|
41
46
|
<Content>
|
|
42
47
|
<OText mBottom={20}>
|
|
@@ -43,6 +43,11 @@ 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
|
+
}}
|
|
46
51
|
/>
|
|
47
52
|
<Content>
|
|
48
53
|
<OText mBottom={15}>
|
|
@@ -39,6 +39,11 @@ 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
|
+
}}
|
|
42
47
|
/>
|
|
43
48
|
<Content>
|
|
44
49
|
<OText mBottom={20}>
|
|
@@ -108,7 +108,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
108
108
|
|
|
109
109
|
const googleLoginEnabled = configs?.google_login_enabled?.value === '1' || !configs?.google_login_enabled?.enabled
|
|
110
110
|
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1' || !configs?.facebook_login_enabled?.enabled
|
|
111
|
-
const appleLoginEnabled = Platform.OS === 'ios' && configs?.apple_login_enabled?.value === '1' || !configs?.apple_login_enabled?.enabled
|
|
111
|
+
const appleLoginEnabled = Platform.OS === 'ios' && (configs?.apple_login_enabled?.value === '1' || !configs?.apple_login_enabled?.enabled)
|
|
112
112
|
|
|
113
113
|
const loginStyle = StyleSheet.create({
|
|
114
114
|
btnOutline: {
|
|
@@ -412,6 +412,11 @@ 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
|
+
}}
|
|
415
420
|
/>
|
|
416
421
|
)}
|
|
417
422
|
<FormSide>
|
|
@@ -802,7 +807,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
802
807
|
handleSuccessGoogleLogin={handleSuccessFacebook}
|
|
803
808
|
/>
|
|
804
809
|
)}
|
|
805
|
-
{(configs?.apple_login_client_id?.value !== '' && configs?.
|
|
810
|
+
{(configs?.apple_login_client_id?.value !== '' && configs?.apple_login_client_id?.value !== null) && appleLoginEnabled && (
|
|
806
811
|
<AppleLogin
|
|
807
812
|
notificationState={notificationState}
|
|
808
813
|
handleErrors={(err: any) => { showToast(ToastType.Error, err), vibrateApp() }}
|
|
@@ -237,6 +237,7 @@ export const MessageListing = (props: MessageListingParams) => {
|
|
|
237
237
|
const [seletedOrder, setSeletedOrder] = useState<any>()
|
|
238
238
|
const [openMessages, setOpenMessges] = useState(false)
|
|
239
239
|
const [, t] = useLanguage()
|
|
240
|
+
const theme = useTheme()
|
|
240
241
|
|
|
241
242
|
const goToBack = () => {
|
|
242
243
|
navigation?.canGoBack() && navigation.goBack()
|
|
@@ -265,6 +266,11 @@ export const MessageListing = (props: MessageListingParams) => {
|
|
|
265
266
|
showCall={false}
|
|
266
267
|
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
267
268
|
btnStyle={{ paddingLeft: 0 }}
|
|
269
|
+
buttonProps={{
|
|
270
|
+
bgColor: theme.colors.white,
|
|
271
|
+
borderColor: theme.colors.white,
|
|
272
|
+
textStyle: { color: theme.colors.btnFont }
|
|
273
|
+
}}
|
|
268
274
|
/>
|
|
269
275
|
<OrderListing
|
|
270
276
|
ordersLength={{ activeOrdersLength: 0, previousOrdersLength: 0 }}
|
|
@@ -343,6 +343,11 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
343
343
|
titleAlign={'center'}
|
|
344
344
|
titleStyle={{ fontSize: 20, marginRight: 0, marginLeft: 0 }}
|
|
345
345
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
346
|
+
buttonProps={{
|
|
347
|
+
bgColor: theme.colors.white,
|
|
348
|
+
borderColor: theme.colors.white,
|
|
349
|
+
textStyle: { color: theme.colors.btnFont }
|
|
350
|
+
}}
|
|
346
351
|
/>
|
|
347
352
|
)}
|
|
348
353
|
{(preorderMinimumDays === 0 && preorderLeadTime === 0) || !cateringPreorder && (
|
|
@@ -101,6 +101,11 @@ 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
|
+
}}
|
|
104
109
|
/>
|
|
105
110
|
)}
|
|
106
111
|
</View>
|
|
@@ -44,6 +44,7 @@ interface Props {
|
|
|
44
44
|
isVertical?: boolean,
|
|
45
45
|
noMargin?: any
|
|
46
46
|
hideArrowLeft?: boolean
|
|
47
|
+
buttonProps?: any
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
const NavBar = (props: Props) => {
|
|
@@ -64,6 +65,7 @@ const NavBar = (props: Props) => {
|
|
|
64
65
|
<Wrapper style={{ paddingTop: props.paddingTop, ...{ flexDirection: props.isVertical ? 'column' : 'row', alignItems: props.isVertical ? 'flex-start' : 'center' }, ...props.style }}>
|
|
65
66
|
{!props.hideArrowLeft && (
|
|
66
67
|
<OButton
|
|
68
|
+
{...props.buttonProps}
|
|
67
69
|
iconProps={{
|
|
68
70
|
name: 'arrowleft',
|
|
69
71
|
size: 26
|
|
@@ -75,6 +75,11 @@ const NotificationsUI = (props: any) => {
|
|
|
75
75
|
showCall={false}
|
|
76
76
|
style={{ paddingVertical: 0 }}
|
|
77
77
|
btnStyle={{ paddingLeft: 0 }}
|
|
78
|
+
buttonProps={{
|
|
79
|
+
bgColor: theme.colors.white,
|
|
80
|
+
borderColor: theme.colors.white,
|
|
81
|
+
textStyle: { color: theme.colors.btnFont }
|
|
82
|
+
}}
|
|
78
83
|
/>
|
|
79
84
|
{showCustomerPromotions && showNotifications && (
|
|
80
85
|
<>
|
|
@@ -103,6 +103,11 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
|
|
|
103
103
|
title={t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will your order type?')}
|
|
104
104
|
titleAlign={'center'}
|
|
105
105
|
noMargin
|
|
106
|
+
buttonProps={{
|
|
107
|
+
bgColor: theme.colors.white,
|
|
108
|
+
borderColor: theme.colors.white,
|
|
109
|
+
textStyle: { color: theme.colors.btnFont }
|
|
110
|
+
}}
|
|
106
111
|
/>
|
|
107
112
|
{
|
|
108
113
|
items.length > 0 && (
|
|
@@ -49,6 +49,8 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
|
|
|
49
49
|
onClick={loadMoreOrders}
|
|
50
50
|
text={t('LOAD_MORE_ORDERS', 'Load more orders')}
|
|
51
51
|
imgRightSrc={null}
|
|
52
|
+
bgColor={theme.colors.primary}
|
|
53
|
+
borderColor={theme.colors.primary}
|
|
52
54
|
textStyle={{ color: theme.colors.white }}
|
|
53
55
|
style={{ borderRadius: 7.6, shadowOpacity: 0, marginTop: 20 }}
|
|
54
56
|
/>
|
|
@@ -113,6 +113,11 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
113
113
|
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
114
114
|
style={{ paddingVertical: 0 }}
|
|
115
115
|
btnStyle={{ paddingLeft: 0 }}
|
|
116
|
+
buttonProps={{
|
|
117
|
+
bgColor: theme.colors.white,
|
|
118
|
+
borderColor: theme.colors.white,
|
|
119
|
+
textStyle: { color: theme.colors.btnFont }
|
|
120
|
+
}}
|
|
116
121
|
/>
|
|
117
122
|
<PromotionsContainer>
|
|
118
123
|
<SearchBarContainer>
|
|
@@ -192,6 +192,11 @@ const ReviewDriverUI = (props: ReviewDriverParams) => {
|
|
|
192
192
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
193
193
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
194
194
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
195
|
+
buttonProps={{
|
|
196
|
+
bgColor: theme.colors.white,
|
|
197
|
+
borderColor: theme.colors.white,
|
|
198
|
+
textStyle: { color: theme.colors.btnFont }
|
|
199
|
+
}}
|
|
195
200
|
/>
|
|
196
201
|
<DriverPhotoContainer>
|
|
197
202
|
<View
|
|
@@ -215,6 +215,11 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
|
|
|
215
215
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
216
216
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
217
217
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
218
|
+
buttonProps={{
|
|
219
|
+
bgColor: theme.colors.white,
|
|
220
|
+
borderColor: theme.colors.white,
|
|
221
|
+
textStyle: { color: theme.colors.btnFont }
|
|
222
|
+
}}
|
|
218
223
|
/>
|
|
219
224
|
<BusinessLogo isMulti={order?.business?.length > 1}>
|
|
220
225
|
{typeof order?.logo === 'string' || !order?.logo ? (
|
|
@@ -73,6 +73,11 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
|
|
|
73
73
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
74
74
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
75
75
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
76
|
+
buttonProps={{
|
|
77
|
+
bgColor: theme.colors.white,
|
|
78
|
+
borderColor: theme.colors.white,
|
|
79
|
+
textStyle: { color: theme.colors.btnFont }
|
|
80
|
+
}}
|
|
76
81
|
/>
|
|
77
82
|
{order?.products && order.products.length > 0 && order?.products.map(productsOrder => (
|
|
78
83
|
productsOrder?.length ? productsOrder?.map((product: any, i: any) => !product?.deleted ?
|
|
@@ -72,6 +72,11 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
72
72
|
showCall={false}
|
|
73
73
|
paddingTop={10}
|
|
74
74
|
btnStyle={{ paddingLeft: 0 }}
|
|
75
|
+
buttonProps={{
|
|
76
|
+
bgColor: theme.colors.white,
|
|
77
|
+
borderColor: theme.colors.white,
|
|
78
|
+
textStyle: { color: theme.colors.btnFont }
|
|
79
|
+
}}
|
|
75
80
|
/>
|
|
76
81
|
{user?.session_strategy === 'jwt_session' ? (
|
|
77
82
|
<>
|
|
@@ -155,7 +155,7 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
155
155
|
const showInputPhoneNumber = (validationFields?.fields?.checkout?.cellphone?.enabled ?? false) || configs?.verification_phone_required?.value === '1'
|
|
156
156
|
const googleLoginEnabled = configs?.google_login_enabled?.value === '1' || !configs?.google_login_enabled?.enabled
|
|
157
157
|
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1' || !configs?.facebook_login_enabled?.enabled
|
|
158
|
-
const appleLoginEnabled = configs?.apple_login_enabled?.value === '1' || !configs?.apple_login_enabled?.enabled
|
|
158
|
+
const appleLoginEnabled = Platform.OS === 'ios' && (configs?.apple_login_enabled?.value === '1' || !configs?.apple_login_enabled?.enabled)
|
|
159
159
|
|
|
160
160
|
const closeAlert = () => {
|
|
161
161
|
setAlertState({
|
|
@@ -488,6 +488,11 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
488
488
|
btnStyle={{ paddingLeft: 0 }}
|
|
489
489
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
490
490
|
titleStyle={{ marginLeft: 0, marginRight: 0 }}
|
|
491
|
+
buttonProps={{
|
|
492
|
+
bgColor: theme.colors.white,
|
|
493
|
+
borderColor: theme.colors.white,
|
|
494
|
+
textStyle: { color: theme.colors.btnFont }
|
|
495
|
+
}}
|
|
491
496
|
/>
|
|
492
497
|
)}
|
|
493
498
|
<FormSide>
|
|
@@ -381,7 +381,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
381
381
|
))
|
|
382
382
|
},
|
|
383
383
|
)}
|
|
384
|
-
{showInputBirthday && (
|
|
384
|
+
{showInputBirthday && ((requiredFields && requiredFields?.includes?.('birthdate')) || !requiredFields) && (
|
|
385
385
|
<>
|
|
386
386
|
<WrapperBirthdate>
|
|
387
387
|
<OText size={14} lineHeight={21} color={theme.colors.textNormal} weight={'500'} style={{ textTransform: 'capitalize', alignSelf: 'flex-start' }}>
|
|
@@ -396,7 +396,7 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
396
396
|
<DatePickerUI open={showDatePicker} birthdate={birthdate} onConfirm={_handleChangeDate} onCancel={() => setShowDatePicker(false)} />
|
|
397
397
|
</>
|
|
398
398
|
)}
|
|
399
|
-
{!!showInputPhoneNumber && ((requiredFields && requiredFields
|
|
399
|
+
{!!showInputPhoneNumber && ((requiredFields && requiredFields?.includes?.('cellphone')) || !requiredFields) && (
|
|
400
400
|
<WrapperPhone>
|
|
401
401
|
<OText size={14} lineHeight={21} weight={'500'} color={theme.colors.textNormal}>{t('PHONE', 'Phone')}</OText>
|
|
402
402
|
<PhoneInputNumber
|
|
@@ -523,10 +523,10 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
523
523
|
borderColor: !user?.guest_id && (formState.loading || !isValid) ? theme.colors.white : theme.colors.primary,
|
|
524
524
|
opacity: !user?.guest_id && (formState.loading || !isValid) ? 0.3 : 1,
|
|
525
525
|
}}
|
|
526
|
-
onClick={
|
|
526
|
+
onClick={handleSubmit(onSubmit)}
|
|
527
527
|
/>
|
|
528
528
|
)}
|
|
529
|
-
{isCheckout && !!user?.guest_id && (
|
|
529
|
+
{isCheckout && !!user?.guest_id && !requiredFields && (
|
|
530
530
|
<TouchableOpacity style={{ marginTop: 10 }} onPress={() => handlePlaceOrderAsGuest()}>
|
|
531
531
|
<OText color={theme.colors.primary} style={{ textAlign: 'center' }}>{t('PLACE_ORDER_AS_GUEST', 'Place order as guest')}</OText>
|
|
532
532
|
</TouchableOpacity>
|
|
@@ -287,6 +287,11 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
287
287
|
onActionLeft={() => navigation.goBack()}
|
|
288
288
|
showCall={false}
|
|
289
289
|
btnStyle={{ paddingLeft: 0 }}
|
|
290
|
+
buttonProps={{
|
|
291
|
+
bgColor: theme.colors.white,
|
|
292
|
+
borderColor: theme.colors.white,
|
|
293
|
+
textStyle: { color: theme.colors.btnFont }
|
|
294
|
+
}}
|
|
290
295
|
/>
|
|
291
296
|
<CenterView>
|
|
292
297
|
<View style={styles.photo}>
|
|
@@ -141,6 +141,11 @@ const WalletsUI = (props: any) => {
|
|
|
141
141
|
btnStyle={{ paddingLeft: 0 }}
|
|
142
142
|
isVertical={!hideWalletsTheme}
|
|
143
143
|
hideArrowLeft={!hideWalletsTheme}
|
|
144
|
+
buttonProps={{
|
|
145
|
+
bgColor: theme.colors.white,
|
|
146
|
+
borderColor: theme.colors.white,
|
|
147
|
+
textStyle: { color: theme.colors.btnFont }
|
|
148
|
+
}}
|
|
144
149
|
/>
|
|
145
150
|
{isChewLayout && !openHistory && (
|
|
146
151
|
<OButton
|
|
@@ -119,7 +119,7 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
119
119
|
style={{ width: props.isCircle ? 52 : props.style?.width, ...props.parentStyle }}
|
|
120
120
|
disabled={props.isDisabledWithSameStyles}
|
|
121
121
|
>
|
|
122
|
-
<StyledButton style={{ ...props.style, backgroundColor: props.bgColor
|
|
122
|
+
<StyledButton style={{ ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor, borderRadius: props.style?.borderRadius }}>
|
|
123
123
|
{props.icon ? (
|
|
124
124
|
<props.icon {...props.iconProps} />
|
|
125
125
|
) : null}
|
|
@@ -127,7 +127,7 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
127
127
|
<OIcon style={props.imgLeftStyle} src={props.imgLeftSrc} color={theme.colors.textNormal} />
|
|
128
128
|
) : null}
|
|
129
129
|
{props.text ? (
|
|
130
|
-
<StyledText style={{ ...props.textStyle, color: props?.textStyle?.color
|
|
130
|
+
<StyledText style={{ ...props.textStyle, color: props?.textStyle?.color }}>{props.text}</StyledText>
|
|
131
131
|
) : null}
|
|
132
132
|
{props.imgRightSrc ? (
|
|
133
133
|
<EndImage style={props.imgRightStyle} source={props.imgRightSrc} />
|