ordering-ui-react-native 0.15.18 → 0.15.21

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.18",
3
+ "version": "0.15.21",
4
4
  "description": "Reusable components made in react native",
5
5
  "main": "src/index.tsx",
6
6
  "author": "ordering.inc",
@@ -631,6 +631,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
631
631
  getOrderStatus={getOrderStatus}
632
632
  handleClickOrder={handleClickOrder}
633
633
  slaSettingTime={slaSettingTime}
634
+ currentTabSelected={currentTabSelected}
634
635
  />
635
636
  )}
636
637
  {!logisticOrders?.error?.length &&
@@ -17,7 +17,8 @@ export const PreviousOrders = (props: any) => {
17
17
  handleClickOrder,
18
18
  isLogisticOrder,
19
19
  handleClickLogisticOrder,
20
- slaSettingTime
20
+ slaSettingTime,
21
+ currentTabSelected
21
22
  } = props;
22
23
  const [, t] = useLanguage();
23
24
  const [{ parseDate, optimizeImage }] = useUtils();
@@ -159,7 +160,7 @@ export const PreviousOrders = (props: any) => {
159
160
  />
160
161
  </NotificationIcon>
161
162
  )}
162
- <View style={{ flexDirection: 'row' }}>
163
+ <View style={{ flexDirection: 'row', flexWrap: 'wrap' }}>
163
164
  <OText
164
165
  style={styles.date}
165
166
  color={theme.colors.unselectText}
@@ -169,9 +170,14 @@ export const PreviousOrders = (props: any) => {
169
170
  {(order?.order_group_id && order?.order_group && isLogisticOrder ? `${order?.order_group?.orders?.length} ${t('ORDERS', 'Orders')}` : (t('NO', 'Order No.') + order.id)) + ' · '}
170
171
  {order?.delivery_datetime_utc
171
172
  ? parseDate(order?.delivery_datetime_utc, { outputFormat: 'MM/DD/YY · HH:mm a' })
172
- : parseDate(order?.delivery_datetime, { utc: false })}{' · '}
173
+ : parseDate(order?.delivery_datetime, { utc: false })}
173
174
  </OText>
174
- <OText style={styles.date} color={order?.time_status === 'in_time' ? '#00D27A' : order?.time_status === 'at_risk' ? '#FFC700' : order?.time_status === 'delayed' ? '#E63757' : ''} >{getDelayTime(order)}</OText>
175
+ {(currentTabSelected === 'pending' || currentTabSelected === 'inProgress') && (
176
+ <>
177
+ <OText> · </OText>
178
+ <OText style={styles.date} color={order?.time_status === 'in_time' ? '#00D27A' : order?.time_status === 'at_risk' ? '#FFC700' : order?.time_status === 'delayed' ? '#E63757' : ''} >{getDelayTime(order)}</OText>
179
+ </>
180
+ )}
175
181
  </View>
