ordering-ui-react-native 0.16.83 → 0.16.84
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/src/components/BusinessProductsList/index.tsx +4 -4
- package/themes/original/src/components/BusinessController/index.tsx +1 -23
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +3 -3
- package/themes/original/src/components/BusinessListingSearch/BusinessControllerSkeletons/index.tsx +57 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/index.tsx +59 -0
- package/themes/original/src/components/BusinessListingSearch/MaxSectionItem/styles.tsx +13 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +11 -115
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +4 -12
- package/themes/original/src/components/BusinessProductsList/index.tsx +1 -0
- package/themes/original/src/components/CartContent/index.tsx +3 -3
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +8 -3
- package/themes/original/src/components/HelpGuide/index.tsx +8 -3
- package/themes/original/src/components/HelpOrder/index.tsx +8 -3
- package/themes/original/src/components/Messages/index.tsx +17 -17
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -16
- package/themes/original/src/components/NavBar/index.tsx +7 -1
- package/themes/original/src/components/OrderItAgain/index.tsx +5 -4
- package/themes/original/src/components/OrderTypeSelector/index.tsx +4 -3
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/index.tsx +91 -104
- package/themes/original/src/components/OrdersOption/index.tsx +10 -13
- package/themes/original/src/components/ProductForm/index.tsx +4 -4
- package/themes/original/src/components/SingleProductCard/index.tsx +9 -33
- package/themes/original/src/components/UpsellingProducts/index.tsx +7 -3
- package/themes/original/src/components/WalletTransactions/index.tsx +76 -0
- package/themes/original/src/components/WalletTransactions/styles.tsx +13 -0
- package/themes/original/src/components/Wallets/index.tsx +172 -162
- package/themes/original/src/components/Wallets/styles.tsx +10 -8
- package/themes/original/src/components/shared/OButton.tsx +8 -3
- package/themes/original/src/types/index.tsx +6 -2
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View } from 'react-native'
|
|
3
|
+
import { useLanguage } from 'ordering-components/native'
|
|
4
|
+
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
5
|
+
import { useTheme } from 'styled-components/native'
|
|
6
|
+
import { OText } from '../shared';
|
|
7
|
+
import { WalletTransactionItem } from '../WalletTransactionItem'
|
|
8
|
+
import { NotFoundSource } from '../NotFoundSource';
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
Container,
|
|
12
|
+
TransactionsWrapper
|
|
13
|
+
} from './styles'
|
|
14
|
+
|
|
15
|
+
export const WalletTransactions = (props: any) => {
|
|
16
|
+
const {
|
|
17
|
+
transactionsList,
|
|
18
|
+
currentWalletSelected
|
|
19
|
+
} = props
|
|
20
|
+
|
|
21
|
+
const theme = useTheme()
|
|
22
|
+
const [, t] = useLanguage()
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Container>
|
|
26
|
+
<View style={{ width: '100%', paddingHorizontal: 1, paddingBottom: 40 }}>
|
|
27
|
+
{!transactionsList?.loading &&
|
|
28
|
+
!transactionsList?.error &&
|
|
29
|
+
transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.length > 0 &&
|
|
30
|
+
(
|
|
31
|
+
<>
|
|
32
|
+
<OText style={{fontSize: 20, color: theme.colors.textNormal, marginBottom: 30}}>
|
|
33
|
+
{t('TRANSACTIONS_HISTORY', 'Transactions history')}
|
|
34
|
+
</OText>
|
|
35
|
+
<TransactionsWrapper>
|
|
36
|
+
{transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.map((transaction: any, i: number) =>(
|
|
37
|
+
<WalletTransactionItem
|
|
38
|
+
idx={i}
|
|
39
|
+
type={currentWalletSelected?.type}
|
|
40
|
+
key={transaction.id}
|
|
41
|
+
item={transaction}
|
|
42
|
+
withFormatPrice={currentWalletSelected?.type === 'cash'}
|
|
43
|
+
/>
|
|
44
|
+
))}
|
|
45
|
+
</TransactionsWrapper>
|
|
46
|
+
</>
|
|
47
|
+
)}
|
|
48
|
+
|
|
49
|
+
{(transactionsList?.loading || !transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]) && (
|
|
50
|
+
<View>
|
|
51
|
+
{[...Array(4).keys()].map(i => (
|
|
52
|
+
<View style={{ marginBottom: 10 }} key={i}>
|
|
53
|
+
<Placeholder Animation={Fade}>
|
|
54
|
+
<PlaceholderLine width={100} height={100} style={{ marginBottom: 0, borderRadius: 8 }} />
|
|
55
|
+
</Placeholder>
|
|
56
|
+
</View>
|
|
57
|
+
))}
|
|
58
|
+
</View>
|
|
59
|
+
)}
|
|
60
|
+
|
|
61
|
+
{!transactionsList?.loading &&
|
|
62
|
+
!(transactionsList?.loading && transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]) &&
|
|
63
|
+
(transactionsList?.error ||
|
|
64
|
+
!transactionsList.list?.[`wallet:${currentWalletSelected?.id}`]?.length) &&
|
|
65
|
+
(
|
|
66
|
+
<NotFoundSource
|
|
67
|
+
content={transactionsList?.error
|
|
68
|
+
? t('ERROR_NOT_FOUND_TRANSACTIONS', 'Sorry, an error has occurred')
|
|
69
|
+
: t('NOT_FOUND_TRANSACTIONS', 'No transactions to show at this time.')
|
|
70
|
+
}
|
|
71
|
+
/>
|
|
72
|
+
)}
|
|
73
|
+
</View>
|
|
74
|
+
</Container>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import styled from 'styled-components/native'
|
|
2
|
+
|
|
3
|
+
export const Container = styled.View`
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
`
|
|
7
|
+
|
|
8
|
+
export const TransactionsWrapper = styled.View`
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
border-left-width: 2px;
|
|
12
|
+
border-left-color: ${(props: any) => props.theme.colors.disabled};
|
|
13
|
+
`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
-
import { Pressable, StyleSheet, View } from 'react-native';
|
|
2
|
+
import { Pressable, StyleSheet, View, ScrollView } 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'
|
|
@@ -12,20 +12,21 @@ import {
|
|
|
12
12
|
|
|
13
13
|
import {
|
|
14
14
|
Container,
|
|
15
|
+
Header,
|
|
15
16
|
BalanceElement,
|
|
16
|
-
TransactionsWrapper,
|
|
17
17
|
OTabs,
|
|
18
18
|
OTab,
|
|
19
19
|
SectionContent,
|
|
20
20
|
LoyaltyContent,
|
|
21
21
|
LoyaltyWrapp,
|
|
22
|
-
LoyaltyImg
|
|
22
|
+
LoyaltyImg,
|
|
23
|
+
WalletTransactionsWrapper
|
|
23
24
|
} from './styles'
|
|
24
25
|
|
|
25
26
|
import NavBar from '../NavBar'
|
|
26
|
-
import { OText } from '../shared';
|
|
27
|
+
import { OButton, OIcon, OText, OModal } from '../shared';
|
|
27
28
|
import { NotFoundSource } from '../NotFoundSource';
|
|
28
|
-
import {
|
|
29
|
+
import { WalletTransactions } from '../WalletTransactions'
|
|
29
30
|
|
|
30
31
|
const WalletsUI = (props: any) => {
|
|
31
32
|
const {
|
|
@@ -46,6 +47,8 @@ const WalletsUI = (props: any) => {
|
|
|
46
47
|
const [{ parsePrice }] = useUtils()
|
|
47
48
|
const [{ configs }] = useConfig()
|
|
48
49
|
|
|
50
|
+
console.log(theme)
|
|
51
|
+
|
|
49
52
|
const styles = StyleSheet.create({
|
|
50
53
|
logoStyle: {
|
|
51
54
|
width: 120,
|
|
@@ -60,6 +63,8 @@ const WalletsUI = (props: any) => {
|
|
|
60
63
|
});
|
|
61
64
|
|
|
62
65
|
const [tabSelected, setTabSelected] = useState(isWalletCashEnabled ? 'cash' : 'credit_point')
|
|
66
|
+
const [openHistory, setOpenHistory] = useState(false)
|
|
67
|
+
const isChewLayout = theme?.wallets_view?.components?.layout?.type === 'original'
|
|
63
68
|
|
|
64
69
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (isWalletCashEnabled || isWalletPointsEnabled)
|
|
65
70
|
|
|
@@ -105,173 +110,178 @@ const WalletsUI = (props: any) => {
|
|
|
105
110
|
}, [refreshWallets])
|
|
106
111
|
|
|
107
112
|
return (
|
|
108
|
-
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
>
|
|
133
|
-
<OTab isSelected={tabSelected === wallet.type}>
|
|
134
|
-
<OText size={18}>
|
|
135
|
-
{walletName[wallet.type]?.name}
|
|
136
|
-
</OText>
|
|
137
|
-
</OTab>
|
|
138
|
-
</Pressable>
|
|
139
|
-
))}
|
|
140
|
-
</OTabs>
|
|
113
|
+
<>
|
|
114
|
+
<Container>
|
|
115
|
+
<Header>
|
|
116
|
+
<NavBar
|
|
117
|
+
title={isChewLayout ? '' : t('WALLETS', 'Wallets')}
|
|
118
|
+
titleAlign={'center'}
|
|
119
|
+
onActionLeft={goToBack}
|
|
120
|
+
showCall={false}
|
|
121
|
+
paddingTop={10}
|
|
122
|
+
btnStyle={{ paddingLeft: 0 }}
|
|
123
|
+
style={{ flex: 1 }}
|
|
124
|
+
/>
|
|
125
|
+
{isChewLayout && (
|
|
126
|
+
<OButton
|
|
127
|
+
text={t('WALLET_HISTORY', 'Wallet history')}
|
|
128
|
+
bgColor={theme.colors.white}
|
|
129
|
+
borderColor={theme.colors.lightGray}
|
|
130
|
+
imgRightSrc={null}
|
|
131
|
+
textStyle={{ fontSize: 12, color: theme.colors.disabled }}
|
|
132
|
+
onClick={() => setOpenHistory(true)}
|
|
133
|
+
style={{ borderRadius: 8, height: 40 }}
|
|
134
|
+
/>
|
|
135
|
+
)}
|
|
136
|
+
</Header>
|
|
141
137
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<OText
|
|
166
|
-
size={22}
|
|
167
|
-
weight='bold'
|
|
168
|
-
style={{ textTransform: 'uppercase' }}
|
|
169
|
-
color={theme.colors.primary}
|
|
170
|
-
>
|
|
171
|
-
{loyaltyLevel.name}
|
|
172
|
-
</OText>
|
|
173
|
-
</LoyaltyWrapp>
|
|
174
|
-
</LoyaltyContent>
|
|
175
|
-
)}
|
|
176
|
-
<BalanceElement>
|
|
177
|
-
<OText size={20} style={{fontWeight: '600'}}>
|
|
178
|
-
{currentWalletSelected?.type === 'cash'
|
|
179
|
-
? parsePrice(currentWalletSelected?.balance)
|
|
180
|
-
: currentWalletSelected?.balance
|
|
181
|
-
}
|
|
182
|
-
</OText>
|
|
183
|
-
<OText style={{ paddingLeft: 5 }}>
|
|
184
|
-
{currentWalletSelected?.type === 'cash'
|
|
185
|
-
? configs?.stripe_currency?.value
|
|
186
|
-
: t('POINTS', 'Points')}
|
|
187
|
-
</OText>
|
|
188
|
-
</BalanceElement>
|
|
138
|
+
{!walletList.loading &&
|
|
139
|
+
!userLoyaltyLevel.loading &&
|
|
140
|
+
!walletList.error &&
|
|
141
|
+
walletList.wallets?.length > 0 &&
|
|
142
|
+
(
|
|
143
|
+
<>
|
|
144
|
+
<OTabs
|
|
145
|
+
horizontal
|
|
146
|
+
showsHorizontalScrollIndicator={false}
|
|
147
|
+
>
|
|
148
|
+
{walletList.wallets?.map((wallet: any) => walletName[wallet.type]?.isActive && (
|
|
149
|
+
<Pressable
|
|
150
|
+
key={wallet.id}
|
|
151
|
+
onPress={() => handleChangeTab(wallet)}
|
|
152
|
+
>
|
|
153
|
+
<OTab isSelected={tabSelected === wallet.type}>
|
|
154
|
+
<OText size={18}>
|
|
155
|
+
{walletName[wallet.type]?.name}
|
|
156
|
+
</OText>
|
|
157
|
+
</OTab>
|
|
158
|
+
</Pressable>
|
|
159
|
+
))}
|
|
160
|
+
</OTabs>
|
|
189
161
|
|
|
190
|
-
<
|
|
191
|
-
{
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
withFormatPrice={currentWalletSelected?.type === 'cash'}
|
|
162
|
+
<SectionContent>
|
|
163
|
+
{!!loyaltyLevel && tabSelected === 'credit_point' && (
|
|
164
|
+
<LoyaltyContent>
|
|
165
|
+
<LoyaltyWrapp>
|
|
166
|
+
<OText size={20}>
|
|
167
|
+
{`${t('LOYALTY_LEVEL_TITLE', 'Your level is')}:`}
|
|
168
|
+
</OText>
|
|
169
|
+
{loyaltyLevel.image ? (
|
|
170
|
+
<FastImage
|
|
171
|
+
style={styles.logoStyle}
|
|
172
|
+
source={{
|
|
173
|
+
uri: loyaltyLevel.image,
|
|
174
|
+
priority: FastImage.priority.high,
|
|
175
|
+
cache:FastImage.cacheControl.web
|
|
176
|
+
}}
|
|
177
|
+
resizeMode={FastImage.resizeMode.contain}
|
|
207
178
|
/>
|
|
208
|
-
)
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
179
|
+
) : (
|
|
180
|
+
<LoyaltyImg
|
|
181
|
+
source={theme.images.dummies.loyaltyLevel}
|
|
182
|
+
resizeMode='contain'
|
|
183
|
+
/>
|
|
184
|
+
)}
|
|
185
|
+
<OText
|
|
186
|
+
size={22}
|
|
187
|
+
weight='bold'
|
|
188
|
+
style={{ textTransform: 'uppercase' }}
|
|
189
|
+
color={theme.colors.primary}
|
|
190
|
+
>
|
|
191
|
+
{loyaltyLevel.name}
|
|
192
|
+
</OText>
|
|
193
|
+
</LoyaltyWrapp>
|
|
194
|
+
</LoyaltyContent>
|
|
223
195
|
)}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
(
|
|
230
|
-
<NotFoundSource
|
|
231
|
-
content={transactionsList?.error
|
|
232
|
-
? t('ERROR_NOT_FOUND_TRANSACTIONS', 'Sorry, an error has occurred')
|
|
233
|
-
: t('NOT_FOUND_TRANSACTIONS', 'No transactions to show at this time.')
|
|
196
|
+
<BalanceElement>
|
|
197
|
+
<OText size={20} style={{fontWeight: '600'}}>
|
|
198
|
+
{currentWalletSelected?.type === 'cash'
|
|
199
|
+
? parsePrice(currentWalletSelected?.balance)
|
|
200
|
+
: currentWalletSelected?.balance
|
|
234
201
|
}
|
|
202
|
+
</OText>
|
|
203
|
+
<OText style={{ paddingLeft: 5 }}>
|
|
204
|
+
{currentWalletSelected?.type === 'cash'
|
|
205
|
+
? configs?.stripe_currency?.value
|
|
206
|
+
: t('POINTS', 'Points')}
|
|
207
|
+
</OText>
|
|
208
|
+
</BalanceElement>
|
|
209
|
+
|
|
210
|
+
{!isChewLayout && (
|
|
211
|
+
<WalletTransactions
|
|
212
|
+
transactionsList={transactionsList}
|
|
213
|
+
currentWalletSelected={currentWalletSelected}
|
|
235
214
|
/>
|
|
236
215
|
)}
|
|
216
|
+
</SectionContent>
|
|
217
|
+
</>
|
|
218
|
+
)}
|
|
219
|
+
|
|
220
|
+
{(walletList?.loading || userLoyaltyLevel.loading) && (
|
|
221
|
+
<>
|
|
222
|
+
<View>
|
|
223
|
+
<Placeholder Animation={Fade}>
|
|
224
|
+
<PlaceholderLine width={100} height={40} style={{ marginBottom: 0 }} />
|
|
225
|
+
</Placeholder>
|
|
226
|
+
</View>
|
|
227
|
+
<View style={{ marginTop: 10, marginBottom: 20 }}>
|
|
228
|
+
<Placeholder Animation={Fade}>
|
|
229
|
+
<PlaceholderLine width={100} height={40} style={{ marginBottom: 0 }} />
|
|
230
|
+
</Placeholder>
|
|
231
|
+
</View>
|
|
232
|
+
<View>
|
|
233
|
+
{[...Array(4).keys()].map(i => (
|
|
234
|
+
<View style={{ marginBottom: 10 }} key={i}>
|
|
235
|
+
<Placeholder Animation={Fade}>
|
|
236
|
+
<PlaceholderLine width={100} height={60} style={{ marginBottom: 0 }} />
|
|
237
|
+
</Placeholder>
|
|
238
|
+
</View>
|
|
239
|
+
))}
|
|
237
240
|
</View>
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
)}
|
|
241
|
+
</>
|
|
242
|
+
)}
|
|
241
243
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
<PlaceholderLine width={100} height={40} style={{ marginBottom: 0 }} />
|
|
252
|
-
</Placeholder>
|
|
253
|
-
</View>
|
|
254
|
-
<View>
|
|
255
|
-
{[...Array(4).keys()].map(i => (
|
|
256
|
-
<View style={{ marginBottom: 10 }} key={i}>
|
|
257
|
-
<Placeholder Animation={Fade}>
|
|
258
|
-
<PlaceholderLine width={100} height={60} style={{ marginBottom: 0 }} />
|
|
259
|
-
</Placeholder>
|
|
260
|
-
</View>
|
|
261
|
-
))}
|
|
262
|
-
</View>
|
|
263
|
-
</>
|
|
264
|
-
)}
|
|
244
|
+
{!walletList?.loading && !userLoyaltyLevel.loading && (walletList?.error || !walletList?.wallets?.length) && (
|
|
245
|
+
<NotFoundSource
|
|
246
|
+
content={walletList?.error
|
|
247
|
+
? t('ERROR_NOT_FOUND_WALLETS', 'Sorry, an error has occurred')
|
|
248
|
+
: t('NOT_FOUND_WALLETS', 'No wallets to show at this time.')
|
|
249
|
+
}
|
|
250
|
+
/>
|
|
251
|
+
)}
|
|
252
|
+
</Container>
|
|
265
253
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
254
|
+
<OModal
|
|
255
|
+
open={openHistory}
|
|
256
|
+
onClose={() => setOpenHistory(false)}
|
|
257
|
+
entireModal
|
|
258
|
+
customClose
|
|
259
|
+
>
|
|
260
|
+
<ScrollView>
|
|
261
|
+
<WalletTransactionsWrapper>
|
|
262
|
+
<OButton
|
|
263
|
+
imgLeftSrc={theme.images.general.arrow_left}
|
|
264
|
+
imgLeftStyle={{ width: 18 }}
|
|
265
|
+
imgRightSrc={null}
|
|
266
|
+
style={{
|
|
267
|
+
borderWidth: 0,
|
|
268
|
+
backgroundColor: theme.colors.white,
|
|
269
|
+
padding: 0,
|
|
270
|
+
paddingHorizontal: 0,
|
|
271
|
+
width: 30,
|
|
272
|
+
paddingLeft: 0,
|
|
273
|
+
paddingRight: 0
|
|
274
|
+
}}
|
|
275
|
+
onClick={() => setOpenHistory(false)}
|
|
276
|
+
/>
|
|
277
|
+
<WalletTransactions
|
|
278
|
+
transactionsList={transactionsList}
|
|
279
|
+
currentWalletSelected={currentWalletSelected}
|
|
280
|
+
/>
|
|
281
|
+
</WalletTransactionsWrapper>
|
|
282
|
+
</ScrollView>
|
|
283
|
+
</OModal>
|
|
284
|
+
</>
|
|
275
285
|
)
|
|
276
286
|
}
|
|
277
287
|
|
|
@@ -4,7 +4,11 @@ export const Container = styled.View`
|
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
`
|
|
7
|
-
|
|
7
|
+
export const Header = styled.View`
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
`
|
|
8
12
|
export const SectionContent = styled.View`
|
|
9
13
|
width: 100%;
|
|
10
14
|
display: flex;
|
|
@@ -14,13 +18,6 @@ export const SectionContent = styled.View`
|
|
|
14
18
|
margin-top: 20px;
|
|
15
19
|
`
|
|
16
20
|
|
|
17
|
-
export const TransactionsWrapper = styled.View`
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
border-left-width: 2px;
|
|
21
|
-
border-left-color: ${(props: any) => props.theme.colors.disabled};
|
|
22
|
-
`
|
|
23
|
-
|
|
24
21
|
export const BalanceElement = styled.View`
|
|
25
22
|
width: 100%;
|
|
26
23
|
padding: 10px 0;
|
|
@@ -30,6 +27,7 @@ export const BalanceElement = styled.View`
|
|
|
30
27
|
align-items: center;
|
|
31
28
|
background-color: ${(props: any) => props.theme.colors.backgroundGray100};
|
|
32
29
|
border-radius: 8px;
|
|
30
|
+
margin-bottom: 20px;
|
|
33
31
|
`
|
|
34
32
|
|
|
35
33
|
export const OTabs = styled.View`
|
|
@@ -62,3 +60,7 @@ export const LoyaltyImg = styled.ImageBackground`
|
|
|
62
60
|
justify-content: center;
|
|
63
61
|
align-items: center;
|
|
64
62
|
`
|
|
63
|
+
export const WalletTransactionsWrapper = styled.View`
|
|
64
|
+
padding-horizontal: 40px;
|
|
65
|
+
padding-top: 20px;
|
|
66
|
+
`
|
|
@@ -79,6 +79,8 @@ interface Props {
|
|
|
79
79
|
loadingStyle?: ViewStyle;
|
|
80
80
|
showNextIcon?: boolean;
|
|
81
81
|
isDisabledWithSameStyles?: boolean;
|
|
82
|
+
icon?: any;
|
|
83
|
+
iconProps?: any
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
const OButton = (props: Props): React.ReactElement => {
|
|
@@ -114,6 +116,9 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
114
116
|
disabled={props.isDisabledWithSameStyles}
|
|
115
117
|
>
|
|
116
118
|
<StyledButton style={props.bgColor ? { ...props.style, backgroundColor: props.bgColor, borderColor: props.borderColor } : props.style}>
|
|
119
|
+
{props.icon ? (
|
|
120
|
+
<props.icon {...props.iconProps} />
|
|
121
|
+
) : null}
|
|
117
122
|
{props.imgLeftSrc ? (
|
|
118
123
|
<OIcon style={props.imgLeftStyle} src={props.imgLeftSrc} />
|
|
119
124
|
) : null}
|
|
@@ -122,9 +127,9 @@ const OButton = (props: Props): React.ReactElement => {
|
|
|
122
127
|
) : null}
|
|
123
128
|
{props.imgRightSrc ? (
|
|
124
129
|
<EndImage style={props.imgRightStyle} source={props.imgRightSrc} />
|
|
125
|
-
) : props.showNextIcon ?
|
|
126
|
-
<EndImage source={theme.images.general.arrow_left}
|
|
127
|
-
|
|
130
|
+
) : props.showNextIcon ?
|
|
131
|
+
<EndImage source={theme.images.general.arrow_left}
|
|
132
|
+
style={{ width: 16, tintColor: 'white', transform: [{ rotate: I18nManager.isRTL ? '0deg' : '180deg' }] }} /> : null}
|
|
128
133
|
</StyledButton>
|
|
129
134
|
</TouchableOpacity>
|
|
130
135
|
);
|
|
@@ -366,6 +366,8 @@ export interface OrdersOptionParams {
|
|
|
366
366
|
businessesSearchList?: any,
|
|
367
367
|
hideOrders?: boolean,
|
|
368
368
|
BusinessControllerSkeletons?: any,
|
|
369
|
+
businessPaginationProps?: any,
|
|
370
|
+
businesses?: any
|
|
369
371
|
}
|
|
370
372
|
export interface ActiveOrdersParams {
|
|
371
373
|
orders?: any,
|
|
@@ -719,7 +721,8 @@ export interface PreviousBusinessOrderedParams {
|
|
|
719
721
|
businessId?: number,
|
|
720
722
|
onNavigationRedirect?: any,
|
|
721
723
|
isBusinessesSearchList?: any,
|
|
722
|
-
businessLoading?: boolean
|
|
724
|
+
businessLoading?: boolean,
|
|
725
|
+
businesses?: any
|
|
723
726
|
}
|
|
724
727
|
|
|
725
728
|
export interface ServiceFormParams {
|
|
@@ -754,7 +757,8 @@ export interface OrderItAgainParams {
|
|
|
754
757
|
categoryState: any,
|
|
755
758
|
currentCart: any,
|
|
756
759
|
handleUpdateProducts: any,
|
|
757
|
-
navigation: any
|
|
760
|
+
navigation: any,
|
|
761
|
+
searchValue?: string
|
|
758
762
|
}
|
|
759
763
|
|
|
760
764
|
export interface PreviousProductsOrderedParams {
|