ordering-ui-react-native 0.14.22 → 0.14.23

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.14.22",
3
+ "version": "0.14.23",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -57,6 +57,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
57
57
  handleBusinessClick,
58
58
  paginationProps,
59
59
  handleChangeSearch,
60
+ businessId
60
61
  } = props;
61
62
 
62
63
  const theme = useTheme();
@@ -256,17 +257,20 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
256
257
  />
257
258
  </WrapMomentOption>
258
259
 
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
- />
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
+
270
274
  </View>
271
275
  </OrderControlContainer>
272
276
  </HeaderWrapper>
@@ -277,7 +281,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
277
281
  />
278
282
  </OrderProgressWrapper>
279
283
  )}
280
- {!props.franchiseId && featuredBusiness && featuredBusiness.length > 0 && (
284
+ {!businessId && !props.franchiseId && featuredBusiness && featuredBusiness.length > 0 && (
281
285
  <FeaturedWrapper>
282
286
  <OText size={16} style={{ marginLeft: 40 }} weight={Platform.OS === 'ios' ? '600' : 'bold'}>{t('FEATURED_BUSINESS', 'Featured business')}</OText>
283
287
  <ScrollView
@@ -306,17 +310,19 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
306
310
  </FeaturedWrapper>
307
311
  )}
308
312
  <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100 }} />
309
- {!props.franchiseId && (
313
+ {!businessId && !props.franchiseId && (
310
314
  <HighestRatedBusinesses onBusinessClick={handleBusinessClick} navigation={navigation} />
311
315
  )}
312
316
  <View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100 }} />
313
317
  <ListWrapper>
314
- <BusinessTypeFilter
315
- images={props.images}
316
- businessTypes={props.businessTypes}
317
- defaultBusinessType={props.defaultBusinessType}
318
- handleChangeBusinessType={handleChangeBusinessType}
319
- />
318
+ {!businessId && (
319
+ <BusinessTypeFilter
320
+ images={props.images}
321
+ businessTypes={props.businessTypes}
322
+ defaultBusinessType={props.defaultBusinessType}
323
+ handleChangeBusinessType={handleChangeBusinessType}
324
+ />
325
+ )}
320
326
  {!businessesList.loading && businessesList.businesses.length === 0 && (
321
327
  <NotFoundSource
322
328
  content={t(
@@ -48,8 +48,8 @@ export const Help = (props: HelpParams) => {
48
48
 
49
49
  <LastOrdersContainer>
50
50
  <OText size={18} weight={600}>{t('LAST_ORDERS', 'Last Orders')}</OText>
51
- <LastOrders onRedirect={onRedirect} />
51
+ <LastOrders businessId={props.businessId} onRedirect={onRedirect} />
52
52
  </LastOrdersContainer>
53
53
  </>
54
54
  )
55
- }
55
+ }
@@ -193,13 +193,13 @@ const OrderProgressUI = (props: any) => {
193
193
  </View>
194
194
  </View>
195
195
  )}
196
- {!orderList?.loading && orderList?.orders?.length === 0 && (
196
+ {/* {!orderList?.loading && orderList?.orders?.length === 0 && (
197
197
  <NotFoundSource
198
198
  image={imageFails}
199
199
  content={t('NO_RESULTS_FOUND', 'Sorry, no results found')}
200
200
  conditioned
201
201
  />
202
- )}
202
+ )} */}
203
203
  </>
204
204
  )
205
205
  }
@@ -129,6 +129,7 @@ export interface BusinessesListingParams {
129
129
  businessTypes?: any;
130
130
  defaultBusinessType?: any;
131
131
  franchiseId?: any;
132
+ businessId?: any;
132
133
  }
133
134
  export interface HighestRatedBusinessesParams {
134
135
  businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
@@ -455,6 +456,7 @@ export interface GoogleMapsParams {
455
456
 
456
457
  export interface HelpParams {
457
458
  navigation: any;
459
+ businessId?: any;
458
460
  }
459
461
 
460
462
  export interface LastOrdersParams {