ordering-ui-react-native 0.22.47-map → 0.22.47-test

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 (75) hide show
  1. package/package.json +4 -4
  2. package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +4 -3
  3. package/themes/business/src/components/NewOrderNotification/index.tsx +3 -4
  4. package/themes/business/src/components/OrderDetails/Delivery.tsx +14 -2
  5. package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +9 -9
  6. package/themes/business/src/types/index.tsx +1 -0
  7. package/themes/original/src/components/AddressForm/index.tsx +10 -12
  8. package/themes/original/src/components/AddressList/index.tsx +0 -13
  9. package/themes/original/src/components/BusinessItemAccordion/index.tsx +4 -2
  10. package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +1 -3
  11. package/themes/original/src/components/BusinessListingSearch/index.tsx +1 -2
  12. package/themes/original/src/components/BusinessPreorder/index.tsx +20 -17
  13. package/themes/original/src/components/Cart/index.tsx +1 -2
  14. package/themes/original/src/components/CartContent/index.tsx +1 -2
  15. package/themes/original/src/components/Checkout/index.tsx +29 -17
  16. package/themes/original/src/components/CitiesControl/index.tsx +0 -3
  17. package/themes/original/src/components/CouponControl/index.tsx +1 -3
  18. package/themes/original/src/components/DriverTips/index.tsx +1 -3
  19. package/themes/original/src/components/Favorite/index.tsx +0 -5
  20. package/themes/original/src/components/FavoriteList/index.tsx +0 -1
  21. package/themes/original/src/components/ForgotPasswordForm/index.tsx +4 -10
  22. package/themes/original/src/components/GiftCard/GiftCardUI/index.tsx +15 -17
  23. package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +3 -7
  24. package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +24 -32
  25. package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +7 -9
  26. package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +11 -12
  27. package/themes/original/src/components/GoogleMap/index.tsx +4 -3
  28. package/themes/original/src/components/Help/index.tsx +0 -5
  29. package/themes/original/src/components/HelpAccountAndPayment/index.tsx +0 -5
  30. package/themes/original/src/components/HelpGuide/index.tsx +0 -5
  31. package/themes/original/src/components/HelpOrder/index.tsx +0 -5
  32. package/themes/original/src/components/Home/index.tsx +1 -10
  33. package/themes/original/src/components/LoginForm/Otp/index.tsx +0 -3
  34. package/themes/original/src/components/LoginForm/index.tsx +1 -9
  35. package/themes/original/src/components/MessageListing/index.tsx +0 -5
  36. package/themes/original/src/components/MomentOption/index.tsx +6 -10
  37. package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +1 -0
  38. package/themes/original/src/components/MultiCheckout/index.tsx +0 -1
  39. package/themes/original/src/components/MultiOrdersDetails/index.tsx +1 -0
  40. package/themes/original/src/components/MyOrders/index.tsx +0 -5
  41. package/themes/original/src/components/NavBar/index.tsx +1 -4
  42. package/themes/original/src/components/NetworkError/index.tsx +0 -5
  43. package/themes/original/src/components/NotFoundSource/index.tsx +0 -3
  44. package/themes/original/src/components/Notifications/index.tsx +0 -5
  45. package/themes/original/src/components/OrderDetails/OrderHistory.tsx +5 -7
  46. package/themes/original/src/components/OrderDetails/index.tsx +1 -2
  47. package/themes/original/src/components/OrderTypeSelector/index.tsx +3 -8
  48. package/themes/original/src/components/PaymentOptionStripe/index.tsx +0 -5
  49. package/themes/original/src/components/PaymentOptions/index.tsx +0 -2
  50. package/themes/original/src/components/PlaceSpot/index.tsx +1 -3
  51. package/themes/original/src/components/PreviousOrders/index.tsx +1 -4
  52. package/themes/original/src/components/ProductForm/ActionButton.tsx +4 -5
  53. package/themes/original/src/components/ProductOptionSubOption/index.tsx +8 -1
  54. package/themes/original/src/components/ProfessionalProfile/index.tsx +4 -5
  55. package/themes/original/src/components/Promotions/index.tsx +2 -7
  56. package/themes/original/src/components/ReviewDriver/index.tsx +1 -6
  57. package/themes/original/src/components/ReviewOrder/index.tsx +2 -7
  58. package/themes/original/src/components/ReviewProducts/index.tsx +1 -6
  59. package/themes/original/src/components/ReviewTrigger/index.tsx +2 -2
  60. package/themes/original/src/components/ServiceForm/index.tsx +52 -54
  61. package/themes/original/src/components/Sessions/index.tsx +3 -8
  62. package/themes/original/src/components/SignupForm/index.tsx +4 -13
  63. package/themes/original/src/components/SingleOrderCard/index.tsx +0 -1
  64. package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
  65. package/themes/original/src/components/StripeCardForm/index.tsx +0 -3
  66. package/themes/original/src/components/StripeCardsList/index.tsx +9 -1
  67. package/themes/original/src/components/StripeElementsForm/index.tsx +4 -2
  68. package/themes/original/src/components/StripeRedirectForm/index.tsx +0 -3
  69. package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +1 -3
  70. package/themes/original/src/components/UserFormDetails/index.tsx +8 -10
  71. package/themes/original/src/components/UserProfileForm/index.tsx +0 -5
  72. package/themes/original/src/components/Wallets/index.tsx +1 -3
  73. package/themes/original/src/components/WebsocketStatus/index.tsx +1 -4
  74. package/themes/original/src/components/shared/OButton.tsx +3 -2
  75. package/themes/original/src/types/index.tsx +2 -1
