ordering-ui-react-native 0.17.33 → 0.17.35

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.17.33",
3
+ "version": "0.17.35",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -52,7 +52,8 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
52
52
  brandList,
53
53
  onNavigationRedirect,
54
54
  handleUpdateBusinessList,
55
- handleUpdateProducts
55
+ handleUpdateProducts,
56
+ brandId
56
57
  } = props
57
58
 
58
59
  const screenHeight = Dimensions.get('window').height;
@@ -253,6 +254,7 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
253
254
  onNavigationRedirect={onNavigationRedirect}
254
255
  BusinessControllerSkeletons={BusinessControllerSkeletons}
255
256
  businessPaginationProps={paginationProps}
257
+ franchiseId={brandId}
256
258
  />
257
259
  )}
258
260
 
@@ -186,7 +186,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
186
186
  paginationProps.totalPages === paginationProps.currentPage
187
187
  );
188
188
 
189
- if (y + PIXELS_TO_SCROLL > height && !businessesList.loading && hasMore) {
189
+ if (y + PIXELS_TO_SCROLL > height && !businessesList.loading && hasMore && businessesList?.businesses?.length > 0) {
190
190
  getBusinesses();
191
191
  }
192
192
  };
@@ -36,6 +36,7 @@ export const MyOrders = (props: any) => {
36
36
  { key: 'products', value: t('PRODUCTS', 'Products') }
37
37
  ]
38
38
  const isChewLayout = theme?.business_view?.components?.header?.components?.layout?.type === 'chew'
39
+ const showNavbar = theme?.bar_menu?.components?.orders?.hidden
39
40
 
40
41
  const goToBack = () => navigation?.canGoBack() && navigation.goBack()
41
42
 
@@ -72,47 +73,48 @@ export const MyOrders = (props: any) => {
72
73
  onRefresh={() => handleOnRefresh()}
73
74
  />
74
75
  }>
75
- {isChewLayout && (
76
+ {(isChewLayout || showNavbar) && (
76
77
  <View style={{
77
78
  width: '100%',
78
79
  display: 'flex',
79
80
  flexDirection: 'row',
80
81
  alignItems: 'center',
81
- paddingHorizontal: 40
82
+ paddingHorizontal: 40,
83
+ marginTop: Platform.OS === 'android' ? 50 : 30,
82
84
  }}>
85
+ <OButton
86
+ imgLeftStyle={{ width: 18 }}
87
+ imgRightSrc={null}
88
+ style={{
89
+ borderWidth: 0,
90
+ width: 26,
91
+ height: 26,
92
+ backgroundColor: '#FFF',
93
+ borderColor: '#FFF',
94
+ shadowColor: '#FFF',
95
+ paddingLeft: 0,
96
+ paddingRight: 0
97
+ }}
98
+ onClick={goToBack}
99
+ icon={AntDesignIcon}
100
+ iconProps={{
101
+ name: 'arrowleft',
102
+ size: 26
103
+ }}
104
+ />
83
105
  <OText
84
106
  size={24}
85
107
  style={{
86
- marginTop: Platform.OS === 'android' ? 50 : 30,
87
- paddingHorizontal: 20,
88
- textTransform: 'capitalize'
108
+ textTransform: 'capitalize',
109
+ marginLeft: 20,
110
+ top: 2
89
111
  }}
90
112
  >
91
- <OButton
92
- imgLeftStyle={{ width: 18 }}
93
- imgRightSrc={null}
94
- style={{
95
- borderWidth: 0,
96
- width: 26,
97
- height: 26,
98
- backgroundColor: '#FFF',
99
- borderColor: '#FFF',
100
- shadowColor: '#FFF',
101
- paddingLeft: 0,
102
- paddingRight: 0,
103
- }}
104
- onClick={goToBack}
105
- icon={AntDesignIcon}
106
- iconProps={{
107
- name: 'arrowleft',
108
- size: 26
109
- }}
110
- />
111
113
  {t('MY_ORDERS', 'My Orders')}
112
114
  </OText>
113
115
  </View>
114
116
  )}
115
- {!hideOrders && !isChewLayout && (
117
+ {!hideOrders && !isChewLayout && !showNavbar && (
116
118
  <HeaderTitle text={t('MY_ORDERS', 'My Orders')} />
117
119
  )}
118
120
  {!allEmpty && (
@@ -114,7 +114,6 @@ const ProfileListUI = (props: ProfileParams) => {
114
114
  const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
115
115
  const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
116
116
  const IsPromotionsEnabled = configs?.advanced_offers_module?.value === '1' || configs?.advanced_offers_module?.value === true
117
- const isChewLayout = theme?.business_view?.components?.header?.components?.layout?.type === 'chew'
118
117
  const onRedirect = (route: string, params?: any) => {
119
118
  navigation.navigate(route, params)
120
119
  }
@@ -200,12 +199,10 @@ const ProfileListUI = (props: ProfileParams) => {
200
199
  <MessageCircle name='message1' style={styles.messageIconStyle} color={theme.colors.textNormal} />
201
200
  <OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('MESSAGES', 'Messages')}</OText>
202
201
  </ListItem>
203
- {isChewLayout && (
204
- <ListItem onPress={() => onRedirect('MyOrders', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
205
- <FontAwesome name='list-alt' style={styles.messageIconStyle} color={theme.colors.textNormal} />
206
- <OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('MY_ORDERS', 'My Orders')}</OText>
207
- </ListItem>
208
- )}
202
+ <ListItem onPress={() => onRedirect('MyOrders', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
203
+ <FontAwesome name='list-alt' style={styles.messageIconStyle} color={theme.colors.textNormal} />
204
+ <OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('MY_ORDERS', 'My Orders')}</OText>
205
+ </ListItem>
209
206
  {isWalletEnabled && (
210
207
  <ListItem onPress={() => onRedirect('Wallets', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
211
208
  <Ionicons name='wallet-outline' style={styles.messageIconStyle} color={theme.colors.textNormal} />
@@ -645,6 +645,7 @@ export interface BusinessSearchParams {
645
645
  onNavigationRedirect?: any,
646
646
  handleUpdateProducts: any,
647
647
  handleUpdateBusinessList?: any;
648
+ brandId?: number
648
649
  }
649
650
 
650
651
  export interface NoNetworkParams {