ordering-ui-react-native 0.14.25 → 0.14.26-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 (35) hide show
  1. package/package.json +2 -2
  2. package/src/components/Messages/index.tsx +6 -1
  3. package/src/components/ProductForm/index.tsx +40 -34
  4. package/src/components/VerifyPhone/styles.tsx +1 -2
  5. package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
  6. package/themes/doordash/src/components/ProductForm/index.tsx +14 -16
  7. package/themes/instacart/src/components/BusinessProductsList/styles.tsx +1 -1
  8. package/themes/instacart/src/components/ProductForm/index.tsx +13 -15
  9. package/themes/instacart/src/components/SingleProductCard/index.tsx +19 -24
  10. package/themes/instacart/src/components/SingleProductCard/styles.tsx +6 -4
  11. package/themes/kiosk/src/components/ProductForm/index.tsx +13 -15
  12. package/themes/original/index.tsx +0 -4
  13. package/themes/original/src/components/BusinessItemAccordion/index.tsx +1 -2
  14. package/themes/original/src/components/BusinessesListing/index.tsx +19 -25
  15. package/themes/original/src/components/Cart/index.tsx +9 -27
  16. package/themes/original/src/components/CartContent/index.tsx +0 -1
  17. package/themes/original/src/components/Checkout/index.tsx +4 -15
  18. package/themes/original/src/components/Checkout/styles.tsx +1 -5
  19. package/themes/original/src/components/FacebookLogin/index.tsx +20 -5
  20. package/themes/original/src/components/Help/index.tsx +2 -2
  21. package/themes/original/src/components/Messages/index.tsx +39 -59
  22. package/themes/original/src/components/OrderDetails/index.tsx +5 -55
  23. package/themes/original/src/components/OrderProgress/index.tsx +2 -2
  24. package/themes/original/src/components/OrderSummary/index.tsx +3 -21
  25. package/themes/original/src/components/ProductForm/index.tsx +43 -28
  26. package/themes/original/src/components/UserProfile/index.tsx +0 -5
  27. package/themes/original/src/types/index.tsx +2 -4
  28. package/themes/single-business/src/components/ProductForm/index.tsx +28 -29
  29. package/themes/uber-eats/src/components/ProductForm/index.tsx +13 -15
  30. package/themes/original/src/components/PaymentOptionWallet/index.tsx +0 -163
  31. package/themes/original/src/components/PaymentOptionWallet/styles.tsx +0 -38
  32. package/themes/original/src/components/WalletTransactionItem/index.tsx +0 -68
  33. package/themes/original/src/components/WalletTransactionItem/styles.tsx +0 -37
  34. package/themes/original/src/components/Wallets/index.tsx +0 -204
  35. package/themes/original/src/components/Wallets/styles.tsx +0 -43
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.14.25",
3
+ "version": "0.14.26-release",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -55,7 +55,7 @@
55
55
  "@types/styled-components": "^5.1.3",
56
56
  "axios": "^0.21.0",
57
57
  "moment": "^2.29.1",
58
- "ordering-components": "github:Ordering-Inc/ordering-components#development",
58
+ "ordering-components": "github:Ordering-Inc/ordering-components#release",
59
59
  "patch-package": "^6.4.7",
60
60
  "postinstall-postinstall": "^2.1.0",
61
61
  "prop-types": "^15.7.2",
@@ -45,6 +45,7 @@ const imgOptions = {
45
45
  includeBase64: true,
46
46
  selectionLimit: 0
47
47
  }
48
+ const filterSpecialStatus = ['prepared_in', 'delivered_in']
48
49
 