@@ -45,15 +45,10 @@ export const NetworkError = (props: NoNetworkParams) => {
45
45
  />
46
46
  <OButton
47
47
  text={t('REFRESH', 'Refresh')}
48
- bgColor={theme.colors.primary}
49
- borderColor={theme.colors.primary}
50
48
  style={{
51
49
  borderRadius: 8,
52
50
  marginTop: 45
53
51
  }}
54
- textStyle={{
55
- color: theme.colors.white
56
- }}
57
52
  onClick={() => RNRestart.Restart()}
58
53
  />
59
54
  </ImageContainer>
@@ -42,11 +42,8 @@ export const NotFoundSource = (props: NotFoundSourceParams) => {
42
42
  <View style={{ marginTop: 10, width: '100%' }}>
43
43
  <OButton
44
44
  style={{ width: '100%', height: 50, ...btnStyle }}
45
- bgColor={theme.colors.primary}
46
- borderColor={theme.colors.primary}
47
45
  onClick={() => onClickButton()}
48
46
  text={btnTitle}
49
- textStyle={{ color: theme.colors.white }}
50
47
  />
51
48
  </View>
52
49
  )}
@@ -75,11 +75,6 @@ const NotificationsUI = (props: any) => {
75
75
  showCall={false}
76
76
  style={{ paddingVertical: 0 }}
77
77
  btnStyle={{ paddingLeft: 0 }}
78
- buttonProps={{
79
- bgColor: theme.colors.white,
80
- borderColor: theme.colors.white,
81
- textStyle: { color: theme.colors.btnFont }
82
- }}
83
78
  />
84
79
  {showCustomerPromotions && showNotifications && (
85
80
  <>
@@ -145,10 +145,10 @@ export const OrderHistory = (props: any) => {
145
145
  </>
146
146
  )
147
147
  : message.change?.attribute === 'prepared_in' ? (
148
- <>
149
- {t('TIME_ADDED_BY_BUSINESS', 'Time added by business')}{'\n'}
150
- {formatSeconds(parseInt(message.change.new, 10))}
151
- </>
148
+ <>
149
+ {t('TIME_ADDED_BY_BUSINESS', 'Time added by business')}{'\n'}
150
+ {formatSeconds(parseInt(message.change.new, 10))}
151
+ </>
152
152
  ) : t(ORDER_STATUS[parseInt(message.change.new, 10)])
153
153
  }
154
154
  </OText>
@@ -170,11 +170,9 @@ export const OrderHistory = (props: any) => {
170
170
  ))}
171
171
  <OButton
172
172
  text={enableReview ? t('REVIEW_ORDER', 'Review order') : t('CONTINUE', 'Continue')}
173
- textStyle={{ fontSize: 14, color: theme.colors.white }}
173
+ textStyle={{ fontSize: 14 }}
174
174
  imgRightSrc={theme.images.general.arrow_right}
175
175
  imgRightStyle={{ tintColor: theme.colors.white, right: 5, margin: 5 }}
176
- borderColor='transparent'
177
- bgColor={theme.colors.primary}
178
176
  style={{ borderRadius: 7.6, borderWidth: 1, height: 44, shadowOpacity: 0, marginBottom: 30, marginTop: 20 }}
179
177
  onClick={() => handleReview()}
180
178
  />
@@ -643,7 +643,6 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
643
643
  <OButton
644
644
  text={t('GET_DIRECTIONS', 'Get Directions')}
645
645
  imgRightSrc=''
646
- textStyle={{ color: theme.colors.white }}
647
646
  style={{
648
647
  alignSelf: 'center',
649
648
  borderRadius: 10,
@@ -750,6 +749,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
750
749
  }
751
750
  locations={parsedLocations}
752
751
  readOnly
752
+ manualZoom
753
753
  />
754
754
  </Map>
755
755
  )}
