ordering-ui-react-native 0.12.8 → 0.12.12
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 +2 -1
- package/src/assets/images/business_list_banner.jpg +0 -0
- package/src/components/Account/index.tsx +2 -2
- package/src/config.json +2 -2
- package/themes/business/src/components/OrderDetails/Delivery.tsx +3 -3
- package/themes/business/src/components/OrdersOption/index.tsx +30 -23
- package/themes/original/index.tsx +2 -0
- package/themes/original/src/components/BusinessesListing/index.tsx +7 -0
- package/themes/original/src/components/BusinessesListing/styles.tsx +6 -1
- package/themes/original/src/components/OrderProgress/index.tsx +208 -0
- package/themes/original/src/components/OrderProgress/styles.tsx +30 -0
- package/themes/original/src/components/ProductForm/index.tsx +159 -56
- package/themes/original/src/components/ProductForm/styles.tsx +1 -1
- package/themes/single-business/src/components/ActiveOrders/index.tsx +20 -19
- package/themes/single-business/src/components/BusinessProductsListing/index.tsx +4 -4
- package/themes/single-business/src/components/Cart/index.tsx +39 -47
- package/themes/single-business/src/components/Cart/styles.tsx +1 -0
- package/themes/single-business/src/components/LoginForm/index.tsx +147 -89
- package/themes/single-business/src/components/LoginForm/styles.tsx +33 -28
- package/themes/single-business/src/components/OrderDetails/index.tsx +32 -12
- package/themes/single-business/src/components/OrdersOption/index.tsx +50 -50
- package/themes/single-business/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/single-business/src/components/PreviousOrders/index.tsx +97 -83
- package/themes/single-business/src/components/PromotionCard/index.tsx +10 -2
- package/themes/single-business/src/components/Promotions/index.tsx +1 -1
- package/themes/single-business/src/components/ReviewOrder/index.tsx +299 -274
- package/themes/single-business/src/components/ReviewOrder/styles.tsx +23 -26
- package/themes/single-business/src/components/UpsellingProducts/index.tsx +230 -189
- package/themes/single-business/src/components/UpsellingProducts/styles.tsx +24 -18
- package/themes/single-business/src/types/index.tsx +10 -2
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
ProductForm as ProductOptions,
|
|
4
4
|
useSession,
|
|
5
5
|
useLanguage,
|
|
6
6
|
useOrder,
|
|
7
|
-
useUtils
|
|
7
|
+
useUtils
|
|
8
8
|
} from 'ordering-components/native';
|
|
9
9
|
import { useTheme } from 'styled-components/native';
|
|
10
10
|
import { ProductIngredient } from '../ProductIngredient';
|
|
11
11
|
import { ProductOption } from '../ProductOption';
|
|
12
|
+
import Swiper from 'react-native-swiper'
|
|
13
|
+
import FastImage from 'react-native-fast-image';
|
|
14
|
+
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
12
15
|
|
|
13
|
-
import { View, TouchableOpacity, StyleSheet, Dimensions, Platform } from 'react-native';
|
|
16
|
+
import { View, TouchableOpacity, StyleSheet, Dimensions, Platform, AppRegistry } from 'react-native';
|
|
14
17
|
|
|
15
18
|
import {
|
|
16
19
|
ProductHeader,
|
|
@@ -25,7 +28,7 @@ import {
|
|
|
25
28
|
WrapperSubOption,
|
|
26
29
|
ProductComment,
|
|
27
30
|
ProductActions,
|
|
28
|
-
ExtraOptionWrap
|
|
31
|
+
ExtraOptionWrap
|
|
29
32
|
} from './styles';
|
|
30
33
|
import { OButton, OIcon, OInput, OText } from '../shared';
|
|
31
34
|
import { ScrollView } from 'react-native-gesture-handler';
|
|
@@ -110,13 +113,30 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
110
113
|
borderBottomColor: theme.colors.border,
|
|
111
114
|
justifyContent: 'center',
|
|
112
115
|
},
|
|
116
|
+
slide1: {
|
|
117
|
+
flex: 1,
|
|
118
|
+
},
|
|
119
|
+
mainSwiper : {
|
|
120
|
+
height: 258,
|
|
121
|
+
},
|
|
122
|
+
swiperButton: {
|
|
123
|
+
marginHorizontal: 30,
|
|
124
|
+
alignItems: 'center',
|
|
125
|
+
justifyContent: 'center',
|
|
126
|
+
width: 32,
|
|
127
|
+
height: 32,
|
|
128
|
+
borderRadius: 16,
|
|
129
|
+
backgroundColor: 'rgba(255,255,255,0.3)'
|
|
130
|
+
}
|
|
113
131
|
});
|
|
114
132
|
|
|
115
|
-
const [{ parsePrice }] = useUtils();
|
|
133
|
+
const [{ parsePrice, optimizeImage }] = useUtils();
|
|
116
134
|
const [, t] = useLanguage();
|
|
117
135
|
const [orderState] = useOrder();
|
|
118
136
|
const [{ auth }] = useSession();
|
|
119
137
|
const { product, loading, error } = productObject;
|
|
138
|
+
const [gallery, setGallery] = useState([])
|
|
139
|
+
const [thumbsSwiper, setThumbsSwiper] = useState(0)
|
|
120
140
|
|
|
121
141
|
const { top, bottom } = useSafeAreaInsets();
|
|
122
142
|
const { height } = useWindowDimensions();
|
|
@@ -154,63 +174,76 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
154
174
|
return sel[0]?.id !== undefined;
|
|
155
175
|
};
|
|
156
176
|
|
|
177
|
+
const handleChangeMainIndex = (index: number) => {
|
|
178
|
+
setThumbsSwiper(index)
|
|
179
|
+
}
|
|
180
|
+
|
|
157
181
|
const handleRedirectLogin = () => {
|
|
158
182
|
onClose();
|
|
159
183
|
navigation.navigate('Login');
|
|
160
184
|
};
|
|
161
185
|
|
|
186
|
+
useEffect(() => {
|
|
187
|
+
const productImgList: any = []
|
|
188
|
+
product?.images && productImgList.push(product.images)
|
|
189
|
+
for (const img of product?.gallery) {
|
|
190
|
+
productImgList.push(img.file)
|
|
191
|
+
}
|
|
192
|
+
setGallery(productImgList)
|
|
193
|
+
}, [product])
|
|
194
|
+
|
|
162
195
|
const saveErrors =
|
|
163
196
|
orderState.loading ||
|
|
164
197
|
maxProductQuantity === 0 ||
|
|
165
198
|
Object.keys(errors).length > 0;
|
|
166
199
|
|
|
167
200
|
const ExtraOptions = ({ eID, options }: any) => (
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
201
|
+
<>
|
|
202
|
+
{product?.ingredients.length > 0 && (
|
|
203
|
+
<TouchableOpacity
|
|
204
|
+
key={`eopt_all_00`}
|
|
205
|
+
onPress={() => setSelectedOpt(-1)}
|
|
206
|
+
style={[
|
|
207
|
+
styles.extraItem,
|
|
208
|
+
{
|
|
209
|
+
borderBottomColor:
|
|
210
|
+
selOpt == -1 ? theme.colors.textNormal : theme.colors.border,
|
|
211
|
+
},
|
|
212
|
+
]}>
|
|
213
|
+
<OText
|
|
214
|
+
color={selOpt == -1 ? theme.colors.textNormal : theme.colors.textSecondary}
|
|
215
|
+
size={selOpt == -1 ? 14 : 12}
|
|
216
|
+
weight={selOpt == -1 ? '600' : 'normal'}>
|
|
217
|
+
{t('INGREDIENTS', 'Ingredients')}
|
|
218
|
+
</OText>
|
|
219
|
+
</TouchableOpacity>
|
|
220
|
+
)}
|
|
221
|
+
{options.map(({ id, name, respect_to }: any) => (
|
|
222
|
+
<React.Fragment key={`cont_key_${id}`}>
|
|
223
|
+
{respect_to == null && (
|
|
224
|
+
<TouchableOpacity
|
|
225
|
+
key={`eopt_key_${id}`}
|
|
226
|
+
onPress={() => setSelectedOpt(id)}
|
|
227
|
+
style={[
|
|
228
|
+
styles.extraItem,
|
|
229
|
+
{
|
|
230
|
+
borderBottomColor:
|
|
231
|
+
selOpt == id ? theme.colors.textNormal : theme.colors.border,
|
|
232
|
+
},
|
|
233
|
+
]}>
|
|
234
|
+
<OText
|
|
235
|
+
color={
|
|
236
|
+
selOpt == id ? theme.colors.textNormal : theme.colors.textSecondary
|
|
237
|
+
}
|
|
238
|
+
size={selOpt == id ? 14 : 12}
|
|
239
|
+
weight={selOpt == id ? '600' : 'normal'}>
|
|
240
|
+
{name}
|
|
241
|
+
</OText>
|
|
242
|
+
</TouchableOpacity>
|
|
243
|
+
)}
|
|
244
|
+
</React.Fragment>
|
|
245
|
+
))}
|
|
246
|
+
</>
|
|
214
247
|
);
|
|
215
248
|
|
|
216
249
|
return (
|
|
@@ -238,11 +271,81 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
238
271
|
</View>
|
|
239
272
|
) : (
|
|
240
273
|
<>
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
274
|
+
<Swiper
|
|
275
|
+
loop={false}
|
|
276
|
+
showsButtons={true}
|
|
277
|
+
style={styles.mainSwiper}
|
|
278
|
+
// index={thumbsSwiper}
|
|
279
|
+
onIndexChanged={(index) => handleChangeMainIndex(index)}
|
|
280
|
+
prevButton={
|
|
281
|
+
<View style={styles.swiperButton}>
|
|
282
|
+
<IconAntDesign
|
|
283
|
+
name="caretleft"
|
|
284
|
+
color={theme.colors.white}
|
|
285
|
+
size={13}
|
|
286
|
+
// style={styles.starIcon}
|
|
287
|
+
/>
|
|
288
|
+
</View>
|
|
289
|
+
}
|
|
290
|
+
nextButton={
|
|
291
|
+
<View style={styles.swiperButton}>
|
|
292
|
+
<IconAntDesign
|
|
293
|
+
name="caretright"
|
|
294
|
+
color={theme.colors.white}
|
|
295
|
+
size={13}
|
|
296
|
+
// style={styles.starIcon}
|
|
297
|
+
/>
|
|
298
|
+
</View>
|
|
299
|
+
}
|
|
300
|
+
>
|
|
301
|
+
{gallery.length > 0 && gallery.map((img, i) => (
|
|
302
|
+
<View
|
|
303
|
+
style={styles.slide1}
|
|
304
|
+
key={i}
|
|
305
|
+
>
|
|
306
|
+
<FastImage
|
|
307
|
+
style={{ height: '100%' }}
|
|
308
|
+
source={{
|
|
309
|
+
uri: optimizeImage(img, 'h_258,c_limit'),
|
|
310
|
+
priority: FastImage.priority.normal,
|
|
311
|
+
}}
|
|
312
|
+
/>
|
|
313
|
+
</View>
|
|
314
|
+
))}
|
|
315
|
+
</Swiper>
|
|
316
|
+
<ScrollView
|
|
317
|
+
horizontal
|
|
318
|
+
contentContainerStyle={{
|
|
319
|
+
paddingHorizontal: 30,
|
|
320
|
+
paddingVertical: 15
|
|
321
|
+
}}
|
|
322
|
+
>
|
|
323
|
+
{gallery.length > 0 && gallery.map((img, index) => (
|
|
324
|
+
<View
|
|
325
|
+
key={index}
|
|
326
|
+
style={{
|
|
327
|
+
height: 56,
|
|
328
|
+
borderRadius: 8,
|
|
329
|
+
margin: 8,
|
|
330
|
+
opacity: index === thumbsSwiper ? 1 : 0.8
|
|
331
|
+
}}
|
|
332
|
+
>
|
|
333
|
+
<OIcon
|
|
334
|
+
url={img}
|
|
335
|
+
style={{
|
|
336
|
+
borderColor: theme.colors.lightGray,
|
|
337
|
+
borderRadius: 8,
|
|
338
|
+
minHeight: '100%'
|
|
339
|
+
}}
|
|
340
|
+
width={56}
|
|
341
|
+
height={56}
|
|
342
|
+
cover
|
|
343
|
+
/>
|
|
344
|
+
{/* {thumbsSwiper === 2 && <OText color='red'>{index.toString()}</OText>}
|
|
345
|
+
{thumbsSwiper === 3 && <OText color='red'>{index.toString()}</OText>} */}
|
|
346
|
+
</View>
|
|
347
|
+
))}
|
|
348
|
+
</ScrollView>
|
|
246
349
|
</>
|
|
247
350
|
)}
|
|
248
351
|
</WrapHeader>
|
|
@@ -10,12 +10,11 @@ import {
|
|
|
10
10
|
BusinessInformation,
|
|
11
11
|
Price,
|
|
12
12
|
} from './styles';
|
|
13
|
-
import { View, StyleSheet } from 'react-native';
|
|
13
|
+
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
14
14
|
|
|
15
15
|
import { ActiveOrdersParams } from '../../types';
|
|
16
16
|
import moment from 'moment';
|
|
17
17
|
import { useTheme } from 'styled-components/native';
|
|
18
|
-
import { TouchableOpacity } from 'react-native-gesture-handler';
|
|
19
18
|
|
|
20
19
|
export const ActiveOrders = (props: ActiveOrdersParams) => {
|
|
21
20
|
const {
|
|
@@ -85,11 +84,11 @@ export const ActiveOrders = (props: ActiveOrdersParams) => {
|
|
|
85
84
|
<OText size={12} lineHeight={18}>
|
|
86
85
|
{parsePrice(order?.summary?.total || order?.total)}
|
|
87
86
|
</OText>
|
|
88
|
-
{!isPreorders &&
|
|
87
|
+
{/* {!isPreorders &&
|
|
89
88
|
<TouchableOpacity onPress={handleLike}>
|
|
90
89
|
<OIcon src={theme.images.general.heart} color={theme.colors.red} width={16} />
|
|
91
90
|
</TouchableOpacity>
|
|
92
|
-
}
|
|
91
|
+
} */}
|
|
93
92
|
</Price>
|
|
94
93
|
</OrderInformation>
|
|
95
94
|
</Information>
|
|
@@ -98,21 +97,23 @@ export const ActiveOrders = (props: ActiveOrdersParams) => {
|
|
|
98
97
|
);
|
|
99
98
|
|
|
100
99
|
return (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
100
|
+
orders.length === 0 ? null : (
|
|
101
|
+
<>
|
|
102
|
+
<ActiveOrdersContainer isMiniCards={configs?.google_maps_api_key?.value}>
|
|
103
|
+
{orders.length > 0 &&
|
|
104
|
+
orders.map((order: any, index: any) => (
|
|
105
|
+
<Order key={order?.id || order?.uuid} order={order} index={index} />
|
|
106
|
+
))}
|
|
107
|
+
</ActiveOrdersContainer>
|
|
108
|
+
<View
|
|
109
|
+
style={{
|
|
110
|
+
height: 8,
|
|
111
|
+
backgroundColor: theme.colors.backgroundGray100,
|
|
112
|
+
marginHorizontal: -40,
|
|
113
|
+
}}
|
|
114
|
+
/>
|
|
115
|
+
</>
|
|
116
|
+
)
|
|
116
117
|
);
|
|
117
118
|
};
|
|
118
119
|
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from './styles'
|
|
24
24
|
import { FloatingButton } from '../FloatingButton'
|
|
25
25
|
import { ProductForm } from '../ProductForm'
|
|
26
|
-
import { UpsellingProducts } from '../UpsellingProducts'
|
|
26
|
+
// import { UpsellingProducts } from '../UpsellingProducts'
|
|
27
27
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
28
28
|
import { _setStoreData } from '../../providers/StoreUtil';
|
|
29
29
|
|
|
@@ -237,7 +237,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
237
237
|
btnLeftValue={currentCart?.products?.length}
|
|
238
238
|
btnRightValue={parsePrice(currentCart?.total)}
|
|
239
239
|
disabled={openUpselling || currentCart?.subtotal < currentCart?.minimum}
|
|
240
|
-
handleClick={() =>
|
|
240
|
+
handleClick={() => onRedirect('Cart')}
|
|
241
241
|
hasBottom
|
|
242
242
|
/>
|
|
243
243
|
)}
|
|
@@ -256,7 +256,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
256
256
|
onSave={handlerProductAction}
|
|
257
257
|
/>
|
|
258
258
|
</OModal>
|
|
259
|
-
{openUpselling && (
|
|
259
|
+
{/* {openUpselling && (
|
|
260
260
|
<UpsellingProducts
|
|
261
261
|
businessId={currentCart?.business_id}
|
|
262
262
|
business={currentCart?.business}
|
|
@@ -268,7 +268,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
268
268
|
canOpenUpselling={canOpenUpselling}
|
|
269
269
|
setCanOpenUpselling={setCanOpenUpselling}
|
|
270
270
|
/>
|
|
271
|
-
)}
|
|
271
|
+
)} */}
|
|
272
272
|
</>
|
|
273
273
|
)
|
|
274
274
|
}
|
|
@@ -54,6 +54,7 @@ const CartUI = (props: any) => {
|
|
|
54
54
|
const [curProduct, setCurProduct] = useState<any>(null)
|
|
55
55
|
const [openUpselling, setOpenUpselling] = useState(false)
|
|
56
56
|
const [canOpenUpselling, setCanOpenUpselling] = useState(false)
|
|
57
|
+
const [isUpsellingProducts, setIsUpsellingProducts] = useState(false)
|
|
57
58
|
|
|
58
59
|
const isCartPending = cart?.status === 2
|
|
59
60
|
const isCouponEnabled = validationFields?.fields?.checkout?.coupon?.enabled
|
|
@@ -100,6 +101,7 @@ const CartUI = (props: any) => {
|
|
|
100
101
|
<ScrollView
|
|
101
102
|
showsVerticalScrollIndicator={false}
|
|
102
103
|
showsHorizontalScrollIndicator={false}
|
|
104
|
+
style={{ height, backgroundColor: theme.colors.backgroundPage }}
|
|
103
105
|
>
|
|
104
106
|
<Container>
|
|
105
107
|
<Title>
|
|
@@ -126,7 +128,7 @@ const CartUI = (props: any) => {
|
|
|
126
128
|
onEditProduct={handleEditProduct}
|
|
127
129
|
/>
|
|
128
130
|
))}
|
|
129
|
-
|
|
131
|
+
|
|
130
132
|
{cart?.valid_products && (
|
|
131
133
|
<OSBill>
|
|
132
134
|
<OSTable>
|
|
@@ -218,27 +220,16 @@ const CartUI = (props: any) => {
|
|
|
218
220
|
{cart?.products?.length > 0 && (
|
|
219
221
|
<>
|
|
220
222
|
<LineDivider />
|
|
221
|
-
|
|
223
|
+
|
|
222
224
|
<Container>
|
|
223
|
-
<
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
<View
|
|
228
|
-
style={{
|
|
229
|
-
paddingTop: 20,
|
|
230
|
-
overflow: 'visible'
|
|
231
|
-
}}
|
|
225
|
+
<View style={{ padding: 0, }}>
|
|
226
|
+
<ScrollView
|
|
227
|
+
showsVerticalScrollIndicator={false}
|
|
228
|
+
showsHorizontalScrollIndicator={false}
|
|
232
229
|
>
|
|
233
|
-
<OText
|
|
234
|
-
size={16}
|
|
235
|
-
lineHeight={24}
|
|
236
|
-
weight={'500'}
|
|
237
|
-
>
|
|
238
|
-
{t('WANT_SOMETHING_ELSE', 'Do you want something else?')}
|
|
239
|
-
</OText>
|
|
240
230
|
<UpsellingProducts
|
|
241
231
|
isCustomMode
|
|
232
|
+
isShowTitle
|
|
242
233
|
openUpselling={openUpselling}
|
|
243
234
|
businessId={cart?.business_id}
|
|
244
235
|
business={cart?.business}
|
|
@@ -247,36 +238,37 @@ const CartUI = (props: any) => {
|
|
|
247
238
|
setCanOpenUpselling={setCanOpenUpselling}
|
|
248
239
|
handleUpsellingPage={handleUpsellingPage}
|
|
249
240
|
handleCloseUpsellingPage={() => { }}
|
|
241
|
+
handleUpsellingProducts={setIsUpsellingProducts}
|
|
250
242
|
/>
|
|
251
|
-
</
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
243
|
+
</ScrollView>
|
|
244
|
+
|
|
245
|
+
{cart?.valid_products && (
|
|
246
|
+
<CheckoutAction>
|
|
247
|
+
<OButton
|
|
248
|
+
text={(cart?.subtotal >= cart?.minimum || !cart?.minimum) && cart?.valid_address ? (
|
|
249
|
+
!openUpselling !== canOpenUpselling ? t('CHECKOUT', 'Checkout') : t('LOADING', 'Loading')
|
|
250
|
+
) : !cart?.valid_address ? (
|
|
251
|
+
`${t('OUT_OF_COVERAGE', 'Out of Coverage')}`
|
|
252
|
+
) : (
|
|
253
|
+
`${t('MINIMUN_SUBTOTAL_ORDER', 'Minimum subtotal order:')} ${parsePrice(cart?.minimum)}`
|
|
254
|
+
)}
|
|
255
|
+
bgColor={(cart?.subtotal < cart?.minimum || !cart?.valid_address) ? theme.colors.secundary : theme.colors.primary}
|
|
256
|
+
isDisabled={(openUpselling && !canOpenUpselling) || cart?.subtotal < cart?.minimum || !cart?.valid_address}
|
|
257
|
+
borderColor={theme.colors.primary}
|
|
258
|
+
imgRightSrc={null}
|
|
259
|
+
textStyle={{ color: 'white', textAlign: 'center', flex: 1 }}
|
|
260
|
+
onClick={() => props.onNavigationRedirect('CheckoutNavigator', {
|
|
261
|
+
screen: 'CheckoutPage',
|
|
262
|
+
cartUuid: cart?.uuid,
|
|
263
|
+
businessLogo: cart?.business?.logo,
|
|
264
|
+
businessName: cart?.business?.name,
|
|
265
|
+
cartTotal: cart?.total
|
|
266
|
+
})}
|
|
267
|
+
style={{ width: '100%', flexDirection: 'row', justifyContent: 'center', borderRadius: 7.6, shadowOpacity: 0 }}
|
|
268
|
+
/>
|
|
269
|
+
</CheckoutAction>
|
|
270
|
+
)}
|
|
271
|
+
</View>
|
|
280
272
|
</Container>
|
|
281
273
|
</>
|
|
282
274
|
)}
|