49
50
  const MessagesUI = (props: MessagesParams) => {
50
51
  const {
@@ -118,7 +119,11 @@ const MessagesUI = (props: MessagesParams) => {
118
119
  const messageConsole = (message: any) => {
119
120
  return message.change?.attribute !== 'driver_id'
120
121
  ?
121
- `${t('ORDER', 'Order')} ${t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))} ${t('CHANGED_FROM', 'Changed from')} ${message.change.old !== null && t(ORDER_STATUS[parseInt(message.change.old, 10)])} ${t('TO', 'to')} ${t(ORDER_STATUS[parseInt(message.change.new, 10)])}`
122
+ `${t('ORDER', 'Order')} ${t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))} ${t('CHANGED_FROM', 'Changed from')} ${
123
+ filterSpecialStatus.includes(message.change.attribute) ?
124
+ `${message.change.old === null ? '0' : message.change.old} ${t('TO', 'to')} ${message.change.new} ${t('MINUTES', 'Minutes')}` :
125
+ `${message.change.old !== null && t(ORDER_STATUS[parseInt(message.change.old, 10)])} ${t('TO', 'to')} ${t(ORDER_STATUS[parseInt(message.change.new, 10)])}`
126
+ }`
122
127
  : message.change.new
123
128
  ?
124
129
  `${message.driver?.name} ${message.driver?.lastname !== null ? message.driver.lastname : ''} ${t('WAS_ASSIGNED_AS_DRIVER', 'Was assigned as driver')} ${message.comment ? message.comment.length : ''}`
@@ -132,7 +132,18 @@ export const ProductOptionsUI = (props: any) => {
132
132
  ) : (
133
133
  <>
134
134
  <View style={{ flexDirection: 'column', width: '100%' }}>
135
- <OText size={20} style={{ flex: I18nManager.isRTL ? 0 : 1, marginBottom: 10 }}>{product?.name || productCart.name}</OText>
135
+ <View style={{ flexDirection: 'row', marginTop: 15 }}>
136
+ <OText size={20} style={{ flex: I18nManager.isRTL ? 0 : 1, marginBottom: 10 }}>{product?.name || productCart.name}{' '}</OText>
137
+ {product?.calories && (
138
+ <OText size={16} style={styles.caloriesStyle}>{product?.calories} cal</OText>
139
+ )}
140
+ </View>
141
+ <View style={{ flexDirection: 'row', marginBottom: 10 }}>
142
+ <OText size={16} style={{ flex: I18nManager.isRTL ? 1 : 0 }} color={theme.colors.primary}>{productCart.price ? parsePrice(productCart.price) : ''}</OText>
143
+ {product?.offer_price && (
144
+ <OText style={styles.regularPriceStyle}>{parsePrice(product?.offer_price)}</OText>
145
+ )}
146
+ </View>
136
147
  {(product?.estimated_person || (product?.sku && product?.sku !== '-1' && product?.sku !== '1')) && (
137
148
  <OText size={14} style={{ flex: I18nManager.isRTL ? 1 : 0, marginBottom: 10 }} color={'#909BA9'}>
138
149
  {
@@ -147,12 +158,6 @@ export const ProductOptionsUI = (props: any) => {
147
158
  }
148
159
  </OText>
149
160
  )}
150
- <View style={{ flexDirection: 'row', marginBottom: 10}}>
151
- <OText size={16} style={{ flex: I18nManager.isRTL ? 1 : 0 }} color={theme.colors.primary}>{productCart.price ? parsePrice(productCart.price) : ''}</OText>
152
- {product?.offer_price && (
153
- <OText style={styles.regularPriceStyle}>{parsePrice(product?.offer_price)}</OText>
154
- )}
155
- </View>
156
161
  </View>
157
162
  </>
158
163
  )}
@@ -162,17 +167,17 @@ export const ProductOptionsUI = (props: any) => {
162
167
  </ProductDescription>
163
168
  {loading && !product ? (
164
169
  <>
165
- {[...Array(2)].map((item,i) => (
166
- <Placeholder key={i} style={{marginBottom: 20}} Animation={Fade}>
167
- <PlaceholderLine height={40} style={{ flex: 1, marginTop: 10 }} />
168
- {[...Array(3)].map((item,i) => (
169
- <View key={i} style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
170
- <PlaceholderLine height={30} width={10} style={{marginBottom: 20}} />
171
- <PlaceholderLine height={30} width={50} style={{marginBottom: 20}} />
172
- <PlaceholderLine height={30} width={30} style={{marginBottom: 20}} />
173
- </View>
174
- ))}
175
- </Placeholder>
170
+ {[...Array(2)].map((item, i) => (
171
+ <Placeholder key={i} style={{ marginBottom: 20 }} Animation={Fade}>
172
+ <PlaceholderLine height={40} style={{ flex: 1, marginTop: 10 }} />
173
+ {[...Array(3)].map((item, i) => (
174
+ <View key={i} style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
175
+ <PlaceholderLine height={30} width={10} style={{ marginBottom: 20 }} />
176
+ <PlaceholderLine height={30} width={50} style={{ marginBottom: 20 }} />
177
+ <PlaceholderLine height={30} width={30} style={{ marginBottom: 20 }} />
178
+ </View>
179
+ ))}
180
+ </Placeholder>
176
181
  ))}
177
182
  </>
178
183
  ) : (
@@ -221,7 +226,7 @@ export const ProductOptionsUI = (props: any) => {
221
226
  state={currentState}
222
227
  disabled={isSoldOut || maxProductQuantity <= 0}
223
228
  />
224
- ): null
229
+ ) : null
225
230
  })
226
231
  }
227
232
  </WrapperSubOption>
@@ -232,21 +237,19 @@ export const ProductOptionsUI = (props: any) => {
232
237
  </React.Fragment>
233
238
  )
234
239
  }))}
235
- {!product?.hide_special_instructions && (
236
- <ProductComment>
237
- <SectionTitle>
238
- <OText size={16}>{t('SPECIAL_COMMENT', 'Special comment')}</OText>
239
- </SectionTitle>
240
- <OInput
241
- multiline
242
- placeholder={t('SPECIAL_COMMENT', 'Special comment')}
243
- value={productCart.comment}
244
- onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
245
- isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
246
- style={styles.comment}
247
- />
248
- </ProductComment>
249
- )}
240
+ <ProductComment>
241
+ <SectionTitle>
242
+ <OText size={16}>{t('SPECIAL_COMMENT', 'Special comment')}</OText>
243
+ </SectionTitle>
244
+ <OInput
245
+ multiline
246
+ placeholder={t('SPECIAL_COMMENT', 'Special comment')}
247
+ value={productCart.comment}
248
+ onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
249
+ isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
250
+ style={styles.comment}
251
+ />
252
+ </ProductComment>
250
253
  </ProductEditions>
251
254
  )}
