ordering-ui-react-native 0.16.34 → 0.16.35-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.
Files changed (199) hide show
  1. package/package.json +7 -5
  2. package/src/DeliveryApp.tsx +43 -1
  3. package/src/components/ActiveOrders/index.tsx +61 -63
  4. package/src/components/ActiveOrders/styles.tsx +8 -14
  5. package/src/components/BusinessBasicInformation/index.tsx +11 -19
  6. package/src/components/BusinessInformation/index.tsx +33 -4
  7. package/src/components/BusinessInformation/styles.tsx +2 -2
  8. package/src/components/BusinessProductsList/index.tsx +10 -10
  9. package/src/components/BusinessesListing/index.tsx +1 -1
  10. package/src/components/Checkout/index.tsx +2 -1
  11. package/src/components/LanguageSelector/index.tsx +21 -16
  12. package/src/components/LoginForm/index.tsx +15 -0
  13. package/src/components/Messages/index.tsx +2 -2
  14. package/src/components/NotificationSetting/index.tsx +85 -0
  15. package/src/components/OrderDetails/index.tsx +2 -20
  16. package/src/components/OrdersOption/index.tsx +54 -56
  17. package/src/components/PaymentOptions/index.tsx +335 -365
  18. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  19. package/src/components/ReviewDriver/index.tsx +1 -1
  20. package/src/components/ReviewOrder/index.tsx +2 -1
  21. package/src/components/ReviewProducts/index.tsx +11 -0
  22. package/src/components/SignupForm/index.tsx +15 -0
  23. package/src/components/SingleProductReview/index.tsx +8 -5
  24. package/src/components/StripeElementsForm/index.tsx +25 -16
  25. package/src/components/VerifyPhone/styles.tsx +1 -2
  26. package/src/components/shared/OBottomPopup.tsx +6 -2
  27. package/src/index.tsx +2 -0
  28. package/src/pages/BusinessesListing.tsx +7 -6
  29. package/src/pages/OrderDetails.tsx +1 -1
  30. package/src/pages/ReviewDriver.tsx +2 -2
  31. package/src/pages/ReviewOrder.tsx +2 -2
  32. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  33. package/src/utils/index.tsx +2 -1
  34. package/themes/business/index.tsx +4 -0
  35. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  36. package/themes/business/src/components/Chat/index.tsx +38 -30
  37. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  38. package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
  39. package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
  40. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  41. package/themes/business/src/components/MapView/index.tsx +12 -1
  42. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  43. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
  44. package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
  45. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
  46. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  47. package/themes/business/src/components/OrdersOption/index.tsx +65 -21
  48. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  49. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  50. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  51. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  52. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  53. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  54. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  55. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  56. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  57. package/themes/business/src/components/PreviousOrders/index.tsx +21 -23
  58. package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
  59. package/themes/business/src/components/ReviewCustomer/index.tsx +27 -13
  60. package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
  61. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  62. package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
  63. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  64. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  65. package/themes/business/src/components/shared/OModal.tsx +40 -37
  66. package/themes/business/src/types/index.tsx +15 -9
  67. package/themes/business/src/utils/index.tsx +10 -0
  68. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  69. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  70. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  71. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  72. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  73. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  74. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  75. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  76. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  77. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  78. package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
  79. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  80. package/themes/kiosk/src/types/index.d.ts +2 -0
  81. package/themes/original/index.tsx +4 -0
  82. package/themes/original/src/components/AddressDetails/index.tsx +2 -2
  83. package/themes/original/src/components/AddressForm/index.tsx +151 -140
  84. package/themes/original/src/components/AddressList/index.tsx +1 -1
  85. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  86. package/themes/original/src/components/BusinessBasicInformation/index.tsx +324 -162
  87. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
  88. package/themes/original/src/components/BusinessController/index.tsx +190 -113
  89. package/themes/original/src/components/BusinessController/styles.tsx +0 -7
  90. package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
  91. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  92. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  93. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  94. package/themes/original/src/components/BusinessListingSearch/index.tsx +80 -128
  95. package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
  96. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  97. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  98. package/themes/original/src/components/BusinessProductsList/index.tsx +49 -52
  99. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  100. package/themes/original/src/components/BusinessProductsListing/index.tsx +179 -104
  101. package/themes/original/src/components/BusinessProductsListing/styles.tsx +18 -11
  102. package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
  103. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
  104. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +37 -25
  105. package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -4
  106. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +278 -104
  107. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +47 -10
  108. package/themes/original/src/components/BusinessesListing/index.tsx +95 -7
  109. package/themes/original/src/components/Cart/index.tsx +54 -16
  110. package/themes/original/src/components/Cart/styles.tsx +4 -0
  111. package/themes/original/src/components/CartContent/index.tsx +22 -16
  112. package/themes/original/src/components/Checkout/index.tsx +109 -64
  113. package/themes/original/src/components/Checkout/styles.tsx +0 -1
  114. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  115. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  116. package/themes/original/src/components/Favorite/index.tsx +1 -0
  117. package/themes/original/src/components/FavoriteList/index.tsx +32 -2
  118. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  119. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  120. package/themes/original/src/components/GoogleMap/index.tsx +20 -12
  121. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
  122. package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
  123. package/themes/original/src/components/HelpGuide/index.tsx +9 -8
  124. package/themes/original/src/components/HelpOrder/index.tsx +9 -8
  125. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  126. package/themes/original/src/components/LoginForm/Otp/index.tsx +95 -72
  127. package/themes/original/src/components/LoginForm/index.tsx +90 -46
  128. package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
  129. package/themes/original/src/components/Messages/index.tsx +17 -17
  130. package/themes/original/src/components/MomentOption/index.tsx +8 -6
  131. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -92
  132. package/themes/original/src/components/MultiCheckout/index.tsx +6 -0
  133. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
  134. package/themes/original/src/components/MyOrders/index.tsx +70 -6
  135. package/themes/original/src/components/NavBar/index.tsx +15 -9
  136. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  137. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  138. package/themes/original/src/components/Notifications/index.tsx +148 -0
  139. package/themes/original/src/components/Notifications/styles.tsx +17 -0
  140. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  141. package/themes/original/src/components/OrderDetails/index.tsx +200 -37
  142. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  143. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  144. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  145. package/themes/original/src/components/OrderProgress/index.tsx +77 -66
  146. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  147. package/themes/original/src/components/OrderSummary/index.tsx +3 -36
  148. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  149. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  150. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +97 -106
  151. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  152. package/themes/original/src/components/OrdersOption/index.tsx +71 -55
  153. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  154. package/themes/original/src/components/PaymentOptions/index.tsx +41 -23
  155. package/themes/original/src/components/PhoneInputNumber/index.tsx +5 -11
  156. package/themes/original/src/components/PlaceSpot/index.tsx +243 -47
  157. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  158. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  159. package/themes/original/src/components/ProductForm/index.tsx +635 -664
  160. package/themes/original/src/components/ProductForm/styles.tsx +9 -8
  161. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  162. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  163. package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
  164. package/themes/original/src/components/ProfessionalProfile/index.tsx +26 -14
  165. package/themes/original/src/components/ReviewDriver/index.tsx +7 -7
  166. package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
  167. package/themes/original/src/components/ReviewProducts/index.tsx +2 -2
  168. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  169. package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
  170. package/themes/original/src/components/SearchBar/index.tsx +5 -3
  171. package/themes/original/src/components/ServiceForm/index.tsx +410 -258
  172. package/themes/original/src/components/SignupForm/index.tsx +350 -206
  173. package/themes/original/src/components/SingleOrderCard/index.tsx +229 -181
  174. package/themes/original/src/components/SingleOrderCard/styles.tsx +0 -7
  175. package/themes/original/src/components/SingleProductCard/index.tsx +200 -110
  176. package/themes/original/src/components/SingleProductCard/styles.tsx +2 -10
  177. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  178. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  179. package/themes/original/src/components/StripeElementsForm/index.tsx +18 -7
  180. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
  181. package/themes/original/src/components/UserDetails/index.tsx +11 -2
  182. package/themes/original/src/components/UserFormDetails/index.tsx +67 -77
  183. package/themes/original/src/components/UserProfile/index.tsx +56 -31
  184. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  185. package/themes/original/src/components/UserProfileForm/index.tsx +10 -10
  186. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  187. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  188. package/themes/original/src/components/Wallets/index.tsx +176 -164
  189. package/themes/original/src/components/Wallets/styles.tsx +12 -8
  190. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  191. package/themes/original/src/components/shared/OBottomPopup.tsx +48 -15
  192. package/themes/original/src/components/shared/OButton.tsx +10 -3
  193. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  194. package/themes/original/src/components/shared/OInput.tsx +13 -3
  195. package/themes/original/src/layouts/Container.tsx +13 -9
  196. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  197. package/themes/original/src/types/index.tsx +91 -30
  198. package/themes/original/src/utils/index.tsx +121 -10
  199. 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,263 @@ 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
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
+ )}
263
+ </SocialListWrapper>
264
+ )}
265
+ </>
266
+ )
267
+ }
268
+
101
269
  return (
102
- <BusinessContainer>
270
+ <BusinessContainer isChewLayout={isChewLayout && !showLogo}>
103
271
  <BusinessHeader
272
+ isChewLayout={isChewLayout}
104
273
  style={
105
274
  isBusinessInfoShow
106
275
  ? styles.businesInfoheaderStyle
107
276
  : { ...styles.headerStyle, backgroundColor: theme.colors.backgroundGray }
108
277
  }
109
- source={{
110
- uri:
111
- header ||
112
- optimizeImage(businessState?.business?.header, 'h_250,c_limit'),
113
- }}>
114
- {!isBusinessInfoShow && (
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 && (
115
286
  <WrapBusinessInfo onPress={() => handleClickBusinessInformation()}>
116
287
  <OIcon src={theme.images.general.info} width={24} />
117
288
  </WrapBusinessInfo>
118
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}
298
+ </OText>
299
+ )}
300
+ <View style={styles.socialIconsChewContainer}>
301
+ <SocialIcons />
302
+ </View>
303
+ </View>
304
+ )}
119
305
  </BusinessHeader>
