ordering-ui-react-native 0.21.21 → 0.21.23
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/NewOrderNotification/index.tsx +3 -1
- package/themes/original/src/components/AddressList/index.tsx +4 -7
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +2 -2
- package/themes/original/src/components/BusinessListingSearch/index.tsx +9 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +17 -2
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +1 -2
- package/themes/original/src/components/Checkout/index.tsx +10 -0
- package/themes/original/src/components/Messages/index.tsx +7 -3
- package/themes/original/src/components/OrderDetails/index.tsx +11 -2
- package/themes/original/src/components/PageBanner/index.tsx +3 -0
- package/themes/original/src/components/ProductForm/index.tsx +9 -12
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +31 -4
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +6 -1
- package/themes/original/src/components/UserFormDetails/index.tsx +2 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +30 -36
- package/themes/original/src/components/Wallets/index.tsx +6 -6
package/package.json
CHANGED
|
@@ -45,7 +45,9 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
45
45
|
},
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
const
|
|
48
|
+
const soundSrc = 'https://d33aymufw4jvwf.cloudfront.net/notification.mp3' ?? theme.sounds.notification
|
|
49
|
+
|
|
50
|
+
const notificationSound = new Sound(soundSrc, '', () => { });
|
|
49
51
|
|
|
50
52
|
let _timeout: any = null
|
|
51
53
|
let times = 0
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useEffect } from 'react'
|
|
2
|
-
import { AddressList as AddressListController, useLanguage, useOrder
|
|
2
|
+
import { AddressList as AddressListController, useLanguage, useOrder } from 'ordering-components/native'
|
|
3
3
|
import { AddressItem, Container } from './styles'
|
|
4
4
|
import { Platform, RefreshControl, StyleSheet, View } from 'react-native'
|
|
5
|
-
import { OButton, OText, OAlert,
|
|
5
|
+
import { OButton, OText, OAlert, OIcon } from '../shared'
|
|
6
6
|
import { AddressListParams } from '../../types'
|
|
7
7
|
import { NotFoundSource } from '../NotFoundSource'
|
|
8
8
|
import NavBar from '../NavBar'
|
|
@@ -18,12 +18,10 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
18
18
|
route,
|
|
19
19
|
addressList,
|
|
20
20
|
isFromProfile,
|
|
21
|
-
nopadding,
|
|
22
21
|
handleSetDefault,
|
|
23
22
|
handleDelete,
|
|
24
23
|
setAddressList,
|
|
25
24
|
isGoBack,
|
|
26
|
-
actionStatus,
|
|
27
25
|
isFromBusinesses,
|
|
28
26
|
isFromProductsList,
|
|
29
27
|
afterSignup,
|
|
@@ -34,7 +32,6 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
34
32
|
|
|
35
33
|
const [orderState] = useOrder()
|
|
36
34
|
const [, t] = useLanguage()
|
|
37
|
-
const [{ auth }] = useSession()
|
|
38
35
|
const [refreshing] = useState(false);
|
|
39
36
|
|
|
40
37
|
const [isProfile, setIsProfile] = useState(isFromProfile || route?.params?.isFromProfile);
|
|
@@ -296,8 +293,8 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
296
293
|
<OButton
|
|
297
294
|
text={t('ADD_NEW_ADDRESS', 'Add new Address')}
|
|
298
295
|
imgRightSrc=''
|
|
299
|
-
bgColor={theme.colors.
|
|
300
|
-
textStyle={{ color: theme.colors.
|
|
296
|
+
bgColor={theme.colors.primary}
|
|
297
|
+
textStyle={{ color: theme.colors.white }}
|
|
301
298
|
style={styles.button}
|
|
302
299
|
borderColor={theme.colors.primary}
|
|
303
300
|
onClick={() => !afterSignup ? onNavigationRedirect(
|
|
@@ -217,7 +217,7 @@ export const BusinessBasicInformation = (
|
|
|
217
217
|
<Placeholder Animation={Fade}>
|
|
218
218
|
<View style={{ flexDirection: 'row' }}>
|
|
219
219
|
{[...Array(5).keys()].map(i => (
|
|
220
|
-
<View style={styles.socialIcon} key={i}>
|
|
220
|
+
<View style={{ ...styles.socialIcon, borderWidth: 0 }} key={i}>
|
|
221
221
|
<PlaceholderLine width={100} height={20} style={{ marginBottom: 0 }} />
|
|
222
222
|
</View>
|
|
223
223
|
))}
|
|
@@ -270,10 +270,10 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
270
270
|
</BusinessLogo>
|
|
271
271
|
)}
|
|
272
272
|
</BusinessInfo>
|
|
273
|
-
<View style={{ width: '100%', flexDirection: 'row', justifyContent: 'space-between', marginTop: 5 }}>
|
|
273
|
+
<View style={{ width: '100%', flexDirection: 'row', justifyContent: 'space-between', marginTop: 5, alignItems: 'flex-start' }}>
|
|
274
274
|
<OText
|
|
275
275
|
size={textSize + 2}
|
|
276
|
-
style={{ lineHeight: 18, marginBottom: 6 }}
|
|
276
|
+
style={{ lineHeight: 18, marginBottom: 6, width: '90%' }}
|
|
277
277
|
weight={'500'}>
|
|
278
278
|
{business?.name}
|
|
279
279
|
</OText>
|
|
@@ -351,9 +351,15 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
351
351
|
onClick={() => onBusinessClick(business)}
|
|
352
352
|
textStyle={{ color: theme.colors.primary, fontSize: 10 }}
|
|
353
353
|
text={t('GO_TO_STORE', 'Go to store')}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
354
|
+
style={{
|
|
355
|
+
borderRadius: 23,
|
|
356
|
+
paddingLeft: 10,
|
|
357
|
+
paddingRight: 10,
|
|
358
|
+
height: 23,
|
|
359
|
+
shadowOpacity: 0,
|
|
360
|
+
backgroundColor: theme.colors.primaryContrast,
|
|
361
|
+
borderWidth: 0
|
|
362
|
+
}}
|
|
357
363
|
/>
|
|
358
364
|
</SingleBusinessContainer>
|
|
359
365
|
<ScrollView horizontal style={styles.productsContainer} contentContainerStyle={{ flexGrow: 1 }}>
|
|
@@ -45,6 +45,7 @@ import { ProfessionalFilter } from '../ProfessionalFilter';
|
|
|
45
45
|
import { ServiceForm } from '../ServiceForm';
|
|
46
46
|
import { BusinessesListing } from '../BusinessesListing/Layout/Original'
|
|
47
47
|
import { PageBanner } from '../PageBanner'
|
|
48
|
+
import { NavBack } from 'ordering-ui-react-native/src/components/OrderDetails/styles';
|
|
48
49
|
|
|
49
50
|
const PIXELS_TO_SCROLL = 2000
|
|
50
51
|
|
|
@@ -72,7 +73,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
72
73
|
handleUpdateProfessionals,
|
|
73
74
|
handleChangeProfessionalSelected,
|
|
74
75
|
onBusinessClick,
|
|
75
|
-
businessSingleId
|
|
76
|
+
businessSingleId,
|
|
77
|
+
productModal
|
|
76
78
|
} = props
|
|
77
79
|
|
|
78
80
|
const insets = useSafeAreaInsets()
|
|
@@ -191,7 +193,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
191
193
|
onRedirect('ProductDetails', {
|
|
192
194
|
product: product,
|
|
193
195
|
businessSlug: business.slug,
|
|
194
|
-
businessId: business.id,
|
|
196
|
+
businessId: business.id || product?.category?.business_id,
|
|
195
197
|
productAddedToCartLength
|
|
196
198
|
})
|
|
197
199
|
}
|
|
@@ -388,6 +390,19 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
388
390
|
}
|
|
389
391
|
}, [])
|
|
390
392
|
|
|
393
|
+
useEffect(() => {
|
|
394
|
+
if (!business && !loading && !error) {
|
|
395
|
+
showToast(ToastType.Error, t('BUSINESS_NOT_FOUND', 'Business not found'))
|
|
396
|
+
navigation.navigate('BusinessList')
|
|
397
|
+
}
|
|
398
|
+
}, [business, error, loading])
|
|
399
|
+
|
|
400
|
+
useEffect(() => {
|
|
401
|
+
if (productModal?.product && !productModal?.loading && !productModal?.error) {
|
|
402
|
+
onProductClick(props?.productModal?.product)
|
|
403
|
+
}
|
|
404
|
+
}, [productModal])
|
|
405
|
+
|
|
391
406
|
return (
|
|
392
407
|
<>
|
|
393
408
|
<View style={{ flex: 1, backgroundColor: backgroundColor }}>
|
|
@@ -42,10 +42,9 @@ export const FiltProductsContainer = styled.ScrollView`
|
|
|
42
42
|
|
|
43
43
|
export const BackgroundGray = styled.View`
|
|
44
44
|
flex: 1;
|
|
45
|
-
height:
|
|
45
|
+
height: 100%;
|
|
46
46
|
background-color: rgba(0,0,0,0.5);
|
|
47
47
|
position: absolute;
|
|
48
|
-
margin-top: 100px;
|
|
49
48
|
z-index: 10000;
|
|
50
49
|
width: 100%;
|
|
51
50
|
`
|
|
@@ -377,6 +377,16 @@ const CheckoutUI = (props: any) => {
|
|
|
377
377
|
setLengthMore((e.nativeEvent.lines.length == 3 && e.nativeEvent.lines[2].width > WIDTH_SCREEN * .76) || e.nativeEvent.lines.length > 3)
|
|
378
378
|
}, [])
|
|
379
379
|
|
|
380
|
+
useEffect(() => {
|
|
381
|
+
if (!cartState?.loading && (cartState?.error || typeof cartState?.cart === 'string')) {
|
|
382
|
+
const error = cartState?.error || typeof cartState.cart === 'string' && cartState.cart
|
|
383
|
+
if (error) {
|
|
384
|
+
showToast(ToastType.Error, cartState?.error || cartState.cart)
|
|
385
|
+
navigation.navigate('BusinessList')
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}, [cartState?.error, cartState?.cart, cartState?.loading])
|
|
389
|
+
|
|
380
390
|
return (
|
|
381
391
|
<>
|
|
382
392
|
<Container noPadding>
|
|
@@ -126,9 +126,13 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
126
126
|
const messageConsole = (message: any) => {
|
|
127
127
|
return message.change?.attribute !== 'driver_id'
|
|
128
128
|
?
|
|
129
|
-
`${t('ORDER', 'Order')} ${t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))} ${t('CHANGED_FROM', 'Changed from')} ${filterSpecialStatus.includes(message.change.attribute)
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
`${t('ORDER', 'Order')} ${t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))} ${t('CHANGED_FROM', 'Changed from')} ${filterSpecialStatus.includes(message.change.attribute)
|
|
130
|
+
? `${message.change.old === null ? '0' : message.change.old} ${t('TO', 'to')} ${message.change.new} ${t('MINUTES', 'Minutes')}`
|
|
131
|
+
: `${message.change?.attribute !== 'logistic_status'
|
|
132
|
+
? message.change.old !== null && t(ORDER_STATUS[parseInt(message.change.old, 10)])
|
|
133
|
+
: message.change.old !== null && getLogisticTag(message.change.old)} ${t('TO', 'to')} ${message.change?.attribute !== 'logistic_status'
|
|
134
|
+
? t(ORDER_STATUS[parseInt(message.change.new, 10)])
|
|
135
|
+
: getLogisticTag(message.change.new)}`
|
|
132
136
|
}`
|
|
133
137
|
: message.change.new
|
|
134
138
|
?
|
|
@@ -7,7 +7,9 @@ import {
|
|
|
7
7
|
OrderDetails as OrderDetailsConTableoller,
|
|
8
8
|
useUtils,
|
|
9
9
|
useOrder,
|
|
10
|
-
useConfig
|
|
10
|
+
useConfig,
|
|
11
|
+
useToast,
|
|
12
|
+
ToastType
|
|
11
13
|
} from 'ordering-components/native';
|
|
12
14
|
import { useTheme } from 'styled-components/native';
|
|
13
15
|
import { showLocation } from 'react-native-map-link';
|
|
@@ -65,7 +67,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
65
67
|
} = props;
|
|
66
68
|
|
|
67
69
|
const theme = useTheme();
|
|
68
|
-
|
|
70
|
+
const [, { showToast }] = useToast()
|
|
69
71
|
const styles = StyleSheet.create({
|
|
70
72
|
rowDirection: {
|
|
71
73
|
flexDirection: 'row',
|
|
@@ -336,6 +338,13 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
336
338
|
}
|
|
337
339
|
}, [driverLocation]);
|
|
338
340
|
|
|
341
|
+
useEffect(() => {
|
|
342
|
+
if (props?.order?.error && !props?.order?.loading) {
|
|
343
|
+
showToast(ToastType.Error, props?.order?.error)
|
|
344
|
+
navigation.navigate('BusinessList')
|
|
345
|
+
}
|
|
346
|
+
}, [props?.order?.error, props?.order?.loading])
|
|
347
|
+
|
|
339
348
|
return (
|
|
340
349
|
<OrderDetailsContainer
|
|
341
350
|
keyboardShouldPersistTaps="handled"
|
|
@@ -77,6 +77,7 @@ const PageBannerUI = (props: any) => {
|
|
|
77
77
|
const renderItem = ({ item, index }) => {
|
|
78
78
|
return (
|
|
79
79
|
<TouchableOpacity
|
|
80
|
+
activeOpacity={1}
|
|
80
81
|
onPress={() => handleGoToPage(item)}
|
|
81
82
|
>
|
|
82
83
|
<View style={styles.sliderWrapper}>
|
|
@@ -128,6 +129,7 @@ const PageBannerUI = (props: any) => {
|
|
|
128
129
|
{pageBannerState.banner?.items.length > 1 && (
|
|
129
130
|
<>
|
|
130
131
|
<TouchableOpacity
|
|
132
|
+
activeOpacity={1}
|
|
131
133
|
style={[styles.swiperButton, { left: 25 }]}
|
|
132
134
|
onPress={() => carouselRef.current.snapToPrev()}
|
|
133
135
|
>
|
|
@@ -138,6 +140,7 @@ const PageBannerUI = (props: any) => {
|
|
|
138
140
|
/>
|
|
139
141
|
</TouchableOpacity>
|
|
140
142
|
<TouchableOpacity
|
|
143
|
+
activeOpacity={1}
|
|
141
144
|
style={[styles.swiperButton, { right: 25 }]}
|
|
142
145
|
onPress={() => carouselRef.current.snapToNext()}
|
|
143
146
|
>
|
|
@@ -137,7 +137,9 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
137
137
|
},
|
|
138
138
|
slide1: {
|
|
139
139
|
flex: 1,
|
|
140
|
-
alignItems: 'center'
|
|
140
|
+
alignItems: 'center',
|
|
141
|
+
width: '100%',
|
|
142
|
+
marginLeft: 32
|
|
141
143
|
},
|
|
142
144
|
mainSwiper: {
|
|
143
145
|
height: 258,
|
|
@@ -371,12 +373,8 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
371
373
|
</>
|
|
372
374
|
);
|
|
373
375
|
|
|
374
|
-
const handleScroll = ({ nativeEvent: { contentOffset
|
|
376
|
+
const handleScroll = ({ nativeEvent: { contentOffset } }: any) => {
|
|
375
377
|
setShowTitle(contentOffset.y > 30)
|
|
376
|
-
const _topOption = Object.keys(optionLayout).find(((option: any) => Math.abs(contentOffset?.y - layoutMeasurement?.height - optionLayout[option]?.y) < 20))
|
|
377
|
-
if (_topOption) {
|
|
378
|
-
const _topOptionId = Number(_topOption.replace('id:', ''))
|
|
379
|
-
}
|
|
380
378
|
}
|
|
381
379
|
|
|
382
380
|
const handleGoBack = navigation?.canGoBack()
|
|
@@ -563,6 +561,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
563
561
|
ref={scrollViewRef}
|
|
564
562
|
contentContainerStyle={{ paddingBottom: 80 }}
|
|
565
563
|
stickyHeaderIndices={[2]}
|
|
564
|
+
scrollEventThrottle={100}
|
|
566
565
|
onScroll={handleScroll}
|
|
567
566
|
>
|
|
568
567
|
<WrapHeader onLayout={(event: any) => setHeaderRefHeight(event.nativeEvent.layout?.height)}>
|
|
@@ -760,6 +759,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
760
759
|
</ProductDescription>
|
|
761
760
|
<ScrollView
|
|
762
761
|
horizontal
|
|
762
|
+
scrollEventThrottle={100}
|
|
763
763
|
showsHorizontalScrollIndicator={false}
|
|
764
764
|
contentContainerStyle={{ paddingBottom: 30 }}
|
|
765
765
|
>
|
|
@@ -787,6 +787,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
787
787
|
{(!loading && product) && (
|
|
788
788
|
<ExtraOptionWrap
|
|
789
789
|
horizontal
|
|
790
|
+
scrollEventThrottle={100}
|
|
790
791
|
showsHorizontalScrollIndicator={false}
|
|
791
792
|
style={{
|
|
792
793
|
marginBottom: 20,
|
|
@@ -913,12 +914,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
913
914
|
}}>
|
|
914
915
|
{option?.suboptions?.sort((a: any, b: any) => a.rank - b.rank).map(
|
|
915
916
|
(suboption: any) => {
|
|
916
|
-
const currentState =
|
|
917
|
-
productCart.options[
|
|
918
|
-
`id:${option.id}`
|
|
919
|
-
]?.suboptions[
|
|
920
|
-
`id:${suboption.id}`
|
|
921
|
-
] || {};
|
|
917
|
+
const currentState = productCart.options[`id:${option.id}`]?.suboptions[`id:${suboption.id}`] || {};
|
|
922
918
|
const balance =
|
|
923
919
|
productCart.options[
|
|
924
920
|
`id:${option.id}`
|
|
@@ -933,6 +929,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
933
929
|
balance={balance}
|
|
934
930
|
option={option}
|
|
935
931
|
suboption={suboption}
|
|
932
|
+
image={option.image}
|
|
936
933
|
state={currentState}
|
|
937
934
|
disabled={
|
|
938
935
|
isSoldOut ||
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
import { useTheme } from 'styled-components/native';
|
|
8
8
|
import { StyleSheet, View } from 'react-native'
|
|
9
9
|
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
10
|
+
import FastImage from 'react-native-fast-image';
|
|
10
11
|
|
|
11
12
|
import {
|
|
12
13
|
Container,
|
|
@@ -14,7 +15,8 @@ import {
|
|
|
14
15
|
QuantityControl,
|
|
15
16
|
Checkbox,
|
|
16
17
|
PositionControl,
|
|
17
|
-
Circle
|
|
18
|
+
Circle,
|
|
19
|
+
Logo
|
|
18
20
|
} from './styles'
|
|
19
21
|
import { OIcon, OText } from '../shared'
|
|
20
22
|
|
|
@@ -29,7 +31,8 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
29
31
|
toggleSelect,
|
|
30
32
|
changePosition,
|
|
31
33
|
disabled,
|
|
32
|
-
setIsScrollAvailable
|
|
34
|
+
setIsScrollAvailable,
|
|
35
|
+
image
|
|
33
36
|
} = props
|
|
34
37
|
|
|
35
38
|
const disableIncrement = option?.limit_suboptions_by_max ? balance === option?.max || state.quantity === suboption?.max : state.quantity === suboption?.max || (!state.selected && balance === option?.max)
|
|
@@ -37,12 +40,24 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
37
40
|
|
|
38
41
|
const theme = useTheme();
|
|
39
42
|
const [, t] = useLanguage()
|
|
40
|
-
const [{ parsePrice }] = useUtils()
|
|
43
|
+
const [{ parsePrice, optimizeImage }] = useUtils()
|
|
41
44
|
const [showMessage, setShowMessage] = useState(false)
|
|
42
45
|
const [isDirty, setIsDirty] = useState(false)
|
|
43
46
|
|
|
44
47
|
const iconsSize = 20
|
|
45
48
|
|
|
49
|
+
const styles = StyleSheet.create({
|
|
50
|
+
icon: {
|
|
51
|
+
borderRadius: 7.6,
|
|
52
|
+
width: 60,
|
|
53
|
+
height: 60
|
|
54
|
+
},
|
|
55
|
+
logo: {
|
|
56
|
+
borderRadius: 10,
|
|
57
|
+
marginLeft: 3,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
|
|
46
61
|
const handleSuboptionClick = () => {
|
|
47
62
|
toggleSelect()
|
|
48
63
|
setIsDirty(true)
|
|
@@ -82,6 +97,18 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
82
97
|
<OIcon src={theme.images.general.radio_nor} color={theme.colors.disabled} width={16} />
|
|
83
98
|
)
|
|
84
99
|
)}
|
|
100
|
+
{image && (
|
|
101
|
+
<Logo style={styles.logo}>
|
|
102
|
+
<FastImage
|
|
103
|
+
style={styles.icon}
|
|
104
|
+
source={{
|
|
105
|
+
uri: optimizeImage(image, 'h_100,c_limit'),
|
|
106
|
+
priority: FastImage.priority.normal,
|
|
107
|
+
}}
|
|
108
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
109
|
+
/>
|
|
110
|
+
</Logo>
|
|
111
|
+
)}
|
|
85
112
|
<OText size={12} lineHeight={18} color={theme.colors.textSecondary} mLeft={5} style={{ flex: 1 }}>
|
|
86
113
|
{suboption?.name}
|
|
87
114
|
</OText>
|
|
@@ -141,7 +168,7 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
141
168
|
</PositionControl>
|
|
142
169
|
)}
|
|
143
170
|
{price > 0 && (
|
|
144
|
-
<OText size={12} lineHeight={18} color={theme.colors.textSecondary} style={{width: 70, maxWidth: 70}}>
|
|
171
|
+
<OText size={12} lineHeight={18} color={theme.colors.textSecondary} style={{ width: 70, maxWidth: 70 }}>
|
|
145
172
|
+ {parsePrice(price)}
|
|
146
173
|
</OText>
|
|
147
174
|
)}
|
|
@@ -10,7 +10,7 @@ export const Container = styled.TouchableOpacity`
|
|
|
10
10
|
export const IconControl = styled.TouchableOpacity`
|
|
11
11
|
flex-direction: row;
|
|
12
12
|
padding: 10px 0 10px 10px;
|
|
13
|
-
width:
|
|
13
|
+
width: 50%;
|
|
14
14
|
align-items: center;
|
|
15
15
|
`
|
|
16
16
|
|
|
@@ -32,3 +32,8 @@ export const Checkbox = styled.TouchableOpacity`
|
|
|
32
32
|
export const Circle = styled.TouchableOpacity`
|
|
33
33
|
margin: 0 1.5px;
|
|
34
34
|
`
|
|
35
|
+
|
|
36
|
+
export const Logo = styled.View`
|
|
37
|
+
height: 65px;
|
|
38
|
+
width: 65px;
|
|
39
|
+
`;
|
|
@@ -448,8 +448,8 @@ export const UserFormDetailsUI = (props: any) => {
|
|
|
448
448
|
? t('UPDATING', 'Updating...')
|
|
449
449
|
: t('UPDATE', 'Update')
|
|
450
450
|
}
|
|
451
|
-
bgColor={theme.colors.
|
|
452
|
-
textStyle={{ color: theme.colors.
|
|
451
|
+
bgColor={theme.colors.primary}
|
|
452
|
+
textStyle={{ color: theme.colors.white, fontSize: 14 }}
|
|
453
453
|
borderColor={theme.colors.primary}
|
|
454
454
|
isDisabled={formState.loading}
|
|
455
455
|
imgRightSrc={null}
|
|
@@ -288,43 +288,37 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
288
288
|
showCall={false}
|
|
289
289
|
btnStyle={{ paddingLeft: 0 }}
|
|
290
290
|
/>
|
|
291
|
-
<
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
icon={theme.images.general.camera}
|
|
313
|
-
borderColor={theme.colors.clear}
|
|
314
|
-
iconStyle={{ width: 20, height: 20 }}
|
|
315
|
-
style={{ maxWidth: 40, position: 'absolute', alignSelf: 'center', backgroundColor: '#000', opacity: 0.5 }}
|
|
316
|
-
onClick={() => handleImagePicker()}
|
|
317
|
-
/>
|
|
318
|
-
</CenterView>
|
|
319
|
-
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginVertical: 32, zIndex: 10 }} />
|
|
320
|
-
<Spinner visible={formState?.loading || verifyPhoneState?.loading} />
|
|
321
|
-
<UserFormDetailsUI
|
|
322
|
-
{...props}
|
|
323
|
-
isProfile
|
|
324
|
-
isEdit
|
|
325
|
-
setWillVerifyOtpState={setWillVerifyOtpState}
|
|
291
|
+
<CenterView>
|
|
292
|
+
<View style={styles.photo}>
|
|
293
|
+
{user?.photo ? (
|
|
294
|
+
<FastImage
|
|
295
|
+
style={{ height: 80, width: 80, borderRadius: 8 }}
|
|
296
|
+
source={{
|
|
297
|
+
uri: user?.photo,
|
|
298
|
+
priority: FastImage.priority.normal,
|
|
299
|
+
}}
|
|
300
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
301
|
+
/>
|
|
302
|
+
) : (
|
|
303
|
+
<Ionicons name='person-outline' size={50} />
|
|
304
|
+
)}
|
|
305
|
+
</View>
|
|
306
|
+
<OIconButton
|
|
307
|
+
icon={theme.images.general.camera}
|
|
308
|
+
borderColor={theme.colors.clear}
|
|
309
|
+
iconStyle={{ width: 20, height: 20 }}
|
|
310
|
+
style={{ maxWidth: 40, position: 'absolute', alignSelf: 'center', backgroundColor: '#000', opacity: 0.5 }}
|
|
311
|
+
onClick={() => handleImagePicker()}
|
|
326
312
|
/>
|
|
327
|
-
</
|
|
313
|
+
</CenterView>
|
|
314
|
+
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginVertical: 32, zIndex: 10 }} />
|
|
315
|
+
<Spinner visible={formState?.loading || verifyPhoneState?.loading} />
|
|
316
|
+
<UserFormDetailsUI
|
|
317
|
+
{...props}
|
|
318
|
+
isProfile
|
|
319
|
+
isEdit
|
|
320
|
+
setWillVerifyOtpState={setWillVerifyOtpState}
|
|
321
|
+
/>
|
|
328
322
|
</Container>
|
|
329
323
|
<OModal
|
|
330
324
|
open={isModalVisible}
|
|
@@ -73,7 +73,7 @@ const WalletsUI = (props: any) => {
|
|
|
73
73
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
74
74
|
const [openHistory, setOpenHistory] = useState(false)
|
|
75
75
|
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
76
|
-
const hideWalletsTheme = theme?.bar_menu?.components?.
|
|
76
|
+
const hideWalletsTheme = theme?.bar_menu?.components?.wallet?.hidden === true
|
|
77
77
|
|
|
78
78
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
79
79
|
|
|
@@ -128,10 +128,10 @@ const WalletsUI = (props: any) => {
|
|
|
128
128
|
...{
|
|
129
129
|
width: '100%',
|
|
130
130
|
display: 'flex',
|
|
131
|
-
flexDirection: hideWalletsTheme ? 'column' : 'row',
|
|
132
|
-
justifyContent: hideWalletsTheme ? 'flex-start' : 'space-between',
|
|
133
|
-
alignItems: hideWalletsTheme ? 'flex-start' : 'center',
|
|
134
|
-
marginTop: hideWalletsTheme ? 0 : 10,
|
|
131
|
+
flexDirection: !hideWalletsTheme ? 'column' : 'row',
|
|
132
|
+
justifyContent: !hideWalletsTheme ? 'flex-start' : 'space-between',
|
|
133
|
+
alignItems: !hideWalletsTheme ? 'flex-start' : 'center',
|
|
134
|
+
marginTop: !hideWalletsTheme ? 0 : 10,
|
|
135
135
|
},
|
|
136
136
|
}}>
|
|
137
137
|
<NavBar
|
|
@@ -151,7 +151,7 @@ const WalletsUI = (props: any) => {
|
|
|
151
151
|
imgRightSrc={null}
|
|
152
152
|
textStyle={{ fontSize: 12, color: theme.colors.disabled }}
|
|
153
153
|
onClick={() => setOpenHistory(true)}
|
|
154
|
-
style={{ borderRadius: 8, height: 40, width: hideWalletsTheme ? '100%' : 150, marginTop: hideWalletsTheme ? 10 : 0 }}
|
|
154
|
+
style={{ borderRadius: 8, height: 40, width: !hideWalletsTheme ? '100%' : 150, marginTop: !hideWalletsTheme ? 10 : 0 }}
|
|
155
155
|
/>
|
|
156
156
|
)}
|
|
157
157
|
</View>
|