252
255
  </WrapContent>
@@ -383,6 +386,9 @@ const styles = StyleSheet.create({
383
386
  textDecorationLine: 'line-through',
384
387
  marginLeft: 7,
385
388
  marginRight: 7
389
+ },
390
+ caloriesStyle: {
391
+ color: '#808080'
386
392
  }
387
393
  })
388
394
 
@@ -2,7 +2,7 @@ import styled from 'styled-components/native';
2
2
 
3
3
  export const Container = styled.View`
4
4
  width: 100%;
5
- padding: 0 43px;
5
+ padding: 0 30px;
6
6
  `
7
7
 
8
8
  export const CountDownContainer = styled.View`
@@ -20,7 +20,6 @@ export const ResendSection = styled.View`
20
20
  display: flex;
21
21
  flex-direction: row;
22
22
  justify-content: center;
23
- flex-wrap: wrap;
24
23
  `
25
24
 
26
25
  export const WrappCountdown = styled.View`
@@ -410,8 +410,7 @@ const LoginFormUI = (props: LoginParams) => {
410
410
  textInputProps={{
411
411
  returnKeyType: 'next',
412
412
  onSubmitEditing: () => inputRef?.current?.focus?.(),
413
- style: { borderWidth: 0, fontSize: 12 },
414
- maxLength: 10
413
+ style: { borderWidth: 0, fontSize: 12 }
415
414
  }}
416
415
  textWrapStyle={{ borderColor: theme.colors.clear, borderWidth: 0, height: 40, paddingStart: 0 }}
417
416
  />
@@ -287,22 +287,20 @@ export const ProductOptionsUI = (props: any) => {
287
287
  </React.Fragment>
288
288
  )
289
289
  }))}
