ordering-ui-react-native 0.22.63 → 0.22.65
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 +2 -2
- package/themes/business/src/components/NewOrderNotification/index.tsx +2 -1
- package/themes/business/src/components/OrdersOption/index.tsx +5 -5
- package/themes/original/src/components/BusinessProductsListing/index.tsx +5 -2
- package/themes/original/src/components/Cart/index.tsx +6 -2
- package/themes/original/src/components/CartContent/index.tsx +2 -1
- package/themes/original/src/components/UserProfile/index.tsx +9 -1
- package/themes/original/src/components/shared/OAlert.tsx +2 -1
- package/themes/original/src/types/index.tsx +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-react-native",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.65",
|
|
4
4
|
"description": "Reusable components made in react native",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"author": "ordering.inc",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"react-native-gesture-handler": "^1.8.0",
|
|
87
87
|
"react-native-get-random-values": "1.8.0",
|
|
88
88
|
"react-native-gifted-chat": "^0.16.3",
|
|
89
|
-
"react-native-google-places-autocomplete": "
|
|
89
|
+
"react-native-google-places-autocomplete": "2.1.3",
|
|
90
90
|
"react-native-html-to-pdf": "^0.10.0",
|
|
91
91
|
"react-native-image-picker": "^4.0.6",
|
|
92
92
|
"react-native-intersection-observer": "^0.0.9",
|
|
@@ -156,7 +156,8 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
156
156
|
setCurrentEvent({ evt: 2, orderId: value?.id ?? value?.order_id })
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
if ((!orderStatus.includes(value.status) && evtType !== 1 && isBusinessApp) || value?.author_id === user.id) return
|
|
159
|
+
if ((!orderStatus.includes(value.status) && evtType !== 1 && isBusinessApp) || value?.author_id === user.id) return
|
|
160
|
+
setCurrentEvent({
|
|
160
161
|
evt: evtType,
|
|
161
162
|
orderId: value?.driver
|
|
162
163
|
? value?.order_id ?? value?.id
|
|
@@ -380,18 +380,18 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
useEffect(() => {
|
|
383
|
-
scrollRefTab.current?.scrollTo(
|
|
384
|
-
scrollListRef.current?.scrollTo(
|
|
385
|
-
scrollRef.current?.scrollTo(
|
|
383
|
+
scrollRefTab.current?.scrollTo();
|
|
384
|
+
scrollListRef.current?.scrollTo();
|
|
385
|
+
scrollRef.current?.scrollTo();
|
|
386
386
|
setTags({ values: [] })
|
|
387
387
|
}, [currentTabSelected])
|
|
388
388
|
|
|
389
389
|
useEffect(() => {
|
|
390
390
|
const unsubcribe = navigation.addListener('focus', () => {
|
|
391
|
-
currentTabSelected === 'logisticOrders'
|
|
391
|
+
currentTabSelected === 'logisticOrders' && loadLogisticOrders()
|
|
392
392
|
})
|
|
393
393
|
return unsubcribe
|
|
394
|
-
}, [navigation,
|
|
394
|
+
}, [navigation, loadLogisticOrders])
|
|
395
395
|
|
|
396
396
|
return (
|
|
397
397
|
<>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
2
|
-
import { View, TouchableOpacity, StyleSheet, SafeAreaView, Dimensions, Platform, KeyboardAvoidingViewBase, KeyboardAvoidingView, Keyboard, KeyboardEvent, BackHandler, ScrollView } from 'react-native'
|
|
2
|
+
import { View, TouchableOpacity, StyleSheet, SafeAreaView, Dimensions, Platform, KeyboardAvoidingViewBase, KeyboardAvoidingView, Keyboard, KeyboardEvent, BackHandler, ScrollView, Vibration } from 'react-native'
|
|
3
3
|
import { IOScrollView } from 'react-native-intersection-observer'
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
5
5
|
import { useTheme } from 'styled-components/native';
|
|
@@ -687,7 +687,10 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
687
687
|
btnLeftValue={currentCart?.products.reduce((prev: number, product: any) => prev + product.quantity, 0)}
|
|
688
688
|
btnRightValue={parsePrice(currentCart?.total)}
|
|
689
689
|
disabled={subtotalWithTaxes < currentCart?.minimum || openUpselling}
|
|
690
|
-
handleClick={() =>
|
|
690
|
+
handleClick={() => {
|
|
691
|
+
Vibration.vibrate(100)
|
|
692
|
+
setOpenUpselling(true)
|
|
693
|
+
}}
|
|
691
694
|
/>
|
|
692
695
|
</View>
|
|
693
696
|
)}
|
|
@@ -19,7 +19,7 @@ import { CouponControl } from '../CouponControl';
|
|
|
19
19
|
import { OButton, OInput, OModal, OText } from '../shared';
|
|
20
20
|
import { UpsellingProducts } from '../UpsellingProducts';
|
|
21
21
|
import { verifyDecimals } from '../../utils';
|
|
22
|
-
import { ActivityIndicator, TouchableOpacity, View } from 'react-native';
|
|
22
|
+
import { ActivityIndicator, TouchableOpacity, View, Vibration } from 'react-native';
|
|
23
23
|
import AntIcon from 'react-native-vector-icons/AntDesign'
|
|
24
24
|
import { TaxInformation } from '../TaxInformation';
|
|
25
25
|
import { CartStoresListing } from '../CartStoresListing';
|
|
@@ -197,6 +197,7 @@ const CartUI = (props: any) => {
|
|
|
197
197
|
}, cart?.subtotal)
|
|
198
198
|
|
|
199
199
|
const handleClickCheckout = () => {
|
|
200
|
+
Vibration.vibrate(100)
|
|
200
201
|
if (cart?.business_id) {
|
|
201
202
|
setOpenUpselling(true)
|
|
202
203
|
} else {
|
|
@@ -243,7 +244,10 @@ const CartUI = (props: any) => {
|
|
|
243
244
|
handleClearProducts={handleClearProducts}
|
|
244
245
|
handleCartOpen={handleCartOpen}
|
|
245
246
|
onNavigationRedirect={props.onNavigationRedirect}
|
|
246
|
-
handleChangeStore={() =>
|
|
247
|
+
handleChangeStore={() => {
|
|
248
|
+
Vibration.vibrate(100)
|
|
249
|
+
setOpenChangeStore(true)
|
|
250
|
+
}}
|
|
247
251
|
handleClickCheckout={() => handleClickCheckout()}
|
|
248
252
|
checkoutButtonDisabled={(openUpselling && !canOpenUpselling) || subtotalWithTaxes < cart?.minimum || !cart?.valid_address}
|
|
249
253
|
isMultiCheckout={isMultiCheckout}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
2
|
-
import { View } from 'react-native';
|
|
2
|
+
import { Vibration, View } from 'react-native';
|
|
3
3
|
import { useLanguage, useConfig, useUtils, useOrder } from 'ordering-components/native';
|
|
4
4
|
import { useTheme } from 'styled-components/native';
|
|
5
5
|
import { CCContainer, CCNotCarts, CCList, CheckoutAction, ChCartsTotal } from './styles';
|
|
@@ -39,6 +39,7 @@ export const CartContent = (props: any) => {
|
|
|
39
39
|
?.filter((cart: any) => cart?.status !== 1 && cart?.valid && cart?.products?.length)
|
|
40
40
|
?.reduce((total: any, cart: any) => { return total + (cart?.delivery_price_with_discount) }, 0)
|
|
41
41
|
const handleCheckoutRedirect = () => {
|
|
42
|
+
Vibration.vibrate(100)
|
|
42
43
|
if (cartsAvailable.length === 1) {
|
|
43
44
|
onNavigationRedirect('CheckoutNavigator', {
|
|
44
45
|
screen: 'CheckoutPage',
|
|
@@ -44,6 +44,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
44
44
|
handleRemoveAccount,
|
|
45
45
|
removeAccountState,
|
|
46
46
|
handleChangePromotions,
|
|
47
|
+
appVersion
|
|
47
48
|
} = props;
|
|
48
49
|
|
|
49
50
|
const theme = useTheme();
|
|
@@ -151,7 +152,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
151
152
|
const detailProps = {
|
|
152
153
|
goToBack: () => props.navigation?.canGoBack() && props.navigation.goBack(),
|
|
153
154
|
onNavigationRedirect: (route: string, params: any) => props.navigation.navigate(route, params),
|
|
154
|
-
handleRemoveAccount
|
|
155
|
+
handleRemoveAccount,
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
useEffect(() => {
|
|
@@ -271,6 +272,13 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
271
272
|
</Actions>
|
|
272
273
|
</ListWrap>
|
|
273
274
|
<WebsocketStatus />
|
|
275
|
+
{appVersion && (
|
|
276
|
+
<View
|
|
277
|
+
style={{ alignItems: 'center' }}
|
|
278
|
+
>
|
|
279
|
+
<OText>v{appVersion}</OText>
|
|
280
|
+
</View>
|
|
281
|
+
)}
|
|
274
282
|
<OAlert
|
|
275
283
|
open={confirm.open}
|
|
276
284
|
title={confirm.title}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
2
|
import styled, { css } from 'styled-components/native'
|
|
3
|
-
import { Alert } from 'react-native'
|
|
3
|
+
import { Alert, Vibration } from 'react-native'
|
|
4
4
|
import { useLanguage } from 'ordering-components/native'
|
|
5
5
|
|
|
6
6
|
const Wrapper = styled.TouchableOpacity`
|
|
@@ -41,6 +41,7 @@ const OAlert = (props: Props) => {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
const handleClick = () => {
|
|
44
|
+
Vibration.vibrate(100)
|
|
44
45
|
props.onClick && props.onClick()
|
|
45
46
|
createTwoButtonAlert()
|
|
46
47
|
}
|