ordering-ui-react-native 0.15.66 → 0.15.69

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-react-native",
3
- "version": "0.15.66",
3
+ "version": "0.15.69",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -34,6 +34,7 @@ export const getTraduction = (key: string, t: any) => {
34
34
  ERROR_ADD_PRODUCT_VERY_FAR_FOR_DELIVERY: 'Error adding product, very far for delivery',
35
35
  ERROR_PRODUCT_NOT_FOUND: 'Error with the product',
36
36
  ERROR_ADD_BUSINESS_INVALID: 'An error occurred with the business',
37
+ ERROR_INVALID_OFFER: 'The offer doesn\'t exist'
37
38
  }
38
39
 
39
40
  return keyList[key] ? t(key, keyList[key]) : t(key)
@@ -45,7 +45,7 @@ import { UpsellingProducts } from './src/components/UpsellingProducts';
45
45
  import { UserVerification } from './src/components/UserVerification';
46
46
  import { BusinessListingSearch } from './src/components/BusinessListingSearch';
47
47
  import { LastOrders } from './src/components/LastOrders';
48
- import NavBar from './src/components/NavBar';
48
+ import NavBar from './src/components/NavBar';
49
49
  import { BusinessTypeFilter } from './src/components/BusinessTypeFilter';
50
50
  import { BusinessController } from './src/components/BusinessController';
51
51
  import { BusinessFeaturedController } from './src/components/BusinessFeaturedController';
@@ -81,17 +81,17 @@ import { SingleProductReview } from './src/components/SingleProductReview';
81
81
  import { LogoutButton } from './src/components/LogoutButton';
82
82
  import { UserFormDetailsUI } from './src/components/UserFormDetails';
83
83
  import { WalletTransactionItem } from './src/components/WalletTransactionItem';
84
-
84
+ import { Promotions } from './src/components/Promotions'
85
85
  import { USER_TYPE, ORDER_TYPES } from './src/config/constants'
86
86
 
87
87
  import { OSBill, OSTable, OSCoupon, OSTotal, OSRow } from './src/components/OrderSummary/styles';
88
88
 
89
89
  import { FormInput, FormSide, ButtonsWrapper, LoginWith, OTab, OTabs } from './src/components/LoginForm/styles';
90
- import { OSItem, OSItemContent, OSItemActions} from './src/components/PaymentOptionStripe/styles';
90
+ import { OSItem, OSItemContent, OSItemActions } from './src/components/PaymentOptionStripe/styles';
91
91
 
92
92
  import Alert from './src/providers/AlertProvider'
93
93
 