290
- {!product?.hide_special_instructions && (
291
- <ProductComment onLayout={(e: any) => setCommentY(e.nativeEvent.layout.y + e.nativeEvent.layout.height)}>
292
- <SectionTitle>
293
- <OText style={theme.labels.middle as TextStyle}>{t('SPECIAL_COMMENT', 'Special comment')}</OText>
294
- </SectionTitle>
295
- <OInput
296
- multiline
297
- placeholder={t('SPECIAL_COMMENT', 'Special comment')}
298
- value={productCart.comment}
299
- onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
300
- isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
301
- style={styles.comment}
302
- inputStyle={{ fontSize: 12, paddingBottom: 7, paddingTop: 17 }}
303
- />
304
- </ProductComment>
305
- )}
290
+ <ProductComment onLayout={(e: any) => setCommentY(e.nativeEvent.layout.y + e.nativeEvent.layout.height)}>
291
+ <SectionTitle>
292
+ <OText style={theme.labels.middle as TextStyle}>{t('SPECIAL_COMMENT', 'Special comment')}</OText>
293
+ </SectionTitle>
294
+ <OInput
295
+ multiline
296
+ placeholder={t('SPECIAL_COMMENT', 'Special comment')}
297
+ value={productCart.comment}
298
+ onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
299
+ isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
300
+ style={styles.comment}
301
+ inputStyle={{ fontSize: 12, paddingBottom: 7, paddingTop: 17 }}
302
+ />
303
+ </ProductComment>
306
304
  {productCart && !isSoldOut && maxProductQuantity > 0 && (
307
305
  <View style={{ paddingVertical: 4, marginBottom: 10 }}>
308
306
  <SectionTitle>
@@ -15,5 +15,5 @@ export const WrapperNotFound = styled.View`
15
15
  export const ProductsWrapper = styled.View`
16
16
  flex-direction: row;
17
17
  flex-wrap: wrap;
18
- margin-bottom: 20px;
18
+ align-items: flex-start;
19
19
  `
@@ -235,21 +235,19 @@ export const ProductOptionsUI = (props: any) => {
235
235
  </React.Fragment>
236
236
  )
237
237
  }))}
238
- {!product?.hide_special_instructions && (
239
- <ProductComment>
240
- <SectionTitle>
241
- <OText style={theme.labels.middle}>{t('SPECIAL_COMMENT', 'Special comment')}</OText>
242
- </SectionTitle>
243
- <OInput
244
- multiline
245
- placeholder={t('SPECIAL_COMMENT', 'Special comment')}
246
- value={productCart.comment}
247
- onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
248
- isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
249
- style={{ ...styles.comment, borderColor: theme.colors.border }}
250
- />
251
- </ProductComment>
252
- )}
238
+ <ProductComment>
239
+ <SectionTitle>
240
+ <OText style={theme.labels.middle}>{t('SPECIAL_COMMENT', 'Special comment')}</OText>
241
+ </SectionTitle>
242
+ <OInput
243
+ multiline
244
+ placeholder={t('SPECIAL_COMMENT', 'Special comment')}
245
+ value={productCart.comment}
246
+ onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
247
+ isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
248
+ style={{ ...styles.comment, borderColor: theme.colors.border }}
249
+ />
250
+ </ProductComment>
253
251
  </ProductEditions>
254
252
  )}
255
253
  </WrapContent>
@@ -6,7 +6,7 @@ import {
6
6
  CardInfo,
7
7
  SoldOut
8
8
  } from './styles'
9
- import { StyleSheet, TouchableOpacity, Dimensions, View } from 'react-native'
9
+ import { StyleSheet, TouchableOpacity, Dimensions } from 'react-native'
10
10
  import { OText, OIcon } from '../shared'
11
11
  import { useTheme } from 'styled-components/native'
12
12
 
@@ -23,7 +23,11 @@ export const SingleProductCard = (props: SingleProductCardParams) => {
23
23
 
24
24
  const styles = StyleSheet.create({
25
25
  container: {
26
- width: (windowWidth - 80) / 2
26
+ width: (windowWidth - 80) / 2,
27
+ height: (windowWidth - 80) / 2 + 40
28
+ },
29
+ textStyle: {
30
+ flex: 1,
27
31
  },
28
32
  soldOutTextStyle : {
29
33
  textTransform: 'capitalize',
@@ -31,14 +35,9 @@ export const SingleProductCard = (props: SingleProductCardParams) => {
31
35
  fontSize: 12,
32
36
  lineHeight: 18
33
37
  },
34
- imageWrapper: {
38
+ productStyle: {
35
39
  width: (windowWidth - 160) / 2,
36
40
  height: (windowWidth - 160) / 2,
37
- position: 'relative'
38
- },
39
- productStyle: {
40
- width: '100%',
41
- height: '100%',
42
41
  borderRadius: 3,
43
42
  marginTop: 5
44
43
  },
@@ -75,30 +74,26 @@ export const SingleProductCard = (props: SingleProductCardParams) => {
75
74
  onPress={() => onProductClick?.(product)}
76
75
  activeOpacity={0.8}
77
76
  >
78
- <View
79
- style={styles.imageWrapper}
80
- >
81
- <OIcon
82
- url={optimizeImage(product?.images, 'h_200,c_limit')}
83
- src={!product?.images && theme.images.dummies.product}
84
- style={{...styles.productStyle, opacity: (isSoldOut || maxProductQuantity <= 0) ? 0.4 : 1}}
85
- />
86
- {(isSoldOut || maxProductQuantity <= 0) && (
87
- <SoldOut>
88
- <OText size={10} style={styles.soldOutTextStyle}>{t('SOLD_OUT', 'SOLD OUT')}</OText>
89
- </SoldOut>
90
- )}
91
- </View>
77
+ <OIcon
78
+ url={optimizeImage(product?.images, 'h_200,c_limit')}
79
+ src={!product?.images && theme.images.dummies.product}
80
+ style={{...styles.productStyle, opacity: (isSoldOut || maxProductQuantity <= 0) ? 0.4 : 1}}
81
+ />
92
82
  <CardInfo>
93
83
  <OText color={theme.colors.textPrimary} style={{...theme.labels.normal, marginTop: 9}}>{parsePrice(product?.price)}</OText>
94
- <OText numberOfLines={1} ellipsizeMode='tail' style={{...theme.labels.small}}>{product?.name}</OText>
95
- <OText color={theme.colors.textSecondary} size={9} numberOfLines={2} ellipsizeMode='tail' style={{...theme.labels.small}}>{product?.description}</OText>
84
+ <OText numberOfLines={1} ellipsizeMode='tail' style={{...styles.textStyle, ...theme.labels.small}}>{product?.name}</OText>
85
+ <OText color={theme.colors.textSecondary} size={9} numberOfLines={2} ellipsizeMode='tail' style={{...styles.textStyle, ...theme.labels.small}}>{product?.description}</OText>
96
86
  </CardInfo>
97
87
 
98
88
  <TouchableOpacity style={styles.addBtn} onPress={() => onProductClick?.(product)} activeOpacity={0.7}>
99
89
  <OIcon src={theme.images.general.plus_circle} />
100
90
  </TouchableOpacity>
101
91
 
92
+ {(isSoldOut || maxProductQuantity <= 0) && (
93
+ <SoldOut>
94
+ <OText size={10} style={styles.soldOutTextStyle}>{t('SOLD_OUT', 'SOLD OUT')}</OText>
95
+ </SoldOut>
96
+ )}
102
97
  </CardContainer>
103
98
  )
104
99
  }
@@ -1,9 +1,12 @@
1
1
  import styled from 'styled-components/native'
2
2
 
3
3
  export const CardContainer = styled.TouchableOpacity`
4
- flex-direction: column;
4
+ /* flex-grow: 1; */
5
+ align-items: flex-start;
5
6
  padding: 10px;
6
7
  position: relative;
8
+ /* margin-end: 10px; */
9
+ border-radius: 3px;
7
10
  `
8
11
  export const CardInfo = styled.View`
9
12
  flex: 1;
@@ -13,7 +16,6 @@ export const SoldOut = styled.View`
13
16
  position: absolute;
14
17
  background: ${(props: any) => props.theme.colors.black} 0% 0% no-repeat padding-box;
15
18
  padding: 3px 9px;
16
- left: 0px;
17
- bottom: -5px;
18
- border-radius: 3px;
19
+ top: 91px;
20
+ left: 10px;
19
21
  `
@@ -438,21 +438,19 @@ export const ProductOptionsUI = (props: any) => {
438
438
  </React.Fragment>
439
439
  )
440
440
  }))}
