ordering-ui-react-native 0.16.53 → 0.16.54-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 (208) hide show
  1. package/package.json +6 -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/BusinessInformation/index.tsx +33 -4
  6. package/src/components/BusinessInformation/styles.tsx +2 -2
  7. package/src/components/BusinessProductsList/index.tsx +10 -10
  8. package/src/components/BusinessesListing/index.tsx +1 -1
  9. package/src/components/Checkout/index.tsx +2 -1
  10. package/src/components/LanguageSelector/index.tsx +21 -16
  11. package/src/components/Messages/index.tsx +2 -2
  12. package/src/components/NotificationSetting/index.tsx +85 -0
  13. package/src/components/OrdersOption/index.tsx +54 -56
  14. package/src/components/PaymentOptions/index.tsx +298 -345
  15. package/src/components/PaymentOptionsWebView/index.tsx +120 -121
  16. package/src/components/SingleProductReview/index.tsx +7 -4
  17. package/src/components/StripeElementsForm/index.tsx +25 -16
  18. package/src/components/VerifyPhone/styles.tsx +1 -2
  19. package/src/components/shared/OBottomPopup.tsx +6 -2
  20. package/src/components/shared/OToast.tsx +4 -4
  21. package/src/index.tsx +2 -0
  22. package/src/types/@fatnlazycat/react-native-recaptcha-v3/index.d.ts +1 -0
  23. package/src/utils/index.tsx +2 -1
  24. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +260 -238
  25. package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
  26. package/themes/business/src/components/BusinessController/index.tsx +2 -2
  27. package/themes/business/src/components/Chat/index.tsx +40 -32
  28. package/themes/business/src/components/DriverMap/index.tsx +7 -5
  29. package/themes/business/src/components/DriverSchedule/index.tsx +36 -19
  30. package/themes/business/src/components/LoginForm/index.tsx +111 -74
  31. package/themes/business/src/components/MapView/index.tsx +12 -1
  32. package/themes/business/src/components/MessagesOption/index.tsx +11 -1
  33. package/themes/business/src/components/NewOrderNotification/index.tsx +26 -41
  34. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +40 -30
  35. package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +3 -3
  36. package/themes/business/src/components/OrdersListManager/index.tsx +10 -3
  37. package/themes/business/src/components/OrdersOption/index.tsx +76 -77
  38. package/themes/business/src/components/OrdersOption/styles.tsx +5 -1
  39. package/themes/business/src/components/OrdersOptionBusiness/index.tsx +15 -1
  40. package/themes/business/src/components/OrdersOptionCity/index.tsx +15 -1
  41. package/themes/business/src/components/OrdersOptionDate/index.tsx +19 -6
  42. package/themes/business/src/components/OrdersOptionDelivery/index.tsx +15 -1
  43. package/themes/business/src/components/OrdersOptionDriver/index.tsx +15 -1
  44. package/themes/business/src/components/OrdersOptionPaymethod/index.tsx +15 -1
  45. package/themes/business/src/components/OrdersOptionStatus/index.tsx +10 -1
  46. package/themes/business/src/components/PreviousMessages/index.tsx +17 -18
  47. package/themes/business/src/components/PreviousOrders/OrderItem.tsx +250 -0
  48. package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +115 -0
  49. package/themes/business/src/components/PreviousOrders/index.tsx +440 -245
  50. package/themes/business/src/components/PreviousOrders/styles.tsx +31 -3
  51. package/themes/business/src/components/ProductItemAccordion/index.tsx +3 -2
  52. package/themes/business/src/components/ReviewCustomer/index.tsx +39 -15
  53. package/themes/business/src/components/ScheduleBlocked/index.tsx +2 -2
  54. package/themes/business/src/components/UserFormDetails/index.tsx +5 -2
  55. package/themes/business/src/components/UserProfileForm/index.tsx +2 -0
  56. package/themes/business/src/components/shared/ODropDown.tsx +42 -8
  57. package/themes/business/src/components/shared/ODropDownCalendar.tsx +36 -7
  58. package/themes/business/src/components/shared/OLink.tsx +24 -12
  59. package/themes/business/src/components/shared/OText.tsx +3 -2
  60. package/themes/business/src/types/index.tsx +25 -11
  61. package/themes/business/src/utils/index.tsx +10 -0
  62. package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
  63. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  64. package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
  65. package/themes/kiosk/src/components/BusinessesListing/index.tsx +2 -1
  66. package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
  67. package/themes/kiosk/src/components/LoginForm/index.tsx +121 -10
  68. package/themes/kiosk/src/components/LoginForm/styles.tsx +5 -0
  69. package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
  70. package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
  71. package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
  72. package/themes/kiosk/src/components/ProductForm/index.tsx +1 -14
  73. package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
  74. package/themes/kiosk/src/types/index.d.ts +2 -0
  75. package/themes/original/index.tsx +8 -6
  76. package/themes/original/src/components/AddressDetails/index.tsx +10 -8
  77. package/themes/original/src/components/AddressForm/index.tsx +157 -140
  78. package/themes/original/src/components/AddressList/index.tsx +1 -1
  79. package/themes/original/src/components/AppleLogin/index.tsx +4 -4
  80. package/themes/original/src/components/BusinessBasicInformation/index.tsx +53 -37
  81. package/themes/original/src/components/BusinessController/index.tsx +193 -91
  82. package/themes/original/src/components/BusinessController/styles.tsx +14 -9
  83. package/themes/original/src/components/BusinessInformation/index.tsx +10 -31
  84. package/themes/original/src/components/BusinessItemAccordion/index.tsx +12 -6
  85. package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
  86. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
  87. package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
  88. package/themes/original/src/components/BusinessListingSearch/index.tsx +85 -137
  89. package/themes/original/src/components/BusinessListingSearch/styles.tsx +10 -12
  90. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/index.tsx +87 -0
  91. package/themes/original/src/components/BusinessProductsList/SubcategoriesComponent/styles.tsx +12 -0
  92. package/themes/original/src/components/BusinessProductsList/index.tsx +59 -61
  93. package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
  94. package/themes/original/src/components/BusinessProductsListing/index.tsx +156 -86
  95. package/themes/original/src/components/BusinessProductsListing/styles.tsx +14 -12
  96. package/themes/original/src/components/BusinessTypeFilter/index.tsx +3 -2
  97. package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +28 -29
  98. package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +118 -111
  99. package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -9
  100. package/themes/original/src/components/BusinessesListing/index.tsx +51 -71
  101. package/themes/original/src/components/Cart/index.tsx +82 -15
  102. package/themes/original/src/components/Cart/styles.tsx +4 -0
  103. package/themes/original/src/components/CartContent/index.tsx +27 -17
  104. package/themes/original/src/components/CartContent/styles.tsx +1 -1
  105. package/themes/original/src/components/Checkout/index.tsx +115 -118
  106. package/themes/original/src/components/Checkout/styles.tsx +4 -3
  107. package/themes/original/src/components/CitiesControl/index.tsx +89 -0
  108. package/themes/original/src/components/CitiesControl/styles.tsx +17 -0
  109. package/themes/original/src/components/DriverTips/index.tsx +4 -4
  110. package/themes/original/src/components/DriverTips/styles.tsx +2 -1
  111. package/themes/original/src/components/FavoriteList/index.tsx +69 -45
  112. package/themes/original/src/components/FloatingButton/index.tsx +13 -11
  113. package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
  114. package/themes/original/src/components/GPSButton/index.tsx +20 -19
  115. package/themes/original/src/components/GPSButton/styles.ts +3 -3
  116. package/themes/original/src/components/GoogleMap/index.tsx +10 -1
  117. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +25 -10
  118. package/themes/original/src/components/HelpAccountAndPayment/styles.tsx +4 -0
  119. package/themes/original/src/components/HelpGuide/index.tsx +9 -8
  120. package/themes/original/src/components/HelpOrder/index.tsx +9 -8
  121. package/themes/original/src/components/LanguageSelector/index.tsx +19 -14
  122. package/themes/original/src/components/LoginForm/Otp/index.tsx +89 -73
  123. package/themes/original/src/components/LoginForm/Otp/styles.tsx +0 -1
  124. package/themes/original/src/components/LoginForm/index.tsx +98 -41
  125. package/themes/original/src/components/LottieAnimation/index.tsx +69 -0
  126. package/themes/original/src/components/Messages/index.tsx +35 -20
  127. package/themes/original/src/components/MomentOption/index.tsx +8 -6
  128. package/themes/original/src/components/MultiCart/index.tsx +63 -0
  129. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +92 -93
  130. package/themes/original/src/components/MultiCheckout/index.tsx +10 -2
  131. package/themes/original/src/components/MultiOrdersDetails/index.tsx +34 -16
  132. package/themes/original/src/components/MyOrders/index.tsx +88 -24
  133. package/themes/original/src/components/NavBar/index.tsx +11 -5
  134. package/themes/original/src/components/NetworkError/index.tsx +5 -3
  135. package/themes/original/src/components/NotFoundSource/index.tsx +2 -1
  136. package/themes/original/src/components/Notifications/index.tsx +148 -0
  137. package/themes/original/src/components/Notifications/styles.tsx +20 -0
  138. package/themes/original/src/components/OrderDetails/index.tsx +162 -50
  139. package/themes/original/src/components/OrderDetails/styles.tsx +15 -2
  140. package/themes/original/src/components/OrderItAgain/index.tsx +75 -0
  141. package/themes/original/src/components/OrderItAgain/styles.tsx +10 -0
  142. package/themes/original/src/components/OrderProgress/index.tsx +77 -66
  143. package/themes/original/src/components/OrderProgress/styles.tsx +5 -0
  144. package/themes/original/src/components/OrderSummary/index.tsx +2 -35
  145. package/themes/original/src/components/OrderTypeSelector/index.tsx +85 -36
  146. package/themes/original/src/components/OrderTypeSelector/styles.tsx +19 -1
  147. package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +94 -98
  148. package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/index.tsx +3 -0
  149. package/themes/original/src/components/OrdersOption/index.tsx +93 -53
  150. package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
  151. package/themes/original/src/components/PaymentOptions/index.tsx +1 -2
  152. package/themes/original/src/components/PhoneInputNumber/index.tsx +1 -1
  153. package/themes/original/src/components/PlaceSpot/index.tsx +249 -47
  154. package/themes/original/src/components/PlaceSpot/styles.tsx +0 -2
  155. package/themes/original/src/components/PreviousOrders/index.tsx +3 -2
  156. package/themes/original/src/components/ProductForm/index.tsx +367 -384
  157. package/themes/original/src/components/ProductForm/styles.tsx +7 -12
  158. package/themes/original/src/components/ProductItemAccordion/index.tsx +199 -128
  159. package/themes/original/src/components/ProductOption/index.tsx +1 -1
  160. package/themes/original/src/components/ProductOptionSubOption/index.tsx +16 -8
  161. package/themes/original/src/components/ProductOptionSubOption/styles.tsx +0 -1
  162. package/themes/original/src/components/ProfessionalFilter/index.tsx +2 -1
  163. package/themes/original/src/components/ProfessionalProfile/index.tsx +19 -8
  164. package/themes/original/src/components/Promotions/index.tsx +232 -219
  165. package/themes/original/src/components/Promotions/styles.tsx +7 -2
  166. package/themes/original/src/components/ReviewDriver/index.tsx +3 -3
  167. package/themes/original/src/components/ReviewOrder/index.tsx +120 -108
  168. package/themes/original/src/components/ReviewOrder/styles.tsx +5 -7
  169. package/themes/original/src/components/ReviewProducts/index.tsx +8 -5
  170. package/themes/original/src/components/ReviewTrigger/index.tsx +136 -0
  171. package/themes/original/src/components/{Reviews/ReviewOrder → ReviewTrigger}/styles.tsx +10 -22
  172. package/themes/original/src/components/ScheduleAccordion/index.tsx +68 -0
  173. package/themes/original/src/components/ScheduleAccordion/styles.tsx +14 -0
  174. package/themes/original/src/components/ServiceForm/index.tsx +330 -266
  175. package/themes/original/src/components/SignupForm/index.tsx +134 -89
  176. package/themes/original/src/components/SingleOrderCard/index.tsx +219 -129
  177. package/themes/original/src/components/SingleOrderCard/styles.tsx +10 -8
  178. package/themes/original/src/components/SingleProductCard/index.tsx +194 -128
  179. package/themes/original/src/components/SingleProductCard/styles.tsx +2 -9
  180. package/themes/original/src/components/SingleProductReview/index.tsx +38 -5
  181. package/themes/original/src/components/SingleProductReview/styles.tsx +12 -0
  182. package/themes/original/src/components/StripeElementsForm/index.tsx +13 -2
  183. package/themes/original/src/components/UpsellingProducts/index.tsx +15 -5
  184. package/themes/original/src/components/UserDetails/index.tsx +5 -3
  185. package/themes/original/src/components/UserFormDetails/index.tsx +6 -48
  186. package/themes/original/src/components/UserProfile/index.tsx +58 -35
  187. package/themes/original/src/components/UserProfile/styles.ts +17 -0
  188. package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
  189. package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
  190. package/themes/original/src/components/Wallets/index.tsx +176 -164
  191. package/themes/original/src/components/Wallets/styles.tsx +12 -8
  192. package/themes/original/src/components/shared/CardAnimation.tsx +47 -0
  193. package/themes/original/src/components/shared/HeaderTitle.tsx +8 -3
  194. package/themes/original/src/components/shared/OBottomPopup.tsx +36 -22
  195. package/themes/original/src/components/shared/OButton.tsx +8 -3
  196. package/themes/original/src/components/shared/OIcon.tsx +8 -1
  197. package/themes/original/src/components/shared/OInput.tsx +10 -1
  198. package/themes/original/src/layouts/Container.tsx +13 -9
  199. package/themes/original/src/layouts/FloatingBottomContainer.tsx +5 -1
  200. package/themes/original/src/types/index.tsx +65 -13
  201. package/themes/original/src/utils/index.tsx +103 -58
  202. package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
  203. package/themes/original/src/components/Reviews/ReviewDriver/index.tsx +0 -301
  204. package/themes/original/src/components/Reviews/ReviewDriver/styles.tsx +0 -39
  205. package/themes/original/src/components/Reviews/ReviewOrder/index.tsx +0 -326
  206. package/themes/original/src/components/Reviews/ReviewProducts/index.tsx +0 -101
  207. package/themes/original/src/components/Reviews/ReviewProducts/styles.tsx +0 -17
  208. package/themes/original/src/components/Reviews/index.tsx +0 -9
