ordering-ui-react-native 0.17.54-release → 0.17.55-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/themes/business/src/components/AcceptOrRejectOrder/index.tsx +1 -1
- package/themes/business/src/components/Chat/index.tsx +1 -1
- package/themes/business/src/components/LoginForm/index.tsx +2 -2
- package/themes/business/src/components/NewOrderNotification/index.tsx +1 -1
- package/themes/business/src/components/NotFoundSource/index.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +1 -1
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +1 -1
- package/themes/business/src/components/OrderMessage/index.tsx +1 -1
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +2 -2
- package/themes/business/src/components/PreviousOrders/index.tsx +2 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +1 -1
- package/themes/business/src/components/StoresList/index.tsx +1 -2
- package/themes/kiosk/src/components/Intro/index.tsx +16 -1
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +1 -1
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -5
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +0 -18
- package/themes/original/src/components/BusinessProductsListing/index.tsx +2 -2
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +0 -1
- package/themes/original/src/components/PageBanner/index.tsx +31 -23
- package/themes/original/src/components/PageBanner/styles.tsx +0 -3
package/package.json
CHANGED
|
@@ -209,11 +209,11 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
209
209
|
props.handleChangeTab(val);
|
|
210
210
|
|
|
211
211
|
if (loginTab === 'email') {
|
|
212
|
-
scrollRefTab.current?.scrollToEnd({ animated: true });
|
|
212
|
+
scrollRefTab?.current?.scrollToEnd && scrollRefTab.current?.scrollToEnd({ animated: true });
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
if (loginTab === 'cellphone') {
|
|
216
|
-
scrollRefTab.current?.scrollTo({ animated: true });
|
|
216
|
+
scrollRefTab?.current?.scrollTo && scrollRefTab.current?.scrollTo({ animated: true });
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
219
|
|
|
@@ -97,7 +97,7 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
97
97
|
if (evtType === 3 || value.author_id === user.id) return
|
|
98
98
|
setTimeout(() => handlePlayNotificationSound({
|
|
99
99
|
evt: evtType,
|
|
100
|
-
orderId: value?.driver ? value?.order_id : evtList[evtType].event === 'messages' ? value?.order?.id : value?.
|
|
100
|
+
orderId: value?.driver ? value?.order_id : evtList[evtType].event === 'messages' ? value?.order?.id : value?.order_id
|
|
101
101
|
}), 1000)
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -18,7 +18,7 @@ export const NotFoundSource = (props: NotFoundSourceParams) => {
|
|
|
18
18
|
<OIcon src={errorImage} width={260} height={220} />
|
|
19
19
|
</NotFoundImage>
|
|
20
20
|
)}
|
|
21
|
-
{content && conditioned && !errorImage && (
|
|
21
|
+
{!!content && conditioned && !errorImage && (
|
|
22
22
|
<OText
|
|
23
23
|
color={theme.colors.textSecondary}
|
|
24
24
|
size={textSize ?? 18}
|
|
@@ -26,7 +26,7 @@ export const NotFoundSource = (props: NotFoundSourceParams) => {
|
|
|
26
26
|
{content}
|
|
27
27
|
</OText>
|
|
28
28
|
)}
|
|
29
|
-
{content && !conditioned && (
|
|
29
|
+
{!!content && !conditioned && (
|
|
30
30
|
<OText
|
|
31
31
|
color={theme.colors.textSecondary}
|
|
32
32
|
size={textSize ?? 18}
|
|
@@ -263,7 +263,7 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
|
|
|
263
263
|
)}
|
|
264
264
|
</>
|
|
265
265
|
</OText>
|
|
266
|
-
{!order?.isLogistic && order?.delivery_type && (!order?.order_group_id || !logisticOrderStatus?.includes(order?.status)) && (
|
|
266
|
+
{!order?.isLogistic && !!order?.delivery_type && (!order?.order_group_id || !logisticOrderStatus?.includes(order?.status)) && (
|
|
267
267
|
<>
|
|
268
268
|
<OText size={13}>
|
|
269
269
|
<OText size={13} weight='bold'>{`${t('ORDER_TYPE', 'Order Type')}: `}</OText>
|
|
@@ -149,7 +149,7 @@ export const OrderDetailsLogisticUI = (props: OrderDetailsLogisticParams) => {
|
|
|
149
149
|
keyboardShouldPersistTaps="handled"
|
|
150
150
|
showsVerticalScrollIndicator={false}
|
|
151
151
|
>
|
|
152
|
-
{order?.order_group && order?.order_group_id && order?.isLogistic ? order?.order_group?.orders.map((order: any, i: number, hash: any) => (
|
|
152
|
+
{order?.order_group && !!order?.order_group_id && order?.isLogistic ? order?.order_group?.orders.map((order: any, i: number, hash: any) => (
|
|
153
153
|
<OrderDetailsInformation key={order?.id} order={order} isOrderGroup lastOrder={hash?.length === i + 1} />
|
|
154
154
|
)) : (
|
|
155
155
|
<OrderDetailsInformation order={order} />
|
|
@@ -276,7 +276,7 @@ export const OrderMessageUI = (props: OrderDetailsParams) => {
|
|
|
276
276
|
|
|
277
277
|
<View style={styles.titleGroups}>
|
|
278
278
|
<View style={styles.shadow}>
|
|
279
|
-
{order?.business?.logo ? (
|
|
279
|
+
{!!order?.business?.logo ? (
|
|
280
280
|
<OIcon
|
|
281
281
|
url={optimizeImage(order?.business?.logo, 'h_300,c_limit')}
|
|
282
282
|
style={styles.titleIcons}
|
|
@@ -144,7 +144,7 @@ export const OrderItem = (props: any) => {
|
|
|
144
144
|
onPress={() => handlePressOrder({ ...order, logistic_order_id: _order?.id })}
|
|
145
145
|
>
|
|
146
146
|
<Card key={order.id}>
|
|
147
|
-
{allowColumns?.slaBar && (
|
|
147
|
+
{!!allowColumns?.slaBar && (
|
|
148
148
|
<Timestatus
|
|
149
149
|
style={{
|
|
150
150
|
backgroundColor: getStatusClassName(getDelayMinutes(order)) === 'in_time'
|
|
@@ -194,7 +194,7 @@ export const OrderItem = (props: any) => {
|
|
|
194
194
|
numberOfLines={1}
|
|
195
195
|
adjustsFontSizeToFit
|
|
196
196
|
>
|
|
197
|
-
{(order?.order_group_id && order?.order_group && isLogisticOrder
|
|
197
|
+
{(!!order?.order_group_id && order?.order_group && isLogisticOrder
|
|
198
198
|
? `${order?.order_group?.orders?.length} ${t('ORDERS', 'Orders')}`
|
|
199
199
|
: (t('NO', 'Order No.') + order.id)
|
|
200
200
|
) + ' · '}
|
|
@@ -371,7 +371,7 @@ export const PreviousOrders = (props: any) => {
|
|
|
371
371
|
})}
|
|
372
372
|
/>
|
|
373
373
|
)}
|
|
374
|
-
{deliveryPickupBtn && deliveryPickupBtn?.includes(_ordersGrouped[k][0]?.status) && (
|
|
374
|
+
{!!deliveryPickupBtn && deliveryPickupBtn?.includes(_ordersGrouped[k][0]?.status) && (
|
|
375
375
|
<AcceptOrRejectOrderStyle>
|
|
376
376
|
<OButton
|
|
377
377
|
text={t('PICKUP_FAILED', 'Pickup failed')}
|
|
@@ -403,7 +403,7 @@ export const PreviousOrders = (props: any) => {
|
|
|
403
403
|
/>
|
|
404
404
|
</AcceptOrRejectOrderStyle>
|
|
405
405
|
)}
|
|
406
|
-
{deliveryStatusCompleteBtn && deliveryStatusCompleteBtn.includes(_ordersGrouped[k][0]?.status) && (
|
|
406
|
+
{!!deliveryStatusCompleteBtn && deliveryStatusCompleteBtn.includes(_ordersGrouped[k][0]?.status) && (
|
|
407
407
|
<AcceptOrRejectOrderStyle>
|
|
408
408
|
<OButton
|
|
409
409
|
text={t('DELIVERY_FAILED', 'Delivery Failed')}
|
|
@@ -161,7 +161,7 @@ const ReviewCustomerUI = (props: ReviewCustomerParams) => {
|
|
|
161
161
|
useEffect(() => {
|
|
162
162
|
if (scrollref?.current) {
|
|
163
163
|
Keyboard.addListener('keyboardDidShow', () => {
|
|
164
|
-
scrollref?.current && scrollref.current.scrollToEnd()
|
|
164
|
+
scrollref?.current?.scrollToEnd && scrollref.current.scrollToEnd()
|
|
165
165
|
})
|
|
166
166
|
}
|
|
167
167
|
}, [scrollref?.current])
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { View, StyleSheet, Dimensions, Linking } from 'react-native';
|
|
3
|
-
import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler';
|
|
2
|
+
import { View, StyleSheet, Dimensions, Linking, ScrollView, TouchableOpacity } from 'react-native';
|
|
4
3
|
import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
|
|
5
4
|
import NetInfo from '@react-native-community/netinfo';
|
|
6
5
|
import { useTheme } from 'styled-components/native';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { StyleSheet, View,
|
|
2
|
+
import { StyleSheet, View, Pressable, TouchableOpacity } from 'react-native';
|
|
3
3
|
import { useLanguage } from 'ordering-components/native';
|
|
4
4
|
import { useTheme } from 'styled-components/native';
|
|
5
5
|
|
|
@@ -9,6 +9,7 @@ import OButton from '../../components/shared/OButton';
|
|
|
9
9
|
import { LanguageSelector } from '../../components/LanguageSelector';
|
|
10
10
|
import { LogoutPopup } from '../../components/LogoutPopup';
|
|
11
11
|
import { PORTRAIT, LANDSCAPE, useDeviceOrientation } from "../../../../../src/hooks/DeviceOrientation";
|
|
12
|
+
import { OIcon } from '../../components/shared';
|
|
12
13
|
|
|
13
14
|
const Intro = (props: any): React.ReactElement => {
|
|
14
15
|
const { navigation } = props;
|
|
@@ -41,6 +42,19 @@ const Intro = (props: any): React.ReactElement => {
|
|
|
41
42
|
// />
|
|
42
43
|
// }
|
|
43
44
|
// >
|
|
45
|
+
<>
|
|
46
|
+
<View style={{ position: 'absolute', top: 25, right: 20, zIndex: 1000 }}>
|
|
47
|
+
<TouchableOpacity
|
|
48
|
+
onPress={() => setShowLogoutPopup(true)}
|
|
49
|
+
>
|
|
50
|
+
<OIcon
|
|
51
|
+
src={theme.images.general.menulogout}
|
|
52
|
+
width={24}
|
|
53
|
+
height={24}
|
|
54
|
+
color={theme.colors.disabledContrast}
|
|
55
|
+
/>
|
|
56
|
+
</TouchableOpacity>
|
|
57
|
+
</View>
|
|
44
58
|
<Pressable onPress={goBusiness}>
|
|
45
59
|
<View style={{ height: orientationState?.dimensions?.height }}>
|
|
46
60
|
{orientationState.orientation === PORTRAIT ? (
|
|
@@ -134,6 +148,7 @@ const Intro = (props: any): React.ReactElement => {
|
|
|
134
148
|
/>
|
|
135
149
|
</View>
|
|
136
150
|
</Pressable>
|
|
151
|
+
</>
|
|
137
152
|
// </ScrollView>
|
|
138
153
|
);
|
|
139
154
|
};
|
|
@@ -146,7 +146,7 @@ export const BusinessBasicInformation = (
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
const getBusinessType = () => {
|
|
149
|
-
if (Object.keys(business).length <= 0) return t('GENERAL', 'General');
|
|
149
|
+
if (Object.keys(business || {}).length <= 0) return t('GENERAL', 'General');
|
|
150
150
|
const _types: any = [];
|
|
151
151
|
types.forEach(
|
|
152
152
|
(type) =>
|
|
@@ -33,11 +33,6 @@ export const WrapReviews = styled.View`
|
|
|
33
33
|
align-items: center;
|
|
34
34
|
justify-content: flex-start;
|
|
35
35
|
`;
|
|
36
|
-
export const WrapBusinessInfo = styled.TouchableOpacity`
|
|
37
|
-
position: absolute;
|
|
38
|
-
top: 16px;
|
|
39
|
-
end: 39px;
|
|
40
|
-
`;
|
|
41
36
|
|
|
42
37
|
export const TitleWrapper = styled.View`
|
|
43
38
|
width: 100%;
|
|
@@ -49,6 +44,7 @@ export const RibbonBox = styled.View`
|
|
|
49
44
|
padding: 2px 8px;
|
|
50
45
|
max-width: 180px;
|
|
51
46
|
align-self: flex-start;
|
|
47
|
+
margin-bottom: 5px;
|
|
52
48
|
|
|
53
49
|
${(props: any) => props.bgColor && css`
|
|
54
50
|
background-color: ${props.bgColor};
|
|
@@ -4,11 +4,6 @@ export const BContainer = styled.View`
|
|
|
4
4
|
padding: 20px 40px;
|
|
5
5
|
`
|
|
6
6
|
|
|
7
|
-
export const WrapHeader = styled.View`
|
|
8
|
-
width: 100%;
|
|
9
|
-
padding-vertical: 20px;
|
|
10
|
-
`
|
|
11
|
-
|
|
12
7
|
export const SearchWrapper = styled.View`
|
|
13
8
|
|
|
14
9
|
`
|
|
@@ -53,12 +48,6 @@ export const SingleBusinessContainer = styled.View`
|
|
|
53
48
|
justify-content: space-between;
|
|
54
49
|
`
|
|
55
50
|
|
|
56
|
-
export const LoadMoreBusinessContainer = styled.View`
|
|
57
|
-
align-items: center;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
margin-left: 20px;
|
|
60
|
-
`
|
|
61
|
-
|
|
62
51
|
export const TagsContainer = styled.View`
|
|
63
52
|
padding-bottom: 10px;
|
|
64
53
|
`
|
|
@@ -80,13 +69,6 @@ export const PriceFilterWrapper = styled.View`
|
|
|
80
69
|
margin-bottom: 20px;
|
|
81
70
|
`
|
|
82
71
|
|
|
83
|
-
export const OptionTitle = styled.View`
|
|
84
|
-
margin-top: 24px;
|
|
85
|
-
${(props: any) => props.titleContent && css`
|
|
86
|
-
margin-left: ${() => props.isBusinessesSearchList ? '0' : '40px'};
|
|
87
|
-
`}
|
|
88
|
-
`
|
|
89
|
-
|
|
90
72
|
export const WrapperButtons = styled.View`
|
|
91
73
|
flex-direction: row;
|
|
92
74
|
width: 100%;
|
|
@@ -691,8 +691,8 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
691
691
|
<ServiceForm
|
|
692
692
|
navigation={navigation}
|
|
693
693
|
product={currentProduct}
|
|
694
|
-
businessSlug={business
|
|
695
|
-
businessId={business
|
|
694
|
+
businessSlug={business?.slug}
|
|
695
|
+
businessId={business?.id}
|
|
696
696
|
professionalList={business?.professionals}
|
|
697
697
|
professionalSelected={professionalSelected}
|
|
698
698
|
handleChangeProfessional={handleChangeProfessionalSelected}
|
|
@@ -605,7 +605,6 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
605
605
|
<BusinessController
|
|
606
606
|
key={`${business.id}_` + i}
|
|
607
607
|
enableIntersection
|
|
608
|
-
isCustomLayout={isChewLayout}
|
|
609
608
|
business={business}
|
|
610
609
|
isBusinessOpen={business.open}
|
|
611
610
|
handleCustomClick={handleBusinessClick}
|
|
@@ -63,7 +63,11 @@ const PageBannerUI = (props: any) => {
|
|
|
63
63
|
businessSlug: slug,
|
|
64
64
|
businessId: action.business_id,
|
|
65
65
|
categoryId: action.category_id,
|
|
66
|
-
productId: action.product_id
|
|
66
|
+
productId: action.product_id,
|
|
67
|
+
isRedirect: 'business',
|
|
68
|
+
business: {
|
|
69
|
+
store: slug
|
|
70
|
+
}
|
|
67
71
|
})
|
|
68
72
|
}
|
|
69
73
|
const clickedBanner = pageBannerState.result.find(banner => banner.id === item?.banner_id)
|
|
@@ -121,33 +125,37 @@ const PageBannerUI = (props: any) => {
|
|
|
121
125
|
<>
|
|
122
126
|
{pageBannerState.banner?.items && pageBannerState.banner?.items.length > 0 && (
|
|
123
127
|
<PageBannerWrapper>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
128
|
+
{pageBannerState.banner?.items.length > 1 && (
|
|
129
|
+
<>
|
|
130
|
+
<TouchableOpacity
|
|
131
|
+
style={[styles.swiperButton, { left: 25 }]}
|
|
132
|
+
onPress={() => carouselRef.current.snapToPrev()}
|
|
133
|
+
>
|
|
134
|
+
<IconAntDesign
|
|
135
|
+
name="caretleft"
|
|
136
|
+
color={theme.colors.white}
|
|
137
|
+
size={13}
|
|
138
|
+
/>
|
|
139
|
+
</TouchableOpacity>
|
|
140
|
+
<TouchableOpacity
|
|
141
|
+
style={[styles.swiperButton, { right: 25 }]}
|
|
142
|
+
onPress={() => carouselRef.current.snapToNext()}
|
|
143
|
+
>
|
|
144
|
+
<IconAntDesign
|
|
145
|
+
name="caretright"
|
|
146
|
+
color={theme.colors.white}
|
|
147
|
+
size={13}
|
|
148
|
+
/>
|
|
149
|
+
</TouchableOpacity>
|
|
150
|
+
</>
|
|
151
|
+
)}
|
|
144
152
|
<Carousel
|
|
145
153
|
ref={carouselRef}
|
|
146
154
|
loop={pageBannerState.banner?.items.length > 1}
|
|
147
155
|
data={pageBannerState.banner?.items}
|
|
148
156
|
renderItem={renderItem}
|
|
149
|
-
sliderWidth={windowWidth
|
|
150
|
-
itemWidth={windowWidth
|
|
157
|
+
sliderWidth={windowWidth}
|
|
158
|
+
itemWidth={windowWidth}
|
|
151
159
|
inactiveSlideScale={1}
|
|
152
160
|
pagingEnabled
|
|
153
161
|
removeClippedSubviews={false}
|