ordering-ui-react-native 0.14.23 → 0.14.24-release
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/src/components/ProductForm/index.tsx +40 -34
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/doordash/src/components/ProductForm/index.tsx +14 -16
- package/themes/instacart/src/components/ProductForm/index.tsx +13 -15
- package/themes/kiosk/src/components/ProductForm/index.tsx +13 -15
- package/themes/original/index.tsx +0 -4
- package/themes/original/src/components/BusinessesListing/index.tsx +19 -25
- package/themes/original/src/components/Checkout/index.tsx +4 -15
- package/themes/original/src/components/Checkout/styles.tsx +1 -5
- package/themes/original/src/components/Help/index.tsx +2 -2
- package/themes/original/src/components/OrderDetails/index.tsx +0 -54
- package/themes/original/src/components/OrderProgress/index.tsx +2 -2
- package/themes/original/src/components/OrderSummary/index.tsx +2 -58
- package/themes/original/src/components/ProductForm/index.tsx +43 -28
- package/themes/original/src/components/UserProfile/index.tsx +0 -5
- package/themes/original/src/types/index.tsx +2 -4
- package/themes/single-business/src/components/ProductForm/index.tsx +28 -29
- package/themes/uber-eats/src/components/ProductForm/index.tsx +13 -15
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +0 -163
- package/themes/original/src/components/PaymentOptionWallet/styles.tsx +0 -38
- package/themes/original/src/components/WalletTransactionItem/index.tsx +0 -68
- package/themes/original/src/components/WalletTransactionItem/styles.tsx +0 -37
- package/themes/original/src/components/Wallets/index.tsx +0 -204
- package/themes/original/src/components/Wallets/styles.tsx +0 -43
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ordering-ui-react-native",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.24-release",
|
|
4
4
|
"description": "Reusable components made in react native",
|
|
5
5
|
"main": "src/index.tsx",
|
|
6
6
|
"author": "ordering.inc",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@types/styled-components": "^5.1.3",
|
|
56
56
|
"axios": "^0.21.0",
|
|
57
57
|
"moment": "^2.29.1",
|
|
58
|
-
"ordering-components": "github:Ordering-Inc/ordering-components#
|
|
58
|
+
"ordering-components": "github:Ordering-Inc/ordering-components#release",
|
|
59
59
|
"patch-package": "^6.4.7",
|
|
60
60
|
"postinstall-postinstall": "^2.1.0",
|
|
61
61
|
"prop-types": "^15.7.2",
|
|
@@ -132,7 +132,18 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
132
132
|
) : (
|
|
133
133
|
<>
|
|
134
134
|
<View style={{ flexDirection: 'column', width: '100%' }}>
|
|
135
|
-
<
|
|
135
|
+
<View style={{ flexDirection: 'row', marginTop: 15 }}>
|
|
136
|
+
<OText size={20} style={{ flex: I18nManager.isRTL ? 0 : 1, marginBottom: 10 }}>{product?.name || productCart.name}{' '}</OText>
|
|
137
|
+
{product?.calories && (
|
|
138
|
+
<OText size={16} style={styles.caloriesStyle}>{product?.calories} cal</OText>
|
|
139
|
+
)}
|
|
140
|
+
</View>
|
|
141
|
+
<View style={{ flexDirection: 'row', marginBottom: 10 }}>
|
|
142
|
+
<OText size={16} style={{ flex: I18nManager.isRTL ? 1 : 0 }} color={theme.colors.primary}>{productCart.price ? parsePrice(productCart.price) : ''}</OText>
|
|
143
|
+
{product?.offer_price && (
|
|
144
|
+
<OText style={styles.regularPriceStyle}>{parsePrice(product?.offer_price)}</OText>
|
|
145
|
+
)}
|
|
146
|
+
</View>
|
|
136
147
|
{(product?.estimated_person || (product?.sku && product?.sku !== '-1' && product?.sku !== '1')) && (
|
|
137
148
|
<OText size={14} style={{ flex: I18nManager.isRTL ? 1 : 0, marginBottom: 10 }} color={'#909BA9'}>
|
|
138
149
|
{
|
|
@@ -147,12 +158,6 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
147
158
|
}
|
|
148
159
|
</OText>
|
|
149
160
|
)}
|
|
150
|
-
<View style={{ flexDirection: 'row', marginBottom: 10}}>
|
|
151
|
-
<OText size={16} style={{ flex: I18nManager.isRTL ? 1 : 0 }} color={theme.colors.primary}>{productCart.price ? parsePrice(productCart.price) : ''}</OText>
|
|
152
|
-
{product?.offer_price && (
|
|
153
|
-
<OText style={styles.regularPriceStyle}>{parsePrice(product?.offer_price)}</OText>
|
|
154
|
-
)}
|
|
155
|
-
</View>
|
|
156
161
|
</View>
|
|
157
162
|
</>
|
|
158
163
|
)}
|
|
@@ -162,17 +167,17 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
162
167
|
</ProductDescription>
|
|
163
168
|
{loading && !product ? (
|
|
164
169
|
<>
|
|
165
|
-
{[...Array(2)].map((item,i) => (
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
170
|
+
{[...Array(2)].map((item, i) => (
|
|
171
|
+
<Placeholder key={i} style={{ marginBottom: 20 }} Animation={Fade}>
|
|
172
|
+
<PlaceholderLine height={40} style={{ flex: 1, marginTop: 10 }} />
|
|
173
|
+
{[...Array(3)].map((item, i) => (
|
|
174
|
+
<View key={i} style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
175
|
+
<PlaceholderLine height={30} width={10} style={{ marginBottom: 20 }} />
|
|
176
|
+
<PlaceholderLine height={30} width={50} style={{ marginBottom: 20 }} />
|
|
177
|
+
<PlaceholderLine height={30} width={30} style={{ marginBottom: 20 }} />
|
|
178
|
+
</View>
|
|
179
|
+
))}
|
|
180
|
+
</Placeholder>
|
|
176
181
|
))}
|
|
177
182
|
</>
|
|
178
183
|
) : (
|
|
@@ -221,7 +226,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
221
226
|
state={currentState}
|
|
222
227
|
disabled={isSoldOut || maxProductQuantity <= 0}
|
|
223
228
|
/>
|
|
224
|
-
): null
|
|
229
|
+
) : null
|
|
225
230
|
})
|
|
226
231
|
}
|
|
227
232
|
</WrapperSubOption>
|
|
@@ -232,21 +237,19 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
232
237
|
</React.Fragment>
|
|
233
238
|
)
|
|
234
239
|
}))}
|
|
235
|
-
|
|
236
|
-
<
|
|
237
|
-
<
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
</ProductComment>
|
|
249
|
-
)}
|
|
240
|
+
<ProductComment>
|
|
241
|
+
<SectionTitle>
|
|
242
|
+
<OText size={16}>{t('SPECIAL_COMMENT', 'Special comment')}</OText>
|
|
243
|
+
</SectionTitle>
|
|
244
|
+
<OInput
|
|
245
|
+
multiline
|
|
246
|
+
placeholder={t('SPECIAL_COMMENT', 'Special comment')}
|
|
247
|
+
value={productCart.comment}
|
|
248
|
+
onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
|
|
249
|
+
isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
|
|
250
|
+
style={styles.comment}
|
|
251
|
+
/>
|
|
252
|
+
</ProductComment>
|
|
250
253
|
</ProductEditions>
|
|
251
254
|
)}
|
|
252
255
|
</WrapContent>
|
|
@@ -383,6 +386,9 @@ const styles = StyleSheet.create({
|
|
|
383
386
|
textDecorationLine: 'line-through',
|
|
384
387
|
marginLeft: 7,
|
|
385
388
|
marginRight: 7
|
|
389
|
+
},
|
|
390
|
+
caloriesStyle: {
|
|
391
|
+
color: '#808080'
|
|
386
392
|
}
|
|
387
393
|
})
|
|
388
394
|
|
|
@@ -2,7 +2,7 @@ import styled from 'styled-components/native';
|
|
|
2
2
|
|
|
3
3
|
export const Container = styled.View`
|
|
4
4
|
width: 100%;
|
|
5
|
-
padding: 0
|
|
5
|
+
padding: 0 30px;
|
|
6
6
|
`
|
|
7
7
|
|
|
8
8
|
export const CountDownContainer = styled.View`
|
|
@@ -20,7 +20,6 @@ export const ResendSection = styled.View`
|
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: row;
|
|
22
22
|
justify-content: center;
|
|
23
|
-
flex-wrap: wrap;
|
|
24
23
|
`
|
|
25
24
|
|
|
26
25
|
export const WrappCountdown = styled.View`
|
|
@@ -410,8 +410,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
410
410
|
textInputProps={{
|
|
411
411
|
returnKeyType: 'next',
|
|
412
412
|
onSubmitEditing: () => inputRef?.current?.focus?.(),
|
|
413
|
-
style: { borderWidth: 0, fontSize: 12 }
|
|
414
|
-
maxLength: 10
|
|
413
|
+
style: { borderWidth: 0, fontSize: 12 }
|
|
415
414
|
}}
|
|
416
415
|
textWrapStyle={{ borderColor: theme.colors.clear, borderWidth: 0, height: 40, paddingStart: 0 }}
|
|
417
416
|
/>
|
|
@@ -287,22 +287,20 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
287
287
|
</React.Fragment>
|
|
288
288
|
)
|
|
289
289
|
}))}
|
|
290
|
-
{
|
|
291
|
-
<
|
|
292
|
-
<
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
</ProductComment>
|
|
305
|
-
)}
|
|
290
|
+
<ProductComment onLayout={(e: any) => setCommentY(e.nativeEvent.layout.y + e.nativeEvent.layout.height)}>
|
|
291
|
+
<SectionTitle>
|
|
292
|
+
<OText style={theme.labels.middle as TextStyle}>{t('SPECIAL_COMMENT', 'Special comment')}</OText>
|
|
293
|
+
</SectionTitle>
|
|
294
|
+
<OInput
|
|
295
|
+
multiline
|
|
296
|
+
placeholder={t('SPECIAL_COMMENT', 'Special comment')}
|
|
297
|
+
value={productCart.comment}
|
|
298
|
+
onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
|
|
299
|
+
isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
|
|
300
|
+
style={styles.comment}
|
|
301
|
+
inputStyle={{ fontSize: 12, paddingBottom: 7, paddingTop: 17 }}
|
|
302
|
+
/>
|
|
303
|
+
</ProductComment>
|
|
306
304
|
{productCart && !isSoldOut && maxProductQuantity > 0 && (
|
|
307
305
|
<View style={{ paddingVertical: 4, marginBottom: 10 }}>
|
|
308
306
|
<SectionTitle>
|
|
@@ -235,21 +235,19 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
235
235
|
</React.Fragment>
|
|
236
236
|
)
|
|
237
237
|
}))}
|
|
238
|
-
|
|
239
|
-
<
|
|
240
|
-
<
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
</ProductComment>
|
|
252
|
-
)}
|
|
238
|
+
<ProductComment>
|
|
239
|
+
<SectionTitle>
|
|
240
|
+
<OText style={theme.labels.middle}>{t('SPECIAL_COMMENT', 'Special comment')}</OText>
|
|
241
|
+
</SectionTitle>
|
|
242
|
+
<OInput
|
|
243
|
+
multiline
|
|
244
|
+
placeholder={t('SPECIAL_COMMENT', 'Special comment')}
|
|
245
|
+
value={productCart.comment}
|
|
246
|
+
onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
|
|
247
|
+
isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
|
|
248
|
+
style={{ ...styles.comment, borderColor: theme.colors.border }}
|
|
249
|
+
/>
|
|
250
|
+
</ProductComment>
|
|
253
251
|
</ProductEditions>
|
|
254
252
|
)}
|
|
255
253
|
</WrapContent>
|
|
@@ -438,21 +438,19 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
438
438
|
</React.Fragment>
|
|
439
439
|
)
|
|
440
440
|
}))}
|
|
441
|
-
|
|
442
|
-
<
|
|
443
|
-
<
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
</ProductComment>
|
|
455
|
-
)}
|
|
441
|
+
<ProductComment>
|
|
442
|
+
<SectionTitle>
|
|
443
|
+
<OText size={28} weight="bold">{t('SPECIAL_COMMENT', 'Special comment')}</OText>
|
|
444
|
+
</SectionTitle>
|
|
445
|
+
<OInput
|
|
446
|
+
multiline
|
|
447
|
+
placeholder={t('SPECIAL_COMMENT', 'Special comment')}
|
|
448
|
+
value={productCart.comment}
|
|
449
|
+
onChange={(val: string) => handleChangeCommentState({ target: { value: val } })}
|
|
450
|
+
isDisabled={!(productCart && !isSoldOut && maxProductQuantity)}
|
|
451
|
+
style={styles.comment}
|
|
452
|
+
/>
|
|
453
|
+
</ProductComment>
|
|
456
454
|
</ProductEditions>
|
|
457
455
|
</WrapContent>
|
|
458
456
|
</View>
|
|
@@ -28,8 +28,6 @@ import { HelpGuide } from './src/components/HelpGuide';
|
|
|
28
28
|
import { HelpOrder } from './src/components/HelpOrder';
|
|
29
29
|
import { NotFoundSource } from './src/components/NotFoundSource';
|
|
30
30
|
import { OrderTypeSelector } from './src/components/OrderTypeSelector';
|
|
31
|
-
import { Wallets } from './src/components/Wallets';
|
|
32
|
-
import { PaymentOptionWallet } from './src/components/PaymentOptionWallet';
|
|
33
31
|
|
|
34
32
|
import { Toast } from './src/components/shared/OToast';
|
|
35
33
|
import {
|
|
@@ -88,8 +86,6 @@ export {
|
|
|
88
86
|
HelpOrder,
|
|
89
87
|
NotFoundSource,
|
|
90
88
|
OrderTypeSelector,
|
|
91
|
-
Wallets,
|
|
92
|
-
PaymentOptionWallet,
|
|
93
89
|
|
|
94
90
|
// OComponents
|
|
95
91
|
Toast,
|
|
@@ -57,7 +57,6 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
57
57
|
handleBusinessClick,
|
|
58
58
|
paginationProps,
|
|
59
59
|
handleChangeSearch,
|
|
60
|
-
businessId
|
|
61
60
|
} = props;
|
|
62
61
|
|
|
63
62
|
const theme = useTheme();
|
|
@@ -257,20 +256,17 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
257
256
|
/>
|
|
258
257
|
</WrapMomentOption>
|
|
259
258
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
/>
|
|
272
|
-
)}
|
|
273
|
-
|
|
259
|
+
<SearchBar
|
|
260
|
+
onSearch={handleChangeSearch}
|
|
261
|
+
searchValue={searchValue}
|
|
262
|
+
lazyLoad
|
|
263
|
+
isCancelXButtonShow={!!searchValue}
|
|
264
|
+
borderStyle={styles.borderStyle}
|
|
265
|
+
onCancel={() => handleChangeSearch('')}
|
|
266
|
+
placeholder={t('SEARCH', 'Search')}
|
|
267
|
+
height={26}
|
|
268
|
+
inputStyle={{ ...styles.searchInput, ...Platform.OS === 'ios' ? {} : { paddingBottom: 4 } }}
|
|
269
|
+
/>
|
|
274
270
|
</View>
|
|
275
271
|
</OrderControlContainer>
|
|
276
272
|
</HeaderWrapper>
|
|
@@ -281,7 +277,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
281
277
|
/>
|
|
282
278
|
</OrderProgressWrapper>
|
|
283
279
|
)}
|
|
284
|
-
{!
|
|
280
|
+
{!props.franchiseId && featuredBusiness && featuredBusiness.length > 0 && (
|
|
285
281
|
<FeaturedWrapper>
|
|
286
282
|
<OText size={16} style={{ marginLeft: 40 }} weight={Platform.OS === 'ios' ? '600' : 'bold'}>{t('FEATURED_BUSINESS', 'Featured business')}</OText>
|
|
287
283
|
<ScrollView
|
|
@@ -310,19 +306,17 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
310
306
|
</FeaturedWrapper>
|
|
311
307
|
)}
|
|
312
308
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100 }} />
|
|
313
|
-
{!
|
|
309
|
+
{!props.franchiseId && (
|
|
314
310
|
<HighestRatedBusinesses onBusinessClick={handleBusinessClick} navigation={navigation} />
|
|
315
311
|
)}
|
|
316
312
|
<View style={{ height: 8, backgroundColor: theme.colors.backgroundGray100 }} />
|
|
317
313
|
<ListWrapper>
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
/>
|
|
325
|
-
)}
|
|
314
|
+
<BusinessTypeFilter
|
|
315
|
+
images={props.images}
|
|
316
|
+
businessTypes={props.businessTypes}
|
|
317
|
+
defaultBusinessType={props.defaultBusinessType}
|
|
318
|
+
handleChangeBusinessType={handleChangeBusinessType}
|
|
319
|
+
/>
|
|
326
320
|
{!businessesList.loading && businessesList.businesses.length === 0 && (
|
|
327
321
|
<NotFoundSource
|
|
328
322
|
content={t(
|
|
@@ -23,7 +23,6 @@ import { PaymentOptions } from '../PaymentOptions';
|
|
|
23
23
|
import { DriverTips } from '../DriverTips';
|
|
24
24
|
import { NotFoundSource } from '../NotFoundSource';
|
|
25
25
|
import { UserDetails } from '../UserDetails';
|
|
26
|
-
import { PaymentOptionWallet } from '../PaymentOptionWallet';
|
|
27
26
|
|
|
28
27
|
import {
|
|
29
28
|
ChContainer,
|
|
@@ -38,8 +37,7 @@ import {
|
|
|
38
37
|
ChUserDetails,
|
|
39
38
|
ChCart,
|
|
40
39
|
DeliveryOptionsContainer,
|
|
41
|
-
DeliveryOptionItem
|
|
42
|
-
WalletPaymentOptionContainer
|
|
40
|
+
DeliveryOptionItem
|
|
43
41
|
} from './styles';
|
|
44
42
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
45
43
|
|
|
@@ -506,15 +504,6 @@ const CheckoutUI = (props: any) => {
|
|
|
506
504
|
</ChSection>
|
|
507
505
|
)}
|
|
508
506
|
|
|
509
|
-
{!cartState.loading && cart && (
|
|
510
|
-
<WalletPaymentOptionContainer>
|
|
511
|
-
<PaymentOptionWallet
|
|
512
|
-
cart={cart}
|
|
513
|
-
/>
|
|
514
|
-
</WalletPaymentOptionContainer>
|
|
515
|
-
)}
|
|
516
|
-
|
|
517
|
-
|
|
518
507
|
{!cartState.loading && cart && (
|
|
519
508
|
<ChSection>
|
|
520
509
|
<ChCart>
|
|
@@ -554,8 +543,8 @@ const CheckoutUI = (props: any) => {
|
|
|
554
543
|
)}
|
|
555
544
|
|
|
556
545
|
{!cartState.loading && cart && (
|
|
557
|
-
|
|
558
|
-
<ChErrors
|
|
546
|
+
<ChSection style={{ paddingTop: 0, paddingBottom: 20, paddingHorizontal: 20 }}>
|
|
547
|
+
<ChErrors>
|
|
559
548
|
{!cart?.valid_address && cart?.status !== 2 && (
|
|
560
549
|
<OText
|
|
561
550
|
color={theme.colors.error}
|
|
@@ -583,7 +572,7 @@ const CheckoutUI = (props: any) => {
|
|
|
583
572
|
</OText>
|
|
584
573
|
)}
|
|
585
574
|
</ChErrors>
|
|
586
|
-
</
|
|
575
|
+
</ChSection>
|
|
587
576
|
)}
|
|
588
577
|
<OModal
|
|
589
578
|
open={openChangeStore && props.isFranchiseApp}
|
|
@@ -74,10 +74,6 @@ export const ChDriverTips = styled(ChPaymethods)``
|
|
|
74
74
|
|
|
75
75
|
export const ChCart = styled(ChPaymethods)``
|
|
76
76
|
|
|
77
|
-
export const WalletPaymentOptionContainer = styled(ChPaymethods)`
|
|
78
|
-
padding-bottom: 0;
|
|
79
|
-
`
|
|
80
|
-
|
|
81
77
|
export const ChPlaceOrderBtn = styled.View`
|
|
82
78
|
width: 100%;
|
|
83
79
|
display: flex;
|
|
@@ -103,4 +99,4 @@ export const DeliveryOptionItem = styled.View`
|
|
|
103
99
|
align-items: center;
|
|
104
100
|
flex-direction: row;
|
|
105
101
|
background-color: ${(props : any) => props?.backgroundColor ?? '#fff'};
|
|
106
|
-
`;
|
|
102
|
+
`;
|
|
@@ -48,8 +48,8 @@ export const Help = (props: HelpParams) => {
|
|
|
48
48
|
|
|
49
49
|
<LastOrdersContainer>
|
|
50
50
|
<OText size={18} weight={600}>{t('LAST_ORDERS', 'Last Orders')}</OText>
|
|
51
|
-
<LastOrders
|
|
51
|
+
<LastOrders onRedirect={onRedirect} />
|
|
52
52
|
</LastOrdersContainer>
|
|
53
53
|
</>
|
|
54
54
|
)
|
|
55
|
-
}
|
|
55
|
+
}
|
|
@@ -104,15 +104,6 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
104
104
|
|
|
105
105
|
const { order, businessData } = props.order;
|
|
106
106
|
|
|
107
|
-
const walletName: any = {
|
|
108
|
-
cash: {
|
|
109
|
-
name: t('PAY_WITH_CASH_WALLET', 'Pay with Cash Wallet'),
|
|
110
|
-
},
|
|
111
|
-
credit_point: {
|
|
112
|
-
name: t('PAY_WITH_CREDITS_POINTS_WALLET', 'Pay with Credit Points Wallet'),
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
107
|
const getOrderStatus = (s: string) => {
|
|
117
108
|
const status = parseInt(s);
|
|
118
109
|
const orderStatus = [
|
|
@@ -835,51 +826,6 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
835
826
|
</OText>
|
|
836
827
|
</Table>
|
|
837
828
|
</Total>
|
|
838
|
-
{order?.payment_events?.length > 0 && (
|
|
839
|
-
<View style={{marginTop: 10}}>
|
|
840
|
-
<OText size={20} weight='bold' color={theme.colors.textNormal}>{t('PAYMENTS', 'Payments')}</OText>
|
|
841
|
-
<View
|
|
842
|
-
style={{
|
|
843
|
-
width: '100%',
|
|
844
|
-
marginTop: 10
|
|
845
|
-
}}
|
|
846
|
-
>
|
|
847
|
-
{order?.payment_events?.map((event: any) => (
|
|
848
|
-
<View
|
|
849
|
-
key={event.id}
|
|
850
|
-
style={{
|
|
851
|
-
display: 'flex',
|
|
852
|
-
flexDirection: 'row',
|
|
853
|
-
justifyContent: 'space-between',
|
|
854
|
-
alignItems: 'center',
|
|
855
|
-
marginBottom: 10
|
|
856
|
-
}}
|
|
857
|
-
>
|
|
858
|
-
<View
|
|
859
|
-
style={{
|
|
860
|
-
display: 'flex',
|
|
861
|
-
flexDirection: 'column',
|
|
862
|
-
}}
|
|
863
|
-
>
|
|
864
|
-
<OText>
|
|
865
|
-
{event?.wallet_event
|
|
866
|
-
? walletName[event?.wallet_event?.wallet?.type]?.name
|
|
867
|
-
: event?.paymethod?.name}
|
|
868
|
-
</OText>
|
|
869
|
-
{event?.data?.charge_id && (
|
|
870
|
-
<OText>
|
|
871
|
-
{`${t('CODE', 'Code')}: ${event?.data?.charge_id}`}
|
|
872
|
-
</OText>
|
|
873
|
-
)}
|
|
874
|
-
</View>
|
|
875
|
-
<OText>
|
|
876
|
-
-{parsePrice(event.amount)}
|
|
877
|
-
</OText>
|
|
878
|
-
</View>
|
|
879
|
-
))}
|
|
880
|
-
</View>
|
|
881
|
-
</View>
|
|
882
|
-
)}
|
|
883
829
|
</OrderBill>
|
|
884
830
|
</OrderContent>
|
|
885
831
|
</>
|
|
@@ -193,13 +193,13 @@ const OrderProgressUI = (props: any) => {
|
|
|
193
193
|
</View>
|
|
194
194
|
</View>
|
|
195
195
|
)}
|
|
196
|
-
{
|
|
196
|
+
{!orderList?.loading && orderList?.orders?.length === 0 && (
|
|
197
197
|
<NotFoundSource
|
|
198
198
|
image={imageFails}
|
|
199
199
|
content={t('NO_RESULTS_FOUND', 'Sorry, no results found')}
|
|
200
200
|
conditioned
|
|
201
201
|
/>
|
|
202
|
-
)}
|
|
202
|
+
)}
|
|
203
203
|
</>
|
|
204
204
|
)
|
|
205
205
|
}
|
|
@@ -28,6 +28,7 @@ import { TouchableOpacity } from 'react-native';
|
|
|
28
28
|
|
|
29
29
|
const OrderSummaryUI = (props: any) => {
|
|
30
30
|
const {
|
|
31
|
+
cart,
|
|
31
32
|
changeQuantity,
|
|
32
33
|
getProductMax,
|
|
33
34
|
offsetDisabled,
|
|
@@ -75,16 +76,6 @@ const OrderSummaryUI = (props: any) => {
|
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
const cart = orderState?.carts?.[`businessId:${props.cart.business_id}`]
|
|
79
|
-
|
|
80
|
-
const walletName: any = {
|
|
81
|
-
cash: {
|
|
82
|
-
name: t('PAY_WITH_CASH_WALLET', 'Pay with Cash Wallet'),
|
|
83
|
-
},
|
|
84
|
-
credit_point: {
|
|
85
|
-
name: t('PAY_WITH_CREDITS_POINTS_WALLET', 'Pay with Credit Points Wallet'),
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
79
|
|
|
89
80
|
return (
|
|
90
81
|
<OSContainer>
|
|
@@ -214,8 +205,7 @@ const OrderSummaryUI = (props: any) => {
|
|
|
214
205
|
height: 100,
|
|
215
206
|
borderColor: theme.colors.border,
|
|
216
207
|
paddingRight: 50,
|
|
217
|
-
marginTop: 10
|
|
218
|
-
borderRadius: 8
|
|
208
|
+
marginTop: 10
|
|
219
209
|
}}
|
|
220
210
|
multiline
|
|
221
211
|
/>
|
|
@@ -232,52 +222,6 @@ const OrderSummaryUI = (props: any) => {
|
|
|
232
222
|
</View>
|
|
233
223
|
</OSTable>
|
|
234
224
|
)}
|
|
235
|
-
{cart?.payment_events?.length > 0 && (
|
|
236
|
-
<View
|
|
237
|
-
style={{
|
|
238
|
-
width: '100%',
|
|
239
|
-
marginTop: 20
|
|
240
|
-
}}
|
|
241
|
-
>
|
|
242
|
-
{cart?.payment_events?.map((event: any) => (
|
|
243
|
-
<View
|
|
244
|
-
key={event.id}
|
|
245
|
-
style={{
|
|
246
|
-
display: 'flex',
|
|
247
|
-
flexDirection: 'row',
|
|
248
|
-
justifyContent: 'space-between',
|
|
249
|
-
marginBottom: 10
|
|
250
|
-
}}
|
|
251
|
-
>
|
|
252
|
-
<OText>
|
|
253
|
-
{walletName[cart?.wallets?.find((wallet: any) => wallet.id === event.wallet_id)?.type]?.name}
|
|
254
|
-
</OText>
|
|
255
|
-
<OText>
|
|
256
|
-
-{parsePrice(event.amount)}
|
|
257
|
-
</OText>
|
|
258
|
-
</View>
|
|
259
|
-
))}
|
|
260
|
-
<View
|
|
261
|
-
style={{
|
|
262
|
-
display: 'flex',
|
|
263
|
-
flexDirection: 'row',
|
|
264
|
-
justifyContent: 'space-between',
|
|
265
|
-
marginBottom: 10
|
|
266
|
-
}}
|
|
267
|
-
>
|
|
268
|
-
<OText
|
|
269
|
-
weight={'bold'}
|
|
270
|
-
>
|
|
271
|
-
{t('TOTAL_TO_PAY', 'Total to pay')}
|
|
272
|
-
</OText>
|
|
273
|
-
<OText
|
|
274
|
-
weight={'bold'}
|
|
275
|
-
>
|
|
276
|
-
{parsePrice(cart?.balance)}
|
|
277
|
-
</OText>
|
|
278
|
-
</View>
|
|
279
|
-
</View>
|
|
280
|
-
)}
|
|
281
225
|
</OSBill>
|
|
282
226
|
)}
|
|
283
227
|
<OModal
|