441
- {!product?.hide_special_instructions && (
442
- <ProductComment>
443
- <SectionTitle>
444
- <OText size={28} weight="bold">{t('SPECIAL_COMMENT', 'Special comment')}</OText>
445
- </SectionTitle>
446
- <OInput
447
- multiline
448
- placeholder={t('SPECIAL_COMMENT', 'Special comment')}
449
- value={productCart.comment}
450
- onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
451
- isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
452
- style={styles.comment}
453
- />
454
- </ProductComment>
455
- )}
441
+ <ProductComment>
442
+ <SectionTitle>
443
+ <OText size={28} weight="bold">{t('SPECIAL_COMMENT', 'Special comment')}</OText>
444
+ </SectionTitle>
445
+ <OInput
446
+ multiline
447
+ placeholder={t('SPECIAL_COMMENT', 'Special comment')}
448
+ value={productCart.comment}
449
+ onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
450
+ isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
451
+ style={styles.comment}
452
+ />
453
+ </ProductComment>
456
454
  </ProductEditions>
457
455
  </WrapContent>
458
456
  </View>
@@ -28,8 +28,6 @@ import { HelpGuide } from './src/components/HelpGuide';
28
28
  import { HelpOrder } from './src/components/HelpOrder';
29
29
  import { NotFoundSource } from './src/components/NotFoundSource';
