ordering-ui-react-native 0.12.15 → 0.12.19
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/src/components/AddressList/index.tsx +3 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +168 -156
- package/themes/business/src/components/NewOrderNotification/index.tsx +14 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +3 -1
- package/themes/business/src/components/OrdersOption/index.tsx +19 -15
- package/themes/business/src/types/index.tsx +4 -1
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +128 -83
- package/themes/kiosk/src/components/DrawerView/index.tsx +57 -0
- package/themes/kiosk/src/components/DrawerView/styles.tsx +30 -0
- package/themes/kiosk/src/components/LanguageSelector/index.tsx +78 -58
- package/themes/kiosk/src/components/OrderDetails/index.tsx +3 -1
- package/themes/kiosk/src/components/ProductForm/index.tsx +129 -127
- package/themes/kiosk/src/components/ProductForm/styles.tsx +1 -1
- package/themes/original/src/components/OrderProgress/index.tsx +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Platform, View } from 'react-native';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { Dimensions, Platform, View } from 'react-native';
|
|
3
3
|
import { useLanguage, useOrder, useUtils } from 'ordering-components/native';
|
|
4
4
|
import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons'
|
|
5
5
|
|
|
@@ -17,13 +17,16 @@ import { CartContent } from '../../components/CartContent';
|
|
|
17
17
|
import { TouchableOpacity } from 'react-native-gesture-handler';
|
|
18
18
|
import { LANDSCAPE, PORTRAIT, useDeviceOrientation } from '../../../../../src/hooks/DeviceOrientation';
|
|
19
19
|
import { useCartBottomSheet } from '../../providers/CartBottomSheetProvider';
|
|
20
|
-
import { useTheme } from 'styled-components/native';
|
|
20
|
+
import styled, { useTheme } from 'styled-components/native';
|
|
21
|
+
import { DrawerView } from '../DrawerView';
|
|
22
|
+
import { ProductForm } from '../ProductForm';
|
|
21
23
|
|
|
22
24
|
const CategoriesMenu = (props: any): React.ReactElement => {
|
|
23
25
|
|
|
24
26
|
const {
|
|
25
27
|
navigation,
|
|
26
28
|
route,
|
|
29
|
+
isDrawer
|
|
27
30
|
} = props;
|
|
28
31
|
|
|
29
32
|
const {
|
|
@@ -41,7 +44,16 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
41
44
|
const [{ parsePrice }] = useUtils();
|
|
42
45
|
const [orientationState] = useDeviceOrientation();
|
|
43
46
|
const [bottomSheetVisibility, { showCartBottomSheet, hideCartBottomSheet }] = useCartBottomSheet();
|
|
44
|
-
|
|
47
|
+
const [productSelected, setProductSelected] = useState({})
|
|
48
|
+
const [drawerState, setDrawerState] = useState({ isOpen: false, data: { order: null } });
|
|
49
|
+
|
|
50
|
+
const width_dimension = Dimensions.get('window').width;
|
|
51
|
+
const height_dimension = Dimensions.get('window').height;
|
|
52
|
+
|
|
53
|
+
const KeyboardView = styled.KeyboardAvoidingView`
|
|
54
|
+
flex: 1;
|
|
55
|
+
`;
|
|
56
|
+
|
|
45
57
|
const onChangeTabs = (idx: number) => {
|
|
46
58
|
resetInactivityTimeout();
|
|
47
59
|
setIndexCateg(idx);
|
|
@@ -49,6 +61,10 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
49
61
|
|
|
50
62
|
const goToBack = () => navigation.goBack()
|
|
51
63
|
|
|
64
|
+
const setDrawerValues = ({ isOpen, data }: any) => {
|
|
65
|
+
setDrawerState({ ...drawerState, isOpen, data });
|
|
66
|
+
}
|
|
67
|
+
|
|
52
68
|
const [{ carts }] = useOrder();
|
|
53
69
|
const cartsList = (carts && Object.values(carts).filter((cart: any) => cart.products.length > 0)) || [];
|
|
54
70
|
const VISIBLE_CART_BOTTOM_SHEET_HEIGHT = orientationState?.dimensions?.height * (orientationState.orientation === PORTRAIT ? 0.5 : 1);
|
|
@@ -82,91 +98,120 @@ const CategoriesMenu = (props: any): React.ReactElement => {
|
|
|
82
98
|
}
|
|
83
99
|
|
|
84
100
|
return (
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
<OText
|
|
108
|
-
color={theme.colors.mediumGray}
|
|
101
|
+
<>
|
|
102
|
+
<View style={{
|
|
103
|
+
flex: 1,
|
|
104
|
+
flexDirection: orientationState?.orientation === PORTRAIT ? 'column' : 'row'
|
|
105
|
+
}}>
|
|
106
|
+
<View
|
|
107
|
+
style={{
|
|
108
|
+
flex: 1,
|
|
109
|
+
paddingBottom: bottomSheetVisibility && !!cart && orientationState?.orientation === PORTRAIT
|
|
110
|
+
? VISIBLE_CART_BOTTOM_SHEET_HEIGHT
|
|
111
|
+
: 0,
|
|
112
|
+
}}
|
|
113
|
+
>
|
|
114
|
+
<Container nopadding nestedScrollEnabled>
|
|
115
|
+
<View style={{ paddingTop: 20 }}>
|
|
116
|
+
<NavBar
|
|
117
|
+
title={categories[curIndexCateg].name}
|
|
118
|
+
onActionLeft={goToBack}
|
|
119
|
+
rightComponent={cart && (
|
|
120
|
+
<TouchableOpacity
|
|
121
|
+
style={{ paddingHorizontal: 20, flexDirection: 'row', alignItems: 'center' }}
|
|
122
|
+
onPress={onToggleCart}
|
|
109
123
|
>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
<OText
|
|
125
|
+
color={theme.colors.mediumGray}
|
|
126
|
+
>
|
|
127
|
+
{`${cart?.products?.length || 0} ${t('ITEMS', 'items')}`} {parsePrice(cart?.total || 0)} {' '}
|
|
128
|
+
</OText>
|
|
129
|
+
|
|
130
|
+
<MaterialIcon
|
|
131
|
+
name={bottomSheetVisibility ? "cart-off" : "cart-outline"}
|
|
132
|
+
color={theme.colors.primary}
|
|
133
|
+
size={30}
|
|
134
|
+
/>
|
|
135
|
+
</TouchableOpacity>
|
|
136
|
+
)}
|
|
137
|
+
/>
|
|
138
|
+
<OSegment
|
|
139
|
+
items={categories.map((category) => ({
|
|
140
|
+
text: category.name
|
|
141
|
+
}))}
|
|
142
|
+
selectedIdx={curIndexCateg}
|
|
143
|
+
onSelectItem={onChangeTabs}
|
|
144
|
+
/>
|
|
145
|
+
</View>
|
|
146
|
+
|
|
147
|
+
<GridContainer style={{ marginTop: 20 }}>
|
|
148
|
+
{categories[curIndexCateg].products.map((product) => (
|
|
149
|
+
<OCard
|
|
150
|
+
key={product.id}
|
|
151
|
+
title={product?.name}
|
|
152
|
+
image={{ uri: product?.images }}
|
|
153
|
+
style={{
|
|
154
|
+
width: orientationState?.orientation === LANDSCAPE
|
|
155
|
+
? bottomSheetVisibility ? orientationState?.dimensions?.width * 0.145 :orientationState?.dimensions?.width * 0.16
|
|
156
|
+
: orientationState?.dimensions?.width * 0.20
|
|
157
|
+
}}
|
|
158
|
+
titleStyle={{marginTop: Platform.OS === 'ios' ? 10 : 0}}
|
|
159
|
+
onPress={() => {
|
|
160
|
+
resetInactivityTimeout()
|
|
161
|
+
if (isDrawer) {
|
|
162
|
+
setProductSelected(product)
|
|
163
|
+
setDrawerValues({ isOpen: true, data: null })
|
|
164
|
+
} else {
|
|
165
|
+
navigation.navigate('ProductDetails', {
|
|
166
|
+
businessId,
|
|
167
|
+
businessSlug,
|
|
168
|
+
product,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}}
|
|
172
|
+
{...(!!product?.description && { description: product?.description } )}
|
|
173
|
+
{...(!!product?.price && { price: parsePrice(product?.price) } )}
|
|
174
|
+
{...(product?.in_offer && { prevPrice: `$${product?.offer_price}` } )}
|
|
175
|
+
/>
|
|
176
|
+
))}
|
|
177
|
+
</GridContainer>
|
|
178
|
+
</Container>
|
|
179
|
+
</View>
|
|
180
|
+
|
|
181
|
+
<View
|
|
182
|
+
style={{
|
|
183
|
+
flex: bottomSheetVisibility && orientationState?.orientation === PORTRAIT ? 0 : 0.8,
|
|
184
|
+
display: bottomSheetVisibility ? 'flex' : 'none'
|
|
185
|
+
}}
|
|
186
|
+
>
|
|
187
|
+
<CartContent
|
|
188
|
+
{...cartProps}
|
|
127
189
|
/>
|
|
128
190
|
</View>
|
|
129
|
-
|
|
130
|
-
<GridContainer style={{ marginTop: 20 }}>
|
|
131
|
-
{categories[curIndexCateg].products.map((product) => (
|
|
132
|
-
<OCard
|
|
133
|
-
key={product.id}
|
|
134
|
-
title={product?.name}
|
|
135
|
-
image={{ uri: product?.images }}
|
|
136
|
-
style={{
|
|
137
|
-
width: orientationState?.orientation === LANDSCAPE
|
|
138
|
-
? bottomSheetVisibility ? orientationState?.dimensions?.width * 0.145 :orientationState?.dimensions?.width * 0.16
|
|
139
|
-
: orientationState?.dimensions?.width * 0.20
|
|
140
|
-
}}
|
|
141
|
-
titleStyle={{marginTop: Platform.OS === 'ios' ? 10 : 0}}
|
|
142
|
-
onPress={() => {
|
|
143
|
-
resetInactivityTimeout()
|
|
144
|
-
navigation.navigate('ProductDetails', {
|
|
145
|
-
businessId,
|
|
146
|
-
businessSlug,
|
|
147
|
-
product,
|
|
148
|
-
});
|
|
149
|
-
}}
|
|
150
|
-
{...(!!product?.description && { description: product?.description } )}
|
|
151
|
-
{...(!!product?.price && { price: parsePrice(product?.price) } )}
|
|
152
|
-
{...(product?.in_offer && { prevPrice: `$${product?.offer_price}` } )}
|
|
153
|
-
/>
|
|
154
|
-
))}
|
|
155
|
-
</GridContainer>
|
|
156
|
-
</Container>
|
|
157
191
|
</View>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
192
|
+
<DrawerView
|
|
193
|
+
isOpen={drawerState.isOpen}
|
|
194
|
+
width={width_dimension - (width_dimension * 0.4)}
|
|
195
|
+
height={height_dimension}
|
|
196
|
+
onClickIcon={() => setDrawerValues({ isOpen: !drawerState.isOpen, data: null })}
|
|
197
|
+
>
|
|
198
|
+
<KeyboardView
|
|
199
|
+
enabled
|
|
200
|
+
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
164
201
|
>
|
|
165
|
-
<
|
|
166
|
-
|
|
202
|
+
<ProductForm
|
|
203
|
+
isDrawer
|
|
204
|
+
product={productSelected}
|
|
205
|
+
businessId={parseInt(businessId, 10)}
|
|
206
|
+
businessSlug={businessSlug}
|
|
207
|
+
onSave={() => {
|
|
208
|
+
setDrawerValues({ isOpen: !drawerState.isOpen, data: null })
|
|
209
|
+
}}
|
|
210
|
+
navigation={navigation}
|
|
167
211
|
/>
|
|
168
|
-
</
|
|
169
|
-
|
|
212
|
+
</KeyboardView>
|
|
213
|
+
</DrawerView>
|
|
214
|
+
</>
|
|
170
215
|
);
|
|
171
216
|
};
|
|
172
217
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleSheet } from 'react-native';
|
|
3
|
+
import MaterialCommunityIcon from 'react-native-vector-icons/MaterialCommunityIcons';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Container,
|
|
7
|
+
Wrapper,
|
|
8
|
+
WrapperFloatBtn,
|
|
9
|
+
IconControl
|
|
10
|
+
} from './styles';
|
|
11
|
+
|
|
12
|
+
export const DrawerView = (props: any) => {
|
|
13
|
+
const {
|
|
14
|
+
children,
|
|
15
|
+
isOpen,
|
|
16
|
+
width,
|
|
17
|
+
height,
|
|
18
|
+
onClickIcon,
|
|
19
|
+
iconStyles
|
|
20
|
+
} = props;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
isOpen && (
|
|
24
|
+
<>
|
|
25
|
+
<WrapperFloatBtn>
|
|
26
|
+
<IconControl
|
|
27
|
+
activeOpacity={1}
|
|
28
|
+
style={{ ...iconStyles, ...styles.shadow}}
|
|
29
|
+
onPress={() => onClickIcon()}
|
|
30
|
+
>
|
|
31
|
+
<MaterialCommunityIcon
|
|
32
|
+
name='arrow-expand-right'
|
|
33
|
+
size={24}
|
|
34
|
+
/>
|
|
35
|
+
</IconControl>
|
|
36
|
+
</WrapperFloatBtn>
|
|
37
|
+
<Container style={styles.shadow}>
|
|
38
|
+
<Wrapper width={width} height={height}>
|
|
39
|
+
{children}
|
|
40
|
+
</Wrapper>
|
|
41
|
+
</Container>
|
|
42
|
+
</>
|
|
43
|
+
)
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
shadow:{
|
|
49
|
+
shadowColor: 'rgba(0.0, 0.0, 0.0, 0.5)',
|
|
50
|
+
shadowOffset: {
|
|
51
|
+
width: 0,
|
|
52
|
+
height: 1.5,
|
|
53
|
+
},
|
|
54
|
+
shadowOpacity: 0.21,
|
|
55
|
+
shadowRadius: 5,
|
|
56
|
+
}
|
|
57
|
+
})
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components/native';
|
|
2
|
+
|
|
3
|
+
export const Container = styled.View`
|
|
4
|
+
position: absolute;
|
|
5
|
+
top: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
z-index: 10001;
|
|
8
|
+
elevation: 5;
|
|
9
|
+
background-color: #FFF;
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
export const Wrapper = styled.View`
|
|
13
|
+
width: ${(props: any) => props.width}px;
|
|
14
|
+
height: ${(props: any) => props.height}px;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
export const WrapperFloatBtn = styled.View`
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 10%;
|
|
20
|
+
right: ${(props: any) => props.outside ? 11 : 58}%;
|
|
21
|
+
z-index: 20002;
|
|
22
|
+
elevation: 11;
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export const IconControl = styled.TouchableOpacity`
|
|
26
|
+
background-color: ${(props: any) => props.theme.colors.white};
|
|
27
|
+
padding: 10px;
|
|
28
|
+
border-radius: 8px;
|
|
29
|
+
elevation: 11;
|
|
30
|
+
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import { TouchableOpacity, View, StyleSheet } from 'react-native'
|
|
3
3
|
import { LanguageSelector as LanguageSelectorController, useLanguage } from 'ordering-components/native'
|
|
4
4
|
import CountryPicker, { Flag } from 'react-native-country-picker-modal'
|
|
@@ -9,6 +9,7 @@ import { LanguageSelectorParams } from '../../types'
|
|
|
9
9
|
import { OText } from '../shared'
|
|
10
10
|
import MatarialIcon from "react-native-vector-icons/MaterialIcons"
|
|
11
11
|
import { useTheme } from 'styled-components/native'
|
|
12
|
+
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder'
|
|
12
13
|
const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
13
14
|
const {
|
|
14
15
|
languagesState,
|
|
@@ -18,7 +19,7 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
18
19
|
|
|
19
20
|
const theme = useTheme()
|
|
20
21
|
const [{loading}] = useLanguage()
|
|
21
|
-
|
|
22
|
+
const [isLoading, setIsLoading] = useState(true)
|
|
22
23
|
const styles = StyleSheet.create({
|
|
23
24
|
closeIcon: {
|
|
24
25
|
width: 48, marginLeft: 32
|
|
@@ -27,6 +28,15 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
27
28
|
marginLeft: 40
|
|
28
29
|
}
|
|
29
30
|
})
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (!isLoading) return
|
|
33
|
+
const loadingLanguage = setTimeout(() =>{
|
|
34
|
+
setIsLoading(false)
|
|
35
|
+
}, 1000);
|
|
36
|
+
return () => {
|
|
37
|
+
clearTimeout(loadingLanguage);
|
|
38
|
+
}
|
|
39
|
+
}, [])
|
|
30
40
|
|
|
31
41
|
const _languages = languagesState?.languages?.map((language: any) => {
|
|
32
42
|
return {
|
|
@@ -48,63 +58,73 @@ const LanguageSelectorUI = (props: LanguageSelectorParams) => {
|
|
|
48
58
|
const currentLanguageData = _languages?.find((item:any) => item.value == currentLanguage);
|
|
49
59
|
|
|
50
60
|
return (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
61
|
+
<>
|
|
62
|
+
{ isLoading ?
|
|
63
|
+
(<Container>
|
|
64
|
+
<Placeholder style={{ width: 130, paddingTop: 10 }} Animation={Fade}>
|
|
65
|
+
<PlaceholderLine height={15}/>
|
|
66
|
+
</Placeholder>
|
|
67
|
+
</Container>
|
|
68
|
+
):(
|
|
69
|
+
<Container>
|
|
70
|
+
{languagesState?.languages && (
|
|
71
|
+
<CountryPicker
|
|
72
|
+
countryCode={currentLanguageData?.countryCode}
|
|
73
|
+
visible={isCountryModalVisible}
|
|
74
|
+
onClose={() => setCountryModalVisible(false)}
|
|
75
|
+
withCountryNameButton
|
|
76
|
+
countryCodes={countryCodes}
|
|
77
|
+
closeButtonStyle={styles.closeIcon}
|
|
78
|
+
renderFlagButton={() => (
|
|
79
|
+
<TouchableOpacity
|
|
80
|
+
onPress={() => setCountryModalVisible(true)}
|
|
81
|
+
disabled={loading}
|
|
82
|
+
>
|
|
83
|
+
<LanguageItem>
|
|
84
|
+
<Flag
|
|
85
|
+
withEmoji
|
|
86
|
+
flagSize={24}
|
|
87
|
+
countryCode={currentLanguageData?.countryCode}
|
|
88
|
+
/>
|
|
89
|
+
<OText color={theme.colors.primary}>{currentLanguageData?.label}</OText>
|
|
90
|
+
<MatarialIcon name='keyboard-arrow-down' size={24}/>
|
|
91
|
+
</LanguageItem>
|
|
92
|
+
</TouchableOpacity>
|
|
93
|
+
)}
|
|
94
|
+
flatListProps={{
|
|
95
|
+
/* @ts-ignore */
|
|
96
|
+
keyExtractor: (item) => item.value,
|
|
97
|
+
data: _languages || [],
|
|
98
|
+
renderItem: ({item} : any) => (
|
|
99
|
+
<TouchableOpacity
|
|
100
|
+
onPress={() => {
|
|
101
|
+
/* @ts-ignore */
|
|
102
|
+
handleChangeLanguage(item.value);
|
|
103
|
+
setCountryModalVisible(false);
|
|
104
|
+
}}
|
|
105
|
+
disabled={loading}
|
|
106
|
+
>
|
|
107
|
+
<LanguageItem>
|
|
108
|
+
<View style={styles.flagsContainer} />
|
|
109
|
+
<Flag
|
|
110
|
+
withEmoji
|
|
111
|
+
flagSize={24}
|
|
112
|
+
/* @ts-ignore */
|
|
113
|
+
countryCode={item.countryCode}
|
|
114
|
+
/>
|
|
115
|
+
<OText>{
|
|
116
|
+
/* @ts-ignore */
|
|
117
|
+
item.label
|
|
118
|
+
}</OText>
|
|
119
|
+
</LanguageItem>
|
|
120
|
+
</TouchableOpacity>
|
|
121
|
+
)
|
|
122
|
+
}}
|
|
123
|
+
/>
|
|
75
124
|
)}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
data: _languages || [],
|
|
80
|
-
renderItem: ({item} : any) => (
|
|
81
|
-
<TouchableOpacity
|
|
82
|
-
onPress={() => {
|
|
83
|
-
/* @ts-ignore */
|
|
84
|
-
handleChangeLanguage(item.value);
|
|
85
|
-
setCountryModalVisible(false);
|
|
86
|
-
}}
|
|
87
|
-
disabled={loading}
|
|
88
|
-
>
|
|
89
|
-
<LanguageItem>
|
|
90
|
-
<View style={styles.flagsContainer} />
|
|
91
|
-
<Flag
|
|
92
|
-
withEmoji
|
|
93
|
-
flagSize={24}
|
|
94
|
-
/* @ts-ignore */
|
|
95
|
-
countryCode={item.countryCode}
|
|
96
|
-
/>
|
|
97
|
-
<OText>{
|
|
98
|
-
/* @ts-ignore */
|
|
99
|
-
item.label
|
|
100
|
-
}</OText>
|
|
101
|
-
</LanguageItem>
|
|
102
|
-
</TouchableOpacity>
|
|
103
|
-
)
|
|
104
|
-
}}
|
|
105
|
-
/>
|
|
106
|
-
)}
|
|
107
|
-
</Container>
|
|
125
|
+
</Container>
|
|
126
|
+
)}
|
|
127
|
+
</>
|
|
108
128
|
)
|
|
109
129
|
}
|
|
110
130
|
|
|
@@ -33,7 +33,7 @@ import OptionSwitch, { Opt } from '../../components/shared/OOptionToggle';
|
|
|
33
33
|
import { verifyDecimals } from '../../../../../src/utils'
|
|
34
34
|
import { LANDSCAPE, PORTRAIT, useDeviceOrientation } from '../../../../../src/hooks/DeviceOrientation'
|
|
35
35
|
import { useTheme } from 'styled-components/native'
|
|
36
|
-
import { _retrieveStoreData } from '../../../../../src/providers/StoreUtil';
|
|
36
|
+
import { _retrieveStoreData, _setStoreData } from '../../../../../src/providers/StoreUtil';
|
|
37
37
|
import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons'
|
|
38
38
|
import EvilIcons from 'react-native-vector-icons/EvilIcons'
|
|
39
39
|
const _EMAIL = 'email';
|
|
@@ -218,6 +218,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
218
218
|
}
|
|
219
219
|
getCustomerName()
|
|
220
220
|
const redirectHome = setTimeout(() =>{
|
|
221
|
+
_setStoreData('customer_name', {customerName: ''});
|
|
221
222
|
navigation.reset({
|
|
222
223
|
routes: [{ name: 'Intro' }],
|
|
223
224
|
});
|
|
@@ -344,6 +345,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
344
345
|
<OButton
|
|
345
346
|
text={`${t('YOU_ARE_DONE', 'You are done! Click to close')}!`}
|
|
346
347
|
onClick={() => {
|
|
348
|
+
_setStoreData('customer_name', {customerName: ''});
|
|
347
349
|
navigation.reset({
|
|
348
350
|
routes: [{ name: 'Intro' }],
|
|
349
351
|
});
|