@@ -833,7 +833,6 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
833
833
  text={t('YOUR_ORDERS', 'Your Orders')}
834
834
  textStyle={{ fontSize: 14, color: theme.colors.primary }}
835
835
  imgRightSrc={null}
836
- borderColor={theme.colors.primary}
837
836
  bgColor={theme.colors.clear}
838
837
  style={{ borderRadius: 7.6, borderWidth: 1, height: 44, shadowOpacity: 0 }}
839
838
  parentStyle={{ marginTop: 29, marginEnd: 15 }}
@@ -31,9 +31,9 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
31
31
  const [orderState] = useOrder();
32
32
  const [, t] = useLanguage();
33
33
  const _orderTypes = orderTypes.filter((type: any) => configTypes?.includes(type.value));
34
- const orderTypeTitle = (type : string) => theme?.header?.components?.order_types?.components?.[type]?.components?.title
35
- const orderTypeDescription = (type : string) => theme?.header?.components?.order_types?.components?.[type]?.components?.description
36
- const orderTypeCallAction = (type : string) => theme?.header?.components?.order_types?.components?.[type]?.components?.call_to_action
34
+ const orderTypeTitle = (type: string) => theme?.header?.components?.order_types?.components?.[type]?.components?.title
35
+ const orderTypeDescription = (type: string) => theme?.header?.components?.order_types?.components?.[type]?.components?.description
36
+ const orderTypeCallAction = (type: string) => theme?.header?.components?.order_types?.components?.[type]?.components?.call_to_action
37
37
  const items = _orderTypes.map((type) => {
38
38
  return {
39
39
  value: type.value,
@@ -103,11 +103,6 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
103
103
  title={t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will your order type?')}
104
104
  titleAlign={'center'}
105
105
  noMargin
106
- buttonProps={{
107
- bgColor: theme.colors.white,
108
- borderColor: theme.colors.white,
109
- textStyle: { color: theme.colors.btnFont }
110
- }}
111
106
  />
112
107
  {
113
108
  items.length > 0 && (
@@ -131,7 +131,6 @@ const PaymentOptionStripeUI = (props: any) => {
131
131
  bgColor={theme.colors.backgroundGray}
132
132
  borderColor={theme.colors.backgroundGray}
133
133
  style={styles.btnAddStyle}
134
- textStyle={{ color: 'white' }}
135
134
  imgRightSrc={null}
136
135
  onClick={() => setAddCardOpen(true)}
137
136
  />
@@ -141,7 +140,6 @@ const PaymentOptionStripeUI = (props: any) => {
141
140
  text={t('CANCEL', 'Cancel')}
142
141
  bgColor={theme.colors.backgroundGray}
143
142
  borderColor={theme.colors.backgroundGray}
144
- textStyle={{ color: 'white' }}
145
143
  style={styles.btnAction}
146
144
  imgRightSrc={null}
147
145
  onClick={() => onCancel()}
@@ -150,9 +148,6 @@ const PaymentOptionStripeUI = (props: any) => {
150
148
  <View style={{ width: '48%' }}>
151
149
  <OButton
152
150
  text={t('ACCEPT', 'Accept')}
153
- bgColor={theme.colors.primary}
154
- borderColor={theme.colors.primary}
155
- textStyle={{ color: 'white' }}
156
151
  style={styles.btnAction}
157
152
  imgRightSrc={null}
158
153
  isDisabled={!cardSelected || cardsList?.cards?.length === 0}
@@ -326,7 +326,6 @@ const PaymentOptionsUI = (props: any) => {
326
326
  <OButton
327
327
  text={t('ADD_PAYMENT_CARD', 'Add New Payment Card')}
328
328
  bgColor={theme.colors.white}
329
- borderColor={theme.colors.primary}
330
329
  style={styles.btnAddStyle}
331
330
  textStyle={{ color: theme.colors.primary, fontSize: 12 }}
332
331
  imgRightSrc={null}
@@ -426,7 +425,6 @@ const PaymentOptionsUI = (props: any) => {
426
425
  <OButton
427
426
  text={t('ADD_PAYMENT_CARD', 'Add New Payment Card')}
428
427
  bgColor={theme.colors.white}
429
- borderColor={theme.colors.primary}
430
428
  style={styles.btnAddStyle}
431
429
  textStyle={{ color: theme.colors.primary, fontSize: 12 }}
432
430
  imgRightSrc={null}
@@ -236,9 +236,7 @@ const PlaceSpotUI = (props: PlaceSpotParams) => {
236
236
  <View style={{ alignItems: 'flex-start' }}>
237
237
  <OButton
238
238
  onClick={() => onChangeSpot()}
239
- bgColor={theme.colors.primary}
240
- borderColor={theme.colors.primary}
241
- textStyle={{ color: 'white', fontSize: 12 }}
239
+ textStyle={{ fontSize: 12 }}
242
240
  imgRightSrc={null}
243
241
  text={t('UPDATE_SPOT_NUMBER', 'Update')}
244
242
  isDisabled={(!spotNumber && !Object.values(vehicle).every(e => e))}
@@ -27,7 +27,7 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
27
27
 
28
28
  const [, t] = useLanguage();
29
29
 
30
- const pastOrders = [1, 2, 5, 6, 10, 11, 12, 15, 16, 17]
30
+ const pastOrders = [1, 2, 5, 6, 10, 11, 12, 15, 16, 17]
31
31
 
32
32
  return (
33
33
  <View style={{ marginBottom: 30 }}>
@@ -49,9 +49,6 @@ export const PreviousOrders = (props: PreviousOrdersParams) => {
49
49
  onClick={loadMoreOrders}
50
50
  text={t('LOAD_MORE_ORDERS', 'Load more orders')}
51
51
  imgRightSrc={null}
52
- bgColor={theme.colors.primary}
53
- borderColor={theme.colors.primary}
54
- textStyle={{ color: theme.colors.white }}
55
52
  style={{ borderRadius: 7.6, shadowOpacity: 0, marginTop: 20 }}
56
53
  />
57
54
  </WrappButton>
@@ -59,11 +59,11 @@ export const ActionButton = (props: any) => {
59
59
  }`}
60
60
  isDisabled={isSoldOut || maxProductQuantity <= 0 || (product?.minimum_per_order && ((productCart?.quantity + productAddedToCartLength) < product?.minimum_per_order)) || (product?.maximum_per_order && ((productCart?.quantity + productAddedToCartLength) > product?.maximum_per_order))}
61
61
  textStyle={{
62
- color: saveErrors || isSoldOut || maxProductQuantity <= 0 ? theme.colors.primary : theme.colors.white,
62
+ color: theme.colors.white,
63
63
  fontSize: orderState.loading || editMode ? 10 : 14
64
64
  }}
65
65
  bgColor={buttonColor ? theme.colors.lightGray : theme.colors.primary}
66
- borderColor={!buttonColor ? theme.colors.white : theme.colors.primary}
66
+ borderColor={buttonColor ? theme.colors.lightGray : theme.colors.primary}
67
67
  style={{
68
68
  opacity: saveErrors || isSoldOut || maxProductQuantity <= 0 ? 0.3 : 1,
69
69
  borderRadius: 7.6,
@@ -84,7 +84,7 @@ export const ActionButton = (props: any) => {
84
84
  textStyle={{ fontSize: 10 }}
85
85
  />
86
86
  ) : (
87
- <OButton onClick={navigation.navigate('AddressList')} />
87
+ <OButton onClick={() => navigation.navigate('AddressList')} />
88
88
  ))}
89
89
  {!auth && (
90
90
  <OButton
@@ -96,10 +96,9 @@ export const ActionButton = (props: any) => {
96
96
  : t('LOGIN_SIGNUP', 'Login / Sign Up')
97
97
  }
98
98
  imgRightSrc=""
99
- textStyle={{ color: theme.colors.primary, fontSize: 13, textAlign: 'center' }}
99
+ textStyle={{ fontSize: 13, textAlign: 'center', color: theme.colors.primary }}
100
100
  style={{
101
101
  height: 42,
102
- borderColor: theme.colors.primary,
103
102
  backgroundColor: theme.colors.white,
104
103
  paddingLeft: 0,
105
104
  paddingRight: 0
@@ -35,7 +35,8 @@ export const ProductOptionSubOptionUI = (props: any) => {
35
35
  disabled,
36
36
  setIsScrollAvailable,
37
37
  image,
38
- enableIntersection
38
+ enableIntersection,
39
+ onChange
39
40
  } = props
40
41
 
41
42
  const disableIncrement = option?.limit_suboptions_by_max ? balance === option?.max || state.quantity === suboption?.max : state.quantity === suboption?.max || (!state.selected && balance === option?.max)
@@ -88,6 +89,12 @@ export const ProductOptionSubOptionUI = (props: any) => {
88
89
  }
89
90
  }, [balance])
90
91
 
92
+ useEffect(() => {
93
+ if (!suboption?.preselected || !option?.respect_to) return
94
+ const newState = { ...state, selected: suboption?.preselected, quantity: state.selected ? 0 : 1 }
95
+ onChange(newState, suboption, option)
96
+ }, [suboption, option])
97
+
91
98
  return (
92
99
  <InView onChange={(inView: boolean) => handleChangeInterSection(inView)} triggerOnce={true}>
93
100
  {isIntersectionObserver ? (
@@ -233,7 +233,7 @@ export const ProfessionalProfile = (props: ProfessionalProfileParams) => {
233
233
  <CalendarWrapper>
234
234
  {(timeList?.length > 0 && isEnabled) ? (
235
235
  <SelectDropdown
236
- ref={dropdownRef}
236
+ ref={dropdownRef}
237
237
  data={timeList}
238
238
  onSelect={(selectedItem, index) => {
239
239
  console.log(selectedItem.value)
@@ -244,7 +244,7 @@ export const ProfessionalProfile = (props: ProfessionalProfileParams) => {
244
244
  rowTextForSelection={(item, index) => {
245
245
  return item.text
246
246
  }}
247
- buttonStyle={{borderRadius: 7.6, ...styles.selectOption}}
247
+ buttonStyle={{ borderRadius: 7.6, ...styles.selectOption }}
248
248
  buttonTextStyle={{
249
249
  color: theme.colors.disabled,
250
250
  fontSize: 14,
@@ -267,7 +267,7 @@ export const ProfessionalProfile = (props: ProfessionalProfileParams) => {
267
267
  }}
268
268
  renderCustomizedRowChild={(item, index) => {
269
269
  return (
270
- <Text style={[styles.dropDownRow, { color: isBusyTime(professional, getMomentTime(item.value)) ? theme.colors.lightGray : theme.colors.primary } ]}>
270
+ <Text style={[styles.dropDownRow, { color: isBusyTime(professional, getMomentTime(item.value)) ? theme.colors.lightGray : theme.colors.primary }]}>
271
271
  {item.text}
272
272
  </Text>
273
273
  )
@@ -326,11 +326,10 @@ export const ProfessionalProfile = (props: ProfessionalProfileParams) => {
326
326
  </ScheduleWrapper>
327
327
  <ButtonWrapper>
328
328
  <OButton
329
- bgColor={theme.colors.primary}
330
329
  onClick={() => handleSelectProfessional()}
331
330
  text={t('BOOK', 'Book')}
332
331
  style={styles.buttonStyle}
333
- textStyle={{ fontSize: 14, color: theme.colors.white }}
332
+ textStyle={{ fontSize: 14 }}
334
333
  />
335
334
  </ButtonWrapper>
336
335
  </Container>
@@ -113,11 +113,6 @@ const PromotionsUI = (props: PromotionParams) => {
113
113
  paddingTop={Platform.OS === 'ios' ? 20 : 10}
114
114
  style={{ paddingVertical: 0 }}
115
115
  btnStyle={{ paddingLeft: 0 }}
116
- buttonProps={{
117
- bgColor: theme.colors.white,
118
- borderColor: theme.colors.white,
119
- textStyle: { color: theme.colors.btnFont }
120
- }}
121
116
  />
122
117
  <PromotionsContainer>
123
118
  <SearchBarContainer>
@@ -176,7 +171,7 @@ const PromotionsUI = (props: PromotionParams) => {
176
171
  onClick={() => handleClickOffer(offer)}
177
172
  text={t('VIEW', 'View')}
178
173
  style={styles.buttonStyle}
179
- textStyle={{ fontSize: 14, color: '#fff', flexWrap: 'nowrap' }}
174
+ textStyle={{ fontSize: 14, flexWrap: 'nowrap' }}
180
175
  />
181
176
  </WrapperSingleOffer>
182
177
  ))}
@@ -240,7 +235,7 @@ const PromotionsUI = (props: PromotionParams) => {
240
235
  onClick={() => handleBusinessClick(business)}
241
236
  text={t('GO_TO_BUSINESSS', 'Go to business')}
242
237
  style={styles.modalButtonStyle}
243
- textStyle={{ fontSize: 10, color: '#fff' }}
238
+ textStyle={{ fontSize: 10 }}
244
239
  />
245
240
  </BusinessInfo>
246
241
  </SingleBusinessOffer>
@@ -192,11 +192,6 @@ const ReviewDriverUI = (props: ReviewDriverParams) => {
192
192
  style={{ flexDirection: 'column', alignItems: 'flex-start' }}
193
193
  titleWrapStyle={{ paddingHorizontal: 0 }}
194
194
  titleStyle={{ marginRight: 0, marginLeft: 0 }}
195
- buttonProps={{
196
- bgColor: theme.colors.white,
197
- borderColor: theme.colors.white,
198
- textStyle: { color: theme.colors.btnFont }
199
- }}
200
195
  />
201
196
  <DriverPhotoContainer>
202
197
  <View
@@ -298,7 +293,7 @@ const ReviewDriverUI = (props: ReviewDriverParams) => {
298
293
  <FloatingBottomContainer>
299
294
  <ActionContainer>
300
295
  <OButton
301
- textStyle={{ color: theme.colors.white, paddingRight: 10 }}
296
+ textStyle={{ paddingRight: 10 }}
302
297
  text={t('SEND_REVIEW', 'Send Review')}
303
298
  style={{ borderRadius: 8 }}
304
299
  imgRightStyle={{ tintColor: theme.colors.white, right: 5, margin: 5 }}
@@ -215,11 +215,6 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
215
215
  style={{ flexDirection: 'column', alignItems: 'flex-start' }}
216
216
  titleWrapStyle={{ paddingHorizontal: 0 }}
217
217
  titleStyle={{ marginRight: 0, marginLeft: 0 }}
218
- buttonProps={{
219
- bgColor: theme.colors.white,
220
- borderColor: theme.colors.white,
221
- textStyle: { color: theme.colors.btnFont }
222
- }}
223
218
  />
224
219
  <BusinessLogo isMulti={order?.business?.length > 1}>
225
220
  {typeof order?.logo === 'string' || !order?.logo ? (
@@ -232,7 +227,7 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
232
227
  </View>
233
228
  ) : (
234
229
  <MultiLogosContainer>
235
- {order?.logo?.map((logo : string, i : number) => (
230
+ {order?.logo?.map((logo: string, i: number) => (
236
231
  <React.Fragment key={logo}>
237
232
  <View style={styles.logoWrapper}>
238
233
  <OIcon
@@ -338,7 +333,7 @@ export const ReviewOrderUI = (props: ReviewOrderParams) => {
338
333
  <OText weight={700} size={18} color={theme.colors.textNormal}>{t('FRONT_VISUALS_SKIP', 'Skip')}</OText>
339
334
  </SkipButton>
340
335
  <OButton
341
- textStyle={{ color: theme.colors.white, paddingRight: 10 }}
336
+ textStyle={{ paddingRight: 10 }}
342
337
  text={t('CONTINUE', 'Continue')}
343
338
  style={{ borderRadius: 8 }}
344
339
  imgRightSrc={theme.images.general.arrow_right}
@@ -73,11 +73,6 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
73
73
  style={{ flexDirection: 'column', alignItems: 'flex-start' }}
74
74
  titleWrapStyle={{ paddingHorizontal: 0 }}
75
75
  titleStyle={{ marginRight: 0, marginLeft: 0 }}
76
- buttonProps={{
77
- bgColor: theme.colors.white,
78
- borderColor: theme.colors.white,
79
- textStyle: { color: theme.colors.btnFont }
80
- }}
81
76
  />
82
77
  {order?.products && order.products.length > 0 && order?.products.map(productsOrder => (
83
78
  productsOrder?.length ? productsOrder?.map((product: any, i: any) => !product?.deleted ?
@@ -109,7 +104,7 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
109
104
  <OText weight={700} size={18} color={theme.colors.textNormal}>{t('FRONT_VISUALS_SKIP', 'Skip')}</OText>
110
105
  </SkipButton>
111
106
  <OButton
112
- textStyle={{ color: theme.colors.white, paddingRight: 10 }}
107
+ textStyle={{ paddingRight: 10 }}
113
108
  text={order?.driver && !order?.user_review ? t('CONTINUE', 'Continue') : t('SEND_REVIEW', 'Send Review')}
114
109
  style={{ borderRadius: 8 }}
115
110
  imgRightSrc={theme.images.general.arrow_right}
@@ -90,7 +90,7 @@ export const ReviewTrigger = (props: any) => {
90
90
  </View>
91
91
  ) : (
92
92
  <MultiLogosContainer>
93
- {order?.logo?.map((logo : string, i : number) => (
93
+ {order?.logo?.map((logo: string, i: number) => (
94
94
  <React.Fragment key={logo}>
95
95
  <View style={styles.logoWrapper}>
96
96
  <OIcon
@@ -122,7 +122,7 @@ export const ReviewTrigger = (props: any) => {
122
122
  <FloatingBottomContainer borderTopWidth={0} borderRadius={10}>
123
123
  <ActionContainer>
124
124
  <OButton
125
- textStyle={{ color: theme.colors.white, paddingRight: 10 }}
125
+ textStyle={{ paddingRight: 10 }}
126
126
  text={t('GOTO_REVIEW', 'Go to review')}
127
127
  style={{ borderRadius: 8 }}
128
128
  imgRightSrc={theme.images.general.arrow_right}
@@ -57,9 +57,9 @@ const ServiceFormUI = (props: ServiceFormParams) => {
57
57
  const [{ optimizeImage, parsePrice, parseDate }] = useUtils()
58
58
  const { top } = useSafeAreaInsets()
59
59
  const [{ configs }] = useConfig()
60
- const [orderState] = useOrder()
61
- const [{ auth }] = useSession()
62
- const { product, loading, error } = productObject;
60
+ const [orderState] = useOrder()
61
+ const [{ auth }] = useSession()
62
+ const { product, loading, error } = productObject;
63
63
 
64
64
  const [selectDate, setSelectedDate] = useState<any>(new Date())
65
65
  const [timeList, setTimeList] = useState<any>([])
@@ -77,8 +77,8 @@ const ServiceFormUI = (props: ServiceFormParams) => {
77
77
  const styles = StyleSheet.create({
78
78
  photoStyle: {
79
79
  width: 45,
80
- height: 45,
81
- borderRadius: 7.6
80
+ height: 45,
81
+ borderRadius: 7.6
82
82
  },
83
83
  buttonStyle: {
84
84
  borderRadius: 7.6,
@@ -144,7 +144,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
144
144
  return (moment.utc(item?.start).local().valueOf() <= moment(selectedMoment).valueOf() &&
145
145
  moment(selectedMoment).valueOf() < moment.utc(item?.end).local().valueOf()) ||
146
146
  (moment.utc(item?.start).local().valueOf() < moment(selectedMoment).add(duration, 'minutes').valueOf() &&
147
- moment(selectedMoment).add(duration, 'minutes').valueOf() < moment.utc(item?.end).local().valueOf())
147
+ moment(selectedMoment).add(duration, 'minutes').valueOf() < moment.utc(item?.end).local().valueOf())
148
148
  })
149
149
  return valid
150
150
  }
@@ -166,9 +166,9 @@ const ServiceFormUI = (props: ServiceFormParams) => {
166
166
  }
167
167
 
168
168
  const handleUpdateGuest = () => {
169
- const guestToken = uuid.v4()
170
- if (guestToken) handleCreateGuestUser({ guest_token: guestToken })
171
- }
169
+ const guestToken = uuid.v4()
170
+ if (guestToken) handleCreateGuestUser({ guest_token: guestToken })
171
+ }
172
172
 
173
173
  const customDayHeaderStylesCallback = () => {
174
174
  return {
@@ -193,11 +193,11 @@ const ServiceFormUI = (props: ServiceFormParams) => {
193
193
  }
194
194
 
195
195
  const handleRedirectLogin = () => {
196
- navigation && navigation.navigate('Login', {
197
- store_slug: props.businessSlug
198
- });
196
+ navigation && navigation.navigate('Login', {
197
+ store_slug: props.businessSlug
198
+ });
199
199
  onClose && onClose()
200
- };
200
+ };
201
201
 
202
202
  const getTimes = (curdate: any, menu: any) => {
203
203
  validateSelectedDate(curdate, menu)
@@ -290,7 +290,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
290
290
  setSelectedDate(moment.utc(productCart?.calendar_event?.start).local())
291
291
  setTimeSelected(moment.utc(productCart?.calendar_event?.start).local().format('HH:mm'))
292
292
  }, [productCart])
293
-
293
+
294
294
  return (
295
295
  <>
296
296
  {loading && !error && (
@@ -450,7 +450,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
450
450
  <CalendarWrapper>
451
451
  {(timeList?.length > 0 && isEnabled) ? (
452
452
  <SelectDropdown
453
- ref={dropdownRef}
453
+ ref={dropdownRef}
454
454
  defaultValueByIndex={timeList.findIndex((item: any) => item.value === timeSelected)}
455
455
  data={timeList}
456
456
  onSelect={(selectedItem, index) => {
@@ -462,7 +462,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
462
462
  rowTextForSelection={(item, index) => {
463
463
  return item.text
464
464
  }}
465
- buttonStyle={{borderRadius: 7.6, ...styles.selectOption}}
465
+ buttonStyle={{ borderRadius: 7.6, ...styles.selectOption }}
466
466
  buttonTextStyle={{
467
467
  color: theme.colors.disabled,
468
468
  fontSize: 14,
@@ -485,7 +485,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
485
485
  }}
486
486
  renderCustomizedRowChild={(item, index) => {
487
487
  return (
488
- <Text style={[styles.dropDownRow, { color: isBusyTime(currentProfessional, getMomentTime(item.value)) ? theme.colors.lightGray : theme.colors.primary } ]}>
488
+ <Text style={[styles.dropDownRow, { color: isBusyTime(currentProfessional, getMomentTime(item.value)) ? theme.colors.lightGray : theme.colors.primary }]}>
489
489
  {item.text}
490
490
  </Text>
491
491
  )
@@ -553,7 +553,6 @@ const ServiceFormUI = (props: ServiceFormParams) => {
553
553
  auth &&
554
554
  orderState.options?.address_id)) && (
555
555
  <OButton
556
- bgColor={theme.colors.primary}
557
556
  onClick={() => handleSaveService()}
558
557
  text={orderState.loading
559
558
  ? t('LOADING', 'Loading')
@@ -562,7 +561,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
562
561
  : t('BOOK', 'Book'))}
563
562
  style={styles.buttonStyle}
564
563
  isDisabled={isSoldOut || maxProductQuantity <= 0 || !currentProfessional?.id || !dateSelected || isBusyTime(currentProfessional, dateSelected)}
565
- textStyle={{ fontSize: 14, color: theme.colors.white }}
564
+ textStyle={{ fontSize: 14 }}
566
565
  />
567
566
  )}
568
567
  {auth &&
@@ -577,45 +576,44 @@ const ServiceFormUI = (props: ServiceFormParams) => {
577
576
  ) : (
578
577
  <OButton onClick={() => addressRedirect()} />
579
578
  ))}
580
- {!auth && (
581
- <OButton
582
- isDisabled={isSoldOut || maxProductQuantity <= 0}
583
- onClick={() => handleRedirectLogin()}
584
- text={
585
- isSoldOut || maxProductQuantity <= 0
586
- ? t('SOLD_OUT', 'Sold out')
587
- : t('LOGIN_SIGNUP', 'Login / Sign Up')
588
- }
589
- imgRightSrc=""
590
- textStyle={{ color: theme.colors.primary, fontSize: 14 }}
591
- style={{
592
- height: 44,
593
- borderColor: theme.colors.primary,
594
- backgroundColor: theme.colors.white,
595
- }}
596
- />
597
- )}
598
- {!auth && guestCheckoutEnabled && orderTypeEnabled && (
599
- <TouchableOpacity style={{ marginTop: 10 }} onPress={handleUpdateGuest}>
600
- {actionStatus?.loading ? (
601
- <Placeholder Animation={Fade}>
602
- <PlaceholderLine width={60} height={20} />
603
- </Placeholder>
604
- ) : (
605
- <OText color={theme.colors.primary} size={13}>{t('AS_GUEST_USER', 'As guest user')}</OText>
606
- )}
607
- </TouchableOpacity>
608
- )}
579
+ {!auth && (
580
+ <OButton
581
+ isDisabled={isSoldOut || maxProductQuantity <= 0}
582
+ onClick={() => handleRedirectLogin()}
583
+ text={
584
+ isSoldOut || maxProductQuantity <= 0
585
+ ? t('SOLD_OUT', 'Sold out')
586
+ : t('LOGIN_SIGNUP', 'Login / Sign Up')
587
+ }
588
+ imgRightSrc=""
589
+ textStyle={{ color: theme.colors.primary, fontSize: 14 }}
590
+ style={{
591
+ height: 44,
592
+ backgroundColor: theme.colors.white,
593
+ }}
594
+ />
595
+ )}
596
+ {!auth && guestCheckoutEnabled && orderTypeEnabled && (
597
+ <TouchableOpacity style={{ marginTop: 10 }} onPress={handleUpdateGuest}>
598
+ {actionStatus?.loading ? (
599
+ <Placeholder Animation={Fade}>
600
+ <PlaceholderLine width={60} height={20} />
601
+ </Placeholder>
602
+ ) : (
603
+ <OText color={theme.colors.primary} size={13}>{t('AS_GUEST_USER', 'As guest user')}</OText>
604
+ )}
605
+ </TouchableOpacity>
606
+ )}
609
607
  </ButtonWrapper>
610
608
  </Container>
611
609
  )}
612
610
 
613
611
  <OModal
614
- open={isOpen}
615
- onClose={() => setIsOpen(false)}
616
- entireModal
617
- >
618
- <ScrollView contentContainerStyle={styles.professionalList}>
612
+ open={isOpen}
613
+ onClose={() => setIsOpen(false)}
614
+ entireModal
615
+ >
616
+ <ScrollView contentContainerStyle={styles.professionalList}>
619
617
  <View style={{ paddingVertical: 11 }}>
620
618
  <OText
621
619
  size={14}
@@ -671,7 +669,7 @@ const ServiceFormUI = (props: ServiceFormParams) => {
671
669
  </TouchableOpacity>
672
670
  ))}
673
671
  </ScrollView>
674
- </OModal>
672
+ </OModal>
675
673
  </>
676
674
  )
677
675
  }