94
- import {
94
+ import {
95
95
  LoginParams,
96
96
  ProfileParams,
97
97
  AddressListParams,
@@ -134,7 +134,7 @@ import {
134
134
  OAlert,
135
135
  OModal,
136
136
  OBottomPopup,
137
- HeaderTitle
137
+ HeaderTitle
138
138
  } from './src/components/shared';
139
139
 
140
140
  import { Container } from './src/layouts/Container';
@@ -176,7 +176,7 @@ export {
176
176
  BusinessMenuList,
177
177
  UserProfile,
178
178
  MessageListing,
179
- Messages,
179
+ Messages,
180
180
  Help,
181
181
  HelpAccountAndPayment,
182
182
  HelpGuide,
@@ -231,7 +231,7 @@ export {
231
231
  LogoutButton,
232
232
  UserFormDetailsUI,
233
233
  WalletTransactionItem,
234
-
234
+ Promotions,
235
235
  ORDER_TYPES,
236
236
  USER_TYPE,
237
237
 
@@ -296,7 +296,7 @@ export {
296
296
  OAlert,
297
297
  OModal,
298
298
  OBottomPopup,
299
- HeaderTitle,
299
+ HeaderTitle,
300
300
 
301
301
  // layout
302
302
  Container,
@@ -202,7 +202,7 @@ const OrderSummaryUI = (props: any) => {
202
202
  <OSRow>
203
203
  <OText size={12} numberOfLines={1}>
204
204
  {fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}{' '}
205
- ({fee?.fixed > 0 && `${parsePrice(fee?.fixed)} + `}{fee.percentage}%)
205
+ ({fee?.fixed > 0 && `${parsePrice(fee?.fixed)}${fee.percentage > 0 ? ' + ' : ''}`}{fee.percentage > 0 && `${fee.percentage}%`}){' '}
206
206
  </OText>
207
207
  <TouchableOpacity onPress={() => setOpenTaxModal({ open: true, data: fee, type: 'fee' })} >
208
208
  <AntIcon name='infocirlceo' size={16} color={theme.colors.primary} />
@@ -24,15 +24,6 @@ export const SearchBarContainer = styled.View`
24
24
  width: 100%;
25
25
  justify-content: flex-start;
26
26
  margin-bottom: 20px;
27
- .search-bar {
28
- justify-content: flex-start;
29
- input {
30
- width: 100%;
31
- }
32
- }
33
- .clear {
34
- right: 0;
35
- }
36
27
  `
37
28
 
38
29
  export const SingleBusinessOffer = styled.View`
@@ -48,11 +39,6 @@ export const OfferData = styled.View`
48
39
  display: flex;
49
40
  align-items: center;
50
41
  flex-direction: column;
51
- p{
52
- color: #909BA9;
53
- margin: 3px;
54
- font-size: 14px;
55
- }
56
42
  `
57
43
 
58
44
  export const Code = styled.View`
@@ -62,14 +48,7 @@ export const Code = styled.View`
62
48
  margin-bottom: 10px;
63
49
  `
64
50
 
65
- export const ValueOfOffer = styled.View`
66
- p{
67
- font-size: 16px;
68
- }
69
- span{
70
- font-size: 20px;
71
- }
72
- `
51
+ export const ValueOfOffer = styled.View``
73
52
 
74
53
  export const BusinessInfo = styled.View`
75
54
  flex: 1;
@@ -109,7 +109,7 @@ const ProfileListUI = (props: ProfileParams) => {
109
109
  const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
110
110
 
111
111
  const isWalletEnabled = configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
112
- const IsPromotionsEnabled = configs?.advanced_offers_module === '1' || configs?.advanced_offers_module === 'true'
112
+ const IsPromotionsEnabled = configs?.advanced_offers_module?.value === '1' || configs?.advanced_offers_module?.value === true
113
113
  const onRedirect = (route: string, params?: any) => {
114
114
  navigation.navigate(route, params)
115
115
  }
@@ -63,7 +63,7 @@ const WalletsUI = (props: any) => {
63
63
 
64
64
  const currentWalletSelected = (walletList.wallets?.length > 0 && walletList.wallets?.find((w: any) => w.type === tabSelected)) ?? null
65
65
 
66
- const loyaltyLevel = Object.keys(user?.loyalty_level).length > 0 && user?.loyalty_level
66
+ const loyaltyLevel = Object.keys(user?.loyalty_level ?? {}).length > 0 && user?.loyalty_level
67
67
 
68
68
  const walletName: any = {
69
69
  cash: {
@@ -33,7 +33,8 @@ export const getTraduction = (key: string) => {
33
33
  ERROR_PLACE_PAY_WITH_CARD1: 'An error occurred while trying to pay by card',
34
34
  ERROR_PLACE_PAY_WITH_PAYPAL_CAPTURE: 'An error occurred while trying to pay by PayPal',
35
35
  ERROR_ADD_PRODUCT_VERY_FAR_FOR_DELIVERY: 'Error adding product, very far for delivery',
36
- ERROR_PRODUCT_NOT_FOUND: 'Error with the product'
36
+ ERROR_PRODUCT_NOT_FOUND: 'Error with the product',
37
+ ERROR_INVALID_OFFER: 'The offer doesn\'t exist'
37
38
  }
38
39
 
39
40
  return keyList[key] ? t(key, keyList[key]) : t(key)