@@ -14,6 +14,8 @@ Sound.setCategory('Playback')
14
14
 
15
15
  const windowWidth = Dimensions.get('screen').width
16
16
 
17
+ const SOUND_LOOP = 3
18
+
17
19
  const NewOrderNotificationUI = (props: any) => {
18
20
  const { isBusinessApp } = props
19
21
  const [events] = useEvent()
@@ -22,8 +24,7 @@ const NewOrderNotificationUI = (props: any) => {
22
24
  const [{ user, token }] = useSession()
23
25
  const [ordering] = useApi()
24
26
  const { getCurrentLocation } = useLocation();
25
- const [soundTimeout, setSoundTimeout] = useState<any>(null)
26
- let [currentEvent, setCurrentEvent] = useState<any>(null)
27
+ const [currentEvent, setCurrentEvent] = useState<any>(null)
27
28
 
28
29
  const evtList: any = {
29
30
  1: {
@@ -43,29 +44,27 @@ const NewOrderNotificationUI = (props: any) => {
43
44
  },
44
45
  }
45
46
 
46
- const notificationSound = new Sound(theme.sounds.notification, (e) => { console.log(e) });
47
+ const notificationSound = new Sound(theme.sounds.notification);
47
48
 
48
- const handlePlayNotificationSound = () => {
49
- if (currentEvent) return
50
- let times = 0
51
- const _timeout = setInterval(function () {
52
- notificationSound.play(success => {
53
- if (success) {
54
- times = times + 1
55
- }
56
- })
57
- setSoundTimeout(_timeout)
58
- if (times === 3) {
59
- clearInterval(_timeout)
60
- clearInterval(soundTimeout)
61
- }
62
- }, 2500)
49
+ let _timeout: any = null
50
+
51
+ const handleCloseEvents = () => {
52
+ notificationSound.stop()
53
+ setCurrentEvent(null)
54
+ clearInterval(_timeout)
63
55
  }
64
56
 
65
- const handleCloseModal = () => {
66
- clearInterval(soundTimeout)
67
- currentEvent = null
68
- setCurrentEvent({ evt: null })
57
+ const handlePlayNotificationSound = (eventObj: any = null) => {
58
+ setCurrentEvent(eventObj)
59
+ let times = 1
60
+ if (times < SOUND_LOOP) {
61
+ _timeout = setInterval(() => {
62
+ notificationSound.setVolume(1).play(success => success && (times = times + 1))
63
+ if (times === SOUND_LOOP) {
64
+ clearInterval(_timeout)
65
+ }
66
+ }, 2500)
67
+ }
69
68
  }
70
69
 
71
70
  const handleEventNotification = async (evtType: number, value: any) => {
@@ -79,26 +78,15 @@ const NewOrderNotificationUI = (props: any) => {
79
78
  }),
80
79
  headers: { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }
81
80
  })
82
- } catch (error) {
83
- console.log(error)
84
- }
81
+ } catch {}
85
82
  const duration = moment.duration(moment().diff(moment.utc(value?.last_driver_assigned_at)))
86
83
  const assignedSecondsDiff = duration.asSeconds()
87
84
  if (assignedSecondsDiff < 5 && !isBusinessApp) {
88
- handlePlayNotificationSound()
89
- clearInterval(soundTimeout)
90
- currentEvent = { evt: 2, orderId: value?.id }
91
- setCurrentEvent({ evt: 2, orderId: value?.id })
85
+ handlePlayNotificationSound({ evt: 2, orderId: value?.id })
92
86
  }
93
87
  }
