ordering-ui-react-native 0.16.49 → 0.16.50-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 +6 -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/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/Messages/index.tsx +2 -2
- package/src/components/NotificationSetting/index.tsx +85 -0
- package/src/components/OrdersOption/index.tsx +54 -56
- package/src/components/PaymentOptions/index.tsx +298 -345
- package/src/components/PaymentOptionsWebView/index.tsx +120 -121
- package/src/components/ReviewProducts/index.tsx +11 -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/components/shared/OToast.tsx +4 -4
- package/src/index.tsx +2 -0
- package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
- package/src/utils/index.tsx +2 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +259 -238
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
- package/themes/business/src/components/BusinessController/index.tsx +2 -2
- package/themes/business/src/components/Chat/index.tsx +40 -32
- package/themes/business/src/components/DriverMap/index.tsx +7 -5
- package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
- 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/OrderContentComponent.tsx +40 -30
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +3 -3
- package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
- package/themes/business/src/components/OrdersOption/index.tsx +76 -77
- 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/OrderItem.tsx +250 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
- package/themes/business/src/components/PreviousOrders/index.tsx +332 -244
- package/themes/business/src/components/PreviousOrders/styles.tsx +30 -2
- package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +39 -15
- package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
- package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
- package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
- 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/OLink.tsx +24 -12
- package/themes/business/src/components/shared/OText.tsx +3 -2
- package/themes/business/src/types/index.tsx +25 -11
- 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 +8 -0
- package/themes/original/src/components/AddressDetails/index.tsx +10 -8
- package/themes/original/src/components/AddressForm/index.tsx +157 -140
- 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 +218 -147
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessController/index.tsx +203 -94
- package/themes/original/src/components/BusinessController/styles.tsx +14 -9
- package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
- 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 +85 -137
- 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 +59 -60
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +179 -83
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +19 -12
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +15 -4
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +276 -122
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +48 -11
- package/themes/original/src/components/BusinessesListing/index.tsx +82 -28
- package/themes/original/src/components/Cart/index.tsx +82 -15
- package/themes/original/src/components/Cart/styles.tsx +4 -0
- package/themes/original/src/components/CartContent/index.tsx +27 -17
- package/themes/original/src/components/CartContent/styles.tsx +1 -1
- package/themes/original/src/components/Checkout/index.tsx +114 -118
- package/themes/original/src/components/Checkout/styles.tsx +4 -3
- package/themes/original/src/components/CitiesControl/index.tsx +89 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
- 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/FavoriteList/index.tsx +69 -45
- package/themes/original/src/components/FloatingButton/index.tsx +13 -11
- 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/GPSButton/styles.ts +3 -3
- 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 +89 -73
- package/themes/original/src/components/LoginForm/Otp/styles.tsx +0 -1
- package/themes/original/src/components/LoginForm/index.tsx +98 -41
- package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
- package/themes/original/src/components/Messages/index.tsx +35 -20
- package/themes/original/src/components/MomentOption/index.tsx +8 -6
- package/themes/original/src/components/MultiCart/index.tsx +63 -0
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -93
- package/themes/original/src/components/MultiCheckout/index.tsx +10 -2
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +34 -16
- package/themes/original/src/components/MyOrders/index.tsx +88 -24
- package/themes/original/src/components/NavBar/index.tsx +11 -5
- 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/index.tsx +162 -50
- 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 +77 -66
- package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
- package/themes/original/src/components/OrderSummary/index.tsx +2 -35
- 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 +94 -98
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
- package/themes/original/src/components/OrdersOption/index.tsx +91 -53
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
- package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
- package/themes/original/src/components/PlaceSpot/index.tsx +249 -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 +645 -664
- package/themes/original/src/components/ProductForm/styles.tsx +10 -11
- 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/ProductOptionSubOption/index.tsx +16 -8
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
- package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
- package/themes/original/src/components/ProfessionalProfile/index.tsx +19 -8
- package/themes/original/src/components/Promotions/index.tsx +232 -219
- package/themes/original/src/components/Promotions/styles.tsx +7 -2
- package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
- package/themes/original/src/components/ReviewOrder/index.tsx +120 -108
- package/themes/original/src/components/ReviewOrder/styles.tsx +5 -7
- package/themes/original/src/components/ReviewProducts/index.tsx +8 -5
- package/themes/original/src/components/ReviewTrigger/index.tsx +136 -0
- package/themes/original/src/components/ReviewTrigger/styles.tsx +41 -0
- package/themes/original/src/components/ScheduleAccordion/index.tsx +68 -0
- package/themes/original/src/components/ScheduleAccordion/styles.tsx +14 -0
- package/themes/original/src/components/ServiceForm/index.tsx +341 -267
- package/themes/original/src/components/SignupForm/index.tsx +160 -113
- package/themes/original/src/components/SingleOrderCard/index.tsx +219 -129
- package/themes/original/src/components/SingleOrderCard/styles.tsx +10 -8
- package/themes/original/src/components/SingleProductCard/index.tsx +182 -105
- package/themes/original/src/components/SingleProductCard/styles.tsx +3 -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 +13 -2
- package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
- package/themes/original/src/components/UserDetails/index.tsx +5 -3
- package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
- package/themes/original/src/components/UserProfile/index.tsx +58 -35
- package/themes/original/src/components/UserProfile/styles.ts +17 -0
- 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/HeaderTitle.tsx +8 -3
- 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 +10 -1
- 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 +86 -28
- package/themes/original/src/utils/index.tsx +103 -58
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { StyleSheet, View, TouchableOpacity, Linking } 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';
|
|
@@ -45,24 +46,26 @@ export const BusinessBasicInformation = (
|
|
|
45
46
|
const [openBusinessReviews, setOpenBusinessReviews] = useState(false);
|
|
46
47
|
const [businessInformationObtained, setBusinessInformationObtained] = useState(false)
|
|
47
48
|
const [businessReviewsObtained, setBusinessReviewsObtainedbtained] = useState(false)
|
|
49
|
+
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
50
|
+
const showLogo = !theme?.business_view?.components?.header?.components?.business?.components?.logo?.hidden
|
|
48
51
|
|
|
49
52
|
const styles = StyleSheet.create({
|
|
50
53
|
businesInfoheaderStyle: {
|
|
51
54
|
height: 150,
|
|
52
55
|
},
|
|
53
56
|
headerStyle: {
|
|
54
|
-
height: 260,
|
|
57
|
+
height: isChewLayout ? 170 : 260,
|
|
55
58
|
},
|
|
56
|
-
|
|
59
|
+
logoStyle: {
|
|
57
60
|
width: 72,
|
|
58
61
|
height: 72,
|
|
59
62
|
borderRadius: 7.6,
|
|
60
63
|
justifyContent: 'flex-start',
|
|
61
|
-
alignItems: 'flex-start'
|
|
64
|
+
alignItems: 'flex-start'
|
|
62
65
|
},
|
|
63
66
|
businessInfo: {
|
|
64
67
|
paddingHorizontal: 40,
|
|
65
|
-
paddingTop: 56,
|
|
68
|
+
paddingTop: isChewLayout ? 0 : 56,
|
|
66
69
|
},
|
|
67
70
|
bullet: {
|
|
68
71
|
flexDirection: 'row',
|
|
@@ -89,7 +92,7 @@ export const BusinessBasicInformation = (
|
|
|
89
92
|
socialIcon: {
|
|
90
93
|
borderRadius: 3,
|
|
91
94
|
borderColor: theme.colors.border,
|
|
92
|
-
borderWidth: 1,
|
|
95
|
+
borderWidth: isChewLayout ? 0 : 1,
|
|
93
96
|
width: 20,
|
|
94
97
|
height: 20,
|
|
95
98
|
justifyContent: 'center',
|
|
@@ -101,7 +104,20 @@ export const BusinessBasicInformation = (
|
|
|
101
104
|
height: 12,
|
|
102
105
|
width: 12,
|
|
103
106
|
margin: 0,
|
|
104
|
-
padding: 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
|
|
105
121
|
}
|
|
106
122
|
});
|
|
107
123
|
|
|
@@ -135,14 +151,14 @@ export const BusinessBasicInformation = (
|
|
|
135
151
|
};
|
|
136
152
|
|
|
137
153
|
const SocialNetWork = (props: any) => {
|
|
138
|
-
const { socialLink, iconTitle} = props
|
|
154
|
+
const { socialLink, iconTitle } = props
|
|
139
155
|
|
|
140
156
|
return (
|
|
141
157
|
<TouchableOpacity style={styles.socialIcon} onPress={() => Linking.openURL(socialLink)}>
|
|
142
158
|
<MaterialComIcon
|
|
143
159
|
name={iconTitle}
|
|
144
|
-
color={theme.colors.textNormal}
|
|
145
|
-
size={14}
|
|
160
|
+
color={isChewLayout ? theme.colors.black : theme.colors.textNormal}
|
|
161
|
+
size={isChewLayout ? 18 : 14}
|
|
146
162
|
/>
|
|
147
163
|
</TouchableOpacity>
|
|
148
164
|
)
|
|
@@ -172,85 +188,9 @@ export const BusinessBasicInformation = (
|
|
|
172
188
|
}
|
|
173
189
|
}, [businessState?.business])
|
|
174
190
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
style={
|
|
179
|
-
isBusinessInfoShow
|
|
180
|
-
? styles.businesInfoheaderStyle
|
|
181
|
-
: { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
|
|
182
|
-
}
|
|
183
|
-
source={{
|
|
184
|
-
uri:
|
|
185
|
-
header ||
|
|
186
|
-
optimizeImage(businessState?.business?.header, 'h_250,c_limit'),
|
|
187
|
-
}}>
|
|
188
|
-
{!isBusinessInfoShow && (
|
|
189
|
-
<WrapBusinessInfo onPress={() => handleClickBusinessInformation()}>
|
|
190
|
-
<OIcon src={theme.images.general.info} width={24} />
|
|
191
|
-
</WrapBusinessInfo>
|
|
192
|
-
)}
|
|
193
|
-
</BusinessHeader>
|
|
194
|
-
<BusinessInfo style={styles.businessInfo}>
|
|
195
|
-
<BusinessLogo>
|
|
196
|
-
{loading ? (
|
|
197
|
-
<View>
|
|
198
|
-
<Placeholder Animation={Fade}>
|
|
199
|
-
<PlaceholderLine height={50} width={20} />
|
|
200
|
-
</Placeholder>
|
|
201
|
-
</View>
|
|
202
|
-
) : (
|
|
203
|
-
!isBusinessInfoShow && (
|
|
204
|
-
<OIcon
|
|
205
|
-
url={
|
|
206
|
-
logo ||
|
|
207
|
-
optimizeImage(businessState?.business?.logo, 'h_70,c_limit')
|
|
208
|
-
}
|
|
209
|
-
style={styles.businessLogo}
|
|
210
|
-
/>
|
|
211
|
-
)
|
|
212
|
-
)}
|
|
213
|
-
</BusinessLogo>
|
|
214
|
-
<BusinessInfoItem>
|
|
215
|
-
{loading ? (
|
|
216
|
-
<Placeholder Animation={Fade}>
|
|
217
|
-
<PlaceholderLine height={30} width={20} />
|
|
218
|
-
</Placeholder>
|
|
219
|
-
) : (
|
|
220
|
-
<TitleWrapper>
|
|
221
|
-
<OText size={24} weight={'600'}>
|
|
222
|
-
{business?.name}
|
|
223
|
-
</OText>
|
|
224
|
-
{business?.ribbon?.enabled && (
|
|
225
|
-
<RibbonBox
|
|
226
|
-
bgColor={business?.ribbon?.color}
|
|
227
|
-
isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
|
|
228
|
-
isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
|
|
229
|
-
>
|
|
230
|
-
<OText
|
|
231
|
-
size={10}
|
|
232
|
-
weight={'400'}
|
|
233
|
-
color={theme.colors.white}
|
|
234
|
-
numberOfLines={2}
|
|
235
|
-
ellipsizeMode='tail'
|
|
236
|
-
lineHeight={13}
|
|
237
|
-
>
|
|
238
|
-
{business?.ribbon?.text}
|
|
239
|
-
</OText>
|
|
240
|
-
</RibbonBox>
|
|
241
|
-
)}
|
|
242
|
-
</TitleWrapper>
|
|
243
|
-
)}
|
|
244
|
-
</BusinessInfoItem>
|
|
245
|
-
{loading ? (
|
|
246
|
-
<Placeholder Animation={Fade}>
|
|
247
|
-
<PlaceholderLine width={10} />
|
|
248
|
-
</Placeholder>
|
|
249
|
-
) : (
|
|
250
|
-
<View style={{ width: '75%' }}>
|
|
251
|
-
<OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
|
|
252
|
-
</View>
|
|
253
|
-
)}
|
|
191
|
+
const SocialIcons = () => {
|
|
192
|
+
return (
|
|
193
|
+
<>
|
|
254
194
|
{loading ? (
|
|
255
195
|
<Placeholder Animation={Fade}>
|
|
256
196
|
<View style={{ flexDirection: 'row' }}>
|
|
@@ -266,7 +206,7 @@ export const BusinessBasicInformation = (
|
|
|
266
206
|
showsVerticalScrollIndicator={false}
|
|
267
207
|
showsHorizontalScrollIndicator={false}
|
|
268
208
|
horizontal
|
|
269
|
-
contentContainerStyle={{ flex: 1}}
|
|
209
|
+
contentContainerStyle={{ flex: 1 }}
|
|
270
210
|
>
|
|
271
211
|
{!!business?.facebook_profile && (
|
|
272
212
|
<SocialNetWork
|
|
@@ -281,14 +221,15 @@ export const BusinessBasicInformation = (
|
|
|
281
221
|
/>
|
|
282
222
|
)}
|
|
283
223
|
{!!business?.tiktok_profile && (
|
|
284
|
-
<
|
|
224
|
+
<Pressable style={styles.socialIcon} onPress={() => Linking.openURL(business?.tiktok_profile)}>
|
|
285
225
|
<View style={styles.tiktokIcon}>
|
|
286
226
|
<OIcon
|
|
287
227
|
src={theme.images.general.tiktok}
|
|
288
|
-
style={{ width:
|
|
228
|
+
style={{ width: 10, height: 12 }}
|
|
229
|
+
cover
|
|
289
230
|
/>
|
|
290
231
|
</View>
|
|
291
|
-
</
|
|
232
|
+
</Pressable>
|
|
292
233
|
)}
|
|
293
234
|
{!!business?.pinterest_profile && (
|
|
294
235
|
<SocialNetWork
|
|
@@ -308,72 +249,202 @@ export const BusinessBasicInformation = (
|
|
|
308
249
|
iconTitle='snapchat'
|
|
309
250
|
/>
|
|
310
251
|
)}
|
|
252
|
+
{isChewLayout && (
|
|
253
|
+
<TouchableOpacity onPress={() => handleClickBusinessInformation()}>
|
|
254
|
+
<OText
|
|
255
|
+
color={theme.colors.primary}
|
|
256
|
+
style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
|
|
257
|
+
size={12}
|
|
258
|
+
>
|
|
259
|
+
{t('SEE_MORE_DESCRIPTION', 'See more')}
|
|
260
|
+
</OText>
|
|
261
|
+
</TouchableOpacity>
|
|
262
|
+
)}
|
|
311
263
|
</SocialListWrapper>
|
|
312
264
|
)}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
265
|
+
</>
|
|
266
|
+
)
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
return (
|
|
270
|
+
<BusinessContainer isChewLayout={isChewLayout && !showLogo}>
|
|
271
|
+
<BusinessHeader
|
|
272
|
+
isChewLayout={isChewLayout}
|
|
273
|
+
style={
|
|
274
|
+
isBusinessInfoShow
|
|
275
|
+
? styles.businesInfoheaderStyle
|
|
276
|
+
: { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
|
|
277
|
+
}
|
|
278
|
+
{...(!loading && {
|
|
279
|
+
source: (header || businessState?.business?.header) ? {
|
|
280
|
+
uri: header || optimizeImage(businessState?.business?.header, 'h_250,c_limit')
|
|
281
|
+
} : theme?.images?.dummies?.businessHeader
|
|
282
|
+
})}
|
|
283
|
+
imageStyle={{ opacity: isChewLayout ? 0.5 : 1 }}
|
|
284
|
+
>
|
|
285
|
+
{!isBusinessInfoShow && !isChewLayout && (
|
|
286
|
+
<WrapBusinessInfo onPress={() => handleClickBusinessInformation()}>
|
|
287
|
+
<OIcon src={theme.images.general.info} width={24} />
|
|
288
|
+
</WrapBusinessInfo>
|
|
289
|
+
)}
|
|
290
|
+
{isChewLayout && !loading && (
|
|
291
|
+
<View style={styles.headerChewStyle}>
|
|
292
|
+
<OText size={24} weight={'600'} mBottom={-5}>
|
|
293
|
+
{business?.name}
|
|
294
|
+
</OText>
|
|
295
|
+
{business?.city?.name && (
|
|
296
|
+
<OText>
|
|
297
|
+
{business?.city?.name}
|
|
328
298
|
</OText>
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
299
|
+
)}
|
|
300
|
+
<View style={styles.socialIconsChewContainer}>
|
|
301
|
+
<SocialIcons />
|
|
302
|
+
</View>
|
|
303
|
+
</View>
|
|
304
|
+
)}
|
|
305
|
+
</BusinessHeader>
|
|
306
|
+
<BusinessInfo style={styles.businessInfo}>
|
|
307
|
+
{showLogo && (
|
|
308
|
+
<BusinessLogo isChewLayout={isChewLayout}>
|
|
309
|
+
{!isBusinessInfoShow && (
|
|
310
|
+
logo || businessState?.business?.logo ?
|
|
311
|
+
<FastImage
|
|
312
|
+
style={styles.logoStyle}
|
|
313
|
+
source={{
|
|
314
|
+
uri: logo || optimizeImage(businessState?.business?.logo, 'h_70,c_limit'),
|
|
315
|
+
priority: FastImage.priority.high,
|
|
316
|
+
cache: FastImage.cacheControl.web
|
|
317
|
+
}}
|
|
318
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
319
|
+
/>
|
|
320
|
+
:
|
|
321
|
+
<OIcon
|
|
322
|
+
src={theme?.images?.dummies?.businessLogo}
|
|
323
|
+
style={styles.logoStyle}
|
|
324
|
+
/>
|
|
325
|
+
)}
|
|
326
|
+
</BusinessLogo>
|
|
327
|
+
)}
|
|
328
|
+
{!isChewLayout && (
|
|
329
|
+
|
|
330
|
+
<>
|
|
331
|
+
<BusinessInfoItem>
|
|
332
|
+
{loading ? (
|
|
333
|
+
<Placeholder Animation={Fade}>
|
|
334
|
+
<PlaceholderLine height={30} width={20} />
|
|
335
|
+
</Placeholder>
|
|
333
336
|
) : (
|
|
334
|
-
<
|
|
335
|
-
{
|
|
336
|
-
|
|
337
|
+
<TitleWrapper>
|
|
338
|
+
<OText size={24} weight={'600'} numberOfLines={2}>
|
|
339
|
+
{business?.name}
|
|
340
|
+
</OText>
|
|
341
|
+
{business?.ribbon?.enabled && (
|
|
342
|
+
<RibbonBox
|
|
343
|
+
bgColor={business?.ribbon?.color}
|
|
344
|
+
isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
|
|
345
|
+
isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
|
|
346
|
+
>
|
|
347
|
+
<OText
|
|
348
|
+
size={10}
|
|
349
|
+
weight={'400'}
|
|
350
|
+
color={theme.colors.white}
|
|
351
|
+
numberOfLines={2}
|
|
352
|
+
ellipsizeMode='tail'
|
|
353
|
+
lineHeight={13}
|
|
354
|
+
>
|
|
355
|
+
{business?.ribbon?.text}
|
|
356
|
+
</OText>
|
|
357
|
+
</RibbonBox>
|
|
358
|
+
)}
|
|
359
|
+
</TitleWrapper>
|
|
337
360
|
)}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
361
|
+
</BusinessInfoItem>
|
|
362
|
+
{loading ? (
|
|
363
|
+
<Placeholder Animation={Fade}>
|
|
364
|
+
<PlaceholderLine width={10} />
|
|
365
|
+
</Placeholder>
|
|
366
|
+
) : (
|
|
367
|
+
<View style={{ width: '75%' }}>
|
|
368
|
+
<OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
|
|
369
|
+
</View>
|
|
370
|
+
)}
|
|
371
|
+
{!isChewLayout && (
|
|
372
|
+
<SocialIcons />
|
|
373
|
+
)}
|
|
374
|
+
<View>
|
|
375
|
+
<BusinessInfoItem>
|
|
376
|
+
{loading && (
|
|
377
|
+
<Placeholder Animation={Fade}>
|
|
378
|
+
<View style={{ flexDirection: 'row' }}>
|
|
379
|
+
<PlaceholderLine width={13} style={{ marginRight: 10 }} />
|
|
380
|
+
<PlaceholderLine width={13} style={{ marginRight: 10 }} />
|
|
381
|
+
<PlaceholderLine width={13} style={{ marginRight: 10 }} />
|
|
382
|
+
<PlaceholderLine width={13} />
|
|
383
|
+
</View>
|
|
384
|
+
</Placeholder>
|
|
385
|
+
)}
|
|
386
|
+
<View style={styles.bullet}>
|
|
387
|
+
<OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
|
|
388
|
+
{`${t('DELIVERY_FEE', 'Delivery fee')} ${business && parsePrice(business?.delivery_price || 0)} \u2022 `}
|
|
389
|
+
</OText>
|
|
390
|
+
{orderState?.options?.type === 1 ? (
|
|
391
|
+
<OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
|
|
392
|
+
{convertHoursToMinutes(business?.delivery_time) + ` \u2022 `}
|
|
393
|
+
</OText>
|
|
394
|
+
) : (
|
|
395
|
+
<OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
|
|
396
|
+
{convertHoursToMinutes(business?.pickup_time) + ` \u2022 `}
|
|
397
|
+
</OText>
|
|
398
|
+
)}
|
|
399
|
+
<OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
|
|
400
|
+
{parseDistance(business?.distance || 0) + ` \u2022 `}
|
|
401
|
+
</OText>
|
|
402
|
+
</View>
|
|
342
403
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
404
|
+
<View style={styles.reviewStyle}>
|
|
405
|
+
<OIcon
|
|
406
|
+
src={theme.images.general.star}
|
|
407
|
+
width={14}
|
|
408
|
+
color={theme.colors.textSecondary}
|
|
409
|
+
style={{ marginTop: -2, marginEnd: 2 }}
|
|
410
|
+
/>
|
|
411
|
+
<OText size={12} color={theme.colors.textSecondary}>
|
|
412
|
+
{business?.reviews?.total}
|
|
413
|
+
</OText>
|
|
414
|
+
</View>
|
|
415
|
+
</BusinessInfoItem>
|
|
353
416
|
</View>
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
<WrapReviews>
|
|
357
|
-
{!isBusinessInfoShow && (
|
|
358
|
-
<>
|
|
359
|
-
{isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
|
|
417
|
+
<WrapReviews>
|
|
418
|
+
{!isBusinessInfoShow && (
|
|
360
419
|
<>
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
{
|
|
420
|
+
{isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
|
|
421
|
+
<>
|
|
422
|
+
<TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
|
|
423
|
+
<OText
|
|
424
|
+
color={theme.colors.primary}
|
|
425
|
+
style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
|
|
426
|
+
size={12}
|
|
427
|
+
>
|
|
428
|
+
{t('PREORDER', 'Preorder')}
|
|
429
|
+
</OText>
|
|
430
|
+
</TouchableOpacity>
|
|
431
|
+
<OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
|
|
432
|
+
</>
|
|
433
|
+
)}
|
|
434
|
+
<TouchableOpacity onPress={() => handleClickBusinessReviews()}>
|
|
435
|
+
<OText
|
|
436
|
+
color={theme.colors.primary}
|
|
437
|
+
style={{ textDecorationColor: theme.colors.primary, textDecorationLine: 'underline' }}
|
|
438
|
+
size={12}
|
|
439
|
+
>
|
|
440
|
+
{t('REVIEWS', 'Reviews')}
|
|
364
441
|
</OText>
|
|
365
442
|
</TouchableOpacity>
|
|
366
|
-
<OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
|
|
367
443
|
</>
|
|
368
444
|
)}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
</OText>
|
|
373
|
-
</TouchableOpacity>
|
|
374
|
-
</>
|
|
375
|
-
)}
|
|
376
|
-
</WrapReviews>
|
|
445
|
+
</WrapReviews>
|
|
446
|
+
</>
|
|
447
|
+
)}
|
|
377
448
|
</BusinessInfo>
|
|
378
449
|
{businessInformationObtained ? (
|
|
379
450
|
<OModal
|
|
@@ -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;
|