ordering-ui-react-native 0.22.75 → 0.22.76-release
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 +5 -7
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +40 -39
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/context/OfflineActions/index.tsx +236 -0
- package/src/providers/AlertProvider.tsx +3 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +5 -3
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +1 -0
- package/themes/business/src/components/BusinessController/index.tsx +8 -3
- package/themes/business/src/components/BusinessProductList/index.tsx +3 -2
- package/themes/business/src/components/Chat/index.tsx +15 -3
- package/themes/business/src/components/DriverMap/index.tsx +44 -33
- package/themes/business/src/components/FloatingButton/index.tsx +3 -2
- package/themes/business/src/components/LanguageSelector/index.tsx +1 -1
- package/themes/business/src/components/LoginForm/index.tsx +123 -98
- package/themes/business/src/components/LogoutButton/index.tsx +13 -4
- package/themes/business/src/components/MapView/RenderMarker.tsx +146 -0
- package/themes/business/src/components/MapView/index.tsx +68 -142
- package/themes/business/src/components/NewOrderNotification/index.tsx +38 -54
- package/themes/business/src/components/OrderDetails/Business.tsx +56 -20
- package/themes/business/src/components/OrderDetails/Delivery.tsx +111 -42
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +146 -36
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +51 -28
- package/themes/business/src/components/OrderDetails/styles.tsx +39 -3
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +17 -16
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +3 -2
- package/themes/business/src/components/OrderSummary/index.tsx +271 -176
- package/themes/business/src/components/OrdersListManager/index.tsx +13 -1
- package/themes/business/src/components/OrdersOption/index.tsx +207 -144
- package/themes/business/src/components/OrdersOption/styles.tsx +14 -0
- package/themes/business/src/components/PreviousMessages/index.tsx +26 -3
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +20 -8
- package/themes/business/src/components/PreviousOrders/index.tsx +74 -66
- package/themes/business/src/components/PreviousOrders/styles.tsx +2 -1
- package/themes/business/src/components/PrinterEdition/MessageAlert.tsx +33 -0
- package/themes/business/src/components/PrinterEdition/index.tsx +143 -75
- package/themes/business/src/components/PrinterEdition/printerList.tsx +23 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +1 -1
- package/themes/business/src/components/ProductItemAccordion/index.tsx +15 -16
- package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/StoresList/index.tsx +2 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +48 -10
- package/themes/business/src/components/UserProfileForm/styles.tsx +7 -0
- package/themes/business/src/components/WebsocketStatus/index.tsx +2 -2
- package/themes/business/src/config/currency.tsx +1010 -0
- package/themes/business/src/hooks/useLocation.tsx +16 -12
- package/themes/business/src/layouts/SafeAreaContainer.tsx +35 -19
- package/themes/business/src/types/index.tsx +26 -4
- package/themes/business/src/utils/index.tsx +26 -2
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +9 -5
- package/themes/kiosk/src/components/CustomerName/index.tsx +1 -1
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +121 -57
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +223 -219
- package/themes/original/src/components/AddressForm/index.tsx +56 -17
- package/themes/original/src/components/AppleLogin/index.tsx +3 -4
- package/themes/original/src/components/BusinessController/index.tsx +4 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -3
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +102 -90
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +7 -3
- package/themes/original/src/components/BusinessListingSearch/index.tsx +8 -13
- package/themes/original/src/components/BusinessPreorder/index.tsx +30 -17
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +72 -69
- package/themes/original/src/components/BusinessProductsList/index.tsx +4 -5
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +5 -4
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +1 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +2 -1
- package/themes/original/src/components/Cart/index.tsx +43 -12
- package/themes/original/src/components/Checkout/index.tsx +126 -98
- package/themes/original/src/components/FloatingButton/index.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +2 -1
- package/themes/original/src/components/GoogleMap/index.tsx +3 -2
- package/themes/original/src/components/Help/functions.tsx +76 -0
- package/themes/original/src/components/Help/index.tsx +74 -29
- package/themes/original/src/components/Help/styles.tsx +4 -1
- package/themes/original/src/components/HelpOptions/index.tsx +53 -0
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +36 -11
- package/themes/original/src/components/LastOrder/index.tsx +1 -1
- package/themes/original/src/components/LoginForm/index.tsx +11 -5
- package/themes/original/src/components/MessageListing/index.tsx +1 -1
- package/themes/original/src/components/Messages/index.tsx +562 -555
- package/themes/original/src/components/MomentOption/TimeListItem.tsx +56 -0
- package/themes/original/src/components/MomentOption/index.tsx +141 -61
- package/themes/original/src/components/MomentOption/styles.tsx +1 -1
- package/themes/original/src/components/MomentSelector/index.tsx +5 -2
- package/themes/original/src/components/MultiCheckout/index.tsx +78 -33
- package/themes/original/src/components/MultiOrdersDetails/SingleOrderCard.tsx +2 -2
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +2 -2
- package/themes/original/src/components/NavBar/index.tsx +6 -2
- package/themes/original/src/components/NotFoundSource/index.tsx +40 -39
- package/themes/original/src/components/NotFoundSource/styles.tsx +18 -9
- package/themes/original/src/components/OrderDetails/OrderEta.tsx +4 -3
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +11 -4
- package/themes/original/src/components/OrderDetails/index.tsx +44 -20
- package/themes/original/src/components/OrderDetails/styles.tsx +0 -1
- package/themes/original/src/components/OrderProgress/index.tsx +5 -4
- package/themes/original/src/components/OrderSummary/index.tsx +32 -11
- package/themes/original/src/components/OrderTypeSelector/index.tsx +120 -120
- package/themes/original/src/components/OrdersOption/index.tsx +325 -325
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +1 -0
- package/themes/original/src/components/PaymentOptions/index.tsx +471 -459
- package/themes/original/src/components/PhoneInputNumber/index.tsx +92 -7
- package/themes/original/src/components/ProductItemAccordion/index.tsx +28 -37
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +15 -14
- package/themes/original/src/components/ServiceForm/index.tsx +2 -2
- package/themes/original/src/components/SignupForm/index.tsx +40 -24
- package/themes/original/src/components/SingleOrderCard/index.tsx +8 -5
- package/themes/original/src/components/SingleProductCard/index.tsx +2 -1
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +7 -1
- package/themes/original/src/components/StripeElementsForm/index.tsx +2 -2
- package/themes/original/src/components/TaxInformation/index.tsx +3 -2
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +7 -2
- package/themes/original/src/components/UserDetails/index.tsx +17 -16
- package/themes/original/src/components/UserFormDetails/index.tsx +109 -67
- package/themes/original/src/components/UserVerification/index.tsx +18 -5
- package/themes/original/src/components/VerifyPhone/index.tsx +1 -1
- package/themes/original/src/components/shared/OInput.tsx +97 -97
- package/themes/original/src/components/shared/OModal.tsx +7 -2
- package/themes/original/src/providers/AlertProvider.tsx +1 -1
- package/themes/original/src/types/index.tsx +700 -695
- package/themes/original/src/utils/index.tsx +50 -34
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +0 -62
- package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +0 -12
- package/themes/original/src/components/HelpGuide/index.tsx +0 -68
- package/themes/original/src/components/HelpGuide/styles.tsx +0 -12
- package/themes/original/src/components/HelpOrder/index.tsx +0 -71
- package/themes/original/src/components/HelpOrder/styles.tsx +0 -13
|
@@ -1,27 +1,48 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Platform, RefreshControl, View } from 'react-native'
|
|
3
|
+
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
|
|
4
|
+
import { useTheme } from 'styled-components/native'
|
|
5
5
|
import { useLanguage } from 'ordering-components/native'
|
|
6
|
+
|
|
7
|
+
import { HelpParams } from '../../types'
|
|
8
|
+
import { CmsContent } from './functions'
|
|
9
|
+
import { HelpSubItem, LastOrdersContainer } from './styles'
|
|
10
|
+
import { Container } from '../../layouts/Container'
|
|
11
|
+
|
|
12
|
+
import { OText, OIcon } from '../shared'
|
|
13
|
+
import { NotFoundSource } from '../NotFoundSource'
|
|
6
14
|
import NavBar from '../NavBar'
|
|
7
|
-
import { OText } from '../shared'
|
|
8
15
|
import { LastOrders } from '../LastOrders'
|
|
9
|
-
import { Container } from '../../layouts/Container'
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
17
|
+
const HelpUI = (props: HelpParams) => {
|
|
18
|
+
const { cmsState, navigation } = props
|
|
19
|
+
|
|
20
|
+
const { items, loading, error, pages } = cmsState
|
|
15
21
|
|
|
16
|
-
export const Help = (props: HelpParams) => {
|
|
17
|
-
const {
|
|
18
|
-
navigation
|
|
19
|
-
} = props
|
|
20
22
|
const [, t] = useLanguage()
|
|
21
23
|
const theme = useTheme()
|
|
22
|
-
|
|
24
|
+
|
|
25
|
+
const [refreshing] = useState(false)
|
|
23
26
|
const [refresh, setRefresh] = useState(false)
|
|
24
27
|
|
|
28
|
+
const HelpItem = ({ item }: any) => {
|
|
29
|
+
const currentItem = pages.find((p: any) => p.id === item.id)
|
|
30
|
+
return (
|
|
31
|
+
<HelpSubItem
|
|
32
|
+
activeOpacity={0.7}
|
|
33
|
+
onPress={() => onRedirect('HelpOptions', { item: currentItem })}
|
|
34
|
+
>
|
|
35
|
+
<OText size={14} style={{ width: '90%' }}>
|
|
36
|
+
{item.name}
|
|
37
|
+
</OText>
|
|
38
|
+
<OIcon
|
|
39
|
+
width={15}
|
|
40
|
+
src={theme.images.general.chevron_right}
|
|
41
|
+
/>
|
|
42
|
+
</HelpSubItem>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
25
46
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
26
47
|
const onRedirect = (route: string, params?: any) => {
|
|
27
48
|
navigation.navigate(route, params)
|
|
@@ -49,22 +70,36 @@ export const Help = (props: HelpParams) => {
|
|
|
49
70
|
showCall={false}
|
|
50
71
|
btnStyle={{ paddingLeft: 0 }}
|
|
51
72
|
/>
|
|
52
|
-
<
|
|
53
|
-
|
|
73
|
+
<OText
|
|
74
|
+
size={20}
|
|
75
|
+
weight={'bold'}
|
|
76
|
+
style={{ marginBottom: 20 }}
|
|
54
77
|
>
|
|
55
|
-
|
|
56
|
-
</
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
78
|
+
{t('ALL_THE_THEMES', 'All the themes')}
|
|
79
|
+
</OText>
|
|
80
|
+
{!loading && !error && items.map((item: any) => (
|
|
81
|
+
<HelpItem
|
|
82
|
+
key={item.id}
|
|
83
|
+
item={item}
|
|
84
|
+
/>
|
|
85
|
+
))}
|
|
86
|
+
{loading && (
|
|
87
|
+
<Placeholder Animation={Fade}>
|
|
88
|
+
<View style={{ flexDirection: 'column' }}>
|
|
89
|
+
{[...Array(5)].map((_, i) => (
|
|
90
|
+
<HelpSubItem key={i}>
|
|
91
|
+
<PlaceholderLine key={i} height={30} width={90} noMargin />
|
|
92
|
+
</HelpSubItem>
|
|
93
|
+
))}
|
|
94
|
+
</View>
|
|
95
|
+
</Placeholder>
|
|
96
|
+
)}
|
|
97
|
+
{!loading && !!error && (
|
|
98
|
+
<NotFoundSource
|
|
99
|
+
simple
|
|
100
|
+
content={error}
|
|
101
|
+
/>
|
|
102
|
+
)}
|
|
68
103
|
<LastOrdersContainer>
|
|
69
104
|
<OText size={18} weight={600}>{t('LAST_ORDERS', 'Last Orders')}</OText>
|
|
70
105
|
<LastOrders {...props} onRedirect={onRedirect} refresh={refresh} setRefresh={setRefresh} />
|
|
@@ -72,3 +107,13 @@ export const Help = (props: HelpParams) => {
|
|
|
72
107
|
</Container>
|
|
73
108
|
)
|
|
74
109
|
}
|
|
110
|
+
|
|
111
|
+
export const Help = (props: HelpParams) => {
|
|
112
|
+
const helpProps = {
|
|
113
|
+
...props,
|
|
114
|
+
UIComponent: HelpUI
|
|
115
|
+
}
|
|
116
|
+
return (
|
|
117
|
+
<CmsContent {...helpProps} />
|
|
118
|
+
)
|
|
119
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import styled from 'styled-components/native'
|
|
2
2
|
|
|
3
3
|
export const HelpSubItem = styled.TouchableOpacity`
|
|
4
|
-
border-bottom-color:
|
|
4
|
+
border-bottom-color: ${(props: any) => props.theme.colors.border};
|
|
5
5
|
border-bottom-width: 1px;
|
|
6
6
|
padding-vertical: 15px;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
align-items: center;
|
|
7
10
|
`
|
|
8
11
|
|
|
9
12
|
export const LastOrdersContainer = styled.View`
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React, { useMemo } from 'react'
|
|
2
|
+
import { Dimensions, Platform } from 'react-native'
|
|
3
|
+
import { WebView } from 'react-native-webview'
|
|
4
|
+
import { useLanguage } from 'ordering-components/native'
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
6
|
+
import { Container } from '../../layouts/Container'
|
|
7
|
+
import { NotFoundSource } from '../NotFoundSource'
|
|
8
|
+
import NavBar from '../NavBar'
|
|
9
|
+
|
|
10
|
+
export const HelpOptions = (props: any) => {
|
|
11
|
+
const { item, goToBack } = props
|
|
12
|
+
const [, t] = useLanguage()
|
|
13
|
+
|
|
14
|
+
const insets = useSafeAreaInsets()
|
|
15
|
+
|
|
16
|
+
const containerHeight = useMemo(() => {
|
|
17
|
+
const windowHeight = Dimensions.get('window').height
|
|
18
|
+
const bottomPadding = Platform.OS === 'ios' ? insets.bottom : 0
|
|
19
|
+
const navigationBarHeight = Platform.OS === 'android' ? 48 : 0
|
|
20
|
+
const topPadding = (Platform.OS === 'ios' ? 20 : 10) + 48
|
|
21
|
+
return windowHeight - bottomPadding - navigationBarHeight - topPadding
|
|
22
|
+
}, [insets.bottom])
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Container
|
|
26
|
+
pt={Platform.OS === 'ios' ? 20 : 10}
|
|
27
|
+
noPadding
|
|
28
|
+
>
|
|
29
|
+
<NavBar
|
|
30
|
+
title={t('HELP', 'Help')}
|
|
31
|
+
titleAlign={'center'}
|
|
32
|
+
onActionLeft={goToBack}
|
|
33
|
+
showCall={false}
|
|
34
|
+
btnStyle={{ paddingLeft: 0 }}
|
|
35
|
+
/>
|
|
36
|
+
{!!item?.body && (
|
|
37
|
+
<WebView
|
|
38
|
+
originWhitelist={['*']}
|
|
39
|
+
automaticallyAdjustContentInsets={false}
|
|
40
|
+
source={{ html: item.body }}
|
|
41
|
+
style={{ flex: 1, height: containerHeight }}
|
|
42
|
+
nestedScrollEnabled
|
|
43
|
+
/>
|
|
44
|
+
)}
|
|
45
|
+
{!item?.body && (
|
|
46
|
+
<NotFoundSource
|
|
47
|
+
simple
|
|
48
|
+
content={t('NO_CONTENT_TO_SHOW', 'Nothing to show')}
|
|
49
|
+
/>
|
|
50
|
+
)}
|
|
51
|
+
</Container>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
@@ -1,22 +1,48 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { useLanguage, useOrder, useConfig } from 'ordering-components/native';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useLanguage, useOrder, useConfig, useSession, useApi, ToastType, useToast } from 'ordering-components/native';
|
|
3
3
|
import { useTheme } from 'styled-components/native';
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
5
|
import { OButton, OIcon, OText } from '../shared';
|
|
6
6
|
import { LanguageSelector } from '../LanguageSelector';
|
|
7
7
|
import { TouchableOpacity } from 'react-native-gesture-handler';
|
|
8
8
|
import { useWindowDimensions, Platform } from 'react-native';
|
|
9
|
+
import uuid from 'react-native-uuid';
|
|
9
10
|
|
|
10
11
|
export const Home = (props: any) => {
|
|
11
12
|
const { onNavigationRedirect, businessSlug } = props;
|
|
12
13
|
const { width, height } = useWindowDimensions();
|
|
13
14
|
const [, t] = useLanguage();
|
|
14
|
-
const [orderState] = useOrder();
|
|
15
|
+
const [orderState, { handleOrderStateLoading, setStateInitialValues }] = useOrder();
|
|
15
16
|
const [{ configs }] = useConfig()
|
|
17
|
+
const [, { login }] = useSession()
|
|
18
|
+
const [ordering] = useApi()
|
|
19
|
+
const [, { showToast }] = useToast()
|
|
16
20
|
|
|
17
21
|
const theme = useTheme();
|
|
18
|
-
|
|
19
|
-
const
|
|
22
|
+
|
|
23
|
+
const handleCreateGuestUser = async (values: any) => {
|
|
24
|
+
try {
|
|
25
|
+
await handleOrderStateLoading(true)
|
|
26
|
+
const { content: { error, result } } = await ordering.users().save(values)
|
|
27
|
+
if (!error) {
|
|
28
|
+
await login({
|
|
29
|
+
user: result,
|
|
30
|
+
token: result.session?.access_token
|
|
31
|
+
})
|
|
32
|
+
} else {
|
|
33
|
+
showToast(ToastType.Error, t('ERROR_CREATING_GUEST_USER', 'Error creating guest users'))
|
|
34
|
+
}
|
|
35
|
+
await handleOrderStateLoading(false)
|
|
36
|
+
} catch (err) {
|
|
37
|
+
await handleOrderStateLoading(false)
|
|
38
|
+
showToast(ToastType.Error, t('ERROR_CREATING_GUEST_USER', 'Error creating guest users'))
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const handleUpdateGuest = async () => {
|
|
43
|
+
const guestToken = uuid.v4()
|
|
44
|
+
if (guestToken) await handleCreateGuestUser({ guest_token: guestToken })
|
|
45
|
+
}
|
|
20
46
|
|
|
21
47
|
return (
|
|
22
48
|
<View style={styles.container}>
|
|
@@ -47,6 +73,7 @@ export const Home = (props: any) => {
|
|
|
47
73
|
isCircle={false}
|
|
48
74
|
onClick={() => onNavigationRedirect('Login')}
|
|
49
75
|
imgRightSrc={null}
|
|
76
|
+
isDisabled={orderState?.loading}
|
|
50
77
|
/>
|
|
51
78
|
<OButton
|
|
52
79
|
text={t('SIGNUP', 'Signup')}
|
|
@@ -56,15 +83,13 @@ export const Home = (props: any) => {
|
|
|
56
83
|
textStyle={{ color: 'black' }}
|
|
57
84
|
onClick={() => onNavigationRedirect('Signup')}
|
|
58
85
|
imgRightSrc={null}
|
|
86
|
+
isDisabled={orderState?.loading}
|
|
59
87
|
/>
|
|
60
88
|
<TouchableOpacity
|
|
89
|
+
disabled={orderState?.loading}
|
|
61
90
|
style={{ ...styles.textLink, marginTop: 12 }}
|
|
62
|
-
onPress={() =>
|
|
63
|
-
|
|
64
|
-
? onNavigationRedirect(!!businessSlug ? 'Business' : 'BusinessList', { isGuestUser: true })
|
|
65
|
-
: onNavigationRedirect('AddressForm', { isGuestUser: true })
|
|
66
|
-
}>
|
|
67
|
-
<OText weight="normal" size={18} color={theme.colors.white}>
|
|
91
|
+
onPress={() => handleUpdateGuest()}>
|
|
92
|
+
<OText weight="normal" size={18} color={orderState?.loading ? '#ccc' : theme.colors.white}>
|
|
68
93
|
{t('CONTINUE_AS_GUEST', 'Continue as guest')}
|
|
69
94
|
</OText>
|
|
70
95
|
</TouchableOpacity>
|
|
@@ -112,7 +112,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
112
112
|
orders.map((order: any) =>
|
|
113
113
|
<ItemWrap imageStyle={{ opacity: 0.7 }} source={order.business?.header ? { uri: order.business?.header } : theme.images.dummies.product} key={order.id}>
|
|
114
114
|
<OText color={theme.colors.white} size={12} lineHeight={18} weight={'600'}>{order?.business?.name}</OText>
|
|
115
|
-
<OText color={theme.colors.white} size={10} lineHeight={15}>{`${getOrderStatus(order.status)?.value} on ${formatDate(order?.created_at)}`}</OText>
|
|
115
|
+
<OText color={theme.colors.white} size={10} lineHeight={15}>{`${getOrderStatus(order.status, t)?.value} on ${formatDate(order?.created_at)}`}</OText>
|
|
116
116
|
</ItemWrap>)
|
|
117
117
|
)}
|
|
118
118
|
</>
|
|
@@ -73,7 +73,8 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
73
73
|
generateOtpCode,
|
|
74
74
|
useLoginOtpEmail,
|
|
75
75
|
useLoginOtpCellphone,
|
|
76
|
-
isGuest
|
|
76
|
+
isGuest,
|
|
77
|
+
setCellphoneStartZero
|
|
77
78
|
} = props;
|
|
78
79
|
|
|
79
80
|
const [, { showToast }] = useToast();
|
|
@@ -106,9 +107,9 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
106
107
|
|
|
107
108
|
const [isCheckingCode, setCheckingCode] = useState(false)
|
|
108
109
|
|
|
109
|
-
const googleLoginEnabled = configs?.google_login_enabled?.value === '1'
|
|
110
|
-
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1'
|
|
111
|
-
const appleLoginEnabled = Platform.OS === 'ios' && (configs?.apple_login_enabled?.value === '1'
|
|
110
|
+
const googleLoginEnabled = configs?.google_login_enabled?.value === '1'
|
|
111
|
+
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1'
|
|
112
|
+
const appleLoginEnabled = Platform.OS === 'ios' && (configs?.apple_login_enabled?.value === '1')
|
|
112
113
|
|
|
113
114
|
const loginStyle = StyleSheet.create({
|
|
114
115
|
btnOutline: {
|
|
@@ -300,6 +301,11 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
300
301
|
setTabLayouts(_tabLayouts)
|
|
301
302
|
}
|
|
302
303
|
|
|
304
|
+
const handleChangePhoneNumber = (number: any, rawNumber: any) => {
|
|
305
|
+
setPhoneInputData(number)
|
|
306
|
+
setCellphoneStartZero && setCellphoneStartZero(rawNumber?.number && rawNumber?.countryCallingCode ? rawNumber?.number : null)
|
|
307
|
+
}
|
|
308
|
+
|
|
303
309
|
useEffect(() => {
|
|
304
310
|
if (configs && Object.keys(configs).length > 0 && enableReCaptcha) {
|
|
305
311
|
if (configs?.security_recaptcha_type?.value === 'v3' &&
|
|
@@ -586,7 +592,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
586
592
|
<View style={{ marginBottom: 28 }}>
|
|
587
593
|
<PhoneInputNumber
|
|
588
594
|
data={phoneInputData}
|
|
589
|
-
handleData={
|
|
595
|
+
handleData={handleChangePhoneNumber}
|
|
590
596
|
textInputProps={{
|
|
591
597
|
returnKeyType: 'next',
|
|
592
598
|
onSubmitEditing: () => passwordRef?.current?.focus?.(),
|
|
@@ -200,7 +200,7 @@ export const OrderListing = (props: OrdersOptionParams) => {
|
|
|
200
200
|
const OrderListingProps = {
|
|
201
201
|
...props,
|
|
202
202
|
UIComponent: OrdersOptionUI,
|
|
203
|
-
orderStatus: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23],
|
|
203
|
+
orderStatus: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26],
|
|
204
204
|
useDefualtSessionManager: true,
|
|
205
205
|
paginationSettings: {
|
|
206
206
|
initialPage: 1,
|