94
88
  if (evtType === 3 || value.author_id === user.id) return
95
- handlePlayNotificationSound()
96
- clearInterval(soundTimeout)
97
- currentEvent = {
98
- evt: evtType,
99
- orderId: evtList[evtType].event === 'messages' ? value?.order_id : value?.id
100
- }
101
- setCurrentEvent({
89
+ handlePlayNotificationSound({
102
90
  evt: evtType,
103
91
  orderId: evtList[evtType].event === 'messages' ? value?.order_id : value?.id
104
92
  })
@@ -116,10 +104,7 @@ const NewOrderNotificationUI = (props: any) => {
116
104
  }, [])
117
105
 
118
106
  useEffect(() => {
119
- notificationSound.setVolume(1);
120
- return () => {
121
- notificationSound.release();
122
- }
107
+ return () => handleCloseEvents()
123
108
  }, [])
124
109
 
125
110
  return (
@@ -133,7 +118,7 @@ const NewOrderNotificationUI = (props: any) => {
133
118
  <View style={styles.modalView}>
134
119
  <TouchableOpacity
135
120
  style={styles.wrapperIcon}
136
- onPress={() => handleCloseModal()}
121
+ onPress={() => handleCloseEvents()}
137
122
  >
138
123
  <Icon name="x" size={30} />
139
124
  </TouchableOpacity>
@@ -91,6 +91,10 @@ export const OrderContentComponent = (props: OrderContent) => {
91
91
  return order?.taxes?.filter((tax: any) => tax?.type === 1)?.reduce((carry: number, tax: any) => carry + (tax?.summary?.tax_after_discount ?? tax?.summary?.tax), 0)
92
92
  }
93
93
 
94
+ const containsOnlyNumbers = (str: string) => {
95
+ return /^\d+$/.test(str);
96
+ }
97
+
94
98
  return (
95
99
  <OrderContent isOrderGroup={isOrderGroup} lastOrder={lastOrder}>
96
100
  {isOrderGroup && (
@@ -148,7 +152,7 @@ export const OrderContentComponent = (props: OrderContent) => {
148
152
  <View style={styles.linkWithIcons}>
149
153
  <OLink
150
154
  PressStyle={styles.linkWithIcons}
151
- url={`tel:${order?.business?.cellphone}`}
155
+ url={`tel:${containsOnlyNumbers(order?.business?.cellphone) ? order?.business?.cellphone : 'invalid'}`}
152
156
  shorcut={`${order?.business?.cellphone}`}
153
157
  TextStyle={styles.textLink}
154
158
  />
@@ -159,7 +163,7 @@ export const OrderContentComponent = (props: OrderContent) => {
159
163
  <View style={styles.linkWithIcons}>
160
164
  <OLink
161
165
  PressStyle={styles.linkWithIcons}
162
- url={`tel:${order?.business?.phone}`}
166
+ url={`tel:${containsOnlyNumbers(order?.business?.cellphone) ? order?.business?.phone : 'invalid'}`}
163
167
  shorcut={order?.business?.phone}
164
168
  TextStyle={styles.textLink}
165
169
  />
@@ -274,7 +278,7 @@ export const OrderContentComponent = (props: OrderContent) => {
274
278
  <View style={styles.linkWithIcons}>
275
279
  <OLink
276
280
  PressStyle={styles.linkWithIcons}
277
- url={`tel:${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''} ${order?.customer?.cellphone}`}
281
+ url={`tel:${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''} ${containsOnlyNumbers(order?.customer?.cellphone) ? order?.customer?.cellphone : 'invalid'}`}
278
282
  shorcut={`${!!order?.customer?.country_phone_code ? '+' + order?.customer?.country_phone_code : ''} ${order?.customer?.cellphone}`}
279
283
  TextStyle={styles.textLink}
280
284
  />
@@ -285,7 +289,7 @@ export const OrderContentComponent = (props: OrderContent) => {
285
289
  <View style={styles.linkWithIcons}>
286
290
  <OLink
287
291
  PressStyle={styles.linkWithIcons}
288
- url={`tel:${order?.customer?.phone}`}
292
+ url={`tel:${containsOnlyNumbers(order?.customer?.phone) ? order?.customer?.phone : 'invalid'}`}
289
293
  shorcut={order?.customer?.phone}
290
294
  TextStyle={styles.textLink}
291
295
  />
@@ -333,13 +337,18 @@ export const OrderContentComponent = (props: OrderContent) => {
333
337
  <View style={{ marginTop: 10 }}>
334
338
  {order?.delivery_option !== undefined && order?.delivery_type === 1 && (
335
339
  <OText>
336
- {order?.delivery_option?.name}
340
+ {t(order?.delivery_option?.name?.toUpperCase()?.replace(/ /g, '_'), order?.delivery_option?.name)}
337
341
  </OText>
338
342
  )}
339
343
  {!!order?.comment && (
340
- <OText style={{ fontStyle: 'italic', opacity: 0.6, marginBottom: 5 }}>
341
- {order?.comment}
342
- </OText>
344
+ <>
345
+ <OText weight='500' style={{ marginBottom: 5 }}>
346
+ {t('ORDER_COMMENT', 'Order Comment')}
347
+ </OText>
348
+ <OText style={{ fontStyle: 'italic', opacity: 0.6, marginBottom: 20 }}>
349
+ {order?.comment}
350
+ </OText>
351
+ </>
343
352
  )}
344
353
  </View>
345
354
  )}
@@ -364,6 +373,7 @@ export const OrderContentComponent = (props: OrderContent) => {
364
373
  <ProductItemAccordion
365
374
  key={product?.id || i}
366
375
  product={product}
376
+ currency={order?.currency}
367
377
  />
368
378
  ))}
369
379
  </OrderProducts>
@@ -372,7 +382,7 @@ export const OrderContentComponent = (props: OrderContent) => {
372
382
  <Table>
373
383
  <OText mBottom={4}>{t('SUBTOTAL', 'Subtotal')}</OText>
374
384
  <OText mBottom={4}>
375
- {parsePrice(((order?.summary?.subtotal ?? order?.subtotal) + getIncludedTaxes()))}
385
+ {parsePrice(((order?.summary?.subtotal ?? order?.subtotal) + getIncludedTaxes()), { currency: order?.currency })}
376
386
  </OText>
377
387
  </Table>
378
388
  {(order?.summary?.discount > 0 ?? order?.discount > 0) && order?.offers?.length === 0 && (
@@ -385,7 +395,7 @@ export const OrderContentComponent = (props: OrderContent) => {
385
395
  ) : (
386
396
  <OText mBottom={4}>{t('DISCOUNT', theme?.defaultLanguages?.DISCOUNT || 'Discount')}</OText>
387
397
  )}
388
- <OText>- {parsePrice(order?.summary?.discount ?? order?.discount)}</OText>
398
+ <OText>- {parsePrice(order?.summary?.discount ?? order?.discount, { currency: order?.currency })}</OText>
389
399
  </Table>
390
400
  )}
391
401
  {
@@ -393,13 +403,13 @@ export const OrderContentComponent = (props: OrderContent) => {
393
403
  <Table key={offer.id}>
394
404
  <OSRow>
395
405
  <OText mBottom={4}>
396
- {offer.name}
406
+ {t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
397
407
  {offer.rate_type === 1 && (
398
408
  <OText>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</OText>
399
409
  )}
400
410
  </OText>
401
411
  </OSRow>
402
- <OText mBottom={4}>- {parsePrice(offer?.summary?.discount)}</OText>
412
+ <OText mBottom={4}>- {parsePrice(offer?.summary?.discount, { currency: order?.currency })}</OText>
403
413
  </Table>
404
414
  ))
405
415
  }
@@ -407,9 +417,9 @@ export const OrderContentComponent = (props: OrderContent) => {
407
417
  <Table>
408
418
  <OText mBottom={4}>{t('SUBTOTAL_WITH_DISCOUNT', 'Subtotal with discount')}</OText>
409
419
  {order?.tax_type === 1 ? (
410
- <OText mBottom={4}>{parsePrice((order?.summary?.subtotal_with_discount + getIncludedTaxesDiscounts() ?? 0))}</OText>
420
+ <OText mBottom={4}>{parsePrice((order?.summary?.subtotal_with_discount + getIncludedTaxesDiscounts() ?? 0), { currency: order?.currency })}</OText>
411
421
  ) : (
412
- <OText mBottom={4}>{parsePrice(order?.summary?.subtotal_with_discount ?? 0)}</OText>
422
+ <OText mBottom={4}>{parsePrice(order?.summary?.subtotal_with_discount ?? 0, { currency: order?.currency })}</OText>
413
423
  )}
414
424
  </Table>
415
425
  )}
@@ -419,7 +429,7 @@ export const OrderContentComponent = (props: OrderContent) => {
419
429
  {t('TAX', 'Tax')} {`(${verifyDecimals(order?.tax, parseNumber)}%)`}
420
430
  </OText>
421
431
  <OText mBottom={4}>
422
- {parsePrice(order?.summary?.tax ?? 0)}
432
+ {parsePrice(order?.summary?.tax ?? 0, { currency: order?.currency })}
423
433
  </OText>
424
434
  </Table>
425
435
  )}
@@ -430,7 +440,7 @@ export const OrderContentComponent = (props: OrderContent) => {
430
440
  {t('SERVICE_FEE', 'Service fee')}
431
441
  {`(${verifyDecimals(order?.service_fee, parseNumber)}%)`}
432
442
  </OText>
433
- <OText mBottom={4}>{parsePrice(order?.summary?.service_fee ?? 0)}</OText>
443
+ <OText mBottom={4}>{parsePrice(order?.summary?.service_fee ?? 0, { currency: order?.currency })}</OText>
434
444
  </Table>
435
445
  )
436
446
  }
@@ -439,11 +449,11 @@ export const OrderContentComponent = (props: OrderContent) => {
439
449
  <Table key={tax.id}>
440
450
  <OSRow>
441
451
  <OText mBottom={4}>
442
- {tax.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
452
+ {t(tax?.name?.toUpperCase()?.replace(/ /g, '_'), tax?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
443
453
  {`(${verifyDecimals(tax?.rate, parseNumber)}%)`}{' '}
444
454
  </OText>
445
455
  </OSRow>
446
- <OText mBottom={4}>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0)}</OText>
456
+ <OText mBottom={4}>{parsePrice(tax?.summary?.tax_after_discount ?? tax?.summary?.tax ?? 0, { currency: order?.currency })}</OText>
447
457
  </Table>
448
458
  ))
449
459
  }
@@ -452,11 +462,11 @@ export const OrderContentComponent = (props: OrderContent) => {
452
462
  <Table key={fee.id}>
453
463
  <OSRow>
454
464
  <OText mBottom={4}>
455
- {fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
456
- ({fee?.fixed > 0 && `${parsePrice(fee?.fixed)} + `}{fee.percentage}%){' '}
465
+ {t(fee?.name?.toUpperCase()?.replace(/ /g, '_'), fee?.name) || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
466
+ ({fee?.fixed > 0 && `${parsePrice(fee?.fixed, { currency: order?.currency })} + `}{fee.percentage}%){' '}
457
467
  </OText>
458
468
  </OSRow>
459
- <OText mBottom={4}>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</OText>
469
+ <OText mBottom={4}>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0, { currency: order?.currency })}</OText>
460
470
  </Table>
461
471
  ))
462
472
  }
@@ -465,13 +475,13 @@ export const OrderContentComponent = (props: OrderContent) => {
465
475
  <Table key={offer.id}>
466
476
  <OSRow>
467
477
  <OText mBottom={4}>
468
- {offer.name}
478
+ {t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
469
479
  {offer.rate_type === 1 && (
470
480
  <OText>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</OText>
471
481
  )}
472
482
  </OText>
473
483
  </OSRow>
474
- <OText mBottom={4}>- {parsePrice(offer?.summary?.discount)}</OText>
484
+ <OText mBottom={4}>- {parsePrice(offer?.summary?.discount, { currency: order?.currency })}</OText>
475
485
  </Table>
476
486
  ))
477
487
  }
