ordering-ui-react-native 0.16.49 → 0.16.52
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/ReviewProducts/index.tsx +11 -0
- package/src/components/SingleProductReview/index.tsx +1 -1
- package/themes/original/index.tsx +6 -0
- package/themes/original/src/components/BusinessController/index.tsx +12 -4
- package/themes/original/src/components/BusinessProductsList/index.tsx +1 -0
- package/themes/original/src/components/BusinessProductsListing/index.tsx +4 -4
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +36 -24
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +3 -2
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +27 -24
- package/themes/original/src/components/BusinessesListing/index.tsx +99 -25
- package/themes/original/src/components/ProductForm/index.tsx +481 -481
- package/themes/original/src/components/ProductForm/styles.tsx +5 -1
- package/themes/original/src/components/Reviews/ReviewDriver/index.tsx +301 -0
- package/themes/original/src/components/Reviews/ReviewDriver/styles.tsx +39 -0
- package/themes/original/src/components/Reviews/ReviewOrder/index.tsx +326 -0
- package/themes/original/src/components/Reviews/ReviewOrder/styles.tsx +53 -0
- package/themes/original/src/components/Reviews/ReviewProducts/index.tsx +101 -0
- package/themes/original/src/components/Reviews/ReviewProducts/styles.tsx +17 -0
- package/themes/original/src/components/Reviews/index.tsx +9 -0
- package/themes/original/src/components/ServiceForm/index.tsx +15 -5
- package/themes/original/src/components/SignupForm/index.tsx +26 -24
- package/themes/original/src/components/SingleProductCard/index.tsx +3 -2
- package/themes/original/src/components/shared/OBottomPopup.tsx +26 -7
- package/themes/original/src/types/index.tsx +26 -20
package/package.json
CHANGED
|
@@ -61,6 +61,17 @@ const ReviewProductsUI = (props: ReviewProductParams) => {
|
|
|
61
61
|
}
|
|
62
62
|
}, [formState])
|
|
63
63
|
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
const _changes = order?.products.map(product => {
|
|
66
|
+
return {
|
|
67
|
+
product_id: product?.product_id,
|
|
68
|
+
comment: '',
|
|
69
|
+
qualification: 5
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
handleChangeFormState(_changes)
|
|
73
|
+
}, [])
|
|
74
|
+
|
|
64
75
|
return (
|
|
65
76
|
<>
|
|
66
77
|
<ReviewProductsContainer>
|
|
@@ -69,7 +69,7 @@ export const SingleProductReview = (props: SingleProductReviewParams) => {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
useEffect(() => {
|
|
72
|
-
if (comments?.length === 0 && !extraComment
|
|
72
|
+
if (comments?.length === 0 && !extraComment) return
|
|
73
73
|
let _comments = ''
|
|
74
74
|
if (comments.length > 0) {
|
|
75
75
|
comments.map(comment => (_comments += comment.content + '. '))
|
|
@@ -29,6 +29,9 @@ import { UserProfileForm } from './src/components/UserProfileForm';
|
|
|
29
29
|
import { ReviewOrder } from './src/components/ReviewOrder';
|
|
30
30
|
import { ReviewProducts } from './src/components/ReviewProducts';
|
|
31
31
|
import { ReviewDriver } from './src/components/ReviewDriver';
|
|
32
|
+
import { ReviewOrder as ReviewOrderModal } from './src/components/Reviews/ReviewOrder';
|
|
33
|
+
import { ReviewProducts as ReviewProductsModal } from './src/components/Reviews/ReviewProducts';
|
|
34
|
+
import { ReviewDriver as ReviewDriverModal } from './src/components/Reviews/ReviewDriver';
|
|
32
35
|
import { UserProfile } from './src/components/UserProfile';
|
|
33
36
|
import { MessageListing } from './src/components/MessageListing';
|
|
34
37
|
import { Messages } from './src/components/Messages';
|
|
@@ -186,6 +189,9 @@ export {
|
|
|
186
189
|
ReviewOrder,
|
|
187
190
|
ReviewProducts,
|
|
188
191
|
ReviewDriver,
|
|
192
|
+
ReviewOrderModal,
|
|
193
|
+
ReviewProductsModal,
|
|
194
|
+
ReviewDriverModal,
|
|
189
195
|
BusinessMenuList,
|
|
190
196
|
UserProfile,
|
|
191
197
|
MessageListing,
|
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
useUtils,
|
|
5
5
|
useOrder,
|
|
6
6
|
useLanguage,
|
|
7
|
-
useConfig
|
|
7
|
+
useConfig,
|
|
8
|
+
useToast,
|
|
9
|
+
ToastType
|
|
8
10
|
} from 'ordering-components/native';
|
|
9
11
|
import { OIcon, OText } from '../shared';
|
|
10
12
|
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
@@ -44,14 +46,16 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
44
46
|
businessDeliveryTime,
|
|
45
47
|
businessPickupTime,
|
|
46
48
|
businessDistance,
|
|
47
|
-
handleFavoriteBusiness
|
|
49
|
+
handleFavoriteBusiness,
|
|
50
|
+
enableIntersection
|
|
48
51
|
} = props;
|
|
49
52
|
const [{ parsePrice, parseDistance, parseNumber, optimizeImage }] = useUtils();
|
|
53
|
+
const [, { showToast }] = useToast()
|
|
50
54
|
const [orderState] = useOrder();
|
|
51
55
|
const [configState] = useConfig();
|
|
52
56
|
const [, t] = useLanguage();
|
|
53
57
|
const theme = useTheme()
|
|
54
|
-
const [isIntersectionObserver, setIsIntersectionObserver] = useState(
|
|
58
|
+
const [isIntersectionObserver, setIsIntersectionObserver] = useState(!enableIntersection)
|
|
55
59
|
const styles = StyleSheet.create({
|
|
56
60
|
headerStyle: {
|
|
57
61
|
borderTopLeftRadius: 7.6,
|
|
@@ -121,7 +125,11 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
121
125
|
const handleBusinessClick = (selectedBusiness: any) => {
|
|
122
126
|
if (business?.open) handleClick && handleClick(selectedBusiness)
|
|
123
127
|
else {
|
|
124
|
-
|
|
128
|
+
if (configState?.configs?.preorder_status_enabled?.value === '1') {
|
|
129
|
+
navigation.navigate('BusinessPreorder', { business: selectedBusiness, handleBusinessClick: handleClick })
|
|
130
|
+
return
|
|
131
|
+
}
|
|
132
|
+
showToast(ToastType.Info, t('ERROR_ADD_PRODUCT_BUSINESS_CLOSED', 'The business is closed at the moment'));
|
|
125
133
|
}
|
|
126
134
|
}
|
|
127
135
|
|
|
@@ -239,6 +239,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
|
|
|
239
239
|
{products.sort((a: any, b: any) => a.rank - b.rank).map((product: any, i: any) => (
|
|
240
240
|
<SingleProductCard
|
|
241
241
|
key={`${product?.id}_${i}`}
|
|
242
|
+
enableIntersection
|
|
242
243
|
isSoldOut={product.inventoried && !product.quantity}
|
|
243
244
|
businessId={businessId}
|
|
244
245
|
product={product}
|
|
@@ -223,7 +223,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
223
223
|
}, [currentCart])
|
|
224
224
|
|
|
225
225
|
return (
|
|
226
|
-
|
|
226
|
+
<>
|
|
227
227
|
<ContainerSafeAreaView
|
|
228
228
|
style={{ flex: 1 }}
|
|
229
229
|
isOpenFiltProducts={isOpenFiltProducts}
|
|
@@ -366,7 +366,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
366
366
|
</>
|
|
367
367
|
)}
|
|
368
368
|
{!loading && business?.id && (
|
|
369
|
-
|
|
369
|
+
<IOScrollView rootMargin={{ top: 0, bottom: 0 }}>
|
|
370
370
|
<WrapContent
|
|
371
371
|
onLayout={(event: any) => setProductListLayout(event.nativeEvent.layout)}
|
|
372
372
|
>
|
|
@@ -397,7 +397,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
397
397
|
handleUpdateProducts={handleUpdateProducts}
|
|
398
398
|
/>
|
|
399
399
|
</WrapContent>
|
|
400
|
-
|
|
400
|
+
</IOScrollView>
|
|
401
401
|
)}
|
|
402
402
|
{loading && !error && (
|
|
403
403
|
<>
|
|
@@ -481,7 +481,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
481
481
|
onClose={() => setOpenService(false)}
|
|
482
482
|
/>
|
|
483
483
|
</OModal>
|
|
484
|
-
|
|
484
|
+
</>
|
|
485
485
|
)
|
|
486
486
|
}
|
|
487
487
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
3
|
+
import { IOScrollView } from 'react-native-intersection-observer'
|
|
3
4
|
import Geolocation from '@react-native-community/geolocation'
|
|
4
5
|
import { getTrackingStatus, requestTrackingPermission } from 'react-native-tracking-transparency'
|
|
5
6
|
import {
|
|
@@ -319,7 +320,15 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
319
320
|
</MomentWrapper>
|
|
320
321
|
<View style={styles.wrapperOrderOptions}>
|
|
321
322
|
<WrapMomentOption onPress={() => navigation.navigate('OrderTypes', { configTypes: configTypes, setOrderTypeValue })}>
|
|
322
|
-
<OText
|
|
323
|
+
<OText
|
|
324
|
+
size={12}
|
|
325
|
+
numberOfLines={1}
|
|
326
|
+
ellipsizeMode={'tail'}
|
|
327
|
+
color={theme.colors.textSecondary}
|
|
328
|
+
style={{ textAlign: 'left' }}
|
|
329
|
+
>
|
|
330
|
+
{t(getTypesText(orderTypeValue || orderState?.options?.type || 1), 'Delivery')}
|
|
331
|
+
</OText>
|
|
323
332
|
<OIcon
|
|
324
333
|
src={theme.images.general.arrow_down}
|
|
325
334
|
width={10}
|
|
@@ -460,29 +469,32 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
460
469
|
)}
|
|
461
470
|
/>
|
|
462
471
|
)}
|
|
463
|
-
|
|
464
|
-
(
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
472
|
+
<IOScrollView>
|
|
473
|
+
{businessesList.businesses?.map(
|
|
474
|
+
(business: any, i: number) => (
|
|
475
|
+
<BusinessController
|
|
476
|
+
key={`${business.id}_` + i}
|
|
477
|
+
enableIntersection
|
|
478
|
+
business={business}
|
|
479
|
+
isBusinessOpen={business.open}
|
|
480
|
+
handleCustomClick={handleBusinessClick}
|
|
481
|
+
orderType={orderState?.options?.type}
|
|
482
|
+
navigation={navigation}
|
|
483
|
+
businessHeader={business?.header}
|
|
484
|
+
businessFeatured={business?.featured}
|
|
485
|
+
businessLogo={business?.logo}
|
|
486
|
+
businessReviews={business?.reviews}
|
|
487
|
+
businessDeliveryPrice={business?.delivery_price}
|
|
488
|
+
businessDeliveryTime={business?.delivery_time}
|
|
489
|
+
businessPickupTime={business?.pickup_time}
|
|
490
|
+
businessDistance={business?.distance}
|
|
491
|
+
handleUpdateBusinessList={handleUpdateBusinessList}
|
|
492
|
+
favoriteIds={favoriteIds}
|
|
493
|
+
setFavoriteIds={setFavoriteIds}
|
|
494
|
+
/>
|
|
495
|
+
)
|
|
496
|
+
)}
|
|
497
|
+
</IOScrollView>
|
|
486
498
|
{businessesList.loading && (
|
|
487
499
|
<>
|
|
488
500
|
{[
|
|
@@ -43,8 +43,9 @@ export const WrapMomentOption = styled.TouchableOpacity`
|
|
|
43
43
|
font-size: 12px;
|
|
44
44
|
max-width: 240px;
|
|
45
45
|
height: 26px;
|
|
46
|
+
width: 130px;
|
|
46
47
|
align-items: center;
|
|
47
|
-
justify-content:
|
|
48
|
+
justify-content: space-between;
|
|
48
49
|
padding-horizontal: 8px;
|
|
49
50
|
flex-direction: row;
|
|
50
51
|
margin-end: 12px;
|
|
@@ -84,7 +85,7 @@ export const FarAwayMessage = styled.View`
|
|
|
84
85
|
`
|
|
85
86
|
|
|
86
87
|
export const SearchBarWrapper = styled.View`
|
|
87
|
-
width:
|
|
88
|
+
width: 130px;
|
|
88
89
|
`
|
|
89
90
|
|
|
90
91
|
export const MomentWrapper = styled.View`
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
3
3
|
import Geolocation from '@react-native-community/geolocation'
|
|
4
|
+
import { IOScrollView } from 'react-native-intersection-observer'
|
|
4
5
|
import { getTrackingStatus, requestTrackingPermission } from 'react-native-tracking-transparency'
|
|
5
6
|
import {
|
|
6
7
|
View,
|
|
@@ -162,7 +163,6 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
162
163
|
const hasMore = !(
|
|
163
164
|
paginationProps.totalPages === paginationProps.currentPage
|
|
164
165
|
);
|
|
165
|
-
|
|
166
166
|
if (y + PIXELS_TO_SCROLL > height && !businessesList.loading && hasMore) {
|
|
167
167
|
getBusinesses();
|
|
168
168
|
}
|
|
@@ -430,29 +430,32 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
430
430
|
)}
|
|
431
431
|
/>
|
|
432
432
|
)}
|
|
433
|
-
|
|
434
|
-
(
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
433
|
+
<IOScrollView>
|
|
434
|
+
{businessesList.businesses?.map(
|
|
435
|
+
(business: any, i: number) => (
|
|
436
|
+
<BusinessController
|
|
437
|
+
key={`${business.id}_` + i}
|
|
438
|
+
enableIntersection
|
|
439
|
+
business={business}
|
|
440
|
+
isBusinessOpen={business.open}
|
|
441
|
+
handleCustomClick={handleBusinessClick}
|
|
442
|
+
orderType={orderState?.options?.type}
|
|
443
|
+
navigation={navigation}
|
|
444
|
+
businessHeader={business?.header}
|
|
445
|
+
businessFeatured={business?.featured}
|
|
446
|
+
businessLogo={business?.logo}
|
|
447
|
+
businessReviews={business?.reviews}
|
|
448
|
+
businessDeliveryPrice={business?.delivery_price}
|
|
449
|
+
businessDeliveryTime={business?.delivery_time}
|
|
450
|
+
businessPickupTime={business?.pickup_time}
|
|
451
|
+
businessDistance={business?.distance}
|
|
452
|
+
handleUpdateBusinessList={handleUpdateBusinessList}
|
|
453
|
+
favoriteIds={favoriteIds}
|
|
454
|
+
setFavoriteIds={setFavoriteIds}
|
|
455
|
+
/>
|
|
456
|
+
)
|
|
457
|
+
)}
|
|
458
|
+
</IOScrollView>
|
|
456
459
|
{businessesList.loading && (
|
|
457
460
|
<>
|
|
458
461
|
{[
|
|
@@ -1,51 +1,125 @@
|
|
|
1
1
|
|
|
2
2
|
import React, { useState, useEffect } from 'react'
|
|
3
|
-
import { useOrder, useSession } from 'ordering-components/native';
|
|
3
|
+
import { useOrder, useSession, useLanguage } from 'ordering-components/native';
|
|
4
4
|
|
|
5
5
|
import { useTheme } from 'styled-components/native'
|
|
6
|
-
import { IOScrollView } from 'react-native-intersection-observer'
|
|
7
6
|
import { BusinessesListing as OriginalBusinessListing } from './Layout/Original'
|
|
8
7
|
import { BusinessesListing as AppointmentBusinessListing } from './Layout/Appointment'
|
|
8
|
+
import { OBottomPopup } from '../shared';
|
|
9
|
+
import { ReviewOrderModal, ReviewProductsModal, ReviewDriverModal } from '../Reviews'
|
|
9
10
|
|
|
10
11
|
export const BusinessesListing = (props: any) => {
|
|
11
12
|
const theme = useTheme()
|
|
13
|
+
const [, t] = useLanguage();
|
|
12
14
|
const layout = theme?.layout?.businessListing?.layout?.type || 'original'
|
|
13
15
|
const [{ auth }] = useSession()
|
|
14
16
|
const [, { getLastOrderHasNoReview }] = useOrder();
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
)
|
|
34
|
-
}
|
|
17
|
+
|
|
18
|
+
const [lastOrderReview, setLastOrderReview] = useState({
|
|
19
|
+
isReviewOpen: false,
|
|
20
|
+
order: {
|
|
21
|
+
id: 0,
|
|
22
|
+
business_id: 0,
|
|
23
|
+
business_name: '',
|
|
24
|
+
delivery_datetime: '',
|
|
25
|
+
logo: '',
|
|
26
|
+
driver: null,
|
|
27
|
+
products: [],
|
|
28
|
+
review: null,
|
|
29
|
+
user_review: null
|
|
30
|
+
},
|
|
31
|
+
reviewStatus: { order: false, product: false, driver: false },
|
|
32
|
+
reviewed: { isOrderReviewed: false, isProductReviewed: false, isDriverReviewed: false }
|
|
33
|
+
})
|
|
35
34
|
|
|
36
35
|
const _getLastOrderHasNoReview = async () => {
|
|
37
36
|
const lastOrderHasNoReview = await getLastOrderHasNoReview()
|
|
38
37
|
lastOrderHasNoReview && handleOrderReview(lastOrderHasNoReview)
|
|
39
38
|
}
|
|
40
39
|
|
|
40
|
+
const handleOrderReview = (order: any) => {
|
|
41
|
+
setLastOrderReview({
|
|
42
|
+
isReviewOpen: true,
|
|
43
|
+
order: {
|
|
44
|
+
id: order?.id,
|
|
45
|
+
business_id: order?.business_id,
|
|
46
|
+
business_name: order?.business?.name,
|
|
47
|
+
delivery_datetime: order?.delivery_datetime,
|
|
48
|
+
logo: order.business?.logo,
|
|
49
|
+
driver: order?.driver,
|
|
50
|
+
products: order?.products,
|
|
51
|
+
review: order?.review,
|
|
52
|
+
user_review: order?.user_review
|
|
53
|
+
},
|
|
54
|
+
reviewStatus: { order: true, product: false, driver: false },
|
|
55
|
+
reviewed: { isOrderReviewed: false, isProductReviewed: false, isDriverReviewed: false }
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const handleCloseReivew = () => {
|
|
60
|
+
setLastOrderReview({
|
|
61
|
+
...lastOrderReview,
|
|
62
|
+
isReviewOpen: false,
|
|
63
|
+
reviewStatus: { order: false, product: false, driver: false }
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const setIsReviewed = (reviewType: string) => {
|
|
68
|
+
const _reviewStatus = { ...lastOrderReview?.reviewed }
|
|
69
|
+
setLastOrderReview({
|
|
70
|
+
...lastOrderReview,
|
|
71
|
+
reviewed: { ..._reviewStatus, [reviewType]: true }
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const closeReviewOrder = () => {
|
|
76
|
+
if (!lastOrderReview?.reviewed?.isProductReviewed) setLastOrderReview({ ...lastOrderReview, reviewStatus: { order: false, product: true, driver: false } })
|
|
77
|
+
else if (lastOrderReview?.order?.driver && !lastOrderReview?.order?.user_review && !lastOrderReview?.reviewed?.isDriverReviewed) setLastOrderReview({ ...lastOrderReview, reviewStatus: { order: false, product: false, driver: true } })
|
|
78
|
+
else handleCloseReivew()
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const closeReviewProduct = () => {
|
|
82
|
+
if (lastOrderReview?.order?.driver && !lastOrderReview?.order?.user_review && !lastOrderReview?.reviewed?.isDriverReviewed) setLastOrderReview({ ...lastOrderReview, reviewStatus: { order: false, product: false, driver: true } })
|
|
83
|
+
else {
|
|
84
|
+
setIsReviewed('isDriverReviewed')
|
|
85
|
+
handleCloseReivew()
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
41
89
|
useEffect(() => {
|
|
42
90
|
auth && _getLastOrderHasNoReview()
|
|
43
91
|
}, [auth])
|
|
44
92
|
|
|
45
93
|
return (
|
|
46
|
-
|
|
94
|
+
<>
|
|
47
95
|
{(layout === 'original') && <OriginalBusinessListing {...props} />}
|
|
48
96
|
{(layout === 'appointment') && <AppointmentBusinessListing {...props} />}
|
|
49
|
-
|
|
97
|
+
|
|
98
|
+
{lastOrderReview?.isReviewOpen && (
|
|
99
|
+
<OBottomPopup
|
|
100
|
+
open={lastOrderReview?.isReviewOpen}
|
|
101
|
+
onClose={handleCloseReivew}
|
|
102
|
+
title={lastOrderReview?.order
|
|
103
|
+
? (lastOrderReview?.reviewStatus?.order
|
|
104
|
+
? t('HEY', 'Hey! ') + t('HOW_WAS_YOUR_ORDER', 'How was your order?')
|
|
105
|
+
: (lastOrderReview?.reviewStatus?.product
|
|
106
|
+
? t('REVIEW_PRODUCT', 'Review Product')
|
|
107
|
+
: t('REVIEW_DRIVER', 'Review Driver')))
|
|
108
|
+
: t('LOADING', 'Loading...')}
|
|
109
|
+
bottomContainerStyle={{ height: 'auto' }}
|
|
110
|
+
titleStyle={{ textAlign: 'center' }}
|
|
111
|
+
closeIcon={theme.images.general.close}
|
|
112
|
+
>
|
|
113
|
+
{
|
|
114
|
+
lastOrderReview?.reviewStatus?.order
|
|
115
|
+
? <ReviewOrderModal order={lastOrderReview?.order} closeReviewOrder={closeReviewOrder} skipReview={handleCloseReivew} setIsReviewed={() => setIsReviewed('isOrderReviewed')} />
|
|
116
|
+
: (lastOrderReview?.reviewStatus?.product
|
|
117
|
+
? <ReviewProductsModal order={lastOrderReview?.order} closeReviewProduct={closeReviewProduct} setIsProductReviewed={() => setIsReviewed('isProductReviewed')} />
|
|
118
|
+
: <ReviewDriverModal order={lastOrderReview?.order} closeReviewDriver={handleCloseReivew} setIsDriverReviewed={() => setIsReviewed('isDriverReviewed')} />)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
</OBottomPopup>
|
|
122
|
+
)}
|
|
123
|
+
</>
|
|
50
124
|
)
|
|
51
|
-
}
|
|
125
|
+
}
|