ordering-ui-react-native 0.21.89 → 0.21.91
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
CHANGED
|
@@ -140,8 +140,10 @@ export const OrderSummary = ({ order, navigation, orderStatus, askBluetoothPermi
|
|
|
140
140
|
} </br>`
|
|
141
141
|
: ''
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
${order?.customer.zipcode ?
|
|
144
|
+
`${t('ZIPCODE', 'Zipcode')}: ${order?.customer.zipcode}`
|
|
145
|
+
: ''}
|
|
146
|
+
</p>
|
|
145
147
|
|
|
146
148
|
<h1>${t('BUSINESS_DETAILS', 'Business details')}</h1>
|
|
147
149
|
<p style="font-size: 27px">
|
|
@@ -241,15 +243,18 @@ export const OrderSummary = ({ order, navigation, orderStatus, askBluetoothPermi
|
|
|
241
243
|
: ''
|
|
242
244
|
}
|
|
243
245
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
246
|
+
${order?.summary?.delivery_price > 0 ?
|
|
247
|
+
` <div style="display: flex">
|
|
248
|
+
<div style="font-size: 26px; width: 70%; display: flex; justify-content: flex-start">
|
|
249
|
+
${t('DELIVERY_FEE', 'Delivery Fee')}
|
|
250
|
+
</div>
|
|
251
|
+
|
|
252
|
+
<div style="font-size: 26px; width: 30%; display: flex; justify-content: flex-end">
|
|
253
|
+
${parsePrice(order?.summary?.delivery_price ?? 0)}
|
|
254
|
+
</div>` :
|
|
255
|
+
''}
|
|
252
256
|
|
|
257
|
+
</div>
|
|
253
258
|
<div style="display: flex">
|
|
254
259
|
|
|
255
260
|
<div style="font-size: 26px; width: 70%; display: flex; justify-content: flex-start">
|
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import FastImage from 'react-native-fast-image'
|
|
3
|
-
import { StyleSheet, TouchableOpacity,
|
|
3
|
+
import { StyleSheet, TouchableOpacity, useWindowDimensions } from 'react-native';
|
|
4
4
|
import {
|
|
5
5
|
AddressDetails as AddressDetailsController,
|
|
6
6
|
useOrder,
|
|
7
7
|
useLanguage,
|
|
8
8
|
} from 'ordering-components/native';
|
|
9
|
+
import { useTheme } from 'styled-components/native';
|
|
9
10
|
|
|
10
11
|
import { ADContainer, ADHeader, ADAddress, ADMap } from './styles';
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import { OText, OIcon } from '../shared';
|
|
14
|
-
import { useWindowDimensions } from 'react-native';
|
|
12
|
+
import { OText } from '../shared';
|
|
13
|
+
import { getTypesText } from '../../utils';
|
|
15
14
|
|
|
16
15
|
const AddressDetailsUI = (props: any) => {
|
|
17
|
-
const {
|
|
18
|
-
|
|
16
|
+
const {
|
|
17
|
+
navigation,
|
|
18
|
+
addressToShow,
|
|
19
|
+
isCartPending,
|
|
20
|
+
googleMapsUrl,
|
|
21
|
+
apiKey
|
|
22
|
+
} = props;
|
|
19
23
|
|
|
20
24
|
const theme = useTheme();
|
|
21
25
|
const [orderState] = useOrder();
|
|
26
|
+
const [{ options }] = useOrder();
|
|
22
27
|
const [, t] = useLanguage();
|
|
23
28
|
const { width } = useWindowDimensions();
|
|
24
29
|
|
|
30
|
+
const orderTypeText = {
|
|
31
|
+
key: getTypesText(options?.type || 1),
|
|
32
|
+
value: t(getTypesText(options?.type || 1), 'Delivery')
|
|
33
|
+
}
|
|
34
|
+
|
|
25
35
|
const styles = StyleSheet.create({
|
|
26
36
|
productStyle: {
|
|
27
37
|
width,
|
|
@@ -39,7 +49,7 @@ const AddressDetailsUI = (props: any) => {
|
|
|
39
49
|
lineHeight={24}
|
|
40
50
|
color={theme.colors.textNormal}
|
|
41
51
|
>
|
|
42
|
-
{t(
|
|
52
|
+
{t(`${orderTypeText.key}_ADDRESS`, `${orderTypeText.value} address`)}
|
|
43
53
|
</OText>
|
|
44
54
|
)}
|
|
45
55
|
</ADHeader>
|
|
@@ -318,7 +318,7 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
318
318
|
</TopHeader>
|
|
319
319
|
</View>
|
|
320
320
|
</SafeAreaView>
|
|
321
|
-
<Container pt={0} noPadding onScroll={handleScroll}>
|
|
321
|
+
<Container pt={0} noPadding onScroll={handleScroll} showsVerticalScrollIndicator={false}>
|
|
322
322
|
<View style={styles.wrapperNavbar}>
|
|
323
323
|
<NavBar
|
|
324
324
|
hideArrowLeft
|