ordering-ui-react-native 0.17.57 → 0.17.59
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/LoginForm/index.tsx +0 -1
- package/themes/original/src/components/MomentOption/index.tsx +1 -1
- package/themes/original/src/components/NavBar/index.tsx +1 -1
- package/themes/original/src/components/OrderTypeSelector/index.tsx +0 -1
- package/themes/original/src/components/PlaceSpot/index.tsx +12 -6
- package/themes/original/src/components/SignupForm/index.tsx +0 -1
- package/themes/original/src/components/UserProfile/index.tsx +1 -1
- package/themes/original/src/components/Wallets/index.tsx +9 -2
- package/themes/original/src/components/shared/HeaderTitle.tsx +7 -2
- 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
|
|
@@ -384,7 +384,6 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
384
384
|
onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
|
|
385
385
|
showCall={false}
|
|
386
386
|
btnStyle={{ paddingLeft: 0 }}
|
|
387
|
-
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
388
387
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
389
388
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
390
389
|
/>
|
|
@@ -262,7 +262,7 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
262
262
|
style={{ paddingBottom: 0 }}
|
|
263
263
|
title={t('QUESTION_WHEN_ORDER', 'When do you want your order?')}
|
|
264
264
|
titleAlign={'center'}
|
|
265
|
-
titleStyle={{ fontSize:
|
|
265
|
+
titleStyle={{ fontSize: 20, marginRight: 0, marginLeft: 0 }}
|
|
266
266
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
267
267
|
/>
|
|
268
268
|
|
|
@@ -91,7 +91,7 @@ const NavBar = (props: Props) => {
|
|
|
91
91
|
}
|
|
92
92
|
<TitleWrapper style={{ ...{ paddingHorizontal: props.isVertical ? 0 : 10 }, ...props.titleWrapStyle }}>
|
|
93
93
|
<OText
|
|
94
|
-
size={
|
|
94
|
+
size={20}
|
|
95
95
|
lineHeight={36}
|
|
96
96
|
weight={Platform.OS === 'ios' ? '600' : 'bold'}
|
|
97
97
|
style={
|
|
@@ -100,7 +100,6 @@ const OrderTypeSelectorUI = (props: OrderTypeSelectParams) => {
|
|
|
100
100
|
style={{ paddingBottom: 0 }}
|
|
101
101
|
title={t('HOW_WILL_YOU_DELIVERY_TYPE', 'How will your order type?')}
|
|
102
102
|
titleAlign={'center'}
|
|
103
|
-
titleStyle={{ fontSize: 14 }}
|
|
104
103
|
noMargin
|
|
105
104
|
/>
|
|
106
105
|
{
|
|
@@ -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>
|
|
@@ -471,7 +471,6 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
471
471
|
onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
|
|
472
472
|
showCall={false}
|
|
473
473
|
btnStyle={{ paddingLeft: 0 }}
|
|
474
|
-
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
475
474
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
476
475
|
titleStyle={{ marginLeft: 0, marginRight: 0 }}
|
|
477
476
|
/>
|
|
@@ -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> */}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import { Pressable, StyleSheet, View, ScrollView, TouchableOpacity } from 'react-native';
|
|
2
|
+
import { Pressable, StyleSheet, View, ScrollView, TouchableOpacity, Platform } from 'react-native';
|
|
3
3
|
import { useTheme } from 'styled-components/native'
|
|
4
4
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
5
5
|
import FastImage from 'react-native-fast-image'
|
|
@@ -111,7 +111,14 @@ const WalletsUI = (props: any) => {
|
|
|
111
111
|
<>
|
|
112
112
|
<Container>
|
|
113
113
|
<Header>
|
|
114
|
-
<OText
|
|
114
|
+
<OText
|
|
115
|
+
size={20}
|
|
116
|
+
style={{
|
|
117
|
+
marginTop: 30,
|
|
118
|
+
color: theme.colors.textNormal,
|
|
119
|
+
}}
|
|
120
|
+
weight={Platform.OS === 'ios' ? '600' : 'bold'}
|
|
121
|
+
>{t('WALLETS', 'Wallets')}</OText>
|
|
115
122
|
{isChewLayout && (
|
|
116
123
|
<OButton
|
|
117
124
|
text={t('WALLET_HISTORY', 'Wallet history')}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
3
|
import OText from './OText';
|
|
4
|
+
import { useTheme } from 'styled-components/native'
|
|
4
5
|
|
|
5
6
|
const HeaderTitle = (props: any) => {
|
|
6
7
|
const { text, style } = props
|
|
8
|
+
const theme = useTheme();
|
|
9
|
+
|
|
7
10
|
return (
|
|
8
11
|
<OText
|
|
9
|
-
size={
|
|
12
|
+
size={20}
|
|
13
|
+
weight={Platform.OS === 'ios' ? '600' : 'bold'}
|
|
10
14
|
style={style ?? {
|
|
11
15
|
marginTop: Platform.OS === 'android' ? 50 : 30,
|
|
12
16
|
paddingHorizontal: 40,
|
|
13
|
-
textTransform: 'capitalize'
|
|
17
|
+
textTransform: 'capitalize',
|
|
18
|
+
color: props.titleColor || theme.colors.textNormal,
|
|
14
19
|
}}
|
|
15
20
|
>
|
|
16
21
|
{text}
|
|
@@ -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 {
|