30
30
  import { OrderTypeSelector } from './src/components/OrderTypeSelector';
31
- import { Wallets } from './src/components/Wallets';
32
- import { PaymentOptionWallet } from './src/components/PaymentOptionWallet';
33
31
 
34
32
  import { Toast } from './src/components/shared/OToast';
35
33
  import {
@@ -88,8 +86,6 @@ export {
88
86
  HelpOrder,
89
87
  NotFoundSource,
90
88
  OrderTypeSelector,
91
- Wallets,
92
- PaymentOptionWallet,
93
89
 
94
90
  // OComponents
95
91
  Toast,
@@ -17,7 +17,6 @@ export const BusinessItemAccordion = (props: any) => {
17
17
  const {
18
18
  cart,
19
19
  moment,
20
- singleBusiness,
21
20
  handleClearProducts
22
21
  } = props
23
22
 
@@ -30,7 +29,7 @@ export const BusinessItemAccordion = (props: any) => {
30
29
  const isClosed = !cart?.valid_schedule
31
30
  const isProducts = cart?.products?.length
32
31
 
33
- const [isActive, setActiveState] = useState(!!singleBusiness)
32
+ const [isActive, setActiveState] = useState(false)
34
33
 
35
34
  useEffect(() => {
36
35
  const cartsArray = Object.values(orderState?.carts)
@@ -57,7 +57,6 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
57
57
  handleBusinessClick,
58
58
  paginationProps,
59
59
  handleChangeSearch,
60
- businessId
61
60
  } = props;
62
61
 
63
62
  const theme = useTheme();
@@ -257,20 +256,17 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
257
256
  />
258
257
  </WrapMomentOption>
259
258
 
260
- {!businessId && (
261
- <SearchBar
262
- onSearch={handleChangeSearch}
263
- searchValue={searchValue}
264
- lazyLoad
265
- isCancelXButtonShow={!!searchValue}
266
- borderStyle={styles.borderStyle}
267
- onCancel={() => handleChangeSearch('')}
268
- placeholder={t('SEARCH', 'Search')}
269
- height={26}
270
- inputStyle={{ ...styles.searchInput, ...Platform.OS === 'ios' ? {} : { paddingBottom: 4 } }}
271
- />
272
- )}
273
-
259
+ <SearchBar
260
+ onSearch={handleChangeSearch}
261
+ searchValue={searchValue}
262
+ lazyLoad
263
+ isCancelXButtonShow={!!searchValue}
264
+ borderStyle={styles.borderStyle}
265
+ onCancel={() => handleChangeSearch('')}
266
+ placeholder={t('SEARCH', 'Search')}
267
+ height={26}
268
+ inputStyle={{ ...styles.searchInput, ...Platform.OS === 'ios' ? {} : { paddingBottom: 4 } }}
269
+ />
274
270
  </View>
275
271
  </OrderControlContainer>
276
272
  </HeaderWrapper>
@@ -281,7 +277,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
281
277
  />
282
278
  </OrderProgressWrapper>
283
279
  )}
284
- {!businessId && !props.franchiseId && featuredBusiness && featuredBusiness.length > 0 && (
280
+ {!props.franchiseId && featuredBusiness && featuredBusiness.length > 0 && (
285
281
  <FeaturedWrapper>
286
282
  <OText size={16} style={{ marginLeft: 40 }} weight={Platform.OS === 'ios' ? '600' : 'bold'}>{t('FEATURED_BUSINESS', 'Featured business')}</OText>
287
283
  <ScrollView
@@ -310,19 +306,17 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
310
306
  </FeaturedWrapper>
311
307
  )}
312
308
  <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100 }} />
313
- {!businessId && !props.franchiseId && (
309
+ {!props.franchiseId && (
314
310
  <HighestRatedBusinesses onBusinessClick={handleBusinessClick} navigation={navigation} />
315
311
  )}
316
312
  <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100 }} />
317
313
  <ListWrapper>
318
- {!businessId && (
319
- <BusinessTypeFilter
320
- images={props.images}
321
- businessTypes={props.businessTypes}
322
- defaultBusinessType={props.defaultBusinessType}
323
- handleChangeBusinessType={handleChangeBusinessType}
324
- />
325
- )}
314
+ <BusinessTypeFilter
315
+ images={props.images}
316
+ businessTypes={props.businessTypes}
317
+ defaultBusinessType={props.defaultBusinessType}
318
+ handleChangeBusinessType={handleChangeBusinessType}
319
+ />
326
320
  {!businessesList.loading && businessesList.businesses.length === 0 && (
327
321
  <NotFoundSource
328
322
  content={t(
@@ -113,15 +113,6 @@ const CartUI = (props: any) => {
113
113
  }
114
114
  }
115
115
 
116
- const walletName: any = {
117
- cash: {
118
- name: t('PAY_WITH_CASH_WALLET', 'Pay with Cash Wallet'),
119
- },
120
- credit_point: {
121
- name: t('PAY_WITH_CREDITS_POINTS_WALLET', 'Pay with Credit Points Wallet'),
122
- }
123
- }
124
-
125
116
  return (
126
117
  <CContainer>
127
118
  {openUpselling && (
@@ -139,7 +130,6 @@ const CartUI = (props: any) => {
139
130
  )}
140
131
  <BusinessItemAccordion
141
132
  cart={cart}
142
- singleBusiness={props.singleBusiness}
143
133
  moment={momentFormatted}
144
134
  handleClearProducts={handleClearProducts}
145
135
  handleCartOpen={handleCartOpen}
@@ -201,7 +191,7 @@ const CartUI = (props: any) => {
201
191
  cart?.fees?.length > 0 && cart?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0)).map((fee: any) => (
202
192
  <OSTable key={fee?.id}>
203
193
  <OSRow>
204
- <OText numberOfLines={1} size={12} lineHeight={18}>
194
+ <OText numberOfLines={1}>
205
195
  {fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}{' '}
206
196
  ({parsePrice(fee?.fixed)} + {fee?.percentage}%){' '}
207
197
  </OText>
@@ -213,15 +203,6 @@ const CartUI = (props: any) => {
213
203
  </OSTable>
214
204
  ))
215
205
  }
216
- {cart?.service_fee > 0 && !cart?.fees?.length && (
217
- <OSTable>
218
- <OText size={12} lineHeight={18}>
219
- {t('SERVICE_FEE', 'Service Fee')}
220
- {`(${verifyDecimals(cart?.business?.service_fee, parseNumber)}%)`}
221
- </OText>
222
- <OText size={12} lineHeight={18}>{parsePrice(cart?.service_fee)}</OText>
223
- </OSTable>
224
- )}
225
206
  {orderState?.options?.type === 1 && cart?.delivery_price > 0 && (
226
207
  <OSTable>
227
208
  <OText size={12} lineHeight={18}>{t('DELIVERY_FEE', 'Delivery Fee')}</OText>
@@ -242,14 +223,15 @@ const CartUI = (props: any) => {
242
223
  <OText size={12} lineHeight={18}>{parsePrice(cart?.driver_tip)}</OText>
243
224
  </OSTable>
244
225
  )}
245
- {cart?.payment_events?.length > 0 && cart?.payment_events?.map((event: any) => (
246
- <OSTable key={event.id}>
247
- <OText size={12} numberOfLines={1}>
248
- {walletName[cart?.wallets?.find((wallet: any) => wallet.id === event.wallet_id)?.type]?.name}
226
+ {cart?.service_fee > 0 && (
227
+ <OSTable>
228
+ <OText size={12} lineHeight={18}>
229
+ {t('SERVICE_FEE', 'Service Fee')}
230
+ {`(${verifyDecimals(cart?.business?.service_fee, parseNumber)}%)`}
249
231
  </OText>
250
- <OText size={12}>-{parsePrice(event.amount)}</OText>
232
+ <OText size={12} lineHeight={18}>{parsePrice(cart?.service_fee)}</OText>
251
233
  </OSTable>
252
- ))}
234
+ )}
253
235
  {isCouponEnabled && !isCartPending && (
254
236
  <OSTable>
255
237
  <OSCoupon>
@@ -267,7 +249,7 @@ const CartUI = (props: any) => {
267
249
  {t('TOTAL', 'Total')}
268
250
  </OText>
269
251
  <OText size={14} lineHeight={21} weight={'600'}>
270
- {parsePrice(cart?.balance ?? cart?.total)}
252
+ {cart?.total >= 1 && parsePrice(cart?.total)}
271
253
  </OText>
272
254
  </OSTable>
273
255
  </OSTotal>
@@ -30,7 +30,6 @@ export const CartContent = (props: any) => {
30
30
  {cart.products.length > 0 && (
31
31
  <>
32
32
  <Cart
33
- singleBusiness={props.singleBusiness}
34
33
  isFranchiseApp={props.isFranchiseApp}
35
34
  cart={cart}
36
35
  cartuuid={cart.uuid}