ordering-ui-react-native 0.16.72-release → 0.16.73-release
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/src/components/OrderCreating/index.tsx +2 -2
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +2 -2
- package/themes/business/src/components/LoginForm/Otp/index.tsx +120 -0
- package/themes/business/src/components/LoginForm/Otp/styles.tsx +7 -0
- package/themes/business/src/components/LoginForm/index.tsx +235 -80
- package/themes/business/src/components/LoginForm/styles.tsx +10 -0
- package/themes/business/src/components/ProductItemAccordion/index.tsx +21 -3
- package/themes/business/src/types/index.tsx +15 -0
- package/themes/business/src/utils/index.tsx +16 -0
- package/themes/kiosk/src/components/LoginForm/Otp/index.tsx +92 -0
- package/themes/kiosk/src/components/LoginForm/Otp/styles.tsx +7 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +473 -151
- package/themes/kiosk/src/components/LoginForm/styles.tsx +14 -1
- package/themes/kiosk/src/components/PhoneInputNumber/index.tsx +1 -0
- package/themes/kiosk/src/components/PhoneInputNumber/styles.tsx +1 -3
- package/themes/kiosk/src/components/shared/OModal.tsx +14 -11
- package/themes/kiosk/src/layouts/Container.tsx +7 -1
- package/themes/kiosk/src/types/index.d.ts +13 -0
- package/themes/kiosk/src/utils/index.tsx +15 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +12 -7
- package/themes/original/src/components/BusinessProductsListing/index.tsx +1 -0
- package/themes/original/src/components/Cart/index.tsx +3 -2
- package/themes/original/src/components/Checkout/index.tsx +4 -3
- package/themes/original/src/components/Favorite/index.tsx +1 -1
- package/themes/original/src/components/Help/index.tsx +2 -2
- package/themes/original/src/components/HelpGuide/index.tsx +2 -2
- package/themes/original/src/components/HelpGuide/styles.tsx +1 -0
- package/themes/original/src/components/Messages/index.tsx +8 -7
- package/themes/original/src/components/OrderDetails/index.tsx +8 -3
- package/themes/original/src/components/OrderProgress/index.tsx +2 -5
- package/themes/original/src/components/OrdersOption/index.tsx +17 -29
- package/themes/original/src/components/ProductForm/index.tsx +29 -2
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +1 -1
- package/themes/original/src/components/ProfessionalFilter/SingleProfessionalCard/index.tsx +108 -0
- package/themes/original/src/components/ProfessionalFilter/index.tsx +20 -50
- package/themes/original/src/components/ProfessionalProfile/index.tsx +1 -1
- package/themes/original/src/components/ServiceForm/index.tsx +11 -3
- package/themes/original/src/components/Sessions/index.tsx +11 -8
- package/themes/original/src/components/Sessions/styles.tsx +5 -0
- package/themes/original/src/components/SingleProductCard/index.tsx +62 -24
- package/themes/original/src/components/SingleProductCard/styles.tsx +12 -4
- package/themes/original/src/components/UpsellingProducts/index.tsx +3 -3
- package/themes/original/src/components/UserProfileForm/index.tsx +3 -1
- package/themes/original/src/components/UserProfileForm/styles.tsx +1 -1
- package/themes/original/src/components/Wallets/index.tsx +4 -3
- package/themes/original/src/types/index.tsx +2 -1
- package/themes/original/src/utils/index.tsx +12 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { ScrollView, TouchableOpacity, View, StyleSheet
|
|
3
|
-
import {
|
|
2
|
+
import { ScrollView, TouchableOpacity, View, StyleSheet } from 'react-native'
|
|
3
|
+
import { useLanguage } from 'ordering-components/native'
|
|
4
4
|
import { useTheme } from 'styled-components/native'
|
|
5
|
-
import
|
|
6
|
-
import { OIcon, OText, OModal } from '../shared'
|
|
5
|
+
import { OText, OModal } from '../shared'
|
|
7
6
|
import { ProfessionalProfile } from '../ProfessionalProfile'
|
|
8
7
|
import { ProfessionalFilterParams } from '../../types'
|
|
8
|
+
import { SingleProfessionalCard } from './SingleProfessionalCard'
|
|
9
9
|
|
|
10
10
|
export const ProfessionalFilter = (props: ProfessionalFilterParams) => {
|
|
11
11
|
const {
|
|
12
12
|
professionals,
|
|
13
13
|
professionalSelected,
|
|
14
|
-
handleChangeProfessionalSelected
|
|
14
|
+
handleChangeProfessionalSelected,
|
|
15
|
+
handleUpdateProfessionals
|
|
15
16
|
} = props
|
|
16
17
|
|
|
17
18
|
const theme = useTheme()
|
|
18
|
-
const [{ optimizeImage }] = useUtils()
|
|
19
19
|
const [, t] = useLanguage()
|
|
20
20
|
const [open, setOpen] = useState(false)
|
|
21
21
|
const [currentProfessional, setCurrentProfessional] = useState(null)
|
|
@@ -30,6 +30,11 @@ export const ProfessionalFilter = (props: ProfessionalFilterParams) => {
|
|
|
30
30
|
setOpen(false)
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
const onUpdateProfessionals = (id, changes) => {
|
|
34
|
+
const updatedProfessional = professionals.find(professional => professional.id === id)
|
|
35
|
+
handleUpdateProfessionals({ ...updatedProfessional, ...changes })
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
const styles = StyleSheet.create({
|
|
34
39
|
professionalItem: {
|
|
35
40
|
flexDirection: 'row',
|
|
@@ -39,12 +44,7 @@ export const ProfessionalFilter = (props: ProfessionalFilterParams) => {
|
|
|
39
44
|
borderWidth: 1,
|
|
40
45
|
marginRight: 12,
|
|
41
46
|
minHeight: 64
|
|
42
|
-
}
|
|
43
|
-
photoStyle: {
|
|
44
|
-
width: 42,
|
|
45
|
-
height: 42,
|
|
46
|
-
borderRadius: 7.6
|
|
47
|
-
}
|
|
47
|
+
}
|
|
48
48
|
})
|
|
49
49
|
|
|
50
50
|
return (
|
|
@@ -73,44 +73,14 @@ export const ProfessionalFilter = (props: ProfessionalFilterParams) => {
|
|
|
73
73
|
</OText>
|
|
74
74
|
</View>
|
|
75
75
|
</TouchableOpacity>
|
|
76
|
-
{professionals.map((professional: any
|
|
77
|
-
<
|
|
78
|
-
key={
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
borderColor: (professional?.id === professionalSelected?.id)
|
|
85
|
-
? theme.colors.primary
|
|
86
|
-
: theme.colors.border
|
|
87
|
-
}}
|
|
88
|
-
>
|
|
89
|
-
{professional?.photo ? (
|
|
90
|
-
<FastImage
|
|
91
|
-
style={styles.photoStyle}
|
|
92
|
-
source={{
|
|
93
|
-
uri: optimizeImage(professional?.photo, 'h_250,c_limit'),
|
|
94
|
-
priority: FastImage.priority.normal,
|
|
95
|
-
}}
|
|
96
|
-
resizeMode={FastImage.resizeMode.cover}
|
|
97
|
-
/>
|
|
98
|
-
) : (
|
|
99
|
-
<OIcon
|
|
100
|
-
src={theme?.images?.general?.user}
|
|
101
|
-
cover={false}
|
|
102
|
-
style={styles.photoStyle}
|
|
103
|
-
/>
|
|
104
|
-
)}
|
|
105
|
-
<OText
|
|
106
|
-
size={12}
|
|
107
|
-
style={{ marginLeft: 12 }}
|
|
108
|
-
weight={'400'}
|
|
109
|
-
>
|
|
110
|
-
{professional?.name} {professional?.lastname}
|
|
111
|
-
</OText>
|
|
112
|
-
</View>
|
|
113
|
-
</TouchableOpacity>
|
|
76
|
+
{professionals.map((professional: any) => (
|
|
77
|
+
<SingleProfessionalCard
|
|
78
|
+
key={professional.id}
|
|
79
|
+
professional={professional}
|
|
80
|
+
active={professional?.id === professionalSelected?.id}
|
|
81
|
+
handleProfessionalClick={handleOpenProfile}
|
|
82
|
+
handleUpdateProfessionals={onUpdateProfessionals}
|
|
83
|
+
/>
|
|
114
84
|
))}
|
|
115
85
|
</ScrollView>
|
|
116
86
|
<OModal
|
|
@@ -147,7 +147,7 @@ export const ProfessionalProfile = (props: ProfessionalProfileParams) => {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
useEffect(() => {
|
|
150
|
-
if (selectDate === null) return
|
|
150
|
+
if (selectDate === null || !professional?.schedule) return
|
|
151
151
|
const _times = getTimes(selectDate, professional)
|
|
152
152
|
setTimeList(_times)
|
|
153
153
|
}, [selectDate, professional])
|
|
@@ -110,16 +110,24 @@ const ServiceFormUI = (props: ServiceFormParams) => {
|
|
|
110
110
|
})
|
|
111
111
|
|
|
112
112
|
const isBusyTime = (professional: any) => {
|
|
113
|
-
if (
|
|
113
|
+
if (!dateSelected) return false
|
|
114
|
+
const startDay = moment(dateSelected).utc().format('d')
|
|
115
|
+
const isStartScheduleEnabled = professional?.schedule?.[startDay]?.enabled
|
|
114
116
|
const duration = product?.duration ?? 0
|
|
117
|
+
const endDay = moment(dateSelected).add(duration - 1, 'minutes').utc().format('d')
|
|
118
|
+
const isEndScheduleEnabled = professional?.schedule?.[endDay]?.enabled
|
|
119
|
+
if (!isStartScheduleEnabled || !isEndScheduleEnabled) return true
|
|
120
|
+
|
|
121
|
+
if (professional?.busy_times?.length === 0) return false
|
|
122
|
+
|
|
115
123
|
const busyTimes = isCartProduct
|
|
116
124
|
? professional?.busy_times.filter((item: any) => !(item.start === productCart?.calendar_event?.start && item.end === productCart?.calendar_event?.end))
|
|
117
125
|
: [...professional?.busy_times]
|
|
118
126
|
const valid = busyTimes.some((item: any) => {
|
|
119
127
|
return (moment.utc(item?.start).local().valueOf() <= moment(dateSelected).valueOf() &&
|
|
120
|
-
moment(dateSelected).valueOf()
|
|
128
|
+
moment(dateSelected).valueOf() < moment.utc(item?.end).local().valueOf()) ||
|
|
121
129
|
(moment.utc(item?.start).local().valueOf() <= moment(dateSelected).add(duration, 'minutes').valueOf() &&
|
|
122
|
-
moment(dateSelected).add(duration, 'minutes').valueOf()
|
|
130
|
+
moment(dateSelected).add(duration, 'minutes').valueOf() < moment.utc(item?.end).local().valueOf())
|
|
123
131
|
})
|
|
124
132
|
return valid
|
|
125
133
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { View, TouchableOpacity } from 'react-native'
|
|
2
|
+
import { View, TouchableOpacity, Platform } from 'react-native'
|
|
3
3
|
import { useLanguage, useSession, useUtils, Sessions as SessionsController } from 'ordering-components/native'
|
|
4
4
|
import NavBar from '../NavBar'
|
|
5
5
|
import { SessionsParams } from '../../types'
|
|
@@ -12,7 +12,8 @@ import AntIcon from 'react-native-vector-icons/AntDesign'
|
|
|
12
12
|
import {
|
|
13
13
|
SessionsWrapper,
|
|
14
14
|
SessionItem,
|
|
15
|
-
DurationWrapper
|
|
15
|
+
DurationWrapper,
|
|
16
|
+
Container
|
|
16
17
|
} from './styles'
|
|
17
18
|
|
|
18
19
|
export const SessionsUI = (props: SessionsParams) => {
|
|
@@ -27,7 +28,7 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
27
28
|
const [, t] = useLanguage()
|
|
28
29
|
const [{ user }] = useSession()
|
|
29
30
|
const [{ parseDate }] = useUtils()
|
|
30
|
-
|
|
31
|
+
const theme = useTheme()
|
|
31
32
|
const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
|
|
32
33
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
33
34
|
|
|
@@ -61,7 +62,9 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
return (
|
|
64
|
-
|
|
65
|
+
<Container
|
|
66
|
+
pdng={Platform.OS === 'ios' ? '10px' : '0'}
|
|
67
|
+
>
|
|
65
68
|
<NavBar
|
|
66
69
|
title={t('SESSIONS', 'Sessions')}
|
|
67
70
|
titleAlign={'center'}
|
|
@@ -77,11 +80,11 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
77
80
|
<SessionItem key={i}>
|
|
78
81
|
<Placeholder Animation={Fade}>
|
|
79
82
|
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
80
|
-
<View style={{ flex: 1}}>
|
|
83
|
+
<View style={{ flex: 1 }}>
|
|
81
84
|
<PlaceholderLine width={40} />
|
|
82
85
|
<PlaceholderLine width={40} />
|
|
83
86
|
</View>
|
|
84
|
-
<PlaceholderLine width={5}/>
|
|
87
|
+
<PlaceholderLine width={5} />
|
|
85
88
|
</View>
|
|
86
89
|
</Placeholder>
|
|
87
90
|
</SessionItem>
|
|
@@ -120,7 +123,7 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
120
123
|
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
121
124
|
/>
|
|
122
125
|
</SessionsWrapper>
|
|
123
|
-
|
|
126
|
+
) : (
|
|
124
127
|
<OText>{t('YOU_DONT_HAVE_ANY_SESSIONS', 'You don\'t have any sessions')}</OText>
|
|
125
128
|
)
|
|
126
129
|
)}
|
|
@@ -147,7 +150,7 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
147
150
|
onCancel={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
148
151
|
onClose={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
149
152
|
/>
|
|
150
|
-
|
|
153
|
+
</Container>
|
|
151
154
|
)
|
|
152
155
|
}
|
|
153
156
|
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
} from 'ordering-components/native';
|
|
12
12
|
import { useTheme } from 'styled-components/native';
|
|
13
13
|
import { SingleProductCardParams } from '../../types';
|
|
14
|
-
import { CardInfo, SoldOut, QuantityContainer, PricesContainer, RibbonBox, LogoWrapper } from './styles';
|
|
15
|
-
import { StyleSheet, View } from 'react-native';
|
|
14
|
+
import { CardInfo, SoldOut, QuantityContainer, PricesContainer, RibbonBox, LogoWrapper, TagsContainer } from './styles';
|
|
15
|
+
import { ScrollView, StyleSheet, TouchableWithoutFeedback, View } from 'react-native';
|
|
16
16
|
import { InView } from 'react-native-intersection-observer'
|
|
17
17
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
18
18
|
import { OButton, OIcon, OText } from '../shared';
|
|
@@ -39,14 +39,19 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
39
39
|
enableIntersection,
|
|
40
40
|
navigation,
|
|
41
41
|
businessId,
|
|
42
|
-
isPreviously
|
|
42
|
+
isPreviously,
|
|
43
|
+
viewString
|
|
43
44
|
} = props;
|
|
44
45
|
|
|
45
46
|
const theme = useTheme();
|
|
46
47
|
const hideAddButton = theme?.business_view?.components?.products?.components?.add_to_cart_button?.hidden ?? true
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
49
|
+
const hideProductDescription = theme?.business_view?.components?.products?.components?.product?.components?.description?.hidden
|
|
50
|
+
const hideProductLogo = viewString
|
|
51
|
+
? theme?.[viewString]?.components?.cart?.components?.products?.image?.hidden
|
|
52
|
+
: theme?.business_view?.components?.products?.components?.product?.components?.image?.hidden
|
|
49
53
|
const textSize = isChewLayout ? 12 : 10
|
|
54
|
+
const logoPosition = theme?.business_view?.components?.products?.components?.product?.components?.image?.position
|
|
50
55
|
|
|
51
56
|
const styles = StyleSheet.create({
|
|
52
57
|
container: {
|
|
@@ -99,7 +104,12 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
99
104
|
color: '#808080',
|
|
100
105
|
textDecorationLine: 'line-through',
|
|
101
106
|
marginLeft: 7,
|
|
102
|
-
marginRight:
|
|
107
|
+
marginRight: 0
|
|
108
|
+
},
|
|
109
|
+
productTagsStyle: {
|
|
110
|
+
width: 30,
|
|
111
|
+
height: 30,
|
|
112
|
+
marginRight: 5
|
|
103
113
|
}
|
|
104
114
|
});
|
|
105
115
|
|
|
@@ -168,7 +178,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
168
178
|
(style && { ...style })
|
|
169
179
|
]}
|
|
170
180
|
>
|
|
171
|
-
<View style={{ flexDirection: 'row' }}>
|
|
181
|
+
<View style={{ flexDirection: logoPosition === 'left' ? 'row-reverse' : 'row' }}>
|
|
172
182
|
{productAddedToCartLength > 0 && (
|
|
173
183
|
<QuantityContainer style={[styles.quantityContainer, {
|
|
174
184
|
transform: [{ translateX: 25 }, { translateY: -25 }],
|
|
@@ -205,15 +215,41 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
205
215
|
{product?.offer_price !== null && !!product?.in_offer && (
|
|
206
216
|
<OText style={styles.regularPriceStyle}>{product?.offer_price ? parsePrice(product?.offer_price) : ''}</OText>
|
|
207
217
|
)}
|
|
218
|
+
{!isPreviously && product?.tags && product?.tags.length > 0 && (
|
|
219
|
+
<ScrollView
|
|
220
|
+
showsVerticalScrollIndicator={false}
|
|
221
|
+
showsHorizontalScrollIndicator={false}
|
|
222
|
+
horizontal
|
|
223
|
+
style={{ marginLeft: 10 }}
|
|
224
|
+
contentContainerStyle={{flexGrow: 1}}
|
|
225
|
+
>
|
|
226
|
+
{product?.tags.map((tag: any, i: any) => (
|
|
227
|
+
<TouchableWithoutFeedback key={i}>
|
|
228
|
+
<TagsContainer>
|
|
229
|
+
<FastImage
|
|
230
|
+
style={styles.productTagsStyle}
|
|
231
|
+
source={tag.image ? {
|
|
232
|
+
uri: optimizeImage(tag.image, 'h_250,c_limit'),
|
|
233
|
+
priority: FastImage.priority.normal,
|
|
234
|
+
} : theme?.images?.dummies?.product}
|
|
235
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
236
|
+
/>
|
|
237
|
+
</TagsContainer>
|
|
238
|
+
</TouchableWithoutFeedback>
|
|
239
|
+
))}
|
|
240
|
+
</ScrollView>
|
|
241
|
+
)}
|
|
208
242
|
</PricesContainer>
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
243
|
+
{!hideProductDescription && (
|
|
244
|
+
<OText
|
|
245
|
+
size={textSize}
|
|
246
|
+
numberOfLines={!isPreviously ? 2 : 1}
|
|
247
|
+
ellipsizeMode="tail"
|
|
248
|
+
color={theme.colors.textSecondary}
|
|
249
|
+
style={styles.line15}>
|
|
250
|
+
{product?.description}
|
|
251
|
+
</OText>
|
|
252
|
+
)}
|
|
217
253
|
{isPreviously && (
|
|
218
254
|
<OText
|
|
219
255
|
size={textSize}
|
|
@@ -225,7 +261,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
225
261
|
</OText>
|
|
226
262
|
)}
|
|
227
263
|
</CardInfo>
|
|
228
|
-
<LogoWrapper>
|
|
264
|
+
<LogoWrapper logoPosition={logoPosition}>
|
|
229
265
|
{!!product?.ribbon?.enabled && (
|
|
230
266
|
<RibbonBox
|
|
231
267
|
bgColor={product?.ribbon?.color}
|
|
@@ -244,14 +280,16 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
244
280
|
</OText>
|
|
245
281
|
</RibbonBox>
|
|
246
282
|
)}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
283
|
+
{!hideProductLogo && (
|
|
284
|
+
<FastImage
|
|
285
|
+
style={styles.productStyle}
|
|
286
|
+
source={product?.images ? {
|
|
287
|
+
uri: optimizeImage(product?.images, 'h_250,c_limit'),
|
|
288
|
+
priority: FastImage.priority.normal,
|
|
289
|
+
} : theme?.images?.dummies?.product}
|
|
290
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
291
|
+
/>
|
|
292
|
+
)}
|
|
255
293
|
</LogoWrapper>
|
|
256
294
|
|
|
257
295
|
{(isSoldOut || maxProductQuantity <= 0) && (
|
|
@@ -27,7 +27,18 @@ export const PricesContainer = styled.View`
|
|
|
27
27
|
|
|
28
28
|
export const LogoWrapper = styled.View`
|
|
29
29
|
position: relative;
|
|
30
|
-
margin-left: 12px;
|
|
30
|
+
margin-left: ${(props) => !props.logoPosition || props.logoPosition === 'right' ? '12px' : '0px'};
|
|
31
|
+
margin-right: ${(props) => props.logoPosition === 'right' ? '0px' : '12px'};
|
|
32
|
+
`
|
|
33
|
+
export const WrapTags = styled.View`
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: row;
|
|
36
|
+
justify-content: flex-start;
|
|
37
|
+
margin-left: 10px;
|
|
38
|
+
`
|
|
39
|
+
export const TagsContainer = styled.View`
|
|
40
|
+
display: flex;
|
|
41
|
+
margin: auto;
|
|
31
42
|
`
|
|
32
43
|
|
|
33
44
|
export const RibbonBox = styled.View`
|
|
@@ -38,15 +49,12 @@ export const RibbonBox = styled.View`
|
|
|
38
49
|
background-color: ${(props: any) => props.theme.colors.primary};
|
|
39
50
|
padding: 1px 8px;
|
|
40
51
|
max-width: 60px;
|
|
41
|
-
|
|
42
52
|
${(props: any) => props.bgColor && css`
|
|
43
53
|
background-color: ${props.bgColor};
|
|
44
54
|
`}
|
|
45
|
-
|
|
46
55
|
${(props: any) => props.isRoundRect && css`
|
|
47
56
|
border-radius: 7.6px;
|
|
48
57
|
`}
|
|
49
|
-
|
|
50
58
|
${(props: any) => props.isCapsule && css`
|
|
51
59
|
border-radius: 50px;
|
|
52
60
|
`}
|
|
@@ -117,7 +117,7 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
117
117
|
if (upsellingProducts?.products?.length && !isFromCart) {
|
|
118
118
|
setCanOpenUpselling && setCanOpenUpselling(true)
|
|
119
119
|
} else {
|
|
120
|
-
handleUpsellingPage && handleUpsellingPage()
|
|
120
|
+
handleUpsellingPage && handleUpsellingPage(cart)
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -225,7 +225,7 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
225
225
|
style={{ ...styles.closeUpsellingButton }}
|
|
226
226
|
textStyle={{ color: theme.colors.white, fontSize: 14 }}
|
|
227
227
|
onClick={() => {
|
|
228
|
-
handleUpsellingPage()
|
|
228
|
+
handleUpsellingPage(cart)
|
|
229
229
|
setIsCheckout(true)
|
|
230
230
|
}}
|
|
231
231
|
/>
|
|
@@ -247,7 +247,7 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
247
247
|
<OBottomPopup
|
|
248
248
|
title={''}
|
|
249
249
|
open={openUpselling}
|
|
250
|
-
onClose={() => handleUpsellingPage()}
|
|
250
|
+
onClose={() => handleUpsellingPage(cart)}
|
|
251
251
|
isStatusBar
|
|
252
252
|
>
|
|
253
253
|
<UpsellingContent />
|
|
@@ -62,7 +62,8 @@ const WalletsUI = (props: any) => {
|
|
|
62
62
|
|
|
63
63
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
64
64
|
const [openHistory, setOpenHistory] = useState(false)
|
|
65
|
-
const isChewLayout = theme?.header?.components?.layout?.type
|
|
65
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
66
|
+
const hideWalletsTheme = theme?.bar_menu?.components?.wallets?.hidden
|
|
66
67
|
|
|
67
68
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
68
69
|
|
|
@@ -146,8 +147,8 @@ const WalletsUI = (props: any) => {
|
|
|
146
147
|
borderBottomWidth: 1,
|
|
147
148
|
borderBottomColor:
|
|
148
149
|
tabSelected === wallet.type
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
? theme.colors.textNormal
|
|
151
|
+
: theme.colors.border
|
|
151
152
|
}}
|
|
152
153
|
>
|
|
153
154
|
<OText>
|
|
@@ -765,7 +765,8 @@ export interface ServiceFormParams {
|
|
|
765
765
|
export interface ProfessionalFilterParams {
|
|
766
766
|
professionals?: any,
|
|
767
767
|
professionalSelected?: any,
|
|
768
|
-
handleChangeProfessionalSelected: any
|
|
768
|
+
handleChangeProfessionalSelected: any,
|
|
769
|
+
handleUpdateProfessionals?: any
|
|
769
770
|
}
|
|
770
771
|
|
|
771
772
|
export interface ProfessionalProfileParams {
|
|
@@ -355,6 +355,18 @@ export const priceList = [
|
|
|
355
355
|
{ level: '5', content: '$$$$$' }
|
|
356
356
|
]
|
|
357
357
|
|
|
358
|
+
export const getLogisticTag = (status: any) => {
|
|
359
|
+
const [, t] = useLanguage()
|
|
360
|
+
const keyList: any = {
|
|
361
|
+
0: t('PENDING', 'Pending'),
|
|
362
|
+
1: t('IN_PROGRESS', 'In progress'),
|
|
363
|
+
2: t('IN_QUEUE', 'In queue'),
|
|
364
|
+
3: t('EXPIRED', 'Expired'),
|
|
365
|
+
4: t('RESOLVED', 'Resolved'),
|
|
366
|
+
}
|
|
367
|
+
return keyList[status] ? keyList[status] : t('UNKNOWN', 'Unknown')
|
|
368
|
+
}
|
|
369
|
+
|
|
358
370
|
export const getOrderStatus = (s: string) => {
|
|
359
371
|
const status = parseInt(s);
|
|
360
372
|
const orderStatus = [
|