ordering-ui-react-native 0.16.68 → 0.16.69
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
|
@@ -48,75 +48,73 @@ export const ActiveOrders = (props: ActiveOrdersParams) => {
|
|
|
48
48
|
}, [orders.length])
|
|
49
49
|
|
|
50
50
|
const Order = ({ order }: { order: any }) => (
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<
|
|
51
|
+
<Card
|
|
52
|
+
isMiniCard={configs?.google_maps_api_key?.value}
|
|
53
|
+
onPress={() => handleClickCard(order?.uuid)}
|
|
54
|
+
>
|
|
55
|
+
{!!(configs?.google_maps_api_key?.value) && (
|
|
56
|
+
<Map>
|
|
57
|
+
<OIcon
|
|
58
|
+
url={getGoogleMapImage(order?.business?.location, configs?.google_maps_api_key?.value)}
|
|
59
|
+
height={100}
|
|
60
|
+
width={320}
|
|
61
|
+
style={{resizeMode: 'cover', borderTopRightRadius: 24, borderTopLeftRadius: 24}}
|
|
62
|
+
/>
|
|
63
|
+
</Map>
|
|
64
|
+
)}
|
|
65
|
+
<Information>
|
|
66
|
+
{!!order.business?.logo && (
|
|
67
|
+
<Logo>
|
|
58
68
|
<OIcon
|
|
59
|
-
url={
|
|
60
|
-
|
|
61
|
-
width={320}
|
|
62
|
-
style={{resizeMode: 'cover', borderTopRightRadius: 24, borderTopLeftRadius: 24}}
|
|
69
|
+
url={optimizeImage(order.business?.logo, 'h_300,c_limit')}
|
|
70
|
+
style={styles.logo}
|
|
63
71
|
/>
|
|
64
|
-
</
|
|
72
|
+
</Logo>
|
|
65
73
|
)}
|
|
66
|
-
<
|
|
67
|
-
{
|
|
68
|
-
<
|
|
69
|
-
<OIcon
|
|
70
|
-
url={optimizeImage(order.business?.logo, 'h_300,c_limit')}
|
|
71
|
-
style={styles.logo}
|
|
72
|
-
/>
|
|
73
|
-
</Logo>
|
|
74
|
-
)}
|
|
75
|
-
<OrderInformation>
|
|
76
|
-
<BusinessInformation style={{ width: '60%' }}>
|
|
77
|
-
<GestureHandlerScrollView
|
|
78
|
-
showsVerticalScrollIndicator={false}
|
|
79
|
-
showsHorizontalScrollIndicator={false}
|
|
80
|
-
horizontal
|
|
81
|
-
>
|
|
82
|
-
<TouchableWithoutFeedback>
|
|
83
|
-
<View>
|
|
84
|
-
<OText
|
|
85
|
-
size={16}
|
|
86
|
-
numberOfLines={1}
|
|
87
|
-
ellipsizeMode='tail'
|
|
88
|
-
>
|
|
89
|
-
{order.business?.name}
|
|
90
|
-
</OText>
|
|
91
|
-
</View>
|
|
92
|
-
</TouchableWithoutFeedback>
|
|
93
|
-
</GestureHandlerScrollView>
|
|
94
|
-
<GestureHandlerScrollView
|
|
74
|
+
<OrderInformation>
|
|
75
|
+
<BusinessInformation style={{ width: '60%' }}>
|
|
76
|
+
<GestureHandlerScrollView
|
|
95
77
|
showsVerticalScrollIndicator={false}
|
|
96
78
|
showsHorizontalScrollIndicator={false}
|
|
97
79
|
horizontal
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
80
|
+
>
|
|
81
|
+
<TouchableWithoutFeedback>
|
|
82
|
+
<View>
|
|
83
|
+
<OText
|
|
84
|
+
size={16}
|
|
85
|
+
numberOfLines={1}
|
|
86
|
+
ellipsizeMode='tail'
|
|
87
|
+
>
|
|
88
|
+
{order.business?.name}
|
|
89
|
+
</OText>
|
|
90
|
+
</View>
|
|
91
|
+
</TouchableWithoutFeedback>
|
|
92
|
+
</GestureHandlerScrollView>
|
|
93
|
+
<GestureHandlerScrollView
|
|
94
|
+
showsVerticalScrollIndicator={false}
|
|
95
|
+
showsHorizontalScrollIndicator={false}
|
|
96
|
+
horizontal
|
|
97
|
+
>
|
|
98
|
+
<TouchableWithoutFeedback>
|
|
99
|
+
<View style={styles.orderNumber}>
|
|
100
|
+
<OText size={12} space color={theme.colors.textSecondary}>{t('ORDER_NUMBER', 'Order No.')}</OText>
|
|
101
|
+
<OText size={12} color={theme.colors.textSecondary}>{order.id}</OText>
|
|
102
|
+
</View>
|
|
103
|
+
</TouchableWithoutFeedback>
|
|
104
|
+
</GestureHandlerScrollView>
|
|
105
|
+
<OText size={12} color={theme.colors.textSecondary}>{order?.delivery_datetime_utc
|
|
106
|
+
? parseDate(order?.delivery_datetime_utc)
|
|
107
|
+
: parseDate(order?.delivery_datetime, { utc: false })}</OText>
|
|
108
|
+
</BusinessInformation>
|
|
109
|
+
<Price>
|
|
110
|
+
<OText size={16}>{parsePrice(order?.summary?.total || order?.total)}</OText>
|
|
111
|
+
{order?.status !== 0 && (
|
|
112
|
+
<OText color={theme.colors.primary} size={12} numberOfLines={2}>{getOrderStatus(order.status)?.value}</OText>
|
|
113
|
+
)}
|
|
114
|
+
</Price>
|
|
115
|
+
</OrderInformation>
|
|
116
|
+
</Information>
|
|
117
|
+
</Card>
|
|
120
118
|
)
|
|
121
119
|
|
|
122
120
|
return (
|
|
@@ -2,7 +2,7 @@ import styled from 'styled-components/native'
|
|
|
2
2
|
|
|
3
3
|
export const ActiveOrdersContainer = styled.ScrollView`
|
|
4
4
|
margin-bottom: 20px;
|
|
5
|
-
height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '
|
|
5
|
+
height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '450px'};
|
|
6
6
|
max-height: ${({ isMiniCards }: { isMiniCards: boolean }) => !isMiniCards ? '150px' : '220px'};
|
|
7
7
|
`
|
|
8
8
|
|