ordering-ui-react-native 0.18.11 → 0.18.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 +1 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +20 -17
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +4 -4
- package/themes/original/src/components/BusinessController/index.tsx +5 -5
- package/themes/original/src/components/Messages/index.tsx +1 -1
- package/themes/original/src/components/MultiCheckout/index.tsx +4 -2
- package/themes/original/src/components/OrderDetails/index.tsx +1 -1
- package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
package/package.json
CHANGED
|
@@ -7,13 +7,14 @@ import {
|
|
|
7
7
|
View,
|
|
8
8
|
KeyboardAvoidingView,
|
|
9
9
|
TextInput,
|
|
10
|
-
StyleSheet
|
|
10
|
+
StyleSheet,
|
|
11
|
+
TouchableOpacity
|
|
11
12
|
} from 'react-native';
|
|
12
13
|
import { useTheme } from 'styled-components/native';
|
|
13
14
|
import SelectDropdown from 'react-native-select-dropdown'
|
|
14
15
|
import { useLanguage } from 'ordering-components/native';
|
|
15
16
|
import { Content, Timer, TimeField, Header, Comments, CommentsButtonGroup, TopActions } from './styles';
|
|
16
|
-
import { OText, OButton, OTextarea,
|
|
17
|
+
import { OText, OButton, OTextarea, OIcon } from '../shared';
|
|
17
18
|
import { AcceptOrRejectOrderParams } from '../../types';
|
|
18
19
|
|
|
19
20
|
import { orderCommentList } from '../../../../../src/utils'
|
|
@@ -95,7 +96,7 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
95
96
|
upper: {
|
|
96
97
|
flex: 1,
|
|
97
98
|
zIndex: 1001,
|
|
98
|
-
paddingTop: isPage ? 30 :
|
|
99
|
+
paddingTop: isPage ? 30 : 40,
|
|
99
100
|
marginBottom: 10,
|
|
100
101
|
backgroundColor: theme.colors.backgroundPage
|
|
101
102
|
},
|
|
@@ -109,7 +110,18 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
109
110
|
bottom: {
|
|
110
111
|
textAlignVertical: "center",
|
|
111
112
|
textAlign: "center",
|
|
112
|
-
}
|
|
113
|
+
},
|
|
114
|
+
btnBackArrow: {
|
|
115
|
+
borderWidth: 0,
|
|
116
|
+
width: 32,
|
|
117
|
+
height: 32,
|
|
118
|
+
tintColor: theme.colors.textGray,
|
|
119
|
+
backgroundColor: theme.colors.clear,
|
|
120
|
+
borderColor: theme.colors.clear,
|
|
121
|
+
shadowColor: theme.colors.clear,
|
|
122
|
+
paddingLeft: 0,
|
|
123
|
+
paddingRight: 0
|
|
124
|
+
},
|
|
113
125
|
})
|
|
114
126
|
|
|
115
127
|
const handleFocus = () => {
|
|
@@ -299,18 +311,9 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
299
311
|
<View style={styles.parent}>
|
|
300
312
|
<View style={styles.upper}>
|
|
301
313
|
<TopActions>
|
|
302
|
-
<
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
iconStyle={{ width: 20, height: 20 }}
|
|
306
|
-
style={{
|
|
307
|
-
maxWidth: 40,
|
|
308
|
-
height: 35,
|
|
309
|
-
justifyContent: 'flex-end',
|
|
310
|
-
marginBottom: 10,
|
|
311
|
-
}}
|
|
312
|
-
onClick={() => handleArrowBack()}
|
|
313
|
-
/>
|
|
314
|
+
<TouchableOpacity onPress={() => handleArrowBack()} style={styles.btnBackArrow}>
|
|
315
|
+
<OIcon src={theme.images.general.arrow_left} color={theme.colors.textGray} />
|
|
316
|
+
</TouchableOpacity>
|
|
314
317
|
<OText
|
|
315
318
|
size={20}
|
|
316
319
|
color={theme.colors.textGray}
|
|
@@ -518,7 +521,7 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
518
521
|
imgRightSrc={null}
|
|
519
522
|
style={{ borderRadius: 7, height: 45 }}
|
|
520
523
|
parentStyle={{ width: '100%' }}
|
|
521
|
-
textStyle={{color: '#FFF', fontSize: 18 }}
|
|
524
|
+
textStyle={{ color: '#FFF', fontSize: 18 }}
|
|
522
525
|
isDisabled={!rejectReason && showTextArea}
|
|
523
526
|
onClick={() => handleAcceptOrReject()}
|
|
524
527
|
/>
|
|
@@ -285,8 +285,8 @@ export const BusinessBasicInformation = (
|
|
|
285
285
|
: { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
|
|
286
286
|
}
|
|
287
287
|
{...(!loading && {
|
|
288
|
-
source: (header || businessState?.business?.header) ? {
|
|
289
|
-
uri: optimizeImage(businessState?.business?.header, 'h_250,c_limit') || header
|
|
288
|
+
source: (header || businessState?.business?.header || typeof theme?.images?.dummies?.businessHeader === 'string') ? {
|
|
289
|
+
uri: optimizeImage(businessState?.business?.header, 'h_250,c_limit') || header || theme?.images?.dummies?.businessHeader
|
|
290
290
|
} : theme?.images?.dummies?.businessHeader
|
|
291
291
|
})}
|
|
292
292
|
imageStyle={{ opacity: isChewLayout ? 0.5 : 1 }}
|
|
@@ -317,11 +317,11 @@ export const BusinessBasicInformation = (
|
|
|
317
317
|
{!hideLogo && (
|
|
318
318
|
<BusinessLogo isChewLayout={isChewLayout}>
|
|
319
319
|
{!isBusinessInfoShow && (
|
|
320
|
-
logo || businessState?.business?.logo ?
|
|
320
|
+
logo || businessState?.business?.logo || typeof theme.images.dummies.businessLogo === 'string' ?
|
|
321
321
|
<FastImage
|
|
322
322
|
style={styles.logoStyle}
|
|
323
323
|
source={{
|
|
324
|
-
uri: logo || optimizeImage(businessState?.business?.logo, 'h_70,c_limit'),
|
|
324
|
+
uri: logo || optimizeImage(businessState?.business?.logo, 'h_70,c_limit') || theme.images.dummies.businessLogo,
|
|
325
325
|
priority: FastImage.priority.high,
|
|
326
326
|
cache: FastImage.cacheControl.web
|
|
327
327
|
}}
|
|
@@ -204,10 +204,10 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
204
204
|
{!hideBusinessHeader && (
|
|
205
205
|
<FastImage
|
|
206
206
|
style={{ height: isCustomLayout ? cardHeight * 0.66 : 120 }}
|
|
207
|
-
source={(businessHeader || business?.header) ? {
|
|
208
|
-
uri: optimizeImage(businessHeader || business?.header, 'h_500,c_limit'),
|
|
207
|
+
source={(businessHeader || business?.header || typeof theme.images.dummies.businessHeader === 'string') ? {
|
|
208
|
+
uri: optimizeImage(businessHeader || business?.header || theme.images.dummies.businessHeader, 'h_500,c_limit'),
|
|
209
209
|
priority: FastImage.priority.normal,
|
|
210
|
-
} : theme.images.dummies.businessHeader}
|
|
210
|
+
} : theme.images.dummies.businessHeader}
|
|
211
211
|
resizeMode={FastImage.resizeMode.cover}
|
|
212
212
|
/>
|
|
213
213
|
)}
|
|
@@ -247,8 +247,8 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
247
247
|
<BusinessLogo style={styles.businessLogo}>
|
|
248
248
|
<FastImage
|
|
249
249
|
style={{ width: 56, height: 56 }}
|
|
250
|
-
source={(businessLogo || business?.logo) ? {
|
|
251
|
-
uri: optimizeImage(businessLogo || business?.logo, 'h_150,c_limit'),
|
|
250
|
+
source={(businessLogo || business?.logo || typeof theme.images.dummies.businessLogo === 'string') ? {
|
|
251
|
+
uri: optimizeImage(businessLogo || business?.logo || theme.images.dummies.businessLogo, 'h_150,c_limit'),
|
|
252
252
|
priority: FastImage.priority.normal,
|
|
253
253
|
} : theme.images.dummies.businessLogo}
|
|
254
254
|
resizeMode={FastImage.resizeMode.cover}
|
|
@@ -280,7 +280,9 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
280
280
|
hideDriverTip={configs?.multi_business_checkout_show_combined_driver_tip?.value === '1'}
|
|
281
281
|
onNavigationRedirect={(route: string, params: any) => props.navigation.navigate(route, params)}
|
|
282
282
|
/>
|
|
283
|
-
|
|
283
|
+
{openCarts.length > 1 && (
|
|
284
|
+
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginTop: 13, marginHorizontal: -40 }} />
|
|
285
|
+
)}
|
|
284
286
|
</React.Fragment>
|
|
285
287
|
))}
|
|
286
288
|
{!cartGroup?.loading && openCarts.length === 0 && (
|
|
@@ -295,7 +297,7 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
295
297
|
{t('WARNING_PARTIAL_WALLET_CARTS', 'Important: One or more carts can`t be completed due a partial payment with cash/points wallet and requires to be paid individually')}
|
|
296
298
|
</OText>
|
|
297
299
|
)}
|
|
298
|
-
{openCarts.length >
|
|
300
|
+
{openCarts.length > 1 && (
|
|
299
301
|
<ChCartsTotal>
|
|
300
302
|
{totalCartsFee && configs?.multi_business_checkout_show_combined_delivery_fee?.value === '1' && (
|
|
301
303
|
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
@@ -192,7 +192,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
192
192
|
order: {
|
|
193
193
|
id: order?.id,
|
|
194
194
|
business_id: order?.business_id,
|
|
195
|
-
logo: order.business?.logo,
|
|
195
|
+
logo: order.business?.logo || theme.images.dummies.businessLogo,
|
|
196
196
|
driver: order?.driver,
|
|
197
197
|
products: order?.products,
|
|
198
198
|
review: order?.review,
|
|
@@ -283,8 +283,8 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
283
283
|
{!hideProductLogo && (
|
|
284
284
|
<FastImage
|
|
285
285
|
style={styles.productStyle}
|
|
286
|
-
source={product?.images ? {
|
|
287
|
-
uri: optimizeImage(product?.images, 'h_250,c_limit'),
|
|
286
|
+
source={product?.images || typeof theme?.images?.dummies?.product === 'string' ? {
|
|
287
|
+
uri: optimizeImage(product?.images || theme?.images?.dummies?.products, 'h_250,c_limit'),
|
|
288
288
|
priority: FastImage.priority.normal,
|
|
289
289
|
} : theme?.images?.dummies?.product}
|
|
290
290
|
resizeMode={FastImage.resizeMode.cover}
|