176
182
  {!isLogisticOrder && (
177
183
  <MyOrderOptions>
@@ -25,6 +25,7 @@ import { ReviewProducts } from './src/components/ReviewProducts';
25
25
  import { ReviewDriver } from './src/components/ReviewDriver';
26
26
  import { UserProfile } from './src/components/UserProfile';
27
27
  import { MessageListing } from './src/components/MessageListing';
28
+ import { Messages } from './src/components/Messages';
28
29
  import { Help } from './src/components/Help';
29
30
  import { HelpAccountAndPayment } from './src/components/HelpAccountAndPayment';
30
31
  import { HelpGuide } from './src/components/HelpGuide';
@@ -93,6 +94,7 @@ export {
93
94
  BusinessMenuList,
94
95
  UserProfile,
95
96
  MessageListing,
97
+ Messages,
96
98
  Help,
97
99
  HelpAccountAndPayment,
98
100
  HelpGuide,
@@ -6,7 +6,7 @@ import { BusinessProductsListParams } from '../../types';
6
6
  import { OButton, OIcon, OModal, OText } from '../shared';
7
7
  import { ProductsContainer, ErrorMessage, WrapperNotFound } from './styles';
8
8
  import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
9
- import { View } from 'react-native';
9
+ import { View, ScrollView } from 'react-native';
10
10
  import { StyleSheet } from 'react-native';
11
11
  import { useTheme } from 'styled-components/native';
12
12
 
@@ -220,7 +220,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
220
220
  title={openDescription?.name}
221
221
  onClose={() => setOpenDescription(null)}
222
222
  >
223
- <View style={{ padding: 20 }}>
223
+ <ScrollView style={{ padding: 20 }}>
224
224
  {!!openDescription?.image && (
225
225
  <OIcon
226
226
  url={optimizeImage(openDescription?.image, 'h_100,c_limit')}
@@ -230,7 +230,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
230
230
  />
231
231
  )}
232
232
  <OText>{openDescription?.description}</OText>
233
- </View>
233
+ </ScrollView>
234
234
  </OModal>
235
235
  </ProductsContainer>
236
236
  );
@@ -87,6 +87,7 @@ const CouponControlUI = (props: any) => {
87
87
  ) : (
88
88
  <CCWrapper>
89
89
  <OInput
90
+ value={couponInput}
90
91
  placeholder={t('DISCOUNT_COUPON', 'Discount coupon')}
91
92
  onChange={(e: any) => onChangeInputCoupon(e)}
92
93
  style={styles.inputsStyle}
@@ -63,7 +63,7 @@ const DriverTipsUI = (props: any) => {
63
63
  return (
64
64
  <DTContainer>
65
65
  <DTWrapperTips>
66
- {driverTipsOptions.map((option: any, i: number) => (
66
+ {driverTipsOptions.map((option: any, i: number) => (
67
67
  <TouchableOpacity
68
68
  key={i}
69
69
  onPress={() => handlerChangeOption(option)}
@@ -98,27 +98,17 @@ const MessagesUI = (props: MessagesParams) => {
98
98
 
99
99
  const handleImagePicker = () => {
100
100
  launchImageLibrary({ mediaType: 'photo', maxHeight: 2048, maxWidth: 2048, includeBase64: true }, (response: any) => {
101
- if (response.didCancel) {
102
- console.log('User cancelled image picker');
103
- } else if (response.errorMessage) {
104
- console.log('ImagePicker Error: ', response.errorMessage);
101
+ if (response?.didCancel) {
102
+ showToast(ToastType.Error, t('IMAGE_CANCELLED', 'User cancelled image picker'));
103
+ } else if (response?.errorMessage) {
105
104
  showToast(ToastType.Error, response.errorMessage);
106
105
  } else {
107
- if (Platform.OS === 'ios') {
108
- if (response.uri) {
109
- const url = `data:${response.type};base64,${response.base64}`
110
- setImage && setImage(url);
111
- } else {
112
- showToast(ToastType.Error, t('IMAGE_NOT_FOUND', 'Image not found'));
113
- }
106
+ if (response?.assets?.length > 0) {
107
+ const image = response?.assets[0]
108
+ const url = `data:${image.type};base64,${image.base64}`
109
+ setImage && setImage(url);
114
110
  } else {
115
- if (response?.assets?.length > 0) {
116
- const image = response?.assets[0]
117
- const url = `data:${image.type};base64,${image.base64}`
118
- setImage && setImage(url);
119
- } else {
120
- showToast(ToastType.Error, t('IMAGE_NOT_FOUND', 'Image not found'));
121
- }
111
+ showToast(ToastType.Error, t('IMAGE_NOT_FOUND', 'Image not found'));
122
112
  }
123
113
  }
124
114
  });
@@ -237,7 +227,7 @@ const MessagesUI = (props: MessagesParams) => {
237
227
  {image && (
238
228
  <TouchableOpacity
239
229
  style={{ position: 'absolute', top: -5, right: -5, borderColor: theme.colors.backgroundDark, backgroundColor: theme.colors.white, borderRadius: 25 }}
240
- onPress={() => removeImage()}
230
+ onPress={removeImage}
241
231
  >
242
232
  <MaterialCommunityIcon name='close-circle-outline' color={theme.colors.backgroundDark} size={24} />
243
233
  </TouchableOpacity>
@@ -545,9 +535,15 @@ const styles = StyleSheet.create({
545
535
  })
546
536
 
547
537
  export const Messages = (props: MessagesParams) => {
538
+ const [allMessages, setAllMessages] = useState(props.messages)
548
539
  const MessagesProps = {
549
540
  ...props,
550
- UIComponent: MessagesUI
541
+ UIComponent: MessagesUI,
542
+ messages: allMessages,
543
+ setMessages: (values: any) => {
544
+ props.setMessages && props.setMessages(values)
545
+ setAllMessages(values)
546
+ }
551
547
  }
552
548
  return <MessagesController {...MessagesProps} />
553
549
  }
@@ -1,14 +1,11 @@
1
1
  import React, { useState, useEffect } from 'react';
2
- import { View, StyleSheet, BackHandler, KeyboardAvoidingView, Platform, Linking } from 'react-native';
3
- import Spinner from 'react-native-loading-spinner-overlay';
2
+ import { View, StyleSheet, BackHandler, Platform, Linking } from 'react-native';
4
3
  import LinearGradient from 'react-native-linear-gradient';
5
- import { Messages } from '../Messages';
6
4
  import {
7
5
  useLanguage,
8
6
  OrderDetails as OrderDetailsConTableoller,
9
7
  useUtils,
10
- useConfig,
11
- useSession,
8
+ useConfig
12
9
  } from 'ordering-components/native';
13
10
  import { useTheme } from 'styled-components/native';
14
11
  import {
@@ -16,14 +13,10 @@ import {
16
13
  Header,
17
14
  OrderContent,
18
15
  OrderBusiness,
19
- Logo,
20
16
  OrderData,
21
17
  OrderInfo,
22
- OrderStatus,
23
18
  StaturBar,
24
- StatusImage,
25
19
  OrderCustomer,
26
- CustomerPhoto,
27
20
  InfoBlock,
28
21
  HeaderInfo,
29
22
  Customer,
@@ -31,17 +24,16 @@ import {
31
24
  Table,
32
25
  OrderBill,
33
26
  Total,
34
- NavBack,
35
27
  Icons,
36
28
  OrderDriver,
37
29
  Map,
38
30
  Divider,
31
+ OrderAction
39
32
  } from './styles';
40
33
  import { OButton, OIcon, OModal, OText } from '../shared';
41
34
  import { ProductItemAccordion } from '../ProductItemAccordion';
42
35
  import { TouchableOpacity } from 'react-native-gesture-handler';
43
36
  import { OrderDetailsParams } from '../../types';
44
- import { USER_TYPE } from '../../config/constants';
45
37
  import { GoogleMap } from '../GoogleMap';
46
38
  import { verifyDecimals } from '../../utils';
47
39
  import { OSRow } from '../OrderSummary/styles';
@@ -55,9 +47,11 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
55
47
  messages,
56
48
  setMessages,
57
49
  readMessages,
58
- messagesReadList,
59
50
  isFromCheckout,
60
51
  driverLocation,
52
+ onNavigationRedirect,
53
+ reorderState,
54
+ handleReorder
61
55
  } = props;
62
56
 
63
57
  const theme = useTheme();
@@ -92,16 +86,8 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
92
86
 
93
87
  const [, t] = useLanguage();
94
88
  const [{ parsePrice, parseNumber, parseDate }] = useUtils();
95
- const [{ user }] = useSession();
96
89
  const [{ configs }] = useConfig();
97
-
98
- const [openModalForBusiness, setOpenModalForBusiness] = useState(false);
99
- const [openModalForDriver, setOpenModalForDriver] = useState(false);
100
90
  const [isReviewed, setIsReviewed] = useState(false)
101
- const [unreadAlert, setUnreadAlert] = useState({
102
- business: false,
103
- driver: false,
104
- });
105
91
  const [openTaxModal, setOpenTaxModal] = useState<any>({ open: false, tax: null, type: '' })
106
92
 
107
93
  const { order, businessData } = props.order;
@@ -314,38 +300,24 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
314
300
  return objectStatus && objectStatus;
315
301
  };
316
302
 
317
- const handleOpenMessagesForBusiness = () => {
318
- setOpenModalForBusiness(true);
319
- readMessages && readMessages();
320
- setUnreadAlert({ ...unreadAlert, business: false });
321
- };
322
-
323
- const handleOpenMessagesForDriver = () => {
324
- setOpenModalForDriver(true);
303
+ const handleGoToMessages = (type: string) => {
325
304
  readMessages && readMessages();
326
- setUnreadAlert({ ...unreadAlert, driver: false });
327
- };
328
-
329
- const unreadMessages = () => {
330
- const length = messages?.messages.length;
331
- const unreadLength = order?.unread_count;
332
- const unreadedMessages = messages.messages.slice(
333
- length - unreadLength,
334
- length,
335
- );
336
- const business = unreadedMessages.some((message: any) =>
337
- message?.can_see?.includes(2),
338
- );
339
- const driver = unreadedMessages.some((message: any) =>
340
- message?.can_see?.includes(4),
341
- );
342
- setUnreadAlert({ business, driver });
343
- };
344
-
345
- const handleCloseModal = () => {
346
- setOpenModalForBusiness(false);
347
- setOpenModalForDriver(false);
348
- };
305
+ navigation.navigate(
306
+ 'MessageDetails',
307
+ {
308
+ type,
309
+ order,
310
+ messages,
311
+ setMessages,
312
+ orderId: order?.id,
313
+ business: type === 'business',
314
+ driver: type === 'driver',
315
+ onClose: () => navigation?.canGoBack()
316
+ ? navigation.goBack()
317
+ : navigation.navigate('BottomTab', { screen: 'MyOrders' }),
318
+ }
319
+ )
320
+ }
349
321
 
350
322
  const handleArrowBack: any = () => {
351
323
  if (!isFromCheckout) {
@@ -387,6 +359,16 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
387
359
  )
388
360
  }
389
361
 
362
+
363
+ useEffect(() => {
364
+ if (reorderState?.error) {
365
+ navigation.navigate('Business', { store: businessData?.slug })
366
+ }
367
+ if (!reorderState?.error && reorderState?.result?.uuid) {
368
+ onNavigationRedirect && onNavigationRedirect('CheckoutNavigator', { cartUuid: reorderState?.result.uuid })
369
+ }
370
+ }, [reorderState])
371
+
390
372
  useEffect(() => {
391
373
  BackHandler.addEventListener('hardwareBackPress', handleArrowBack);
392
374
  return () => {
@@ -394,14 +376,6 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
394
376
  };
395
377
  }, []);
396
378
 
397
- useEffect(() => {
398
- if (messagesReadList?.length) {
399
- openModalForBusiness
400
- ? setUnreadAlert({ ...unreadAlert, business: false })
401
- : setUnreadAlert({ ...unreadAlert, driver: false });
402
- }
403
- }, [messagesReadList]);
404
-
405
379
  const locations = [
406
380
  {
407
381
  ...order?.driver?.location,
@@ -606,7 +580,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
606
580
  )}
607
581
  <TouchableOpacity
608
582
  style={{ paddingStart: 5 }}
609
- onPress={() => handleOpenMessagesForBusiness()}>
583
+ onPress={() => handleGoToMessages('business')}>
610
584
  <OIcon
611
585
  src={theme.images.general.chat}
612
586
  width={16}
@@ -735,7 +709,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
735
709
  </OText>
736
710
  <Icons>
737
711
  <TouchableOpacity
738
- onPress={() => handleOpenMessagesForDriver()}>
712
+ onPress={() => handleGoToMessages('driver')}>
739
713
  <OIcon
740
714
  src={theme.images.general.chat}
741
715
  width={16}
@@ -776,16 +750,37 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
776
750
  'Once business accepts your order, we will send you an email, thank you!',
777
751
  )}
778
752
  </OText>
779
- <OButton
780
- text={t('YOUR_ORDERS', 'Your Orders')}
781
- textStyle={{ fontSize: 14, color: theme.colors.primary }}
782
- imgRightSrc={null}
783
- borderColor={theme.colors.primary}
784
- bgColor={theme.colors.clear}
785
- style={{ borderRadius: 7.6, borderWidth: 1, height: 44, shadowOpacity: 0 }}
786
- parentStyle={{ marginTop: 29, width: '50%' }}
787
- onClick={() => navigation.navigate('BottomTab', { screen: 'MyOrders' })}
788
- />
753
+ <OrderAction>
754
+ <OButton
755
+ text={t('YOUR_ORDERS', 'Your Orders')}
756
+ textStyle={{ fontSize: 14, color: theme.colors.primary }}
757
+ imgRightSrc={null}
758
+ borderColor={theme.colors.primary}
759
+ bgColor={theme.colors.clear}
760
+ style={{ borderRadius: 7.6, borderWidth: 1, height: 44, shadowOpacity: 0 }}
761
+ parentStyle={{ marginTop: 29, marginEnd: 15 }}
762
+ onClick={() => navigation.navigate('BottomTab', { screen: 'MyOrders' })}
763
+ />
764
+ {(
765
+ parseInt(order?.status) === 1 ||
766
+ parseInt(order?.status) === 2 ||
767
+ parseInt(order?.status) === 5 ||
768
+ parseInt(order?.status) === 6 ||
769
+ parseInt(order?.status) === 10 ||
770
+ parseInt(order?.status) === 11 ||
771
+ parseInt(order?.status) === 12
772
+ ) && (
773
+ <OButton
774
+ text={order.id === reorderState?.loading ? t('LOADING', 'Loading..') : t('REORDER', 'Reorder')}
775
+ textStyle={{ fontSize: 14, color: theme.colors.primary }}
776
+ imgRightSrc={null}
777
+ borderColor='transparent'
778
+ bgColor={theme.colors.primary + 10}
779
+ style={{ borderRadius: 7.6, borderWidth: 1, height: 44, shadowOpacity: 0, marginTop: 29 }}
780
+ onClick={() => handleReorder && handleReorder(order.id)}
781
+ />
782
+ )}
783
+ </OrderAction>
789
784
  </HeaderInfo>
790
785
  <OrderProducts>
791
786
  {order?.products?.length &&
@@ -1018,22 +1013,6 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
1018
1013
  </OrderContent>
1019
1014
  </>
1020
1015
  )}
1021
- <OModal
1022
- open={openModalForBusiness || openModalForDriver}
1023
- entireModal
1024
- customClose
1025
- onClose={() => handleCloseModal()}>
1026
- <Messages
1027
- type={openModalForBusiness ? USER_TYPE.BUSINESS : USER_TYPE.DRIVER}
1028
- orderId={order?.id}
1029
- messages={messages}
1030
- order={order}
1031
- business={openModalForBusiness}
1032
- driver={openModalForDriver}
1033
- setMessages={setMessages}
1034
- onClose={handleCloseModal}
1035
- />
1036
- </OModal>
1037
1016
  <OModal
1038
1017
  open={openTaxModal.open}
1039
1018
  onClose={() => setOpenTaxModal({ open: false, data: null, type: '' })}
@@ -125,3 +125,6 @@ export const Divider = styled.View`
125
125
  margin-top: 5px;
126
126
  margin-bottom: 5px;
127
127
  `
128
+ export const OrderAction = styled.View`
129
+ flex-direction: row;
130
+ `
@@ -1,4 +1,4 @@
1
- import React, { Mixin } from 'react'
1
+ import React from 'react'
2
2
  import { useLanguage } from 'ordering-components/native'
3
3
  import { SingleProductCard } from '../SingleProductCard'
4
4
  import { TaxInformationContainer, ProductContainer } from './styles'
@@ -9,7 +9,7 @@ interface taxInformationParams {
9
9
  name: string,
10
10
  description?: string,
11
11
  rate: string | number,
12
- type: number,
12
+ type: string | number,
13
13
  fixed?: number,
14
14
  percentage?: number,
15
15
  id: number,
@@ -29,6 +29,10 @@ export const TaxInformation = (props: taxInformationParams) => {
29
29
  const [, t] = useLanguage()
30
30
 
31
31
  const includedOnPriceString = data?.type === 1 ? `(${t('INCLUDED_ON_PRICE', 'Included on price')})` : `(${t('NOT_INCLUDED_ON_PRICE', 'Not included on price')})`
32
+ const offersHideArray = ['offer_target_2', 'offer_target_3']
33
+ const hideProductsSectionOffers = offersHideArray.includes(type)
34
+ const dataHideArray : Array<string | number> = ['platform', 'business']
35
+ const hideProductsSectionData = dataHideArray.includes(data.type)
32
36
 
33
37
  const getFilterValidation = (product: any) => {
34
38
  return (
@@ -61,7 +65,7 @@ export const TaxInformation = (props: taxInformationParams) => {
61
65
  {t('WITHOUT_DESCRIPTION', 'Without description')}
62
66
  </OText>
63
67
  )}
64
- {!(type === 'offer_target_2' || type === 'offer_target_3') && (
68
+ {!hideProductsSectionOffers && !hideProductsSectionData && (
65
69
  <>
66
70
  <OText>{t('OTHER_PRODUCTS_WITH_THIS', 'Other products with this')} {getTypeString()}:</OText>
67
71
  <ProductContainer>
@@ -16,6 +16,7 @@ import { LogoutButton } from '../LogoutButton'
16
16
  import { LanguageSelector } from '../LanguageSelector'
17
17
  import MessageCircle from 'react-native-vector-icons/AntDesign'
18
18
  import Ionicons from 'react-native-vector-icons/Ionicons'
19
+ import FastImage from 'react-native-fast-image'
19
20
 
20
21
  import {
21
22
  OIcon,
@@ -142,12 +143,13 @@ const ProfileListUI = (props: ProfileParams) => {
142
143
  <CenterView style={styles.pagePadding}>
143
144
  <View style={styles.photo}>
144
145
  {user?.photo ? (
145
- <OIcon
146
- url={user?.photo}
147
- cover
148
- width={60}
149
- height={60}
150
- borderRadius={8}
146
+ <FastImage
147
+ style={{ height: 60, width: 60, borderRadius: 8 }}
148
+ source={{
149
+ uri: user?.photo,
150
+ priority: FastImage.priority.normal,
151
+ }}
152
+ resizeMode={FastImage.resizeMode.cover}
151
153
  />
152
154
  ) : (
153
155
  <Ionicons name='person-outline' size={50} style={{ marginRight: 10 }} />
@@ -21,6 +21,7 @@ import NavBar from '../NavBar';
21
21
  import { Container } from '../../layouts/Container';
22
22
  import { VerifyPhone } from '../VerifyPhone'
23
23
  import Ionicons from 'react-native-vector-icons/Ionicons'
24
+ import FastImage from 'react-native-fast-image'
24
25
 
25
26
  const ProfileUI = (props: ProfileParams) => {
26
27
  const {
@@ -288,12 +289,13 @@ const ProfileUI = (props: ProfileParams) => {
288
289
  <CenterView style={styles.pagePadding}>
289
290
  <View style={styles.photo}>
290
291
  {user?.photo ? (
291
- <OIcon
292
- url={user?.photo}
293
- cover
294
- width={60}
295
- height={60}
296
- borderRadius={8}
292
+ <FastImage
293
+ style={{ height: 60, width: 80, borderRadius: 8 }}
294
+ source={{
295
+ uri: user?.photo,
296
+ priority: FastImage.priority.normal,
297
+ }}
298
+ resizeMode={FastImage.resizeMode.cover}
297
299
  />
298
300
  ) : (
299
301
  <Ionicons name='person-outline' size={50} />
@@ -143,9 +143,9 @@ export interface BusinessesListingParams {
143
143
  export interface HighestRatedBusinessesParams {
144
144
  businessesList: { businesses: Array<any>, loading: boolean, error: null | string };
145
145
  onBusinessClick?: void;
146
- navigation? :any;
146
+ navigation?: any;
147
147
  isLoading?: boolean;
148
- getBusinesses: (newFetch : boolean) => void
148
+ getBusinesses: (newFetch: boolean) => void
149
149
  }
150
150
  export interface BusinessTypeFilterParams {
151
151
  businessTypes?: Array<any>;
@@ -182,7 +182,7 @@ export interface BusinessProductsListingParams {
182
182
  header?: any;
183
183
  logo?: any;
184
184
  productModal?: any;
185
- getNextProducts?: () => {};
185
+ getNextProducts?: () => {};
186
186
  handleChangeCategory: (value: any) => {};
187
187
  setProductLogin?: () => {};
188
188
  updateProductModal?: (value: any) => {};
@@ -209,8 +209,8 @@ export interface BusinessProductsCategoriesParams {
209
209
  categoriesLayout?: any;
210
210
  selectedCategoryId?: any;
211
211
  lazyLoadProductsRecommended?: any;
212
- setSelectedCategoryId?: any
213
- setCategoryClicked?: any
212
+ setSelectedCategoryId?: any
213
+ setCategoryClicked?: any
214
214
  }
215
215
  export interface BusinessProductsListParams {
216
216
  errors?: any;
@@ -321,7 +321,10 @@ export interface OrderDetailsParams {
321
321
  isFromCheckout?: boolean,
322
322
  driverLocation?: any,
323
323
  isFromRoot?: any,
324
- goToBusinessList?: boolean
324
+ goToBusinessList?: boolean,
325
+ onNavigationRedirect?: any,
326
+ reorderState?: any,
327
+ handleReorder?: any,
325
328
  }
326
329
  export interface ProductItemAccordionParams {
327
330
  key?: any;
@@ -355,7 +358,7 @@ export interface ReviewProductParams {
355
358
  formState?: any,
356
359
  handleChangeFormState?: any,
357
360
  handleSendProductReview?: any
358
- }
361
+ }
359
362
  export interface SingleProductReviewParams {
360
363
  product: any,
361
364
  formState?: any,
@@ -383,7 +386,7 @@ export interface MessagesParams {
383
386
  handleSend?: () => {},
384
387
  setImage?: (image: string | null) => {},
385
388
  setMessage?: (comment: string) => {},
386
- setMessages?: () => {},
389
+ setMessages?: (image: any | null) => {},
387
390
  readMessages?: () => {},
388
391
  onClose?: () => void,
389
392
  isMeesageListing?: boolean,
@@ -522,34 +525,34 @@ export interface HelpGuideParams {
522
525
  export interface HelpAccountAndPaymentParams {
523
526
  navigation: any;
524
527
  }
525
-
528
+
526
529
  export interface MessageListingParams {
527
530
  navigation: any;
528
531
  franchiseId?: any;
529
532
  }
530
533
 
531
- export interface BusinessSearchParams {
534
+ export interface BusinessSearchParams {
532
535
  navigation: any,
533
- businessesSearchList: any,
534
- onBusinessClick: any,
535
- handleChangeTermValue: (term: string) => void,
536
- termValue: string,
537
- paginationProps: any,
538
- handleSearchbusinessAndProducts: (newFetch?: boolean) => void,
539
- handleChangeFilters: (prop : string, value : any) => void,
540
- filters: any,
541
- businessTypes: Array<number>,
542
- setFilters: (filters: any) => void,
536
+ businessesSearchList: any,
537
+ onBusinessClick: any,
538
+ handleChangeTermValue: (term: string) => void,
539
+ termValue: string,
540
+ paginationProps: any,
541
+ handleSearchbusinessAndProducts: (newFetch?: boolean) => void,
542
+ handleChangeFilters: (prop: string, value: any) => void,
543
+ filters: any,
544
+ businessTypes: Array<number>,
545
+ setFilters: (filters: any) => void,
543
546
  lazySearch?: boolean
544
547
  }
545
-
548
+
546
549
  export interface NoNetworkParams {
547
550
  image?: any,
548
551
  }
549
552
 
550
553
  export interface PlaceSpotParams {
551
554
  isOpenPlaceSpot?: boolean,
552
- cart?: any ,
555
+ cart?: any,
553
556
  placesState?: any,
554
557
  handleChangePlace?: any,
555
558
  getPlacesList?: any,