@@ -483,7 +493,7 @@ export const OrderContentComponent = (props: OrderContent) => {
483
493
  </OText>
484
494
 
485
495
  <OText mBottom={4}>
486
- {parsePrice(order?.summary?.delivery_price)}
496
+ {parsePrice(order?.summary?.delivery_price, { currency: order?.currency })}
487
497
  </OText>
488
498
  </Table>
489
499
  )
@@ -493,13 +503,13 @@ export const OrderContentComponent = (props: OrderContent) => {
493
503
  <Table key={offer.id}>
494
504
  <OSRow>
495
505
  <OText mBottom={4}>
496
- {offer.name}
506
+ {t(offer.name?.toUpperCase()?.replace(/ /g, '_'), offer.name)}
497
507
  {offer.rate_type === 1 && (
498
508
  <OText>{`(${verifyDecimals(offer?.rate, parsePrice)}%)`}</OText>
499
509
  )}
500
510
  </OText>
501
511
  </OSRow>
502
- <OText mBottom={4}>- {parsePrice(offer?.summary?.discount)}</OText>
512
+ <OText mBottom={4}>- {parsePrice(offer?.summary?.discount, { currency: order?.currency })}</OText>
503
513
  </Table>
504
514
  ))
505
515
  }
@@ -514,7 +524,7 @@ export const OrderContentComponent = (props: OrderContent) => {
514
524
  `(${verifyDecimals(order?.summary?.driver_tip, parseNumber)}%)`
515
525
  )}
