ordering-ui-react-native 0.16.21 → 0.16.22-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 (204) hide show
  1. package/package.json +7 -4
  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/AddressForm/index.tsx +18 -2
  6. package/src/components/BusinessBasicInformation/index.tsx +11 -19
  7. package/src/components/BusinessController/index.tsx +10 -8
  8. package/src/components/BusinessInformation/index.tsx +33 -4
  9. package/src/components/BusinessInformation/styles.tsx +2 -2
  10. package/src/components/BusinessProductsList/index.tsx +10 -10
  11. package/src/components/BusinessesListing/index.tsx +1 -1
  12. package/src/components/Checkout/index.tsx +2 -1
  13. package/src/components/LanguageSelector/index.tsx +21 -16
  14. package/src/components/LoginForm/index.tsx +118 -30
  15. package/src/components/LoginForm/styles.tsx +6 -0
  16. package/src/components/Messages/index.tsx +2 -2
  17. package/src/components/NotificationSetting/index.tsx +85 -0
  18. package/src/components/OrderDetails/index.tsx +2 -20
  19. package/src/components/OrdersOption/index.tsx +54 -56
  20. package/src/components/PaymentOptions/index.tsx +335 -365
  21. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  22. package/src/components/ReviewDriver/index.tsx +1 -1
  23. package/src/components/ReviewOrder/index.tsx +2 -1
  24. package/src/components/ReviewProducts/index.tsx +11 -0
  25. package/src/components/SignupForm/index.tsx +143 -61
  26. package/src/components/SingleProductReview/index.tsx +8 -5
  27. package/src/components/StripeElementsForm/index.tsx +25 -16
  28. package/src/components/VerifyPhone/styles.tsx +1 -2
  29. package/src/components/shared/OBottomPopup.tsx +6 -2
  30. package/src/index.tsx +2 -0
  31. package/src/pages/BusinessesListing.tsx +7 -6
  32. package/src/pages/OrderDetails.tsx +1 -1
  33. package/src/pages/ReviewDriver.tsx +2 -2
  34. package/src/pages/ReviewOrder.tsx +2 -2
  35. package/src/theme.json +0 -1
  36. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  37. package/src/types/index.tsx +13 -9
  38. package/src/utils/index.tsx +0 -1
  39. package/themes/business/index.tsx +4 -0
  40. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  41. package/themes/business/src/components/Chat/index.tsx +42 -34
  42. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  43. package/themes/business/src/components/DriverSchedule/index.tsx +71 -0
  44. package/themes/business/src/components/DriverSchedule/styles.tsx +6 -0
  45. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  46. package/themes/business/src/components/MapView/index.tsx +12 -1
  47. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  48. package/themes/business/src/components/OrderDetails/Business.tsx +1 -1
  49. package/themes/business/src/components/OrderDetails/Delivery.tsx +3 -3
  50. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +25 -19
  51. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  52. package/themes/business/src/components/OrdersOption/index.tsx +65 -21
  53. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  54. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  55. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  56. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  57. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  58. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  59. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  60. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  61. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  62. package/themes/business/src/components/PreviousOrders/index.tsx +21 -23
  63. package/themes/business/src/components/ProductItemAccordion/index.tsx +5 -4
  64. package/themes/business/src/components/ReviewCustomer/index.tsx +1 -1
  65. package/themes/business/src/components/ScheduleBlocked/index.tsx +53 -0
  66. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  67. package/themes/business/src/components/UserProfileForm/index.tsx +28 -4
  68. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  69. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  70. package/themes/business/src/components/shared/OModal.tsx +40 -37
  71. package/themes/business/src/types/index.tsx +15 -9
  72. package/themes/business/src/utils/index.tsx +10 -0
  73. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  74. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  75. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  76. package/themes/kiosk/src/components/BusinessMenu/index.tsx +2 -1
  77. package/themes/kiosk/src/components/CartItem/index.tsx +4 -3
  78. package/themes/kiosk/src/components/CategoriesMenu/index.tsx +1 -0
  79. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  80. package/themes/kiosk/src/components/DrawerView/index.tsx +1 -0
  81. package/themes/kiosk/src/components/DrawerView/styles.tsx +2 -2
  82. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  83. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  84. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  85. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  86. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  87. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  88. package/themes/kiosk/src/types/index.d.ts +2 -0
  89. package/themes/original/index.tsx +12 -0
  90. package/themes/original/src/components/AddressForm/index.tsx +136 -133
  91. package/themes/original/src/components/AddressList/index.tsx +1 -1
  92. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  93. package/themes/original/src/components/BusinessBasicInformation/index.tsx +302 -160
  94. package/themes/original/src/components/BusinessBasicInformation/styles.tsx +6 -2
  95. package/themes/original/src/components/BusinessController/index.tsx +173 -108
  96. package/themes/original/src/components/BusinessItemAccordion/index.tsx +8 -6
  97. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  98. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  99. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  100. package/themes/original/src/components/BusinessListingSearch/index.tsx +106 -126
  101. package/themes/original/src/components/BusinessListingSearch/styles.tsx +18 -13
  102. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  103. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  104. package/themes/original/src/components/BusinessProductsList/index.tsx +49 -52
  105. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  106. package/themes/original/src/components/BusinessProductsListing/index.tsx +287 -175
  107. package/themes/original/src/components/BusinessProductsListing/styles.tsx +22 -8
  108. package/themes/original/src/components/BusinessReviews/index.tsx +6 -1
  109. package/themes/original/src/components/BusinessTypeFilter/index.tsx +109 -40
  110. package/themes/original/src/components/BusinessTypeFilter/styles.tsx +2 -0
  111. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +561 -0
  112. package/themes/original/src/components/BusinessesListing/{styles.tsx → Layout/Appointment/styles.tsx} +24 -10
  113. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +676 -0
  114. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +137 -0
  115. package/themes/original/src/components/BusinessesListing/index.tsx +105 -519
  116. package/themes/original/src/components/Cart/index.tsx +42 -10
  117. package/themes/original/src/components/Cart/styles.tsx +4 -0
  118. package/themes/original/src/components/CartContent/index.tsx +22 -16
  119. package/themes/original/src/components/Checkout/index.tsx +106 -66
  120. package/themes/original/src/components/Checkout/styles.tsx +0 -1
  121. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  122. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  123. package/themes/original/src/components/Favorite/index.tsx +1 -0
  124. package/themes/original/src/components/Favorite/styles.tsx +1 -0
  125. package/themes/original/src/components/FavoriteList/index.tsx +142 -93
  126. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  127. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  128. package/themes/original/src/components/GoogleMap/index.tsx +20 -12
  129. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +8 -3
  130. package/themes/original/src/components/HelpGuide/index.tsx +8 -3
  131. package/themes/original/src/components/HelpOrder/index.tsx +8 -3
  132. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  133. package/themes/original/src/components/LoginForm/Otp/index.tsx +3 -2
  134. package/themes/original/src/components/LoginForm/index.tsx +82 -44
  135. package/themes/original/src/components/Messages/index.tsx +17 -17
  136. package/themes/original/src/components/MomentSelector/index.tsx +197 -0
  137. package/themes/original/src/components/MomentSelector/styles.tsx +6 -0
  138. package/themes/original/src/components/MultiCheckout/index.tsx +6 -0
  139. package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
  140. package/themes/original/src/components/MyOrders/index.tsx +68 -6
  141. package/themes/original/src/components/NavBar/index.tsx +15 -9
  142. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  143. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  144. package/themes/original/src/components/Notifications/index.tsx +148 -0
  145. package/themes/original/src/components/Notifications/styles.tsx +17 -0
  146. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +167 -0
  147. package/themes/original/src/components/OrderDetails/index.tsx +200 -42
  148. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  149. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  150. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  151. package/themes/original/src/components/OrderProgress/index.tsx +8 -2
  152. package/themes/original/src/components/OrderSummary/index.tsx +1 -34
  153. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  154. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  155. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +100 -106
  156. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +17 -12
  157. package/themes/original/src/components/OrdersOption/index.tsx +71 -55
  158. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  159. package/themes/original/src/components/PaymentOptions/index.tsx +57 -37
  160. package/themes/original/src/components/PhoneInputNumber/index.tsx +4 -10
  161. package/themes/original/src/components/PlaceSpot/index.tsx +243 -47
  162. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  163. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  164. package/themes/original/src/components/ProductForm/index.tsx +712 -655
  165. package/themes/original/src/components/ProductForm/styles.tsx +9 -7
  166. package/themes/original/src/components/ProductItemAccordion/index.tsx +198 -127
  167. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  168. package/themes/original/src/components/ProfessionalFilter/index.tsx +129 -0
  169. package/themes/original/src/components/ProfessionalFilter/styles.tsx +0 -0
  170. package/themes/original/src/components/ProfessionalProfile/index.tsx +309 -0
  171. package/themes/original/src/components/ProfessionalProfile/styles.tsx +46 -0
  172. package/themes/original/src/components/ReviewDriver/index.tsx +6 -6
  173. package/themes/original/src/components/ReviewOrder/index.tsx +18 -3
  174. package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
  175. package/themes/original/src/components/ReviewTrigger/index.tsx +118 -0
  176. package/themes/original/src/components/ReviewTrigger/styles.tsx +34 -0
  177. package/themes/original/src/components/SearchBar/index.tsx +5 -3
  178. package/themes/original/src/components/ServiceForm/index.tsx +631 -0
  179. package/themes/original/src/components/ServiceForm/styles.tsx +50 -0
  180. package/themes/original/src/components/SignupForm/index.tsx +350 -206
  181. package/themes/original/src/components/SingleOrderCard/index.tsx +214 -179
  182. package/themes/original/src/components/SingleProductCard/index.tsx +194 -108
  183. package/themes/original/src/components/SingleProductCard/styles.tsx +2 -2
  184. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  185. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  186. package/themes/original/src/components/StripeElementsForm/index.tsx +15 -7
  187. package/themes/original/src/components/UpsellingProducts/index.tsx +14 -4
  188. package/themes/original/src/components/UserDetails/index.tsx +31 -17
  189. package/themes/original/src/components/UserFormDetails/index.tsx +74 -81
  190. package/themes/original/src/components/UserProfile/index.tsx +57 -29
  191. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  192. package/themes/original/src/components/UserProfileForm/index.tsx +15 -10
  193. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  194. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  195. package/themes/original/src/components/Wallets/index.tsx +174 -162
  196. package/themes/original/src/components/Wallets/styles.tsx +10 -8
  197. package/themes/original/src/components/shared/OBottomPopup.tsx +47 -14
  198. package/themes/original/src/components/shared/OButton.tsx +10 -3
  199. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  200. package/themes/original/src/components/shared/OInput.tsx +3 -2
  201. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  202. package/themes/original/src/types/index.tsx +124 -30
  203. package/themes/original/src/utils/index.tsx +77 -0
  204. 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,243 @@ 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
