ordering-ui-react-native 0.16.31 → 0.16.32-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 +7 -5
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/ActiveOrders/index.tsx +61 -63
- package/src/components/ActiveOrders/styles.tsx +8 -14
- package/src/components/AddressForm/index.tsx +4 -1
- package/src/components/BusinessBasicInformation/index.tsx +11 -19
- package/src/components/BusinessInformation/index.tsx +33 -4
- package/src/components/BusinessInformation/styles.tsx +2 -2
- package/src/components/BusinessProductsList/index.tsx +10 -10
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +2 -1
- package/src/components/LanguageSelector/index.tsx +21 -16
- package/src/components/LoginForm/index.tsx +15 -0
- package/src/components/Messages/index.tsx +2 -2
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/OrderDetails/index.tsx +2 -20
- package/src/components/OrdersOption/index.tsx +54 -56
- package/src/components/PaymentOptions/index.tsx +335 -365
- package/src/components/PaymentOptionsWebView/index.tsx +120 -121
- package/src/components/ReviewDriver/index.tsx +1 -1
- package/src/components/ReviewOrder/index.tsx +2 -1
- package/src/components/ReviewProducts/index.tsx +11 -0
- package/src/components/SignupForm/index.tsx +15 -0
- package/src/components/SingleProductReview/index.tsx +8 -5
- package/src/components/StripeElementsForm/index.tsx +25 -16
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/components/shared/OBottomPopup.tsx +6 -2
- package/src/index.tsx +2 -0
- package/src/pages/BusinessesListing.tsx +7 -6
- package/src/pages/OrderDetails.tsx +1 -1
- package/src/pages/ReviewDriver.tsx +2 -2
- package/src/pages/ReviewOrder.tsx +2 -2
- package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
- package/src/utils/index.tsx +2 -1
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/BusinessController/index.tsx +2 -2
- package/themes/business/src/components/Chat/index.tsx +42 -34
- package/themes/business/src/components/DriverMap/index.tsx +7 -5
- package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
- package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
- package/themes/business/src/components/LoginForm/index.tsx +111 -74
- package/themes/business/src/components/MapView/index.tsx +12 -1
- package/themes/business/src/components/MessagesOption/index.tsx +11 -1
- package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
- package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
- package/themes/business/src/components/OrdersOption/index.tsx +65 -21
- package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
- package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
- package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
- package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
- package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
- package/themes/business/src/components/PreviousOrders/index.tsx +21 -23
- package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +1 -1
- package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
- package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
- package/themes/business/src/components/shared/ODropDown.tsx +42 -8
- package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
- package/themes/business/src/components/shared/OModal.tsx +40 -37
- package/themes/business/src/types/index.tsx +15 -9
- package/themes/business/src/utils/index.tsx +10 -0
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
- package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/types/index.d.ts +2 -0
- package/themes/original/index.tsx +4 -0
- package/themes/original/src/components/AddressDetails/index.tsx +1 -1
- package/themes/original/src/components/AddressForm/index.tsx +139 -135
- package/themes/original/src/components/AddressList/index.tsx +1 -1
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +311 -161
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
- package/themes/original/src/components/BusinessController/index.tsx +190 -113
- package/themes/original/src/components/BusinessController/styles.tsx +0 -7
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +4 -4
- package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +80 -128
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
- package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
- package/themes/original/src/components/BusinessProductsList/index.tsx +49 -52
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +172 -103
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -11
- package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +37 -25
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -4
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +254 -97
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +46 -2
- package/themes/original/src/components/BusinessesListing/index.tsx +95 -7
- package/themes/original/src/components/Cart/index.tsx +44 -12
- package/themes/original/src/components/Cart/styles.tsx +4 -0
- package/themes/original/src/components/CartContent/index.tsx +22 -16
- package/themes/original/src/components/Checkout/index.tsx +101 -61
- package/themes/original/src/components/Checkout/styles.tsx +0 -1
- package/themes/original/src/components/DriverTips/index.tsx +4 -4
- package/themes/original/src/components/DriverTips/styles.tsx +2 -1
- package/themes/original/src/components/Favorite/index.tsx +1 -0
- package/themes/original/src/components/FavoriteList/index.tsx +32 -2
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/GPSButton/index.tsx +20 -19
- package/themes/original/src/components/GoogleMap/index.tsx +20 -12
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
- package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
- package/themes/original/src/components/HelpGuide/index.tsx +9 -8
- package/themes/original/src/components/HelpOrder/index.tsx +9 -8
- package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
- package/themes/original/src/components/LoginForm/Otp/index.tsx +95 -72
- package/themes/original/src/components/LoginForm/index.tsx +83 -45
- package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
- package/themes/original/src/components/Messages/index.tsx +17 -17
- package/themes/original/src/components/MomentOption/index.tsx +1 -1
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -92
- package/themes/original/src/components/MultiCheckout/index.tsx +6 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
- package/themes/original/src/components/MyOrders/index.tsx +70 -6
- package/themes/original/src/components/NavBar/index.tsx +15 -9
- package/themes/original/src/components/NetworkError/index.tsx +5 -3
- package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
- package/themes/original/src/components/Notifications/index.tsx +148 -0
- package/themes/original/src/components/Notifications/styles.tsx +17 -0
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
- package/themes/original/src/components/OrderDetails/index.tsx +192 -37
- package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
- package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
- package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
- package/themes/original/src/components/OrderProgress/index.tsx +8 -2
- package/themes/original/src/components/OrderSummary/index.tsx +3 -36
- package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
- package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +97 -106
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
- package/themes/original/src/components/OrdersOption/index.tsx +71 -55
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +41 -23
- package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
- package/themes/original/src/components/PlaceSpot/index.tsx +243 -47
- package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
- package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
- package/themes/original/src/components/ProductForm/index.tsx +633 -664
- package/themes/original/src/components/ProductForm/styles.tsx +9 -8
- package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
- package/themes/original/src/components/ProductOption/index.tsx +1 -1
- package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
- package/themes/original/src/components/ProfessionalProfile/index.tsx +26 -14
- package/themes/original/src/components/ReviewDriver/index.tsx +6 -6
- package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
- package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
- package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
- package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
- package/themes/original/src/components/SearchBar/index.tsx +5 -3
- package/themes/original/src/components/ServiceForm/index.tsx +410 -258
- package/themes/original/src/components/SignupForm/index.tsx +350 -206
- package/themes/original/src/components/SingleOrderCard/index.tsx +229 -181
- package/themes/original/src/components/SingleOrderCard/styles.tsx +0 -7
- package/themes/original/src/components/SingleProductCard/index.tsx +199 -110
- package/themes/original/src/components/SingleProductCard/styles.tsx +1 -10
- package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
- package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
- package/themes/original/src/components/StripeElementsForm/index.tsx +15 -7
- package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
- package/themes/original/src/components/UserDetails/index.tsx +31 -17
- package/themes/original/src/components/UserFormDetails/index.tsx +74 -81
- package/themes/original/src/components/UserProfile/index.tsx +54 -29
- package/themes/original/src/components/UserProfile/styles.ts +17 -0
- package/themes/original/src/components/UserProfileForm/index.tsx +15 -10
- package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
- package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
- package/themes/original/src/components/Wallets/index.tsx +176 -164
- package/themes/original/src/components/Wallets/styles.tsx +12 -8
- package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
- package/themes/original/src/components/shared/OBottomPopup.tsx +48 -15
- package/themes/original/src/components/shared/OButton.tsx +10 -3
- package/themes/original/src/components/shared/OIcon.tsx +8 -1
- package/themes/original/src/components/shared/OInput.tsx +3 -2
- package/themes/original/src/layouts/Container.tsx +13 -9
- package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
- package/themes/original/src/types/index.tsx +91 -30
- package/themes/original/src/utils/index.tsx +66 -0
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { StyleSheet, View, TouchableOpacity } from 'react-native';
|
|
2
|
+
import { StyleSheet, View, TouchableOpacity, Linking, Pressable } from 'react-native';
|
|
3
|
+
import FastImage from 'react-native-fast-image'
|
|
3
4
|
import { useUtils, useOrder, useLanguage } from 'ordering-components/native';
|
|
4
5
|
import { useTheme } from 'styled-components/native';
|
|
5
6
|
import { OIcon, OText, OModal } from '../shared';
|
|
6
7
|
import { BusinessBasicInformationParams } from '../../types';
|
|
7
8
|
import { convertHoursToMinutes, shape } from '../../utils';
|
|
9
|
+
import MaterialComIcon from 'react-native-vector-icons/MaterialCommunityIcons'
|
|
8
10
|
import dayjs from 'dayjs';
|
|
9
11
|
import timezone from 'dayjs/plugin/timezone';
|
|
10
12
|
import isBetween from 'dayjs/plugin/isBetween';
|
|
@@ -21,7 +23,8 @@ import {
|
|
|
21
23
|
WrapReviews,
|
|
22
24
|
WrapBusinessInfo,
|
|
23
25
|
TitleWrapper,
|
|
24
|
-
RibbonBox
|
|
26
|
+
RibbonBox,
|
|
27
|
+
SocialListWrapper
|
|
25
28
|
} from './styles';
|
|
26
29
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
27
30
|
const types = ['food', 'laundry', 'alcohol', 'groceries'];
|
|
@@ -43,6 +46,80 @@ export const BusinessBasicInformation = (
|
|
|
43
46
|
const [openBusinessReviews, setOpenBusinessReviews] = useState(false);
|
|
44
47
|
const [businessInformationObtained, setBusinessInformationObtained] = useState(false)
|
|
45
48
|
const [businessReviewsObtained, setBusinessReviewsObtainedbtained] = useState(false)
|
|
49
|
+
const isChewLayout = theme?.business_view?.components?.header?.components?.layout?.type === 'chew'
|
|
50
|
+
const showLogo = !theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
|
|
51
|
+
|
|
52
|
+
const styles = StyleSheet.create({
|
|
53
|
+
businesInfoheaderStyle: {
|
|
54
|
+
height: 150,
|
|
55
|
+
},
|
|
56
|
+
headerStyle: {
|
|
57
|
+
height: isChewLayout ? 170 : 260,
|
|
58
|
+
},
|
|
59
|
+
logoStyle: {
|
|
60
|
+
width: 72,
|
|
61
|
+
height: 72,
|
|
62
|
+
borderRadius: 7.6,
|
|
63
|
+
justifyContent: 'flex-start',
|
|
64
|
+
alignItems: 'flex-start'
|
|
65
|
+
},
|
|
66
|
+
businessInfo: {
|
|
67
|
+
paddingHorizontal: 40,
|
|
68
|
+
paddingTop: isChewLayout ? 0 : 56,
|
|
69
|
+
},
|
|
70
|
+
bullet: {
|
|
71
|
+
flexDirection: 'row',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
},
|
|
74
|
+
metadata: {
|
|
75
|
+
marginRight: 2,
|
|
76
|
+
},
|
|
77
|
+
starIcon: {
|
|
78
|
+
marginHorizontal: 5,
|
|
79
|
+
},
|
|
80
|
+
reviewStyle: {
|
|
81
|
+
flexDirection: 'row',
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
justifyContent: 'center'
|
|
84
|
+
},
|
|
85
|
+
modalTitleSectionStyle: {
|
|
86
|
+
position: 'absolute',
|
|
87
|
+
width: '100%',
|
|
88
|
+
top: 0,
|
|
89
|
+
zIndex: 100,
|
|
90
|
+
left: 40
|
|
91
|
+
},
|
|
92
|
+
socialIcon: {
|
|
93
|
+
borderRadius: 3,
|
|
94
|
+
borderColor: theme.colors.border,
|
|
95
|
+
borderWidth: isChewLayout ? 0 : 1,
|
|
96
|
+
width: 20,
|
|
97
|
+
height: 20,
|
|
98
|
+
justifyContent: 'center',
|
|
99
|
+
alignItems: 'center',
|
|
100
|
+
marginRight: 5,
|
|
101
|
+
marginBottom: 7
|
|
102
|
+
},
|
|
103
|
+
tiktokIcon: {
|
|
104
|
+
height: 12,
|
|
105
|
+
width: 12,
|
|
106
|
+
margin: 0,
|
|
107
|
+
padding: 0,
|
|
108
|
+
display: 'flex',
|
|
109
|
+
justifyContent: 'center',
|
|
110
|
+
alignItems: 'center'
|
|
111
|
+
},
|
|
112
|
+
headerChewStyle: {
|
|
113
|
+
paddingHorizontal: 30,
|
|
114
|
+
justifyContent: 'center',
|
|
115
|
+
height: '100%'
|
|
116
|
+
},
|
|
117
|
+
socialIconsChewContainer: {
|
|
118
|
+
flexDirection: 'row',
|
|
119
|
+
justifyContent: 'flex-start',
|
|
120
|
+
marginTop: 5
|
|
121
|
+
}
|
|
122
|
+
});
|
|
46
123
|
|
|
47
124
|
const handleClickBusinessInformation = () => {
|
|
48
125
|
if (!businessInformationObtained) {
|
|
@@ -73,6 +150,19 @@ export const BusinessBasicInformation = (
|
|
|
73
150
|
return _types.join(', ');
|
|
74
151
|
};
|
|
75
152
|
|
|
153
|
+
const SocialNetWork = (props: any) => {
|
|
154
|
+
const { socialLink, iconTitle } = props
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<TouchableOpacity style={styles.socialIcon} onPress={() => Linking.openURL(socialLink)}>
|
|
158
|
+
<MaterialComIcon
|
|
159
|
+
name={iconTitle}
|
|
160
|
+
color={isChewLayout ? theme.colors.black : theme.colors.textNormal}
|
|
161
|
+
size={isChewLayout ? 18 : 14}
|
|
162
|
+
/>
|
|
163
|
+
</TouchableOpacity>
|
|
164
|
+
)
|
|
165
|
+
}
|
|
76
166
|
|
|
77
167
|
useEffect(() => {
|
|
78
168
|
if (businessState?.loading) return
|
|
@@ -98,149 +188,251 @@ export const BusinessBasicInformation = (
|
|
|
98
188
|
}
|
|
99
189
|
}, [businessState?.business])
|
|
100
190
|
|
|
191
|
+
const SocialIcons = () => {
|
|
192
|
+
return (
|
|
193
|
+
<>
|
|
194
|
+
{loading ? (
|
|
195
|
+
<Placeholder Animation={Fade}>
|
|
196
|
+
<View style={{ flexDirection: 'row' }}>
|
|
197
|
+
{[...Array(5).keys()].map(i => (
|
|
198
|
+
<View style={styles.socialIcon} key={i}>
|
|
199
|
+
<PlaceholderLine width={100} height={20} style={{ marginBottom: 0 }} />
|
|
200
|
+
</View>
|
|
201
|
+
))}
|
|
202
|
+
</View>
|
|
203
|
+
</Placeholder>
|
|
204
|
+
) : (
|
|
205
|
+
<SocialListWrapper
|
|
206
|
+
showsVerticalScrollIndicator={false}
|
|
207
|
+
showsHorizontalScrollIndicator={false}
|
|
208
|
+
horizontal
|
|
209
|
+
contentContainerStyle={{ flex: 1 }}
|
|
210
|
+
>
|
|
211
|
+
{!!business?.facebook_profile && (
|
|
212
|
+
<SocialNetWork
|
|
213
|
+
socialLink={business?.facebook_profile}
|
|
214
|
+
iconTitle='facebook'
|
|
215
|
+
/>
|
|
216
|
+
)}
|
|
217
|
+
{!!business?.instagram_profile && (
|
|
218
|
+
<SocialNetWork
|
|
219
|
+
socialLink={business?.instagram_profile}
|
|
220
|
+
iconTitle='instagram'
|
|
221
|
+
/>
|
|
222
|
+
)}
|
|
223
|
+
{!!business?.tiktok_profile && (
|
|
224
|
+
<Pressable style={styles.socialIcon} onPress={() => Linking.openURL(business?.tiktok_profile)}>
|
|
225
|
+
<View style={styles.tiktokIcon}>
|
|
226
|
+
<OIcon
|
|
227
|
+
src={theme.images.general.tiktok}
|
|
228
|
+
style={{ width: 10, height: 12 }}
|
|
229
|
+
cover
|
|
230
|
+
/>
|
|
231
|
+
</View>
|
|
232
|
+
</Pressable>
|
|
233
|
+
)}
|
|
234
|
+
{!!business?.pinterest_profile && (
|
|
235
|
+
<SocialNetWork
|
|
236
|
+
socialLink={business?.pinterest_profile}
|
|
237
|
+
iconTitle='pinterest'
|
|
238
|
+
/>
|
|
239
|
+
)}
|
|
240
|
+
{!!business?.whatsapp_number && (
|
|
241
|
+
<SocialNetWork
|
|
242
|
+
socialLink={business?.whatsapp_number}
|
|
243
|
+
iconTitle='whatsapp'
|
|
244
|
+
/>
|
|
245
|
+
)}
|
|
246
|
+
{!!business?.snapchat_profile && (
|
|
247
|
+
<SocialNetWork
|
|
248
|
+
socialLink={business?.snapchat_profile}
|
|
249
|
+
iconTitle='snapchat'
|
|
250
|
+
/>
|
|
251
|
+
)}
|
|
252
|
+
{isChewLayout && (
|
|
253
|
+
<TouchableOpacity onPress={() => handleClickBusinessInformation()}>
|
|
254
|
+
<OText style={{ textDecorationColor: theme.colors.black, textDecorationLine: 'underline' }}>
|
|
255
|
+
{t('SEE_MORE_DESCRIPTION', 'See more')}
|
|
256
|
+
</OText>
|
|
257
|
+
</TouchableOpacity>
|
|
258
|
+
)}
|
|
259
|
+
</SocialListWrapper>
|
|
260
|
+
)}
|
|
261
|
+
</>
|
|
262
|
+
)
|
|
263
|
+
}
|
|
264
|
+
|
|
101
265
|
return (
|
|
102
|
-
<BusinessContainer>
|
|
266
|
+
<BusinessContainer isChewLayout={isChewLayout && !showLogo}>
|
|
103
267
|
<BusinessHeader
|
|
268
|
+
isChewLayout={isChewLayout}
|
|
104
269
|
style={
|
|
105
270
|
isBusinessInfoShow
|
|
106
271
|
? styles.businesInfoheaderStyle
|
|
107
272
|
: { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
|
|
108
273
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
header ||
|
|
112
|
-
|
|
113
|
-
}}
|
|
114
|
-
{
|
|
274
|
+
{...(!loading && {
|
|
275
|
+
source: (header || businessState?.business?.header) ? {
|
|
276
|
+
uri: header || optimizeImage(businessState?.business?.header, 'h_250,c_limit')
|
|
277
|
+
} : theme?.images?.dummies?.businessHeader
|
|
278
|
+
})}
|
|
279
|
+
imageStyle={{ opacity: isChewLayout ? 0.5 : 1 }}
|
|
280
|
+
>
|
|
281
|
+
{!isBusinessInfoShow && !isChewLayout && (
|
|
115
282
|
<WrapBusinessInfo onPress={() => handleClickBusinessInformation()}>
|
|
116
283
|
<OIcon src={theme.images.general.info} width={24} />
|
|
117
284
|
</WrapBusinessInfo>
|
|
118
285
|
)}
|
|
286
|
+
{isChewLayout && !loading && (
|
|
287
|
+
<View style={styles.headerChewStyle}>
|
|
288
|
+
<OText size={24} weight={'600'} mBottom={-5}>
|
|
289
|
+
{business?.name}
|
|
290
|
+
</OText>
|
|
291
|
+
{business?.city?.name && (
|
|
292
|
+
<OText>
|
|
293
|
+
{business?.city?.name}
|
|
294
|
+
</OText>
|
|
295
|
+
)}
|
|
296
|
+
<View style={styles.socialIconsChewContainer}>
|
|
297
|
+
<SocialIcons />
|
|
298
|
+
</View>
|
|
299
|
+
</View>
|
|
300
|
+
)}
|
|
119
301
|
</BusinessHeader>
|
|
120
302
|
<BusinessInfo style={styles.businessInfo}>
|
|
121
|
-
|
|
122
|
-
{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
<
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
|
|
155
|
-
>
|
|
156
|
-
<OText
|
|
157
|
-
size={10}
|
|
158
|
-
weight={'400'}
|
|
159
|
-
color={theme.colors.white}
|
|
160
|
-
numberOfLines={2}
|
|
161
|
-
ellipsizeMode='tail'
|
|
162
|
-
lineHeight={13}
|
|
163
|
-
>
|
|
164
|
-
{business?.ribbon?.text}
|
|
303
|
+
{showLogo && (
|
|
304
|
+
<BusinessLogo isChewLayout={isChewLayout}>
|
|
305
|
+
{!isBusinessInfoShow && (
|
|
306
|
+
logo || businessState?.business?.logo ?
|
|
307
|
+
<FastImage
|
|
308
|
+
style={styles.logoStyle}
|
|
309
|
+
source={{
|
|
310
|
+
uri: logo || optimizeImage(businessState?.business?.logo, 'h_70,c_limit'),
|
|
311
|
+
priority: FastImage.priority.high,
|
|
312
|
+
cache: FastImage.cacheControl.web
|
|
313
|
+
}}
|
|
314
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
315
|
+
/>
|
|
316
|
+
:
|
|
317
|
+
<OIcon
|
|
318
|
+
src={theme?.images?.dummies?.businessLogo}
|
|
319
|
+
style={styles.logoStyle}
|
|
320
|
+
/>
|
|
321
|
+
)}
|
|
322
|
+
</BusinessLogo>
|
|
323
|
+
)}
|
|
324
|
+
{!isChewLayout && (
|
|
325
|
+
|
|
326
|
+
<>
|
|
327
|
+
<BusinessInfoItem>
|
|
328
|
+
{loading ? (
|
|
329
|
+
<Placeholder Animation={Fade}>
|
|
330
|
+
<PlaceholderLine height={30} width={20} />
|
|
331
|
+
</Placeholder>
|
|
332
|
+
) : (
|
|
333
|
+
<TitleWrapper>
|
|
334
|
+
<OText size={24} weight={'600'} numberOfLines={2}>
|
|
335
|
+
{business?.name}
|
|
165
336
|
</OText>
|
|
166
|
-
|
|
337
|
+
{business?.ribbon?.enabled && (
|
|
338
|
+
<RibbonBox
|
|
339
|
+
bgColor={business?.ribbon?.color}
|
|
340
|
+
isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
|
|
341
|
+
isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
|
|
342
|
+
>
|
|
343
|
+
<OText
|
|
344
|
+
size={10}
|
|
345
|
+
weight={'400'}
|
|
346
|
+
color={theme.colors.white}
|
|
347
|
+
numberOfLines={2}
|
|
348
|
+
ellipsizeMode='tail'
|
|
349
|
+
lineHeight={13}
|
|
350
|
+
>
|
|
351
|
+
{business?.ribbon?.text}
|
|
352
|
+
</OText>
|
|
353
|
+
</RibbonBox>
|
|
354
|
+
)}
|
|
355
|
+
</TitleWrapper>
|
|
167
356
|
)}
|
|
168
|
-
</
|
|
169
|
-
|
|
170
|
-
</BusinessInfoItem>
|
|
171
|
-
{loading ? (
|
|
172
|
-
<Placeholder Animation={Fade}>
|
|
173
|
-
<PlaceholderLine width={10} />
|
|
174
|
-
</Placeholder>
|
|
175
|
-
) : (
|
|
176
|
-
<View style={{ width: '75%' }}>
|
|
177
|
-
<OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
|
|
178
|
-
</View>
|
|
179
|
-
)}
|
|
180
|
-
<View>
|
|
181
|
-
<BusinessInfoItem>
|
|
182
|
-
{loading && (
|
|
357
|
+
</BusinessInfoItem>
|
|
358
|
+
{loading ? (
|
|
183
359
|
<Placeholder Animation={Fade}>
|
|
184
|
-
<
|
|
185
|
-
<PlaceholderLine width={13} style={{ marginRight: 10 }} />
|
|
186
|
-
<PlaceholderLine width={13} style={{ marginRight: 10 }} />
|
|
187
|
-
<PlaceholderLine width={13} style={{ marginRight: 10 }} />
|
|
188
|
-
<PlaceholderLine width={13} />
|
|
189
|
-
</View>
|
|
360
|
+
<PlaceholderLine width={10} />
|
|
190
361
|
</Placeholder>
|
|
362
|
+
) : (
|
|
363
|
+
<View style={{ width: '75%' }}>
|
|
364
|
+
<OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
|
|
365
|
+
</View>
|
|
191
366
|
)}
|
|
192
|
-
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
{
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
367
|
+
{!isChewLayout && (
|
|
368
|
+
<SocialIcons />
|
|
369
|
+
)}
|
|
370
|
+
<View>
|
|
371
|
+
<BusinessInfoItem>
|
|
372
|
+
{loading && (
|
|
373
|
+
<Placeholder Animation={Fade}>
|
|
374
|
+
<View style={{ flexDirection: 'row' }}>
|
|
375
|
+
<PlaceholderLine width={13} style={{ marginRight: 10 }} />
|
|
376
|
+
<PlaceholderLine width={13} style={{ marginRight: 10 }} />
|
|
377
|
+
<PlaceholderLine width={13} style={{ marginRight: 10 }} />
|
|
378
|
+
<PlaceholderLine width={13} />
|
|
379
|
+
</View>
|
|
380
|
+
</Placeholder>
|
|
381
|
+
)}
|
|
382
|
+
<View style={styles.bullet}>
|
|
383
|
+
<OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
|
|
384
|
+
{`${t('DELIVERY_FEE', 'Delivery fee')} ${business && parsePrice(business?.delivery_price || 0)} \u2022 `}
|
|
385
|
+
</OText>
|
|
386
|
+
{orderState?.options?.type === 1 ? (
|
|
387
|
+
<OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
|
|
388
|
+
{convertHoursToMinutes(business?.delivery_time) + ` \u2022 `}
|
|
389
|
+
</OText>
|
|
390
|
+
) : (
|
|
391
|
+
<OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
|
|
392
|
+
{convertHoursToMinutes(business?.pickup_time) + ` \u2022 `}
|
|
393
|
+
</OText>
|
|
394
|
+
)}
|
|
395
|
+
<OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
|
|
396
|
+
{parseDistance(business?.distance || 0) + ` \u2022 `}
|
|
397
|
+
</OText>
|
|
398
|
+
</View>
|
|
209
399
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
400
|
+
<View style={styles.reviewStyle}>
|
|
401
|
+
<OIcon
|
|
402
|
+
src={theme.images.general.star}
|
|
403
|
+
width={14}
|
|
404
|
+
color={theme.colors.textSecondary}
|
|
405
|
+
style={{ marginTop: -2, marginEnd: 2 }}
|
|
406
|
+
/>
|
|
407
|
+
<OText size={12} color={theme.colors.textSecondary}>
|
|
408
|
+
{business?.reviews?.total}
|
|
409
|
+
</OText>
|
|
410
|
+
</View>
|
|
411
|
+
</BusinessInfoItem>
|
|
220
412
|
</View>
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
<WrapReviews>
|
|
224
|
-
{!isBusinessInfoShow && (
|
|
225
|
-
<>
|
|
226
|
-
{isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
|
|
413
|
+
<WrapReviews>
|
|
414
|
+
{!isBusinessInfoShow && (
|
|
227
415
|
<>
|
|
228
|
-
|
|
416
|
+
{isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
|
|
417
|
+
<>
|
|
418
|
+
<TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
|
|
419
|
+
<OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
|
|
420
|
+
{t('PREORDER', 'Preorder')}
|
|
421
|
+
</OText>
|
|
422
|
+
</TouchableOpacity>
|
|
423
|
+
<OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
|
|
424
|
+
</>
|
|
425
|
+
)}
|
|
426
|
+
<TouchableOpacity onPress={() => handleClickBusinessReviews()}>
|
|
229
427
|
<OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
|
|
230
|
-
{t('
|
|
428
|
+
{t('REVIEWS', 'Reviews')}
|
|
231
429
|
</OText>
|
|
232
430
|
</TouchableOpacity>
|
|
233
|
-
<OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
|
|
234
431
|
</>
|
|
235
432
|
)}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
</OText>
|
|
240
|
-
</TouchableOpacity>
|
|
241
|
-
</>
|
|
242
|
-
)}
|
|
243
|
-
</WrapReviews>
|
|
433
|
+
</WrapReviews>
|
|
434
|
+
</>
|
|
435
|
+
)}
|
|
244
436
|
</BusinessInfo>
|
|
245
437
|
{businessInformationObtained ? (
|
|
246
438
|
<OModal
|
|
@@ -276,45 +468,3 @@ export const BusinessBasicInformation = (
|
|
|
276
468
|
</BusinessContainer>
|
|
277
469
|
);
|
|
278
470
|
};
|
|
279
|
-
|
|
280
|
-
const styles = StyleSheet.create({
|
|
281
|
-
businesInfoheaderStyle: {
|
|
282
|
-
height: 150,
|
|
283
|
-
},
|
|
284
|
-
headerStyle: {
|
|
285
|
-
height: 260,
|
|
286
|
-
},
|
|
287
|
-
businessLogo: {
|
|
288
|
-
width: 72,
|
|
289
|
-
height: 72,
|
|
290
|
-
borderRadius: 7.6,
|
|
291
|
-
justifyContent: 'flex-start',
|
|
292
|
-
alignItems: 'flex-start',
|
|
293
|
-
},
|
|
294
|
-
businessInfo: {
|
|
295
|
-
paddingHorizontal: 40,
|
|
296
|
-
paddingTop: 56,
|
|
297
|
-
},
|
|
298
|
-
bullet: {
|
|
299
|
-
flexDirection: 'row',
|
|
300
|
-
alignItems: 'center',
|
|
301
|
-
},
|
|
302
|
-
metadata: {
|
|
303
|
-
marginRight: 2,
|
|
304
|
-
},
|
|
305
|
-
starIcon: {
|
|
306
|
-
marginHorizontal: 5,
|
|
307
|
-
},
|
|
308
|
-
reviewStyle: {
|
|
309
|
-
flexDirection: 'row',
|
|
310
|
-
alignItems: 'center',
|
|
311
|
-
justifyContent: 'center'
|
|
312
|
-
},
|
|
313
|
-
modalTitleSectionStyle: {
|
|
314
|
-
position: 'absolute',
|
|
315
|
-
width: '100%',
|
|
316
|
-
top: 0,
|
|
317
|
-
zIndex: 100,
|
|
318
|
-
left: 40
|
|
319
|
-
},
|
|
320
|
-
});
|
|
@@ -3,7 +3,7 @@ import { Platform } from 'react-native';
|
|
|
3
3
|
|
|
4
4
|
export const BusinessContainer = styled.View`
|
|
5
5
|
flex-direction: column;
|
|
6
|
-
padding-bottom: 35px;
|
|
6
|
+
padding-bottom: ${(props: any) => props.isChewLayout ? '0' : '35px'};
|
|
7
7
|
`;
|
|
8
8
|
export const BusinessHeader = styled.ImageBackground`
|
|
9
9
|
width: 100%;
|
|
@@ -20,7 +20,7 @@ export const BusinessLogo = styled.View`
|
|
|
20
20
|
box-shadow: 0 0 2px ${Platform.OS == 'android' ? '#000000DD' : '#0000001A'};
|
|
21
21
|
elevation: 2;
|
|
22
22
|
background-color: white;
|
|
23
|
-
border-radius: 7.6px;
|
|
23
|
+
border-radius: 7.6px;
|
|
24
24
|
`;
|
|
25
25
|
export const BusinessInfo = styled.View`
|
|
26
26
|
justify-content: flex-start;
|
|
@@ -68,3 +68,7 @@ export const RibbonBox = styled.View`
|
|
|
68
68
|
border-radius: 50px;
|
|
69
69
|
`}
|
|
70
70
|
`
|
|
71
|
+
|
|
72
|
+
export const SocialListWrapper = styled.ScrollView`
|
|
73
|
+
flex-direction: row;
|
|
74
|
+
`
|