516
526
  </OText>
517
- <OText mBottom={4}>{parsePrice(order?.summary?.driver_tip ?? order?.totalDriverTip)}</OText>
527
+ <OText mBottom={4}>{parsePrice(order?.summary?.driver_tip ?? order?.totalDriverTip, { currency: order?.currency })}</OText>
518
528
  </Table>
519
529
  )}
520
530
 
@@ -528,7 +538,7 @@ export const OrderContentComponent = (props: OrderContent) => {
528
538
  mBottom={4}
529
539
  style={styles.textBold}
530
540
  color={theme.colors.primary}>
531
- {parsePrice(order?.summary?.total ?? order?.total)}
541
+ {parsePrice(order?.summary?.total ?? order?.total, { currency: order?.currency })}
532
542
  </OText>
533
543
  </Table>
534
544
  </Total>
@@ -562,7 +572,7 @@ export const OrderContentComponent = (props: OrderContent) => {
562
572
  <OText>
563
573
  {event?.wallet_event
564
574
  ? walletName[event?.wallet_event?.wallet?.type]?.name
565
- : event?.paymethod?.name}
575
+ : t(event?.paymethod?.name?.toUpperCase()?.replace(/ /g, '_'), event?.paymethod?.name)}
566
576
  </OText>
567
577
  {event?.data?.charge_id && (
568
578
  <OText>
@@ -571,7 +581,7 @@ export const OrderContentComponent = (props: OrderContent) => {
571
581
  )}
572
582
  </View>
573
583
  <OText>
574
- -{parsePrice(event.amount)}
584
+ -{parsePrice(event.amount, { currency: order?.currency })}
575
585
  </OText>
576
586
  </View>
577
587
  ))}
