ordering-ui-react-native 0.16.89 → 0.16.90
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/BusinessProductsListing/index.tsx +7 -11
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +7 -0
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +2 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +3 -1
- package/themes/original/src/components/SignupForm/index.tsx +0 -1
- package/themes/original/src/components/Wallets/index.tsx +83 -79
package/package.json
CHANGED
|
@@ -21,6 +21,8 @@ import { BusinessProductsCategories } from '../BusinessProductsCategories'
|
|
|
21
21
|
import { BusinessProductsList } from '../BusinessProductsList'
|
|
22
22
|
import { BusinessProductsListingParams } from '../../types'
|
|
23
23
|
import { _retrieveStoreData, _removeStoreData } from '../../providers/StoreUtil';
|
|
24
|
+
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
25
|
+
|
|
24
26
|
import {
|
|
25
27
|
TopHeader,
|
|
26
28
|
WrapSearchBar,
|
|
@@ -29,7 +31,8 @@ import {
|
|
|
29
31
|
ContainerSafeAreaView,
|
|
30
32
|
BackgroundGray,
|
|
31
33
|
ProfessionalFilterWrapper,
|
|
32
|
-
NearBusiness
|
|
34
|
+
NearBusiness,
|
|
35
|
+
TopActions
|
|
33
36
|
} from './styles'
|
|
34
37
|
import { FloatingButton } from '../FloatingButton'
|
|
35
38
|
import { UpsellingRedirect } from './UpsellingRedirect'
|
|
@@ -248,16 +251,9 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
248
251
|
<TopHeader isIos={Platform.OS === 'ios'}>
|
|
249
252
|
{!isOpenSearchBar && (
|
|
250
253
|
<>
|
|
251
|
-
<
|
|
252
|
-
<
|
|
253
|
-
|
|
254
|
-
imgRightSrc={null}
|
|
255
|
-
style={styles.btnBackArrow}
|
|
256
|
-
onClick={() => handleBackNavigation()}
|
|
257
|
-
imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 30 }}
|
|
258
|
-
/>
|
|
259
|
-
|
|
260
|
-
</View>
|
|
254
|
+
<TopActions onPress={() => handleBackNavigation()}>
|
|
255
|
+
<IconAntDesign name='arrowleft' size={26} />
|
|
256
|
+
</TopActions>
|
|
261
257
|
{!errorQuantityProducts && (
|
|
262
258
|
<View style={{ ...styles.headerItem }}>
|
|
263
259
|
<TouchableOpacity
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
} from 'ordering-components/native';
|
|
23
23
|
import { useTheme } from 'styled-components/native';
|
|
24
24
|
import Ionicons from 'react-native-vector-icons/Ionicons'
|
|
25
|
+
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
25
26
|
|
|
26
27
|
import {
|
|
27
28
|
Search,
|
|
@@ -283,7 +284,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
283
284
|
style={{ paddingTop: top + 20 }}>
|
|
284
285
|
{!auth && (
|
|
285
286
|
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
|
|
286
|
-
<
|
|
287
|
+
<IconAntDesign name='arrowleft' size={26} />
|
|
287
288
|
</TouchableOpacity>
|
|
288
289
|
)}
|
|
289
290
|
<Search>
|
|
@@ -53,6 +53,7 @@ import { getTypesText, convertToRadian } from '../../../../utils';
|
|
|
53
53
|
import { OrderProgress } from '../../../OrderProgress';
|
|
54
54
|
import { useFocusEffect, useIsFocused } from '@react-navigation/native';
|
|
55
55
|
import FastImage from 'react-native-fast-image';
|
|
56
|
+
import IconAntDesign from 'react-native-vector-icons/AntDesign';
|
|
56
57
|
|
|
57
58
|
const PIXELS_TO_SCROLL = 2000;
|
|
58
59
|
|
|
@@ -450,8 +451,9 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
450
451
|
resizeMode='cover'
|
|
451
452
|
>
|
|
452
453
|
{!auth && (
|
|
454
|
+
|
|
453
455
|
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
|
|
454
|
-
<
|
|
456
|
+
<IconAntDesign name='arrowleft' size={26} />
|
|
455
457
|
</TouchableOpacity>
|
|
456
458
|
)}
|
|
457
459
|
</HeaderWrapper>
|
|
@@ -635,7 +635,6 @@ const SignupFormUI = (props: SignupParams) => {
|
|
|
635
635
|
}
|
|
636
636
|
})}
|
|
637
637
|
forwardRef={phoneRef}
|
|
638
|
-
defaultCode={formState?.country_code ?? formState?.country_phone_code ?? null}
|
|
639
638
|
changeCountry={(val: any) => setPhoneInputData({
|
|
640
639
|
...phoneInputData,
|
|
641
640
|
phone: {
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
useUtils,
|
|
10
10
|
useConfig
|
|
11
11
|
} from 'ordering-components/native'
|
|
12
|
+
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
12
13
|
|
|
13
14
|
import {
|
|
14
15
|
Container,
|
|
@@ -64,7 +65,7 @@ const WalletsUI = (props: any) => {
|
|
|
64
65
|
|
|
65
66
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
66
67
|
const [openHistory, setOpenHistory] = useState(false)
|
|
67
|
-
|
|
68
|
+
const isChewLayout = theme?.wallets_view?.components?.layout?.type === 'original'
|
|
68
69
|
|
|
69
70
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
70
71
|
|
|
@@ -103,7 +104,7 @@ const WalletsUI = (props: any) => {
|
|
|
103
104
|
}, [configs])
|
|
104
105
|
|
|
105
106
|
useEffect(() => {
|
|
106
|
-
if(refreshWallets){
|
|
107
|
+
if (refreshWallets) {
|
|
107
108
|
getWallets()
|
|
108
109
|
setRefreshWallets && setRefreshWallets(false)
|
|
109
110
|
}
|
|
@@ -139,83 +140,83 @@ const WalletsUI = (props: any) => {
|
|
|
139
140
|
!userLoyaltyLevel.loading &&
|
|
140
141
|
!walletList.error &&
|
|
141
142
|
walletList.wallets?.length > 0 &&
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
143
|
+
(
|
|
144
|
+
<>
|
|
145
|
+
<OTabs
|
|
146
|
+
horizontal
|
|
147
|
+
showsHorizontalScrollIndicator={false}
|
|
148
|
+
>
|
|
149
|
+
{walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
|
|
150
|
+
<Pressable
|
|
151
|
+
key={wallet.id}
|
|
152
|
+
onPress={() => handleChangeTab(wallet)}
|
|
153
|
+
>
|
|
154
|
+
<OTab isSelected={tabSelected === wallet.type}>
|
|
155
|
+
<OText size={18}>
|
|
156
|
+
{walletName[wallet.type]?.name}
|
|
157
|
+
</OText>
|
|
158
|
+
</OTab>
|
|
159
|
+
</Pressable>
|
|
160
|
+
))}
|
|
161
|
+
</OTabs>
|
|
161
162
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
163
|
+
<SectionContent>
|
|
164
|
+
{!!loyaltyLevel && tabSelected === 'credit_point' && (
|
|
165
|
+
<LoyaltyContent>
|
|
166
|
+
<LoyaltyWrapp>
|
|
167
|
+
<OText size={20}>
|
|
168
|
+
{`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}:`}
|
|
169
|
+
</OText>
|
|
170
|
+
{loyaltyLevel.image ? (
|
|
171
|
+
<FastImage
|
|
172
|
+
style={styles.logoStyle}
|
|
173
|
+
source={{
|
|
174
|
+
uri: loyaltyLevel.image,
|
|
175
|
+
priority: FastImage.priority.high,
|
|
176
|
+
cache: FastImage.cacheControl.web
|
|
177
|
+
}}
|
|
178
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
179
|
+
/>
|
|
180
|
+
) : (
|
|
181
|
+
<LoyaltyImg
|
|
182
|
+
source={theme.images.dummies.loyaltyLevel}
|
|
183
|
+
resizeMode='contain'
|
|
184
|
+
/>
|
|
185
|
+
)}
|
|
186
|
+
<OText
|
|
187
|
+
size={22}
|
|
188
|
+
weight='bold'
|
|
189
|
+
style={{ textTransform: 'uppercase' }}
|
|
190
|
+
color={theme.colors.primary}
|
|
191
|
+
>
|
|
192
|
+
{loyaltyLevel.name}
|
|
193
|
+
</OText>
|
|
194
|
+
</LoyaltyWrapp>
|
|
195
|
+
</LoyaltyContent>
|
|
196
|
+
)}
|
|
197
|
+
<BalanceElement>
|
|
198
|
+
<OText size={20} style={{ fontWeight: '600' }}>
|
|
199
|
+
{currentWalletSelected?.type === 'cash'
|
|
200
|
+
? parsePrice(currentWalletSelected?.balance)
|
|
201
|
+
: currentWalletSelected?.balance
|
|
202
|
+
}
|
|
203
|
+
</OText>
|
|
204
|
+
<OText style={{ paddingLeft: 5 }}>
|
|
205
|
+
{currentWalletSelected?.type === 'cash'
|
|
206
|
+
? configs?.stripe_currency?.value
|
|
207
|
+
: t('POINTS', 'Points')}
|
|
208
|
+
</OText>
|
|
209
|
+
</BalanceElement>
|
|
209
210
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
211
|
+
{!isChewLayout && (
|
|
212
|
+
<WalletTransactions
|
|
213
|
+
transactionsList={transactionsList}
|
|
214
|
+
currentWalletSelected={currentWalletSelected}
|
|
215
|
+
/>
|
|
216
|
+
)}
|
|
217
|
+
</SectionContent>
|
|
218
|
+
</>
|
|
219
|
+
)}
|
|
219
220
|
|
|
220
221
|
{(walletList?.loading || userLoyaltyLevel.loading) && (
|
|
221
222
|
<>
|
|
@@ -260,8 +261,6 @@ const WalletsUI = (props: any) => {
|
|
|
260
261
|
<ScrollView>
|
|
261
262
|
<WalletTransactionsWrapper>
|
|
262
263
|
<OButton
|
|
263
|
-
imgLeftSrc={theme.images.general.arrow_left}
|
|
264
|
-
imgLeftStyle={{ width: 18 }}
|
|
265
264
|
imgRightSrc={null}
|
|
266
265
|
style={{
|
|
267
266
|
borderWidth: 0,
|
|
@@ -273,6 +272,11 @@ const WalletsUI = (props: any) => {
|
|
|
273
272
|
paddingRight: 0
|
|
274
273
|
}}
|
|
275
274
|
onClick={() => setOpenHistory(false)}
|
|
275
|
+
icon={AntDesignIcon}
|
|
276
|
+
iconProps={{
|
|
277
|
+
name: 'arrowleft',
|
|
278
|
+
size: 26
|
|
279
|
+
}}
|
|
276
280
|
/>
|
|
277
281
|
<WalletTransactions
|
|
278
282
|
transactionsList={transactionsList}
|