ordering-ui-react-native 0.21.50 → 0.21.51-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 +8 -8
- package/src/DeliveryApp.tsx +43 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/PaymentOptionsWebView/index.tsx +1 -0
- package/src/components/StripeMethodForm/index.tsx +6 -4
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/types/index.tsx +3 -1
- package/themes/business/index.tsx +4 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +4 -3
- package/themes/business/src/components/BusinessController/index.tsx +19 -17
- package/themes/business/src/components/BusinessProductList/ProductList.tsx +72 -27
- package/themes/business/src/components/BusinessProductList/index.tsx +57 -25
- package/themes/business/src/components/DriverMap/index.tsx +36 -23
- package/themes/business/src/components/GoogleMap/index.tsx +15 -8
- package/themes/business/src/components/Home/index.tsx +5 -1
- package/themes/business/src/components/LanguageSelector/index.tsx +1 -2
- package/themes/business/src/components/LanguageSelector/lang_country.json +515 -70
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/MapView/index.tsx +30 -15
- package/themes/business/src/components/NewOrderNotification/index.tsx +66 -26
- package/themes/business/src/components/OrderDetails/Business.tsx +52 -2
- package/themes/business/src/components/OrderDetails/Delivery.tsx +42 -23
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +68 -61
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +40 -20
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
- package/themes/business/src/components/OrderSummary/index.tsx +240 -76
- package/themes/business/src/components/OrdersOption/index.tsx +263 -135
- package/themes/business/src/components/PhoneInputNumber/index.tsx +8 -5
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +37 -40
- package/themes/business/src/components/PreviousOrders/OrderList.tsx +1 -1
- package/themes/business/src/components/PreviousOrders/index.tsx +5 -3
- package/themes/business/src/components/PreviousOrders/styles.tsx +10 -0
- package/themes/business/src/components/PrinterEdition/index.tsx +363 -0
- package/themes/business/src/components/PrinterEdition/styles.tsx +61 -0
- package/themes/business/src/components/PrinterSettings/index.tsx +267 -0
- package/themes/business/src/components/PrinterSettings/styles.tsx +30 -0
- package/themes/business/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/business/src/components/ReviewCustomer/index.tsx +2 -0
- package/themes/business/src/components/SearchBar/index.tsx +2 -1
- package/themes/business/src/components/Sessions/index.tsx +187 -0
- package/themes/business/src/components/Sessions/styles.tsx +20 -0
- package/themes/business/src/components/StoresList/index.tsx +5 -3
- package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
- package/themes/business/src/components/UserProfileForm/index.tsx +106 -54
- package/themes/business/src/components/WebsocketStatus/index.tsx +2 -2
- package/themes/business/src/components/shared/OInput.tsx +2 -0
- package/themes/business/src/components/shared/OTextarea.tsx +8 -9
- package/themes/business/src/hooks/useLocation.tsx +5 -4
- package/themes/business/src/types/index.tsx +23 -5
- package/themes/business/src/utils/index.tsx +5 -0
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/Checkout/index.tsx +6 -0
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +8 -10
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/original/index.tsx +6 -2
- package/themes/original/src/components/AddressDetails/index.tsx +20 -10
- package/themes/original/src/components/AddressForm/index.tsx +41 -15
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +18 -4
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/AnalyticsSegment/index.tsx +6 -6
- package/themes/original/src/components/AppleLogin/index.tsx +4 -4
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +7 -10
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +18 -10
- package/themes/original/src/components/BusinessController/styles.tsx +8 -7
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +4 -3
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchFooter.tsx +317 -0
- package/themes/original/src/components/BusinessListingSearch/BusinessSearchHeader.tsx +96 -0
- package/themes/original/src/components/BusinessListingSearch/index.tsx +47 -358
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
- package/themes/original/src/components/BusinessPreorder/index.tsx +4 -3
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsList/index.tsx +1 -1
- package/themes/original/src/components/BusinessProductsList/styles.tsx +0 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +30 -18
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +2 -2
- package/themes/original/src/components/BusinessReviews/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/styles.tsx +5 -5
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListFooter.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +7 -7
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +2 -2
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/index.tsx +0 -1
- package/themes/original/src/components/Cart/index.tsx +30 -9
- package/themes/original/src/components/CartContent/index.tsx +96 -58
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +144 -62
- package/themes/original/src/components/Checkout/styles.tsx +17 -0
- package/themes/original/src/components/CitiesControl/styles.tsx +1 -1
- package/themes/original/src/components/DatePicker/index.tsx +18 -2
- package/themes/original/src/components/Favorite/index.tsx +9 -9
- package/themes/original/src/components/Favorite/styles.tsx +0 -2
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +5 -0
- package/themes/original/src/components/GPSButton/index.tsx +1 -1
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/index.tsx +64 -0
- package/themes/original/src/components/GiftCard/GiftCardOrdersList/styles.tsx +8 -0
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/RedeemGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SendGiftCard/index.tsx +2 -2
- package/themes/original/src/components/GiftCard/SendGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/SingleGiftCard/index.tsx +101 -0
- package/themes/original/src/components/GiftCard/SingleGiftCard/styles.tsx +4 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/index.tsx +83 -0
- package/themes/original/src/components/GiftCard/VerticalGiftCardOrdersLayout/styles.tsx +9 -0
- package/themes/original/src/components/GoogleMap/index.tsx +39 -18
- package/themes/original/src/components/Help/index.tsx +7 -0
- package/themes/original/src/components/HelpAccountAndPayment/index.tsx +5 -0
- package/themes/original/src/components/HelpGuide/index.tsx +5 -0
- package/themes/original/src/components/HelpOrder/index.tsx +5 -0
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +2 -2
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +3 -8
- package/themes/original/src/components/LoginForm/Otp/index.tsx +4 -16
- package/themes/original/src/components/LoginForm/index.tsx +9 -3
- package/themes/original/src/components/MessageListing/index.tsx +6 -0
- package/themes/original/src/components/Messages/index.tsx +8 -7
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +19 -4
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +7 -3
- package/themes/original/src/components/MultiCheckout/index.tsx +126 -61
- package/themes/original/src/components/MultiCheckout/styles.tsx +17 -0
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +20 -15
- package/themes/original/src/components/MyOrders/index.tsx +28 -28
- package/themes/original/src/components/NavBar/index.tsx +5 -0
- package/themes/original/src/components/NetworkError/index.tsx +2 -3
- package/themes/original/src/components/NetworkError/styles.tsx +2 -2
- package/themes/original/src/components/Notifications/index.tsx +9 -8
- package/themes/original/src/components/Notifications/styles.tsx +0 -1
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +1 -1
- package/themes/original/src/components/OrderDetails/index.tsx +701 -662
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -8
- package/themes/original/src/components/OrderProgress/index.tsx +22 -3
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +3 -1
- package/themes/original/src/components/OrderTypeSelector/index.tsx +10 -6
- package/themes/original/src/components/OrdersOption/PreviousBusinessOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/PreviousProductsOrdered/styles.tsx +1 -1
- package/themes/original/src/components/OrdersOption/index.tsx +3 -5
- package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/original/src/components/PaymentOptionCard/index.tsx +4 -2
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +56 -56
- package/themes/original/src/components/PaymentOptions/index.tsx +47 -4
- package/themes/original/src/components/PreviousOrders/index.tsx +2 -0
- package/themes/original/src/components/ProductForm/ActionButton.tsx +122 -0
- package/themes/original/src/components/ProductForm/ExtraOptions.tsx +56 -0
- package/themes/original/src/components/ProductForm/index.tsx +170 -252
- package/themes/original/src/components/ProductItemAccordion/index.tsx +55 -44
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +112 -91
- package/themes/original/src/components/ProfessionalProfile/styles.tsx +3 -3
- package/themes/original/src/components/Promotions/index.tsx +13 -11
- package/themes/original/src/components/Promotions/styles.tsx +0 -2
- package/themes/original/src/components/ReviewDriver/index.tsx +5 -0
- package/themes/original/src/components/ReviewDriver/styles.tsx +1 -1
- package/themes/original/src/components/ReviewOrder/index.tsx +5 -0
- package/themes/original/src/components/ReviewOrder/styles.tsx +1 -1
- package/themes/original/src/components/ReviewProducts/index.tsx +5 -0
- package/themes/original/src/components/ReviewProducts/styles.tsx +1 -1
- package/themes/original/src/components/ServiceForm/index.tsx +1 -1
- package/themes/original/src/components/ServiceForm/styles.tsx +4 -4
- package/themes/original/src/components/Sessions/index.tsx +5 -0
- package/themes/original/src/components/SignupForm/index.tsx +67 -59
- package/themes/original/src/components/SingleOrderCard/index.tsx +1 -1
- package/themes/original/src/components/SingleProductCard/index.tsx +4 -3
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -3
- package/themes/original/src/components/StripeCardsList/index.tsx +12 -35
- package/themes/original/src/components/StripeElementsForm/index.tsx +79 -59
- package/themes/original/src/components/StripeElementsForm/naked.tsx +48 -1
- package/themes/original/src/components/UpsellingProducts/UpsellingContent.tsx +170 -0
- package/themes/original/src/components/UpsellingProducts/UpsellingLayout.tsx +91 -0
- package/themes/original/src/components/UpsellingProducts/index.tsx +15 -199
- package/themes/original/src/components/UpsellingProducts/styles.tsx +19 -0
- package/themes/original/src/components/UserFormDetails/index.tsx +100 -86
- package/themes/original/src/components/UserFormDetails/styles.tsx +7 -0
- package/themes/original/src/components/UserProfile/index.tsx +3 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +5 -0
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +7 -4
- package/themes/original/src/components/Wallets/styles.tsx +2 -1
- package/themes/original/src/components/WebsocketStatus/index.tsx +172 -0
- package/themes/original/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/original/src/components/shared/HeaderTitle.tsx +1 -1
- package/themes/original/src/components/shared/OButton.tsx +5 -5
- package/themes/original/src/components/shared/OInput.tsx +1 -4
- package/themes/original/src/components/shared/OModal.tsx +12 -14
- package/themes/original/src/layouts/Container.tsx +5 -3
- package/themes/original/src/types/index.tsx +6 -1
- package/themes/original/src/utils/index.tsx +12 -1
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useLanguage, useUtils, useEvent } from 'ordering-components/native';
|
|
3
|
+
import { useTheme } from 'styled-components/native';
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
|
+
import {
|
|
6
|
+
Placeholder,
|
|
7
|
+
PlaceholderLine,
|
|
8
|
+
Fade
|
|
9
|
+
} from 'rn-placeholder';
|
|
10
|
+
import FastImage from 'react-native-fast-image';
|
|
11
|
+
import { OText } from '../../shared'
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
CardContainer
|
|
15
|
+
} from './styles'
|
|
16
|
+
|
|
17
|
+
export const SingleGiftCard = (props: any) => {
|
|
18
|
+
const {
|
|
19
|
+
card,
|
|
20
|
+
isSkeleton,
|
|
21
|
+
onNavigationRedirect
|
|
22
|
+
} = props
|
|
23
|
+
|
|
24
|
+
const theme = useTheme()
|
|
25
|
+
const [, t] = useLanguage()
|
|
26
|
+
const [events] = useEvent()
|
|
27
|
+
const [{ parsePrice, optimizeImage, parseDate }] = useUtils()
|
|
28
|
+
|
|
29
|
+
const styles = StyleSheet.create({
|
|
30
|
+
logo: {
|
|
31
|
+
borderRadius: 8,
|
|
32
|
+
width: 64,
|
|
33
|
+
height: 64
|
|
34
|
+
},
|
|
35
|
+
innerContainer: {
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
marginBottom: 24
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const getGiftCardStatus = (status: string) => {
|
|
42
|
+
switch (status) {
|
|
43
|
+
case 'pending':
|
|
44
|
+
return t('PENDING', 'Pending')
|
|
45
|
+
case 'activated':
|
|
46
|
+
return t('REDEEMED', 'Redeemed')
|
|
47
|
+
default:
|
|
48
|
+
return status
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const handleClickGiftCardOrder = (card: any) => {
|
|
53
|
+
onNavigationRedirect?.('OrderDetails', { orderId: card.order_product?.order_id });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<CardContainer
|
|
58
|
+
activeOpacity={0.8}
|
|
59
|
+
onPress={() => handleClickGiftCardOrder(card)}
|
|
60
|
+
>
|
|
61
|
+
{isSkeleton ? (
|
|
62
|
+
<Placeholder style={{ marginBottom: 10 }} Animation={Fade}>
|
|
63
|
+
<View style={{ flexDirection: 'row' }}>
|
|
64
|
+
<View style={{ width: 64, marginRight: 14 }}>
|
|
65
|
+
<PlaceholderLine
|
|
66
|
+
width={100}
|
|
67
|
+
height={64}
|
|
68
|
+
style={{ marginRight: 10, marginBottom: 10 }}
|
|
69
|
+
/>
|
|
70
|
+
</View>
|
|
71
|
+
<Placeholder style={{ paddingTop: 5 }}>
|
|
72
|
+
<PlaceholderLine width={60} style={{ marginBottom: 6}} />
|
|
73
|
+
<PlaceholderLine width={40} style={{ marginBottom: 6 }} />
|
|
74
|
+
<PlaceholderLine width={20} style={{ marginBottom: 0 }} />
|
|
75
|
+
</Placeholder>
|
|
76
|
+
</View>
|
|
77
|
+
</Placeholder>
|
|
78
|
+
) : (
|
|
79
|
+
<View style={styles.innerContainer}>
|
|
80
|
+
<View>
|
|
81
|
+
<FastImage
|
|
82
|
+
style={styles.logo}
|
|
83
|
+
source={card?.order_product?.images ? {
|
|
84
|
+
uri: optimizeImage(card?.order_product?.images, 'h_86,c_limit')
|
|
85
|
+
} : theme?.images?.dummies?.businessLogo}
|
|
86
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
87
|
+
/>
|
|
88
|
+
</View>
|
|
89
|
+
<View style={{ flex: 1, marginLeft: 14 }}>
|
|
90
|
+
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
91
|
+
<OText size={12} lineHeight={18}>{card?.order_product?.name}</OText>
|
|
92
|
+
<OText size={12} lineHeight={18}>{parsePrice(card?.order_product?.price)}</OText>
|
|
93
|
+
</View>
|
|
94
|
+
<OText size={10} color={theme.colors.textSecondary} lineHeight={15}>{parseDate(card?.created_at)}</OText>
|
|
95
|
+
<OText size={10} color={theme.colors.primary}>{getGiftCardStatus(card?.status)}</OText>
|
|
96
|
+
</View>
|
|
97
|
+
</View>
|
|
98
|
+
)}
|
|
99
|
+
</CardContainer>
|
|
100
|
+
)
|
|
101
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { useLanguage, GiftCardOrdersList as GiftCardOrdersListController } from 'ordering-components/native';
|
|
3
|
+
import { useTheme } from 'styled-components/native';
|
|
4
|
+
import {
|
|
5
|
+
Placeholder,
|
|
6
|
+
PlaceholderLine,
|
|
7
|
+
Fade
|
|
8
|
+
} from 'rn-placeholder';
|
|
9
|
+
import { SingleGiftCard } from '../SingleGiftCard';
|
|
10
|
+
import { OButton, OText } from '../../shared';
|
|
11
|
+
import {
|
|
12
|
+
ProductsListContainer,
|
|
13
|
+
SingleGiftCardWrapper,
|
|
14
|
+
WrappButton
|
|
15
|
+
} from './styles'
|
|
16
|
+
|
|
17
|
+
const VerticalGiftCardOrdersLayoutUI = (props: any) => {
|
|
18
|
+
const {
|
|
19
|
+
giftCards,
|
|
20
|
+
paginationProps,
|
|
21
|
+
loadMoreOrders,
|
|
22
|
+
title,
|
|
23
|
+
setIsEmpty,
|
|
24
|
+
onNavigationRedirect
|
|
25
|
+
} = props
|
|
26
|
+
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
const [, t] = useLanguage()
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (giftCards.loading) return
|
|
32
|
+
if (giftCards.list?.length === 0) setIsEmpty(true)
|
|
33
|
+
}, [giftCards])
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<ProductsListContainer>
|
|
37
|
+
{
|
|
38
|
+
giftCards.loading ? (
|
|
39
|
+
<Placeholder Animation={Fade} style={{ marginVertical: 16 }}>
|
|
40
|
+
<PlaceholderLine width={30} height={16} />
|
|
41
|
+
</Placeholder>
|
|
42
|
+
) : giftCards.list?.length > 0 && (
|
|
43
|
+
<OText size={16} lineHeight={24} weight={'500'} color={theme.colors.textNormal} mBottom={24} style={{ marginTop: 24 }}>{title}</OText>
|
|
44
|
+
)}
|
|
45
|
+
{giftCards.list.map(card => (
|
|
46
|
+
<SingleGiftCardWrapper key={card.id}>
|
|
47
|
+
<SingleGiftCard
|
|
48
|
+
card={card}
|
|
49
|
+
onNavigationRedirect={onNavigationRedirect}
|
|
50
|
+
/>
|
|
51
|
+
</SingleGiftCardWrapper>
|
|
52
|
+
))}
|
|
53
|
+
{giftCards.loading && (
|
|
54
|
+
[...Array(10).keys()].map(i => (
|
|
55
|
+
<SingleGiftCardWrapper key={i}>
|
|
56
|
+
<SingleGiftCard
|
|
57
|
+
isSkeleton
|
|
58
|
+
/>
|
|
59
|
+
</SingleGiftCardWrapper>
|
|
60
|
+
))
|
|
61
|
+
)}
|
|
62
|
+
{paginationProps.totalPages && paginationProps.currentPage < paginationProps.totalPages && (
|
|
63
|
+
<WrappButton>
|
|
64
|
+
<OButton
|
|
65
|
+
onClick={loadMoreOrders}
|
|
66
|
+
text={t('LOAD_MORE_ORDERS', 'Load more orders')}
|
|
67
|
+
imgRightSrc={null}
|
|
68
|
+
textStyle={{ color: theme.colors.white }}
|
|
69
|
+
style={{ borderRadius: 7.6, shadowOpacity: 0 }}
|
|
70
|
+
/>
|
|
71
|
+
</WrappButton>
|
|
72
|
+
)}
|
|
73
|
+
</ProductsListContainer>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const VerticalGiftCardOrdersLayout = (props: any) => {
|
|
78
|
+
const giftCardsProps = {
|
|
79
|
+
...props,
|
|
80
|
+
UIComponent: VerticalGiftCardOrdersLayoutUI
|
|
81
|
+
}
|
|
82
|
+
return <GiftCardOrdersListController {...giftCardsProps} />
|
|
83
|
+
}
|
|
@@ -8,7 +8,6 @@ import Alert from '../../../../../src/providers/AlertProvider'
|
|
|
8
8
|
import { OIcon } from '../shared';
|
|
9
9
|
|
|
10
10
|
export const GoogleMap = (props: GoogleMapsParams) => {
|
|
11
|
-
|
|
12
11
|
const {
|
|
13
12
|
location,
|
|
14
13
|
handleChangeAddressMap,
|
|
@@ -21,7 +20,10 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
21
20
|
locations,
|
|
22
21
|
isIntGeoCoder,
|
|
23
22
|
businessZones,
|
|
24
|
-
delta
|
|
23
|
+
delta,
|
|
24
|
+
autoCompleteAddress,
|
|
25
|
+
setAutoCompleteAddress,
|
|
26
|
+
manualZoom
|
|
25
27
|
} = props
|
|
26
28
|
|
|
27
29
|
const [, t] = useLanguage()
|
|
@@ -59,7 +61,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
59
61
|
strokeWidth: 2
|
|
60
62
|
}
|
|
61
63
|
|
|
62
|
-
const geocodePosition = (pos: { latitude: number, longitude: number }, isMovingRegion
|
|
64
|
+
const geocodePosition = (pos: { latitude: number, longitude: number }, isMovingRegion?: boolean) => {
|
|
63
65
|
Geocoder.from({
|
|
64
66
|
latitude: pos.latitude,
|
|
65
67
|
longitude: pos.longitude
|
|
@@ -84,7 +86,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
84
86
|
}
|
|
85
87
|
handleChangeAddressMap && handleChangeAddressMap(address, details)
|
|
86
88
|
setSaveLocation && setSaveLocation(false)
|
|
87
|
-
if(!isMovingRegion){
|
|
89
|
+
if (!isMovingRegion) {
|
|
88
90
|
handleToggleMap && handleToggleMap()
|
|
89
91
|
}
|
|
90
92
|
} else {
|
|
@@ -95,7 +97,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
95
97
|
})
|
|
96
98
|
}
|
|
97
99
|
|
|
98
|
-
const validateResult = (curPos:
|
|
100
|
+
const validateResult = (curPos: any) => {
|
|
99
101
|
const loc1 = center
|
|
100
102
|
const loc2 = curPos
|
|
101
103
|
const distance = calculateDistance(loc1, loc2)
|
|
@@ -103,25 +105,33 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
103
105
|
if (!maxLimitLocation) {
|
|
104
106
|
geocodePosition(curPos)
|
|
105
107
|
setMarkerPosition(curPos)
|
|
106
|
-
|
|
108
|
+
if (!autoCompleteAddress) {
|
|
109
|
+
setRegion({ longitude: curPos?.longitude || 0, latitude: curPos?.latitude || 0, latitudeDelta: curPos?.latitudeDelta || 0.0010, longitudeDelta: curPos?.longitudeDelta || (delta ?? 0.0010) * ASPECT_RATIO })
|
|
110
|
+
} else {
|
|
111
|
+
setRegion({ longitude: curPos?.longitude, latitude: curPos?.latitude, latitudeDelta: delta ?? 0.0010, longitudeDelta: (delta ?? 0.0010) * ASPECT_RATIO })
|
|
112
|
+
}
|
|
107
113
|
return
|
|
108
114
|
}
|
|
109
115
|
|
|
110
116
|
const _maxLimitLocation = typeof maxLimitLocation === 'string' ? parseInt(maxLimitLocation, 10) : maxLimitLocation
|
|
111
117
|
|
|
112
118
|
if (distance <= _maxLimitLocation) {
|
|
113
|
-
if (!aproxEqual(curPos
|
|
119
|
+
if (!aproxEqual(curPos?.latitude, center.lat) || !aproxEqual(curPos?.longitude, center.lng)) {
|
|
114
120
|
geocodePosition(curPos, true)
|
|
115
121
|
}
|
|
116
122
|
setMarkerPosition(curPos)
|
|
117
|
-
|
|
123
|
+
if (!autoCompleteAddress) {
|
|
124
|
+
setRegion({ longitude: curPos?.longitude || 0, latitude: curPos?.latitude || 0, latitudeDelta: curPos?.latitudeDelta || 0.0010, longitudeDelta: curPos?.longitudeDelta || (delta ?? 0.0010) * ASPECT_RATIO })
|
|
125
|
+
} else {
|
|
126
|
+
setRegion({ longitude: curPos?.longitude, latitude: curPos?.latitude, latitudeDelta: delta ?? 0.0010, longitudeDelta: (delta ?? 0.0010) * ASPECT_RATIO })
|
|
127
|
+
}
|
|
118
128
|
} else {
|
|
119
129
|
setMapErrors && setMapErrors('ERROR_MAX_LIMIT_LOCATION')
|
|
120
130
|
setMarkerPosition({ latitude: center.lat, longitude: center.lng })
|
|
121
131
|
}
|
|
122
132
|
}
|
|
123
133
|
|
|
124
|
-
const aproxEqual = (n1
|
|
134
|
+
const aproxEqual = (n1: number, n2: number, epsilon = 0.000001) => {
|
|
125
135
|
return Math.abs(n1 - n2) < epsilon
|
|
126
136
|
}
|
|
127
137
|
|
|
@@ -182,11 +192,21 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
182
192
|
}, [isIntGeoCoder])
|
|
183
193
|
|
|
184
194
|
useEffect(() => {
|
|
185
|
-
|
|
186
|
-
...region,
|
|
195
|
+
const regionConfig = {
|
|
187
196
|
latitude: location?.lat,
|
|
188
197
|
longitude: location?.lng,
|
|
189
|
-
|
|
198
|
+
latitudeDelta: region?.latitudeDelta ?? delta ?? 0.0010,
|
|
199
|
+
longitudeDelta: region?.longitudeDelta ?? (delta ?? 0.0010) * ASPECT_RATIO
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
mapRef.current.animateToRegion(autoCompleteAddress
|
|
203
|
+
? regionConfig
|
|
204
|
+
: { ...region, ...regionConfig }
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
if (autoCompleteAddress) {
|
|
208
|
+
setAutoCompleteAddress && setAutoCompleteAddress(false)
|
|
209
|
+
}
|
|
190
210
|
}, [location])
|
|
191
211
|
|
|
192
212
|
useEffect(() => {
|
|
@@ -197,11 +217,12 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
197
217
|
|
|
198
218
|
useEffect(() => {
|
|
199
219
|
const interval = setInterval(() => {
|
|
200
|
-
if (mapRef.current && locations) {
|
|
220
|
+
if (mapRef.current && locations && !manualZoom) {
|
|
201
221
|
fitAllMarkers()
|
|
202
222
|
}
|
|
203
223
|
}, 1000)
|
|
204
224
|
if (locations) {
|
|
225
|
+
fitAllMarkers()
|
|
205
226
|
SETMARKERS(locations)
|
|
206
227
|
}
|
|
207
228
|
return () => clearInterval(interval)
|
|
@@ -213,7 +234,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
213
234
|
provider={PROVIDER_GOOGLE}
|
|
214
235
|
initialRegion={region}
|
|
215
236
|
style={styles.map}
|
|
216
|
-
onRegionChangeComplete={!readOnly ? (coordinates) => handleChangeRegion(coordinates) : () => { }}
|
|
237
|
+
onRegionChangeComplete={!readOnly ? (coordinates) => { handleChangeRegion(coordinates) } : () => { }}
|
|
217
238
|
zoomTapEnabled
|
|
218
239
|
zoomEnabled
|
|
219
240
|
zoomControlEnabled
|
|
@@ -249,7 +270,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
249
270
|
<React.Fragment key={i}>
|
|
250
271
|
{businessZone?.type === 2 && Array.isArray(businessZone?.data) && (
|
|
251
272
|
<Polygon
|
|
252
|
-
coordinates={businessZone?.data.map((item: any) => ({ latitude: item.lat, longitude: item.lng}))}
|
|
273
|
+
coordinates={businessZone?.data.map((item: any) => ({ latitude: item.lat, longitude: item.lng }))}
|
|
253
274
|
fillColor={fillStyles.fillColor}
|
|
254
275
|
strokeColor={fillStyles.strokeColor}
|
|
255
276
|
strokeWidth={fillStyles.strokeWidth}
|
|
@@ -257,7 +278,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
257
278
|
)}
|
|
258
279
|
{(businessZone.type === 1 && businessZone?.data?.center && businessZone?.data?.radio) && (
|
|
259
280
|
<Circle
|
|
260
|
-
center={{ latitude: businessZone?.data?.center.lat, longitude: businessZone?.data?.center.lng}}
|
|
281
|
+
center={{ latitude: businessZone?.data?.center.lat, longitude: businessZone?.data?.center.lng }}
|
|
261
282
|
radius={businessZone?.data.radio * 1000}
|
|
262
283
|
fillColor={fillStyles.fillColor}
|
|
263
284
|
strokeColor={fillStyles.strokeColor}
|
|
@@ -266,7 +287,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
266
287
|
)}
|
|
267
288
|
{(businessZone.type === 5 && businessZone?.data?.distance) && (
|
|
268
289
|
<Circle
|
|
269
|
-
center={{ latitude: center.lat, longitude: center.lng}}
|
|
290
|
+
center={{ latitude: center.lat, longitude: center.lng }}
|
|
270
291
|
radius={businessZone?.data.distance * units[businessZone?.data?.unit]}
|
|
271
292
|
fillColor={fillStyles.fillColor}
|
|
272
293
|
strokeColor={fillStyles.strokeColor}
|
|
@@ -275,7 +296,7 @@ export const GoogleMap = (props: GoogleMapsParams) => {
|
|
|
275
296
|
)}
|
|
276
297
|
</React.Fragment>
|
|
277
298
|
))}
|
|
278
|
-
</MapView>
|
|
299
|
+
</MapView >
|
|
279
300
|
<Alert
|
|
280
301
|
open={alertState.open}
|
|
281
302
|
onAccept={closeAlert}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
+
import { useTheme } from 'styled-components/native';
|
|
2
3
|
import { Platform, RefreshControl } from 'react-native'
|
|
3
4
|
import { HelpParams } from '../../types'
|
|
4
5
|
import { useLanguage } from 'ordering-components/native'
|
|
@@ -17,6 +18,7 @@ export const Help = (props: HelpParams) => {
|
|
|
17
18
|
navigation
|
|
18
19
|
} = props
|
|
19
20
|
const [, t] = useLanguage()
|
|
21
|
+
const theme = useTheme()
|
|
20
22
|
const [refreshing] = useState(false);
|
|
21
23
|
const [refresh, setRefresh] = useState(false)
|
|
22
24
|
|
|
@@ -46,6 +48,11 @@ export const Help = (props: HelpParams) => {
|
|
|
46
48
|
onActionLeft={goToBack}
|
|
47
49
|
showCall={false}
|
|
48
50
|
btnStyle={{ paddingLeft: 0 }}
|
|
51
|
+
buttonProps={{
|
|
52
|
+
bgColor: theme.colors.white,
|
|
53
|
+
borderColor: theme.colors.white,
|
|
54
|
+
textStyle: { color: theme.colors.btnFont }
|
|
55
|
+
}}
|
|
49
56
|
/>
|
|
50
57
|
<HelpSubItem
|
|
51
58
|
onPress={() => onRedirect('HelpOrder')}
|
|
@@ -37,6 +37,11 @@ export const HelpAccountAndPayment = (props: HelpAccountAndPaymentParams) => {
|
|
|
37
37
|
onActionLeft={goToBack}
|
|
38
38
|
btnStyle={{ paddingLeft: 0 }}
|
|
39
39
|
showCall={false}
|
|
40
|
+
buttonProps={{
|
|
41
|
+
bgColor: theme.colors.white,
|
|
42
|
+
borderColor: theme.colors.white,
|
|
43
|
+
textStyle: { color: theme.colors.btnFont }
|
|
44
|
+
}}
|
|
40
45
|
/>
|
|
41
46
|
<Content>
|
|
42
47
|
<OText mBottom={20}>
|
|
@@ -43,6 +43,11 @@ export const HelpGuide = (props: HelpGuideParams) => {
|
|
|
43
43
|
onActionLeft={goToBack}
|
|
44
44
|
btnStyle={{ paddingLeft: 0 }}
|
|
45
45
|
showCall={false}
|
|
46
|
+
buttonProps={{
|
|
47
|
+
bgColor: theme.colors.white,
|
|
48
|
+
borderColor: theme.colors.white,
|
|
49
|
+
textStyle: { color: theme.colors.btnFont }
|
|
50
|
+
}}
|
|
46
51
|
/>
|
|
47
52
|
<Content>
|
|
48
53
|
<OText mBottom={15}>
|
|
@@ -39,6 +39,11 @@ export const HelpOrder = (props: HelpOrderParams) => {
|
|
|
39
39
|
onActionLeft={goToBack}
|
|
40
40
|
btnStyle={{ paddingLeft: 0 }}
|
|
41
41
|
showCall={false}
|
|
42
|
+
buttonProps={{
|
|
43
|
+
bgColor: theme.colors.white,
|
|
44
|
+
borderColor: theme.colors.white,
|
|
45
|
+
textStyle: { color: theme.colors.btnFont }
|
|
46
|
+
}}
|
|
42
47
|
/>
|
|
43
48
|
<Content>
|
|
44
49
|
<OText mBottom={20}>
|
|
@@ -56,7 +56,7 @@ const HighestRatedBusinessesUI = (props: HighestRatedBusinessesParams) => {
|
|
|
56
56
|
showsHorizontalScrollIndicator={false}
|
|
57
57
|
nestedScrollEnabled
|
|
58
58
|
horizontal
|
|
59
|
-
style={{ height:
|
|
59
|
+
style={{ height: 325, paddingHorizontal: 20 }}
|
|
60
60
|
>
|
|
61
61
|
{[
|
|
62
62
|
...Array(10).keys()
|
|
@@ -162,4 +162,4 @@ export const HighestRatedBusinesses = (props: any) => {
|
|
|
162
162
|
};
|
|
163
163
|
|
|
164
164
|
return <BusinessesListingController {...highestRatedBusinessesProps} />;
|
|
165
|
-
};
|
|
165
|
+
};
|
|
@@ -18,12 +18,6 @@ export const Home = (props: any) => {
|
|
|
18
18
|
const unaddressedTypes = configs?.unaddressed_order_types_allowed?.value.split('|').map((value: any) => Number(value)) || []
|
|
19
19
|
const isAllowUnaddressOrderType = unaddressedTypes.includes(orderState?.options?.type)
|
|
20
20
|
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
if (isAllowUnaddressOrderType) {
|
|
23
|
-
onNavigationRedirect(!!businessSlug ? 'Business' : 'BusinessList')
|
|
24
|
-
}
|
|
25
|
-
}, [isAllowUnaddressOrderType])
|
|
26
|
-
|
|
27
21
|
return (
|
|
28
22
|
<View style={styles.container}>
|
|
29
23
|
<View>
|
|
@@ -62,13 +56,14 @@ export const Home = (props: any) => {
|
|
|
62
56
|
bgColor={theme.colors.primaryContrast}
|
|
63
57
|
borderColor={theme.colors.primaryContrast}
|
|
64
58
|
style={styles.buttons}
|
|
59
|
+
textStyle={{ color: 'black' }}
|
|
65
60
|
onClick={() => onNavigationRedirect('Signup')}
|
|
66
61
|
imgRightSrc={null}
|
|
67
62
|
/>
|
|
68
63
|
<TouchableOpacity
|
|
69
64
|
style={{ ...styles.textLink, marginTop: 12 }}
|
|
70
65
|
onPress={() =>
|
|
71
|
-
orderState?.options?.address?.address
|
|
66
|
+
orderState?.options?.address?.address || isAllowUnaddressOrderType
|
|
72
67
|
? onNavigationRedirect(!!businessSlug ? 'Business' : 'BusinessList', { isGuestUser: true })
|
|
73
68
|
: onNavigationRedirect('AddressForm', { isGuestUser: true })
|
|
74
69
|
}>
|
|
@@ -92,7 +87,7 @@ const styles = StyleSheet.create({
|
|
|
92
87
|
flex: 1,
|
|
93
88
|
alignItems: 'center',
|
|
94
89
|
justifyContent: 'space-between',
|
|
95
|
-
paddingHorizontal:
|
|
90
|
+
paddingHorizontal: 20,
|
|
96
91
|
},
|
|
97
92
|
logo: {
|
|
98
93
|
marginTop: 64,
|
|
@@ -40,19 +40,19 @@ export const Otp = (props: otpParams) => {
|
|
|
40
40
|
onSubmit()
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
const handleChangeCode = (code
|
|
43
|
+
const handleChangeCode = (code: string) => {
|
|
44
44
|
if (code?.length === pinCount) {
|
|
45
|
-
setCheckingCode(true)
|
|
45
|
+
setCheckingCode && setCheckingCode(true)
|
|
46
46
|
handleLoginOtp(code)
|
|
47
47
|
inputRef.current?.reset && inputRef.current.reset()
|
|
48
48
|
setTimeout(() => inputRef.current?.focus && inputRef.current.focus(), 100)
|
|
49
49
|
}
|
|
50
|
-
setOtpError(null)
|
|
50
|
+
setOtpError && setOtpError(null)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
const handleCloseOtp = () => {
|
|
54
54
|
setWillVerifyOtpState(false)
|
|
55
|
-
setOtpError(null)
|
|
55
|
+
setOtpError && setOtpError(null)
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
useEffect(() => {
|
|
@@ -108,18 +108,6 @@ export const Otp = (props: otpParams) => {
|
|
|
108
108
|
return (
|
|
109
109
|
<SafeAreaView style={{ flex: 1, backgroundColor: theme.colors.backgroundPage }}>
|
|
110
110
|
<OTPContainer>
|
|
111
|
-
<View
|
|
112
|
-
style={loginStyle.closeContainer}>
|
|
113
|
-
<TouchableOpacity onPress={() => handleCloseOtp()} style={loginStyle.wrapperIcon}>
|
|
114
|
-
<OIcon
|
|
115
|
-
src={theme.images.general.close}
|
|
116
|
-
width={22}
|
|
117
|
-
/>
|
|
118
|
-
</TouchableOpacity>
|
|
119
|
-
<OText size={22}>
|
|
120
|
-
{t('ENTER_VERIFICATION_CODE', 'Enter verification code')}
|
|
121
|
-
</OText>
|
|
122
|
-
</View>
|
|
123
111
|
<OText size={24}>
|
|
124
112
|
{formatSeconds(otpLeftTime)}
|
|
125
113
|
</OText>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from 'react';
|
|
2
|
-
import { StyleSheet, View, Keyboard, Modal } from 'react-native';
|
|
2
|
+
import { StyleSheet, View, Keyboard, Modal, Platform } from 'react-native';
|
|
3
3
|
import Spinner from 'react-native-loading-spinner-overlay';
|
|
4
4
|
import { useForm, Controller } from 'react-hook-form';
|
|
5
5
|
import { PhoneInputNumber } from '../PhoneInputNumber';
|
|
@@ -108,7 +108,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
108
108
|
|
|
109
109
|
const googleLoginEnabled = configs?.google_login_enabled?.value === '1' || !configs?.google_login_enabled?.enabled
|
|
110
110
|
const facebookLoginEnabled = configs?.facebook_login_enabled?.value === '1' || !configs?.facebook_login_enabled?.enabled
|
|
111
|
-
const appleLoginEnabled = configs?.apple_login_enabled?.value === '1' || !configs?.apple_login_enabled?.enabled
|
|
111
|
+
const appleLoginEnabled = Platform.OS === 'ios' && (configs?.apple_login_enabled?.value === '1' || !configs?.apple_login_enabled?.enabled)
|
|
112
112
|
|
|
113
113
|
const loginStyle = StyleSheet.create({
|
|
114
114
|
btnOutline: {
|
|
@@ -412,6 +412,11 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
412
412
|
btnStyle={{ paddingLeft: 0 }}
|
|
413
413
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
414
414
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
415
|
+
buttonProps={{
|
|
416
|
+
bgColor: theme.colors.white,
|
|
417
|
+
borderColor: theme.colors.white,
|
|
418
|
+
textStyle: { color: theme.colors.btnFont }
|
|
419
|
+
}}
|
|
415
420
|
/>
|
|
416
421
|
)}
|
|
417
422
|
<FormSide>
|
|
@@ -630,6 +635,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
630
635
|
/>
|
|
631
636
|
)
|
|
632
637
|
}
|
|
638
|
+
autoCapitalize='none'
|
|
633
639
|
value={value}
|
|
634
640
|
forwardRef={passwordRef}
|
|
635
641
|
onChange={(val: any) => onChange(val)}
|
|
@@ -802,7 +808,7 @@ const LoginFormUI = (props: LoginParams) => {
|
|
|
802
808
|
handleSuccessGoogleLogin={handleSuccessFacebook}
|
|
803
809
|
/>
|
|
804
810
|
)}
|
|
805
|
-
{(configs?.apple_login_client_id?.value !== '' && configs?.
|
|
811
|
+
{(configs?.apple_login_client_id?.value !== '' && configs?.apple_login_client_id?.value !== null) && appleLoginEnabled && (
|
|
806
812
|
<AppleLogin
|
|
807
813
|
notificationState={notificationState}
|
|
808
814
|
handleErrors={(err: any) => { showToast(ToastType.Error, err), vibrateApp() }}
|
|
@@ -237,6 +237,7 @@ export const MessageListing = (props: MessageListingParams) => {
|
|
|
237
237
|
const [seletedOrder, setSeletedOrder] = useState<any>()
|
|
238
238
|
const [openMessages, setOpenMessges] = useState(false)
|
|
239
239
|
const [, t] = useLanguage()
|
|
240
|
+
const theme = useTheme()
|
|
240
241
|
|
|
241
242
|
const goToBack = () => {
|
|
242
243
|
navigation?.canGoBack() && navigation.goBack()
|
|
@@ -265,6 +266,11 @@ export const MessageListing = (props: MessageListingParams) => {
|
|
|
265
266
|
showCall={false}
|
|
266
267
|
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
267
268
|
btnStyle={{ paddingLeft: 0 }}
|
|
269
|
+
buttonProps={{
|
|
270
|
+
bgColor: theme.colors.white,
|
|
271
|
+
borderColor: theme.colors.white,
|
|
272
|
+
textStyle: { color: theme.colors.btnFont }
|
|
273
|
+
}}
|
|
268
274
|
/>
|
|
269
275
|
<OrderListing
|
|
270
276
|
ordersLength={{ activeOrdersLength: 0, previousOrdersLength: 0 }}
|
|
@@ -127,12 +127,12 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
127
127
|
return message.change?.attribute !== 'driver_id'
|
|
128
128
|
?
|
|
129
129
|
`${t('ORDER', 'Order')} ${t(message.change.attribute.toUpperCase(), message.change.attribute.replace('_', ' '))} ${t('CHANGED_FROM', 'Changed from')} ${filterSpecialStatus.includes(message.change.attribute)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
? `${message.change.old === null ? '0' : message.change.old} ${t('TO', 'to')} ${message.change.new} ${t('MINUTES', 'Minutes')}`
|
|
131
|
+
: `${message.change?.attribute !== 'logistic_status'
|
|
132
|
+
? message.change.old !== null && t(ORDER_STATUS[parseInt(message.change.old, 10)])
|
|
133
|
+
: message.change.old !== null && getLogisticTag(message.change.old)} ${t('TO', 'to')} ${message.change?.attribute !== 'logistic_status'
|
|
134
|
+
? t(ORDER_STATUS[parseInt(message.change.new, 10)])
|
|
135
|
+
: getLogisticTag(message.change.new)}`
|
|
136
136
|
}`
|
|
137
137
|
: message.change.new
|
|
138
138
|
?
|
|
@@ -461,7 +461,7 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
461
461
|
active={business}
|
|
462
462
|
>
|
|
463
463
|
<OIcon
|
|
464
|
-
url={order?.business?.logo
|
|
464
|
+
url={order?.business?.logo}
|
|
465
465
|
width={32}
|
|
466
466
|
height={32}
|
|
467
467
|
style={{ borderRadius: 32 }}
|
|
@@ -503,6 +503,7 @@ const MessagesUI = (props: MessagesParams) => {
|
|
|
503
503
|
scrollToBottom
|
|
504
504
|
renderAvatarOnTop
|
|
505
505
|
renderUsernameOnMessage
|
|
506
|
+
renderAvatar={() => null}
|
|
506
507
|
renderInputToolbar={renderInputToolbar}
|
|
507
508
|
renderComposer={renderComposer}
|
|
508
509
|
renderSend={renderSend}
|
|
@@ -10,7 +10,7 @@ export const Header = styled.View`
|
|
|
10
10
|
background-color: ${(props: any) => props.theme.colors.white};
|
|
11
11
|
box-shadow: 0 2px 2px #0000001A;
|
|
12
12
|
padding-bottom: 10px;
|
|
13
|
-
padding-horizontal:
|
|
13
|
+
padding-horizontal: 10px;
|
|
14
14
|
`
|
|
15
15
|
|
|
16
16
|
export const TitleHeader = styled.View``
|