@@ -271,7 +271,7 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
271
271
  {order?.delivery_option && (
272
272
  <OText size={13}>
273
273
  <OText size={13} weight='bold'>{`${t('DELIVERY_PREFERENCE', 'Delivery Preference')}: `}</OText>
274
- {order?.delivery_option?.name}
274
+ {t(order?.delivery_option?.name?.toUpperCase()?.replace(/ /g, '_'), order?.delivery_option?.name)}
275
275
  </OText>
276
276
  )}
277
277
  {order?.payment_events?.length > 0 && (
@@ -286,8 +286,8 @@ export const OrderHeaderComponent = (props: OrderHeader) => {
286
286
  ? `${walletName[event?.wallet_event?.wallet?.type]?.name} - `
287
287
  : walletName[event?.wallet_event?.wallet?.type]?.name
288
288
  : idx < order?.payment_events?.length - 1
289
- ? `${event?.paymethod?.name} - `
290
- : event?.paymethod?.name
289
+ ? `${t(event?.paymethod?.name?.toUpperCase()?.replace(/ /g, '_'), event?.paymethod?.name)} - `
290
+ : t(event?.paymethod?.name?.toUpperCase()?.replace(/ /g, '_'), event?.paymethod?.name)
291
291
  })}
292
292
  </OText>