120
306
  <BusinessInfo style={styles.businessInfo}>
121
- <BusinessLogo>
122
- {loading ? (
123
- <View>
124
- <Placeholder Animation={Fade}>
125
- <PlaceholderLine height={50} width={20} />
126
- </Placeholder>
127
- </View>
128
- ) : (
129
- !isBusinessInfoShow && (
130
- <OIcon
131
- url={
132
- logo ||
133
- optimizeImage(businessState?.business?.logo, 'h_70,c_limit')
134
- }
135
- style={styles.businessLogo}
136
- />
137
- )
138
- )}
139
- </BusinessLogo>
140
- <BusinessInfoItem>
141
- {loading ? (
142
- <Placeholder Animation={Fade}>
143
- <PlaceholderLine height={30} width={20} />
144
- </Placeholder>
145
- ) : (
146
- <TitleWrapper>
147
- <OText size={24} weight={'600'}>
148
- {business?.name}
149
- </OText>
150
- {business?.ribbon?.enabled && (
151
- <RibbonBox
152
- bgColor={business?.ribbon?.color}
153
- isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
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}
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>
336
+ ) : (
337
+ <TitleWrapper>
338
+ <OText size={24} weight={'600'} numberOfLines={2}>
339
+ {business?.name}
165
340
  </OText>
166
- </RibbonBox>
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>
167
360
  )}
168
- </TitleWrapper>
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 && (
361
+ </BusinessInfoItem>
362
+ {loading ? (
183
363
  <Placeholder Animation={Fade}>
184
- <View style={{ flexDirection: 'row' }}>
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>
364
+ <PlaceholderLine width={10} />
190
365
  </Placeholder>
366
+ ) : (
367
+ <View style={{ width: '75%' }}>
368
+ <OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
369
+ </View>
191
370
  )}
192
- <View style={styles.bullet}>
193
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
194
- {`${t('DELIVERY_FEE', 'Delivery fee')} ${business && parsePrice(business?.delivery_price || 0)} \u2022 `}
195
- </OText>
196
- {orderState?.options?.type === 1 ? (
197
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
198
- {convertHoursToMinutes(business?.delivery_time) + ` \u2022 `}
199
- </OText>
200
- ) : (
201
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
202
- {convertHoursToMinutes(business?.pickup_time) + ` \u2022 `}
203
- </OText>
204
- )}
205
- <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
206
- {parseDistance(business?.distance || 0) + ` \u2022 `}
207
- </OText>
208
- </View>
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>
209
403
 
210
- <View style={styles.reviewStyle}>
211
- <OIcon
212
- src={theme.images.general.star}
213
- width={14}
214
- color={theme.colors.textSecondary}
215
- style={{ marginTop: -2, marginEnd: 2 }}
216
- />
217
- <OText size={12} color={theme.colors.textSecondary}>
218
- {business?.reviews?.total}
219
- </OText>
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>
220
416
  </View>
221
- </BusinessInfoItem>
222
- </View>
223
- <WrapReviews>
224
- {!isBusinessInfoShow && (
225
- <>
226
- {isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
417
+ <WrapReviews>
418
+ {!isBusinessInfoShow && (
227
419
  <>
228
- <TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
229
- <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
230
- {t('PRE_ORDER', 'Preorder')}
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')}
231
441
  </OText>
232
442
  </TouchableOpacity>
233
- <OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
234
443
  </>
235
444
  )}
236
- <TouchableOpacity onPress={() => handleClickBusinessReviews()}>
237
- <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
238
- {t('REVIEWS', 'Reviews')}
239
- </OText>
240
- </TouchableOpacity>
241
- </>
242
- )}
243
- </WrapReviews>
445
+ </WrapReviews>
446
+ </>
447
+ )}
244
448
  </BusinessInfo>
245
449
  {businessInformationObtained ? (
246
450
  <OModal
@@ -276,45 +480,3 @@ export const BusinessBasicInformation = (
276
480
  </BusinessContainer>
277
481
  );
278
482
  };
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
+ `