- source={{
110
- uri:
111
- header ||
112
- optimizeImage(businessState?.business?.header, 'h_250,c_limit'),
113
- }}>
114
- {!isBusinessInfoShow && (
274
+ {...(!loading && { source: {
275
+ uri: header || optimizeImage(businessState?.business?.header || theme?.images?.dummies?.businessHeader, 'h_250,c_limit')
276
+ }})}
277
+ imageStyle={{ opacity: isChewLayout ? 0.5 : 1 }}
278
+ >
279
+ {!isBusinessInfoShow && !isChewLayout && (
115
280
  <WrapBusinessInfo onPress={() => handleClickBusinessInformation()}>
116
281
  <OIcon src={theme.images.general.info} width={24} />
117
282
  </WrapBusinessInfo>
118
283
  )}
284
+ {isChewLayout && !loading && (
285
+ <View style={styles.headerChewStyle}>
286
+ <OText size={24} weight={'600'} mBottom={-5}>
287
+ {business?.name}
288
+ </OText>
289
+ {business?.city?.name && (
290
+ <OText>
291
+ {business?.city?.name}
292
+ </OText>
293
+ )}
294
+ <View style={styles.socialIconsChewContainer}>
295
+ <SocialIcons />
296
+ </View>
297
+ </View>
298
+ )}
119
299
  </BusinessHeader>
120
300
  <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}
301
+ {showLogo && (
302
+ <BusinessLogo isChewLayout={isChewLayout}>
303
+ {!isBusinessInfoShow && (
304
+ <FastImage
305
+ style={styles.logoStyle}
306
+ source={{
307
+ uri: logo || optimizeImage(businessState?.business?.logo || theme?.images?.dummies?.businessLogo, 'h_70,c_limit'),
308
+ priority: FastImage.priority.high,
309
+ cache:FastImage.cacheControl.web
310
+ }}
311
+ resizeMode={FastImage.resizeMode.contain}
136
312
  />
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}
313
+ )}
314
+ </BusinessLogo>
315
+ )}
316
+ {!isChewLayout && (
317
+
318
+ <>
319
+ <BusinessInfoItem>
320
+ {loading ? (
321
+ <Placeholder Animation={Fade}>
322
+ <PlaceholderLine height={30} width={20} />
323
+ </Placeholder>
324
+ ) : (
325
+ <TitleWrapper>
326
+ <OText size={24} weight={'600'} numberOfLines={2}>
327
+ {business?.name}
165
328
  </OText>
166
- </RibbonBox>
329
+ {business?.ribbon?.enabled && (
330
+ <RibbonBox
331
+ bgColor={business?.ribbon?.color}
332
+ isRoundRect={business?.ribbon?.shape === shape?.rectangleRound}
333
+ isCapsule={business?.ribbon?.shape === shape?.capsuleShape}
334
+ >
335
+ <OText
336
+ size={10}
337
+ weight={'400'}
338
+ color={theme.colors.white}
339
+ numberOfLines={2}
340
+ ellipsizeMode='tail'
341
+ lineHeight={13}
342
+ >
343
+ {business?.ribbon?.text}
344
+ </OText>
345
+ </RibbonBox>
346
+ )}
347
+ </TitleWrapper>
167
348
  )}
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 && (
349
+ </BusinessInfoItem>
350
+ {loading ? (
183
351
  <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>
352
+ <PlaceholderLine width={10} />
190
353
  </Placeholder>
354
+ ) : (
355
+ <View style={{ width: '75%' }}>
356
+ <OText color={theme.colors.textNormal}>{getBusinessType()}</OText>
357
+ </View>
191
358
  )}
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>
359
+ {!isChewLayout && (
360
+ <SocialIcons />
361
+ )}
362
+ <View>
363
+ <BusinessInfoItem>
364
+ {loading && (
365
+ <Placeholder Animation={Fade}>
366
+ <View style={{ flexDirection: 'row' }}>
367
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
368
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
369
+ <PlaceholderLine width={13} style={{ marginRight: 10 }} />
370
+ <PlaceholderLine width={13} />
371
+ </View>
372
+ </Placeholder>
373
+ )}
374
+ <View style={styles.bullet}>
375
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
376
+ {`${t('DELIVERY_FEE', 'Delivery fee')} ${business && parsePrice(business?.delivery_price || 0)} \u2022 `}
377
+ </OText>
378
+ {orderState?.options?.type === 1 ? (
379
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
380
+ {convertHoursToMinutes(business?.delivery_time) + ` \u2022 `}
381
+ </OText>
382
+ ) : (
383
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
384
+ {convertHoursToMinutes(business?.pickup_time) + ` \u2022 `}
385
+ </OText>
386
+ )}
387
+ <OText color={theme.colors.textSecondary} size={12} style={styles.metadata}>
388
+ {parseDistance(business?.distance || 0) + ` \u2022 `}
389
+ </OText>
390
+ </View>
209
391
 
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>
392
+ <View style={styles.reviewStyle}>
393
+ <OIcon
394
+ src={theme.images.general.star}
395
+ width={14}
396
+ color={theme.colors.textSecondary}
397
+ style={{ marginTop: -2, marginEnd: 2 }}
398
+ />
399
+ <OText size={12} color={theme.colors.textSecondary}>
400
+ {business?.reviews?.total}
401
+ </OText>
402
+ </View>
403
+ </BusinessInfoItem>
220
404
  </View>
221
- </BusinessInfoItem>
222
- </View>
223
- <WrapReviews>
224
- {!isBusinessInfoShow && (
225
- <>
226
- {isPreOrder && (
405
+ <WrapReviews>
406
+ {!isBusinessInfoShow && (
227
407
  <>
228
- <TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
408
+ {isPreOrder && (!business?.professionals || business?.professionals?.length === 0) && (
409
+ <>
410
+ <TouchableOpacity onPress={() => navigation.navigate('BusinessPreorder', { business: businessState?.business, handleBusinessClick: () => navigation?.goBack() })}>
411
+ <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
412
+ {t('PREORDER', 'Preorder')}
413
+ </OText>
414
+ </TouchableOpacity>
415
+ <OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
416
+ </>
417
+ )}
418
+ <TouchableOpacity onPress={() => handleClickBusinessReviews()}>
229
419
  <OText color={theme.colors.textSecondary} style={{ textDecorationLine: 'underline' }}>
230
- {t('PRE_ORDER', 'Preorder')}
420
+ {t('REVIEWS', 'Reviews')}
231
421
  </OText>
232
422
  </TouchableOpacity>
233
- <OText size={12} color={theme.colors.textSecondary}>{' \u2022 '}</OText>
234
423
  </>
235
424
  )}
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>
425
+ </WrapReviews>
426
+ </>
427
+ )}
244
428
  </BusinessInfo>
245
429
  {businessInformationObtained ? (
246
430
  <OModal
@@ -276,45 +460,3 @@ export const BusinessBasicInformation = (
276
460
  </BusinessContainer>
277
461
  );
278
462
  };
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
+ `