293
293
  </View>
@@ -6,7 +6,7 @@ import FontistoIcon from 'react-native-vector-icons/Fontisto'
6
6
  import FeatherIcon from 'react-native-vector-icons/Feather';
7
7
  import SelectDropdown from 'react-native-select-dropdown'
8
8
  import { useTheme } from 'styled-components/native';
9
-
9
+ import { NotificationSetting } from '../../../../../src/components/NotificationSetting'
10
10
  import {
11
11
  FiltersTab,
12
12
  TabsContainer,
@@ -611,7 +611,7 @@ const OrdersListManagerUI = (props: OrdersOptionParams) => {
611
611
  </LeftSide>
612
612
 
613
613
  <RightSide style={{ paddingBottom: 110, paddingHorizontal: 20 }}>
614
- {currentOrderSelected && (
614
+ {currentOrderSelected && (
615
615
  <OrderDetailsBusiness {...props.orderDetailsProps} order={currentOrderSelected} isCustomView />
616
616
  )}
617
617
  </RightSide>
@@ -756,6 +756,7 @@ const OrdersListManagerUI = (props: OrdersOptionParams) => {
756
756
 
757
757
  export const OrdersListManager = (props: OrdersOptionParams) => {
758
758
  const [, t] = useLanguage();
759
+ const [checkNotificationStatus, setCheckNotificationStatus] = useState({ open: false, checked: false })
759
760
  const ordersProps = {
760
761
  ...props,
761
762
  UIComponent: OrdersListManagerUI,
@@ -870,5 +871,11 @@ export const OrdersListManager = (props: OrdersOptionParams) => {
870
871
  ]
871
872
  };
872
873
 
873
- return <OrderListGroups {...ordersProps} />;
874
+ return (<>
875
+ <OrderListGroups {...ordersProps} />
876
+ {props?.checkNotification && (
877
+ <NotificationSetting checkNotificationStatus={checkNotificationStatus}
878
+ setCheckNotificationStatus={setCheckNotificationStatus} />
879
+ )}
880
+ </>);
874
881
  };