ordering-ui-react-native 0.17.57 → 0.17.58
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 +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -3
- package/themes/original/src/components/Checkout/index.tsx +5 -3
- package/themes/original/src/components/PlaceSpot/index.tsx +12 -6
- package/themes/original/src/components/UserProfile/index.tsx +1 -1
- package/themes/original/src/types/index.tsx +2 -1
package/package.json
CHANGED
|
@@ -469,7 +469,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
469
469
|
<HeaderWrapper
|
|
470
470
|
source={bgHeader ? { uri: bgHeader } : theme.images.backgrounds.business_list_header}
|
|
471
471
|
style={{ paddingTop: top + 20 }}
|
|
472
|
-
resizeMode='
|
|
472
|
+
resizeMode='cover'
|
|
473
473
|
>
|
|
474
474
|
{!auth && (
|
|
475
475
|
|
|
@@ -60,9 +60,7 @@ export const WrapMomentOption = styled.TouchableOpacity`
|
|
|
60
60
|
|
|
61
61
|
export const HeaderWrapper = styled.ImageBackground`
|
|
62
62
|
width: 100%;
|
|
63
|
-
height:
|
|
64
|
-
min-height: 270px;
|
|
65
|
-
max-height: 400px;
|
|
63
|
+
height: 270px;
|
|
66
64
|
padding: 20px 40px;
|
|
67
65
|
background-color: transparent;
|
|
68
66
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { View, StyleSheet, TouchableOpacity, Platform, I18nManager } from 'react-native';
|
|
2
|
+
import { View, StyleSheet, TouchableOpacity, Platform, I18nManager, Vibration } from 'react-native';
|
|
3
3
|
import { initStripe, useConfirmPayment } from '@stripe/stripe-react-native';
|
|
4
4
|
import Picker from 'react-native-country-picker-modal';
|
|
5
5
|
import MaterialIcons from 'react-native-vector-icons/MaterialIcons'
|
|
@@ -87,7 +87,8 @@ const CheckoutUI = (props: any) => {
|
|
|
87
87
|
instructionsOptions,
|
|
88
88
|
handleChangeDeliveryOption,
|
|
89
89
|
currency,
|
|
90
|
-
merchantId
|
|
90
|
+
merchantId,
|
|
91
|
+
setPlaceSpotNumber
|
|
91
92
|
} = props
|
|
92
93
|
|
|
93
94
|
const theme = useTheme();
|
|
@@ -611,6 +612,7 @@ const CheckoutUI = (props: any) => {
|
|
|
611
612
|
isInputMode
|
|
612
613
|
cart={cart}
|
|
613
614
|
spotNumberDefault={cartState?.cart?.spot_number ?? cart?.spot_number}
|
|
615
|
+
setPlaceSpotNumber={setPlaceSpotNumber}
|
|
614
616
|
vehicleDefault={cart?.vehicle}
|
|
615
617
|
/>
|
|
616
618
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100, marginHorizontal: -40 }} />
|
|
@@ -758,7 +760,7 @@ const CheckoutUI = (props: any) => {
|
|
|
758
760
|
</Container>
|
|
759
761
|
{!cartState.loading && cart && cart?.status !== 2 && (
|
|
760
762
|
<FloatingButton
|
|
761
|
-
handleClick={() => handlePlaceOrder(null)}
|
|
763
|
+
handleClick={isDisabledButtonPlace ? () => Vibration.vibrate() : () => handlePlaceOrder(null)}
|
|
762
764
|
isSecondaryBtn={isDisabledButtonPlace}
|
|
763
765
|
disabled={isDisabledButtonPlace}
|
|
764
766
|
btnText={subtotalWithTaxes >= cart?.minimum
|
|
@@ -23,13 +23,14 @@ const PlaceSpotUI = (props: PlaceSpotParams) => {
|
|
|
23
23
|
isInputMode,
|
|
24
24
|
setSpotNumber,
|
|
25
25
|
setVehicle,
|
|
26
|
-
handleChangeSpot
|
|
26
|
+
handleChangeSpot,
|
|
27
|
+
setPlaceSpotNumber
|
|
27
28
|
} = props
|
|
28
29
|
|
|
29
30
|
const theme = useTheme()
|
|
30
31
|
const [, t] = useLanguage()
|
|
31
32
|
const [orderState] = useOrder()
|
|
32
|
-
|
|
33
|
+
const [, { showToast }] = useToast();
|
|
33
34
|
|
|
34
35
|
const [placeGroupSelected, setPlaceGroupSelected] = useState<any>(null)
|
|
35
36
|
const vehicleInputAllowed = [4, 5]
|
|
@@ -135,10 +136,15 @@ const PlaceSpotUI = (props: PlaceSpotParams) => {
|
|
|
135
136
|
useEffect(() => {
|
|
136
137
|
if (spotState?.error?.length > 0) {
|
|
137
138
|
const errorText = manageErrorsToShow(spotState?.error)
|
|
138
|
-
|
|
139
|
+
showToast(ToastType.Error, errorText)
|
|
139
140
|
}
|
|
140
141
|
}, [spotState?.error])
|
|
141
142
|
|
|
143
|
+
const onChangePlaceSpot = (value: string) => {
|
|
144
|
+
setSpotNumber(value)
|
|
145
|
+
setPlaceSpotNumber(value)
|
|
146
|
+
}
|
|
147
|
+
|
|
142
148
|
return (
|
|
143
149
|
<PlaceSpotContainer>
|
|
144
150
|
{isInputMode ? (
|
|
@@ -220,12 +226,12 @@ const PlaceSpotUI = (props: PlaceSpotParams) => {
|
|
|
220
226
|
value={spotNumber?.toString() ?? ''}
|
|
221
227
|
placeholder={placeholderText}
|
|
222
228
|
type='number-pad'
|
|
223
|
-
onChange={(value: string) =>
|
|
229
|
+
onChange={(value: string) => onChangePlaceSpot(value)}
|
|
224
230
|
style={{
|
|
225
231
|
borderColor: theme.colors.border,
|
|
226
232
|
borderRadius: 7.6
|
|
227
233
|
}}
|
|
228
|
-
|
|
234
|
+
inputStyle={{ fontSize: 12, color: theme.colors.textNormal }}
|
|
229
235
|
/>
|
|
230
236
|
<View style={{ alignItems: 'flex-start' }}>
|
|
231
237
|
<OButton
|
|
@@ -278,7 +284,7 @@ const PlaceSpotUI = (props: PlaceSpotParams) => {
|
|
|
278
284
|
onSelect={(place: any) => handlerChangePlace(place)}
|
|
279
285
|
placeholder={t('SELECT_YOUR_SPOT', 'Select your spot')}
|
|
280
286
|
options={getPlaces()}
|
|
281
|
-
defaultValue={placesState?.places?.find((place
|
|
287
|
+
defaultValue={placesState?.places?.find((place: any) => place?.id === cart?.place_id)}
|
|
282
288
|
isModal
|
|
283
289
|
/>
|
|
284
290
|
</View>
|
|
@@ -163,7 +163,7 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
163
163
|
}, [removeAccountState])
|
|
164
164
|
|
|
165
165
|
return (
|
|
166
|
-
<View style={{ flex: 1, height: height - top - bottom
|
|
166
|
+
<View style={{ flex: 1, height: height - top - bottom, paddingTop: 20 }}>
|
|
167
167
|
{/* <OText size={24} style={{ marginTop: 15, paddingHorizontal: 40 }}>
|
|
168
168
|
{t('PROFILE', 'Profile')}
|
|
169
169
|
</OText> */}
|
|
@@ -667,6 +667,7 @@ export interface PlaceSpotParams {
|
|
|
667
667
|
vehicle?: any,
|
|
668
668
|
setVehicle?: any,
|
|
669
669
|
handleChangeSpot?: any
|
|
670
|
+
setPlaceSpotNumber?: any
|
|
670
671
|
}
|
|
671
672
|
|
|
672
673
|
export interface PromotionParams {
|
|
@@ -732,7 +733,7 @@ export interface PreviousBusinessOrderedParams {
|
|
|
732
733
|
isBusinessesSearchList?: any,
|
|
733
734
|
businessLoading?: boolean,
|
|
734
735
|
businesses?: any
|
|
735
|
-
|
|
736
|
+
handleUpdateBusinesses?: (businessId: number, changes: any) => {},
|
|
736
737
|
}
|
|
737
738
|
|
|
738
739
|
export interface ServiceFormParams {
|