ordering-ui-react-native 0.17.80 → 0.17.82
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/BusinessListingSearch/index.tsx +8 -5
- package/themes/original/src/components/BusinessProductsListing/index.tsx +2 -1
- package/themes/original/src/components/Checkout/index.tsx +2 -2
- package/themes/original/src/components/Favorite/index.tsx +1 -1
- package/themes/original/src/components/Help/index.tsx +2 -2
- package/themes/original/src/components/HelpGuide/index.tsx +2 -2
- package/themes/original/src/components/HelpGuide/styles.tsx +1 -0
- package/themes/original/src/components/MessageListing/index.tsx +7 -7
- package/themes/original/src/components/ProductForm/index.tsx +30 -23
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +1 -1
- package/themes/original/src/components/Sessions/index.tsx +11 -8
- package/themes/original/src/components/Sessions/styles.tsx +4 -0
- package/themes/original/src/components/SingleOrderCard/index.tsx +7 -5
- package/themes/original/src/components/UpsellingProducts/index.tsx +4 -12
- package/themes/original/src/components/UserProfileForm/index.tsx +3 -1
- package/themes/original/src/components/UserProfileForm/styles.tsx +1 -1
package/package.json
CHANGED
|
@@ -191,7 +191,8 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
191
191
|
|
|
192
192
|
const isInteger = (val: any) => Number.isInteger(Number(val)) && !!val
|
|
193
193
|
|
|
194
|
-
|
|
194
|
+
|
|
195
|
+
const onProductClick = (business: any, categoryId: any, productId: any, product: any) => {
|
|
195
196
|
if (!isInteger(business?.id) ||
|
|
196
197
|
!isInteger(categoryId) ||
|
|
197
198
|
!isInteger(productId) ||
|
|
@@ -199,17 +200,20 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
199
200
|
showToast(ToastType.error, t('NOT_AVAILABLE', 'Not Available'))
|
|
200
201
|
return
|
|
201
202
|
}
|
|
202
|
-
|
|
203
|
+
const currentCart: any = Object.values(orderState.carts).find((cart: any) => cart?.business?.slug === business?.slug) ?? {}
|
|
204
|
+
const productAddedToCartLength = currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === productId ? Cproduct?.quantity : 0) }, 0) || 0
|
|
203
205
|
navigation.navigate('ProductDetails', {
|
|
204
206
|
isRedirect: 'business',
|
|
205
207
|
businessId: business?.id,
|
|
206
208
|
categoryId: categoryId,
|
|
207
209
|
productId: productId,
|
|
210
|
+
product: product,
|
|
208
211
|
business: {
|
|
209
212
|
store: business.slug,
|
|
210
213
|
header: business.header,
|
|
211
214
|
logo: business.logo,
|
|
212
|
-
}
|
|
215
|
+
},
|
|
216
|
+
productAddedToCartLength
|
|
213
217
|
})
|
|
214
218
|
}
|
|
215
219
|
|
|
@@ -293,7 +297,6 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
293
297
|
/>
|
|
294
298
|
</View>
|
|
295
299
|
))}
|
|
296
|
-
{console.log(screenWidth)}
|
|
297
300
|
{!businessesSearchList.loading && paginationProps?.totalPages && paginationProps?.currentPage < paginationProps?.totalPages && (
|
|
298
301
|
<LoadMoreBusinessContainer>
|
|
299
302
|
<OButton
|
|
@@ -361,7 +364,7 @@ export const BusinessListingSearchUI = (props: BusinessSearchParams) => {
|
|
|
361
364
|
product={product}
|
|
362
365
|
enableIntersection={false}
|
|
363
366
|
businessId={business?.id}
|
|
364
|
-
onProductClick={(product: any) => onProductClick(business, category?.id, product?.id)}
|
|
367
|
+
onProductClick={(product: any) => onProductClick(business, category?.id, product?.id, product)}
|
|
365
368
|
productAddedToCartLength={0}
|
|
366
369
|
handleUpdateProducts={(productId: number, changes: any) => handleUpdateProducts(productId, category?.id, business?.id, changes)}
|
|
367
370
|
style={{ width: screenWidth - 80, maxWidth: screenWidth - 80, marginRight: 20 }}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react'
|
|
2
|
-
import { View, TouchableOpacity, StyleSheet, SafeAreaView, Dimensions, Platform, KeyboardAvoidingViewBase, KeyboardAvoidingView } from 'react-native'
|
|
2
|
+
import { View, TouchableOpacity, StyleSheet, SafeAreaView, Dimensions, Platform, KeyboardAvoidingViewBase, KeyboardAvoidingView, Vibration } from 'react-native'
|
|
3
3
|
import { IOScrollView } from 'react-native-intersection-observer'
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
5
5
|
import { useTheme } from 'styled-components/native';
|
|
@@ -156,6 +156,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
156
156
|
code: isProductAddedToCart?.code,
|
|
157
157
|
quantity: productQuantity + 1
|
|
158
158
|
}
|
|
159
|
+
Vibration.vibrate()
|
|
159
160
|
const cartData = currentCart?.business_id ? currentCart : { business_id: business.id }
|
|
160
161
|
if (isProductAddedToCart) {
|
|
161
162
|
await updateProduct(updateCurrentProduct, cartData, isQuickAddProduct)
|
|
@@ -308,7 +308,7 @@ const CheckoutUI = (props: any) => {
|
|
|
308
308
|
titleAlign={'center'}
|
|
309
309
|
onActionLeft={() => navigation?.canGoBack() && navigation.goBack()}
|
|
310
310
|
showCall={false}
|
|
311
|
-
btnStyle={{ paddingLeft: 0 }}
|
|
311
|
+
btnStyle={{ paddingLeft: 0, paddingTop: Platform.OS == 'ios' ? 0 : 2 }}
|
|
312
312
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
313
313
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
314
314
|
/>
|
|
@@ -578,7 +578,7 @@ const CheckoutUI = (props: any) => {
|
|
|
578
578
|
cart={cart}
|
|
579
579
|
isDisabled={cart?.status === 2}
|
|
580
580
|
businessId={!isGiftCardCart ? businessDetails?.business?.id : -1}
|
|
581
|
-
|
|
581
|
+
isLoading={!isGiftCardCart ? businessDetails.loading : false}
|
|
582
582
|
paymethods={businessDetails?.business?.paymethods}
|
|
583
583
|
onPaymentChange={handlePaymethodChange}
|
|
584
584
|
errorCash={errorCash}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { RefreshControl } from 'react-native'
|
|
2
|
+
import { Platform, RefreshControl } from 'react-native'
|
|
3
3
|
import { HelpParams } from '../../types'
|
|
4
4
|
import { useLanguage } from 'ordering-components/native'
|
|
5
5
|
import NavBar from '../NavBar'
|
|
@@ -31,7 +31,7 @@ export const Help = (props: HelpParams) => {
|
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<Container
|
|
34
|
-
pt={10}
|
|
34
|
+
pt={Platform.OS === 'ios' ? 20 : 10}
|
|
35
35
|
noPadding
|
|
36
36
|
refreshControl={
|
|
37
37
|
<RefreshControl
|
|
@@ -3,7 +3,7 @@ import { useLanguage } from 'ordering-components/native'
|
|
|
3
3
|
import { HelpGuideParams } from '../../types'
|
|
4
4
|
import { OText, OIcon } from '../shared'
|
|
5
5
|
import { useTheme } from 'styled-components/native'
|
|
6
|
-
import { StyleSheet } from 'react-native'
|
|
6
|
+
import { Platform, StyleSheet } from 'react-native'
|
|
7
7
|
import NavBar from '../NavBar'
|
|
8
8
|
import {
|
|
9
9
|
Content,
|
|
@@ -37,7 +37,7 @@ export const HelpGuide = (props: HelpGuideParams) => {
|
|
|
37
37
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
|
-
<Container>
|
|
40
|
+
<Container pdng={Platform.OS === 'ios' ? '10px' : '0px'}>
|
|
41
41
|
<NavBar
|
|
42
42
|
title={t('GUIDE_TO_ORDERING', 'Guide to Ordering')}
|
|
43
43
|
onActionLeft={goToBack}
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
PlaceholderLine,
|
|
17
17
|
Fade
|
|
18
18
|
} from "rn-placeholder";
|
|
19
|
-
import { View, BackHandler } from 'react-native'
|
|
19
|
+
import { View, BackHandler, Platform } from 'react-native'
|
|
20
20
|
import {
|
|
21
21
|
MessageListingWrapper,
|
|
22
22
|
MessageContainer
|
|
@@ -77,7 +77,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
77
77
|
{ key: 20, value: t('ORDER_CUSTOMER_ALMOST_ARRIVED_BUSINESS', 'Customer almost arrived to business') },
|
|
78
78
|
{ key: 21, value: t('ORDER_CUSTOMER_ARRIVED_BUSINESS', 'Customer arrived to business') },
|
|
79
79
|
{ key: 22, value: t('ORDER_LOOKING_FOR_DRIVER', 'Looking for driver') },
|
|
80
|
-
|
|
80
|
+
{ key: 23, value: t('ORDER_DRIVER_ON_WAY', 'Driver on way') }
|
|
81
81
|
]
|
|
82
82
|
|
|
83
83
|
const objectStatus = orderStatus.find((o) => o.key === status)
|
|
@@ -102,7 +102,7 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
102
102
|
}, [orderList, loading])
|
|
103
103
|
|
|
104
104
|
useEffect(() => {
|
|
105
|
-
if(refreshOrders){
|
|
105
|
+
if (refreshOrders) {
|
|
106
106
|
loadOrders(false, false, false, true)
|
|
107
107
|
setRefreshOrders && setRefreshOrders(false)
|
|
108
108
|
}
|
|
@@ -225,7 +225,7 @@ const OrderMessageUI = (props: any) => {
|
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
export const OrderListing = (props: OrdersOptionParams) => {
|
|
228
|
-
|
|
228
|
+
const [businessState] = useBusiness();
|
|
229
229
|
const OrderListingProps = {
|
|
230
230
|
...props,
|
|
231
231
|
UIComponent: OrdersOptionUI,
|
|
@@ -236,7 +236,7 @@ export const OrderListing = (props: OrdersOptionParams) => {
|
|
|
236
236
|
pageSize: 10,
|
|
237
237
|
controlType: 'infinity'
|
|
238
238
|
},
|
|
239
|
-
|
|
239
|
+
businessId: businessState?.business?.id,
|
|
240
240
|
profileMessages: true,
|
|
241
241
|
orderBy: 'last_direct_message_at',
|
|
242
242
|
orderDirection: 'asc'
|
|
@@ -292,7 +292,7 @@ export const MessageListing = (props: MessageListingParams) => {
|
|
|
292
292
|
titleAlign={'center'}
|
|
293
293
|
onActionLeft={goToBack}
|
|
294
294
|
showCall={false}
|
|
295
|
-
paddingTop={10}
|
|
295
|
+
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
296
296
|
btnStyle={{ paddingLeft: 0 }}
|
|
297
297
|
/>
|
|
298
298
|
<OrderListing
|
|
@@ -300,7 +300,7 @@ export const MessageListing = (props: MessageListingParams) => {
|
|
|
300
300
|
setSelectedOrderId={setSelectedOrderId}
|
|
301
301
|
setOrderList={setOrderListStatus}
|
|
302
302
|
setOpenMessges={setOpenMessges}
|
|
303
|
-
|
|
303
|
+
franchiseId={props.franchiseId}
|
|
304
304
|
/>
|
|
305
305
|
{openMessages && seletedOrder && (
|
|
306
306
|
<OModal
|
|
@@ -51,6 +51,7 @@ import { ScrollView } from 'react-native-gesture-handler';
|
|
|
51
51
|
import { ProductOptionSubOption } from '../ProductOptionSubOption';
|
|
52
52
|
import { NotFoundSource } from '../NotFoundSource';
|
|
53
53
|
import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
|
|
54
|
+
import NavBar from '../NavBar';
|
|
54
55
|
const windowWidth = Dimensions.get('window').width;
|
|
55
56
|
|
|
56
57
|
export const ProductOptionsUI = (props: any) => {
|
|
@@ -166,6 +167,10 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
166
167
|
justifyContent: 'space-between',
|
|
167
168
|
width: '100%',
|
|
168
169
|
marginTop: 10
|
|
170
|
+
},
|
|
171
|
+
wrapperNavbar: {
|
|
172
|
+
paddingHorizontal: 40,
|
|
173
|
+
paddingTop: 0,
|
|
169
174
|
}
|
|
170
175
|
});
|
|
171
176
|
|
|
@@ -208,12 +213,12 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
208
213
|
};
|
|
209
214
|
|
|
210
215
|
const handleSaveProduct = () => {
|
|
211
|
-
|
|
216
|
+
Vibration.vibrate()
|
|
212
217
|
if (!productCart.quantity) {
|
|
213
218
|
showToast(ToastType.Error, t('VALIDATION_ERROR_REQUIRED', 'The quantity field is required').replace('_attribute_', t('PRODUCT_POTIONS_QUANTITY', 'Quantity')))
|
|
214
219
|
return
|
|
215
220
|
}
|
|
216
|
-
const isErrors = Object.values(errors)
|
|
221
|
+
const isErrors = Object.values(errors)?.length > 0;
|
|
217
222
|
if (!isErrors) {
|
|
218
223
|
handleSave && handleSave();
|
|
219
224
|
return;
|
|
@@ -232,7 +237,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
232
237
|
};
|
|
233
238
|
|
|
234
239
|
const handleChangeMainIndex = (index: number) => {
|
|
235
|
-
if (index < 0 || index > gallery
|
|
240
|
+
if (index < 0 || index > gallery?.length - 1) {
|
|
236
241
|
setThumbsSwiper(0)
|
|
237
242
|
return
|
|
238
243
|
}
|
|
@@ -275,7 +280,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
275
280
|
}
|
|
276
281
|
|
|
277
282
|
const scrollDown = (id: any) => {
|
|
278
|
-
const isErrors = Object.values(errors)
|
|
283
|
+
const isErrors = Object.values(errors)?.length > 0
|
|
279
284
|
if (!isErrors) {
|
|
280
285
|
return
|
|
281
286
|
}
|
|
@@ -299,7 +304,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
299
304
|
const saveErrors =
|
|
300
305
|
orderState.loading ||
|
|
301
306
|
maxProductQuantity === 0 ||
|
|
302
|
-
Object.keys(errors)
|
|
307
|
+
Object.keys(errors)?.length > 0;
|
|
303
308
|
|
|
304
309
|
|
|
305
310
|
const ExtraOptions = ({ eID, options }: any) => (
|
|
@@ -366,14 +371,14 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
366
371
|
? product.images
|
|
367
372
|
: theme?.images?.dummies?.product)
|
|
368
373
|
|
|
369
|
-
if (product?.gallery && product?.gallery
|
|
374
|
+
if (product?.gallery && product?.gallery?.length > 0) {
|
|
370
375
|
for (const img of product?.gallery) {
|
|
371
376
|
if (img?.file) {
|
|
372
377
|
imageList.push(img?.file)
|
|
373
378
|
}
|
|
374
379
|
if (img?.video) {
|
|
375
380
|
const keys = img?.video.split('/')
|
|
376
|
-
let _videoId = keys[keys
|
|
381
|
+
let _videoId = keys[keys?.length - 1]
|
|
377
382
|
|
|
378
383
|
if (_videoId.includes('watch')) {
|
|
379
384
|
const __url = _videoId.split('=')[1]
|
|
@@ -388,7 +393,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
388
393
|
} else if (_videoId.search(/\?/i) >= 0) {
|
|
389
394
|
_videoId = _videoId.split('?')[0]
|
|
390
395
|
}
|
|
391
|
-
if ((_videoId
|
|
396
|
+
if ((_videoId?.length === 11)) {
|
|
392
397
|
videoList.push(_videoId)
|
|
393
398
|
}
|
|
394
399
|
}
|
|
@@ -483,14 +488,16 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
483
488
|
}
|
|
484
489
|
}, [])
|
|
485
490
|
|
|
486
|
-
|
|
487
491
|
return (
|
|
488
492
|
<SafeAreaView style={{ flex: 1 }}>
|
|
489
|
-
<
|
|
490
|
-
<
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
493
|
+
<View style={styles.wrapperNavbar}>
|
|
494
|
+
<NavBar
|
|
495
|
+
onActionLeft={() => handleGoBack()}
|
|
496
|
+
showCall={false}
|
|
497
|
+
btnStyle={{ paddingLeft: 0 }}
|
|
498
|
+
paddingTop={4}
|
|
499
|
+
/>
|
|
500
|
+
</View>
|
|
494
501
|
{!error && (
|
|
495
502
|
<ScrollView
|
|
496
503
|
ref={scrollViewRef}
|
|
@@ -539,7 +546,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
539
546
|
</View>
|
|
540
547
|
}
|
|
541
548
|
>
|
|
542
|
-
{gallery && gallery
|
|
549
|
+
{gallery && gallery?.length > 0 && gallery.map((img, i) => (
|
|
543
550
|
<View
|
|
544
551
|
style={styles.slide1}
|
|
545
552
|
key={i}
|
|
@@ -574,7 +581,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
574
581
|
paddingVertical: 15
|
|
575
582
|
}}
|
|
576
583
|
>
|
|
577
|
-
{gallery
|
|
584
|
+
{gallery?.length > 0 && gallery.map((img, index) => (
|
|
578
585
|
<TouchableOpacity
|
|
579
586
|
key={index}
|
|
580
587
|
onPress={() => handleClickThumb(index)}
|
|
@@ -729,7 +736,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
729
736
|
backgroundColor: theme.colors.backgroundPage,
|
|
730
737
|
}}
|
|
731
738
|
>
|
|
732
|
-
{product?.ingredients
|
|
739
|
+
{product?.ingredients?.length > 0 && (
|
|
733
740
|
<TouchableOpacity
|
|
734
741
|
key={`eopt_key_01`}
|
|
735
742
|
onPress={() => {
|
|
@@ -754,7 +761,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
754
761
|
</OText>
|
|
755
762
|
</TouchableOpacity>
|
|
756
763
|
)}
|
|
757
|
-
{product?.extras
|
|
764
|
+
{product?.extras?.map((extra: any) =>
|
|
758
765
|
<ExtraOptions key={extra.id} options={extra.options} />
|
|
759
766
|
)}
|
|
760
767
|
</ExtraOptionWrap>
|
|
@@ -805,7 +812,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
805
812
|
}}
|
|
806
813
|
>
|
|
807
814
|
<>
|
|
808
|
-
{product?.ingredients
|
|
815
|
+
{product?.ingredients?.length > 0 && (
|
|
809
816
|
<View style={styles.optionContainer} onLayout={(event: any) => handleOnLayout(event, 0)}>
|
|
810
817
|
<SectionTitle>
|
|
811
818
|
<OText size={16}>
|
|
@@ -827,8 +834,8 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
827
834
|
</WrapperIngredients>
|
|
828
835
|
</View>
|
|
829
836
|
)}
|
|
830
|
-
{product?.extras
|
|
831
|
-
extra.options
|
|
837
|
+
{product?.extras?.sort((a: any, b: any) => a.rank - b.rank).map((extra: any) =>
|
|
838
|
+
extra.options?.sort((a: any, b: any) => a.rank - b.rank).map((option: any) => {
|
|
832
839
|
const currentState =
|
|
833
840
|
productCart.options[`id:${option.id}`] || {};
|
|
834
841
|
return (
|
|
@@ -844,7 +851,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
844
851
|
backgroundColor: isError(option.id),
|
|
845
852
|
borderRadius: 7.6
|
|
846
853
|
}}>
|
|
847
|
-
{option
|
|
854
|
+
{option?.suboptions?.sort((a: any, b: any) => a.rank - b.rank).map(
|
|
848
855
|
(suboption: any) => {
|
|
849
856
|
const currentState =
|
|
850
857
|
productCart.options[
|
|
@@ -909,7 +916,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
909
916
|
)}
|
|
910
917
|
</ProductEditions>
|
|
911
918
|
)}
|
|
912
|
-
{!!error && error
|
|
919
|
+
{!!error && error?.length > 0 && (
|
|
913
920
|
<NotFoundSource content={error[0]?.message || error[0]} />
|
|
914
921
|
)}
|
|
915
922
|
</ScrollView>
|
|
@@ -32,7 +32,7 @@ export const ProductOptionSubOptionUI = (props: any) => {
|
|
|
32
32
|
setIsScrollAvailable
|
|
33
33
|
} = props
|
|
34
34
|
|
|
35
|
-
const disableIncrement = option?.limit_suboptions_by_max ? balance === option?.max : state.quantity === suboption?.max || (!state.selected && balance === option?.max)
|
|
35
|
+
const disableIncrement = option?.limit_suboptions_by_max ? balance === option?.max || state.quantity === suboption?.max : state.quantity === suboption?.max || (!state.selected && balance === option?.max)
|
|
36
36
|
const price = option?.with_half_option && suboption?.half_price && state.position !== 'whole' ? suboption?.half_price : suboption?.price
|
|
37
37
|
|
|
38
38
|
const theme = useTheme();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { View, TouchableOpacity } from 'react-native'
|
|
2
|
+
import { View, TouchableOpacity, Platform } from 'react-native'
|
|
3
3
|
import { useLanguage, useSession, useUtils, Sessions as SessionsController } from 'ordering-components/native'
|
|
4
4
|
import NavBar from '../NavBar'
|
|
5
5
|
import { SessionsParams } from '../../types'
|
|
@@ -12,7 +12,8 @@ import AntIcon from 'react-native-vector-icons/AntDesign'
|
|
|
12
12
|
import {
|
|
13
13
|
SessionsWrapper,
|
|
14
14
|
SessionItem,
|
|
15
|
-
DurationWrapper
|
|
15
|
+
DurationWrapper,
|
|
16
|
+
Container
|
|
16
17
|
} from './styles'
|
|
17
18
|
|
|
18
19
|
export const SessionsUI = (props: SessionsParams) => {
|
|
@@ -27,7 +28,7 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
27
28
|
const [, t] = useLanguage()
|
|
28
29
|
const [{ user }] = useSession()
|
|
29
30
|
const [{ parseDate }] = useUtils()
|
|
30
|
-
|
|
31
|
+
const theme = useTheme()
|
|
31
32
|
const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
|
|
32
33
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
33
34
|
|
|
@@ -61,7 +62,9 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
return (
|
|
64
|
-
|
|
65
|
+
<Container
|
|
66
|
+
pdng={Platform.OS === 'ios' ? '10px' : '0'}
|
|
67
|
+
>
|
|
65
68
|
<NavBar
|
|
66
69
|
title={t('SESSIONS', 'Sessions')}
|
|
67
70
|
titleAlign={'center'}
|
|
@@ -77,11 +80,11 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
77
80
|
<SessionItem key={i}>
|
|
78
81
|
<Placeholder Animation={Fade}>
|
|
79
82
|
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
80
|
-
<View style={{ flex: 1}}>
|
|
83
|
+
<View style={{ flex: 1 }}>
|
|
81
84
|
<PlaceholderLine width={40} />
|
|
82
85
|
<PlaceholderLine width={40} />
|
|
83
86
|
</View>
|
|
84
|
-
<PlaceholderLine width={5}/>
|
|
87
|
+
<PlaceholderLine width={5} />
|
|
85
88
|
</View>
|
|
86
89
|
</Placeholder>
|
|
87
90
|
</SessionItem>
|
|
@@ -120,7 +123,7 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
120
123
|
style={{ borderRadius: 7.6, marginTop: 20 }}
|
|
121
124
|
/>
|
|
122
125
|
</SessionsWrapper>
|
|
123
|
-
|
|
126
|
+
) : (
|
|
124
127
|
<OText>{t('YOU_DONT_HAVE_ANY_SESSIONS', 'You don\'t have any sessions')}</OText>
|
|
125
128
|
)
|
|
126
129
|
)}
|
|
@@ -147,7 +150,7 @@ export const SessionsUI = (props: SessionsParams) => {
|
|
|
147
150
|
onCancel={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
148
151
|
onClose={() => setConfirm({ ...confirm, open: false, title: null })}
|
|
149
152
|
/>
|
|
150
|
-
|
|
153
|
+
</Container>
|
|
151
154
|
)
|
|
152
155
|
}
|
|
153
156
|
|
|
@@ -84,9 +84,13 @@ const SingleOrderCardUI = (props: SingleOrderCardParams) => {
|
|
|
84
84
|
marginRight: 2,
|
|
85
85
|
},
|
|
86
86
|
reorderLoading: {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
height: 23,
|
|
88
|
+
paddingLeft: 20,
|
|
89
|
+
paddingRight: 20,
|
|
90
|
+
borderRadius: 23,
|
|
91
|
+
shadowOpacity: 0,
|
|
92
|
+
backgroundColor: theme.colors.primary,
|
|
93
|
+
borderWidth: 0,
|
|
90
94
|
},
|
|
91
95
|
reorderbutton: {
|
|
92
96
|
height: 23,
|
|
@@ -183,8 +187,6 @@ const SingleOrderCardUI = (props: SingleOrderCardParams) => {
|
|
|
183
187
|
|
|
184
188
|
const handleOriginalReorder = () => {
|
|
185
189
|
setConfirm({ ...confirm, open: false, title: null })
|
|
186
|
-
setReorderSelected(order?.id);
|
|
187
|
-
handleReorder && handleReorder(order?.id);
|
|
188
190
|
}
|
|
189
191
|
|
|
190
192
|
return (
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
import { OrderSummary } from '../OrderSummary';
|
|
22
22
|
import { ScrollView } from 'react-native-gesture-handler';
|
|
23
23
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
24
|
-
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
25
24
|
|
|
26
25
|
const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
27
26
|
const {
|
|
@@ -166,17 +165,10 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
166
165
|
const UpsellingContent = () => {
|
|
167
166
|
return (
|
|
168
167
|
<>
|
|
169
|
-
<View style={{ ...styles.headerItem, flex: 1, marginTop: Platform.OS == 'ios' ? 35 :
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
onClick={() => onGoBack()}
|
|
174
|
-
icon={AntDesignIcon}
|
|
175
|
-
iconProps={{
|
|
176
|
-
name: 'arrowleft',
|
|
177
|
-
size: 26
|
|
178
|
-
}}
|
|
179
|
-
/>
|
|
168
|
+
<View style={{ ...styles.headerItem, flex: 1, marginTop: Platform.OS == 'ios' ? 35 : 14 }}>
|
|
169
|
+
<TouchableOpacity onPress={() => onGoBack()} style={styles.btnBackArrow}>
|
|
170
|
+
<OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
|
|
171
|
+
</TouchableOpacity>
|
|
180
172
|
</View>
|
|
181
173
|
<ScrollView style={{ marginTop: 10, marginBottom: props.isPage ? 40 : bottom + (Platform.OS == 'ios' ? 96 : 130) }} showsVerticalScrollIndicator={false}>
|
|
182
174
|
{productsList.length > 0 &&
|