ordering-ui-react-native 0.18.55 → 0.18.56-crash-driver-1
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 +6 -4
- package/src/components/BusinessInformation/index.tsx +10 -9
- package/src/components/PaymentOptionsWebView/index.tsx +30 -8
- package/src/components/PhoneInputNumber/index.tsx +6 -2
- package/src/components/StripeMethodForm/index.tsx +60 -55
- package/src/components/shared/OToast.tsx +3 -2
- package/src/types/index.tsx +3 -1
- package/src/utils/index.tsx +2 -2
- package/themes/business/index.tsx +6 -0
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +15 -8
- package/themes/business/src/components/BusinessController/index.tsx +19 -17
- package/themes/business/src/components/BusinessProductList/AccordionDropdown.tsx +63 -0
- package/themes/business/src/components/BusinessProductList/IterateCategories.tsx +108 -0
- package/themes/business/src/components/BusinessProductList/ProductList.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/index.tsx +196 -0
- package/themes/business/src/components/BusinessProductList/styles.tsx +10 -0
- package/themes/business/src/components/Chat/index.tsx +48 -19
- package/themes/business/src/components/DriverMap/index.tsx +36 -23
- package/themes/business/src/components/DriverSchedule/index.tsx +45 -8
- package/themes/business/src/components/FloatingButton/index.tsx +34 -31
- 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/LoginForm/index.tsx +2 -2
- package/themes/business/src/components/LogoutButton/index.tsx +1 -1
- package/themes/business/src/components/MapView/index.tsx +28 -17
- package/themes/business/src/components/MessagesOption/index.tsx +22 -94
- package/themes/business/src/components/NewOrderNotification/index.tsx +162 -106
- package/themes/business/src/components/NotFoundSource/index.tsx +2 -2
- package/themes/business/src/components/OrderDetails/Business.tsx +53 -3
- package/themes/business/src/components/OrderDetails/Delivery.tsx +209 -13
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +107 -75
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +79 -41
- package/themes/business/src/components/OrderDetails/usePrinterCommands.tsx +220 -0
- package/themes/business/src/components/OrderDetailsLogistic/index.tsx +7 -2
- package/themes/business/src/components/OrderMessage/index.tsx +1 -1
- package/themes/business/src/components/OrderSummary/index.tsx +245 -82
- package/themes/business/src/components/OrdersListManager/index.tsx +7 -2
- package/themes/business/src/components/OrdersListManager/utils.tsx +1 -1
- package/themes/business/src/components/OrdersOption/index.tsx +125 -48
- package/themes/business/src/components/PhoneInputNumber/index.tsx +8 -5
- package/themes/business/src/components/PreviousMessages/FooterMessageComponent.tsx +103 -0
- package/themes/business/src/components/PreviousMessages/index.tsx +97 -55
- package/themes/business/src/components/PreviousOrders/OrderItem.tsx +43 -41
- package/themes/business/src/components/PreviousOrders/OrderList.tsx +93 -0
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +1 -1
- package/themes/business/src/components/PreviousOrders/index.tsx +195 -221
- 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 +1 -1
- 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 +4 -3
- package/themes/business/src/components/UserFormDetails/index.tsx +111 -107
- package/themes/business/src/components/UserProfileForm/index.tsx +103 -53
- package/themes/business/src/components/WebsocketStatus/index.tsx +171 -0
- package/themes/business/src/components/WebsocketStatus/styles.tsx +28 -0
- package/themes/business/src/components/shared/OInput.tsx +2 -0
- package/themes/business/src/hooks/useLocation.tsx +5 -4
- package/themes/business/src/types/index.tsx +21 -1
- package/themes/business/src/utils/index.tsx +5 -0
- package/themes/kiosk/src/components/Checkout/index.tsx +5 -3
- package/themes/kiosk/src/components/CustomerName/index.tsx +1 -1
- package/themes/kiosk/src/components/Intro/index.tsx +16 -1
- package/themes/kiosk/src/components/LoginForm/index.tsx +131 -101
- package/themes/kiosk/src/components/PaymentOptions/index.tsx +57 -121
- package/themes/original/index.tsx +11 -3
- package/themes/original/src/components/AddressDetails/index.tsx +20 -10
- package/themes/original/src/components/AddressForm/index.tsx +41 -20
- package/themes/original/src/components/AddressForm/styles.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +22 -11
- package/themes/original/src/components/AddressList/styles.tsx +4 -4
- package/themes/original/src/components/AnalyticsSegment/index.tsx +10 -7
- package/themes/original/src/components/AppleLogin/styles.tsx +3 -1
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +8 -11
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +1 -1
- package/themes/original/src/components/BusinessController/index.tsx +40 -43
- package/themes/original/src/components/BusinessController/styles.tsx +12 -12
- package/themes/original/src/components/BusinessInformation/index.tsx +45 -17
- package/themes/original/src/components/BusinessInformation/styles.tsx +2 -2
- package/themes/original/src/components/BusinessItemAccordion/index.tsx +11 -7
- 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/MaxSectionItem/index.tsx +1 -1
- package/themes/original/src/components/BusinessListingSearch/index.tsx +57 -361
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +1 -1
- package/themes/original/src/components/BusinessPreorder/index.tsx +9 -7
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +2 -3
- package/themes/original/src/components/BusinessProductsList/index.tsx +5 -4
- package/themes/original/src/components/BusinessProductsListing/index.tsx +67 -28
- package/themes/original/src/components/BusinessProductsListing/styles.tsx +3 -4
- 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 +69 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListHeader.tsx +406 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/FlatListBusinessListing.tsx +76 -0
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +30 -404
- package/themes/original/src/components/BusinessesListing/Layout/Original/styles.tsx +2 -2
- package/themes/original/src/components/Cart/index.tsx +51 -40
- package/themes/original/src/components/CartContent/index.tsx +98 -54
- package/themes/original/src/components/CartStoresListing/styles.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +308 -75
- 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 +33 -0
- package/themes/original/src/components/DatePicker/styles.tsx +20 -0
- package/themes/original/src/components/DriverTips/index.tsx +6 -3
- package/themes/original/src/components/FacebookLogin/styles.tsx +3 -1
- package/themes/original/src/components/Favorite/index.tsx +8 -4
- 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 +7 -5
- 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/GiftCardUI/index.tsx +8 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/index.tsx +36 -3
- package/themes/original/src/components/GiftCard/PurchaseGiftCard/styles.tsx +1 -1
- package/themes/original/src/components/GiftCard/RedeemGiftCard/index.tsx +84 -8
- 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/GoogleLogin/styles.tsx +1 -1
- package/themes/original/src/components/GoogleMap/index.tsx +52 -5
- 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 +1 -1
- package/themes/original/src/components/HighestRatedBusinesses/styles.tsx +1 -1
- package/themes/original/src/components/Home/index.tsx +3 -2
- package/themes/original/src/components/LastOrder/index.tsx +2 -1
- package/themes/original/src/components/LastOrders/index.tsx +2 -1
- package/themes/original/src/components/LoginForm/Otp/index.tsx +79 -25
- package/themes/original/src/components/LoginForm/index.tsx +38 -14
- package/themes/original/src/components/MessageListing/index.tsx +6 -0
- package/themes/original/src/components/Messages/index.tsx +9 -3
- package/themes/original/src/components/Messages/styles.tsx +1 -1
- package/themes/original/src/components/MomentOption/index.tsx +20 -5
- package/themes/original/src/components/MomentSelector/index.tsx +1 -1
- package/themes/original/src/components/MultiCart/index.tsx +1 -1
- package/themes/original/src/components/MultiCartsPaymethodsAndWallets/index.tsx +48 -15
- package/themes/original/src/components/MultiCheckout/index.tsx +295 -56
- package/themes/original/src/components/MultiCheckout/styles.tsx +20 -1
- package/themes/original/src/components/MultiOrdersDetails/index.tsx +21 -16
- package/themes/original/src/components/MyOrders/index.tsx +37 -39
- package/themes/original/src/components/NavBar/index.tsx +15 -14
- 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/OrderEta.tsx +21 -6
- package/themes/original/src/components/OrderDetails/OrderHistory.tsx +14 -5
- package/themes/original/src/components/OrderDetails/index.tsx +718 -667
- package/themes/original/src/components/OrderDetails/styles.tsx +24 -7
- package/themes/original/src/components/OrderProgress/index.tsx +50 -14
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -1
- package/themes/original/src/components/OrderSummary/index.tsx +26 -34
- package/themes/original/src/components/OrderTypeSelector/index.tsx +5 -0
- 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 +14 -6
- package/themes/original/src/components/OrdersOption/styles.tsx +1 -1
- package/themes/original/src/components/PageBanner/index.tsx +3 -0
- package/themes/original/src/components/PaymentOptionCard/index.tsx +182 -0
- package/themes/original/src/components/PaymentOptionStripe/styles.tsx +3 -0
- package/themes/original/src/components/PaymentOptions/index.tsx +118 -37
- package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -1
- 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 +193 -267
- package/themes/original/src/components/ProductForm/styles.tsx +1 -1
- package/themes/original/src/components/ProductItemAccordion/index.tsx +55 -42
- package/themes/original/src/components/ProductItemAccordion/styles.tsx +3 -4
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +120 -79
- package/themes/original/src/components/ProductOptionSubOption/styles.tsx +10 -9
- 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/ScheduleAccordion/index.tsx +3 -3
- package/themes/original/src/components/ServiceForm/index.tsx +2 -2
- 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 +76 -60
- package/themes/original/src/components/SingleOrderCard/index.tsx +6 -5
- package/themes/original/src/components/SingleProductCard/index.tsx +5 -4
- package/themes/original/src/components/SingleProductCard/styles.tsx +0 -5
- package/themes/original/src/components/StripeCardsList/index.tsx +26 -8
- package/themes/original/src/components/StripeElementsForm/index.tsx +80 -62
- package/themes/original/src/components/StripeElementsForm/naked.tsx +59 -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 +128 -79
- package/themes/original/src/components/UserFormDetails/styles.tsx +8 -1
- package/themes/original/src/components/UserProfile/index.tsx +5 -4
- package/themes/original/src/components/UserProfileForm/index.tsx +35 -36
- package/themes/original/src/components/UserVerification/index.tsx +55 -50
- package/themes/original/src/components/WalletTransactionItem/index.tsx +2 -2
- package/themes/original/src/components/WalletTransactions/styles.tsx +1 -0
- package/themes/original/src/components/Wallets/index.tsx +35 -49
- package/themes/original/src/components/Wallets/styles.tsx +3 -4
- 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 +7 -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 +13 -2
- package/themes/original/src/utils/index.tsx +124 -22
- package/src/navigators/BottomNavigator.tsx +0 -117
- package/src/navigators/CheckoutNavigator.tsx +0 -66
- package/src/navigators/HomeNavigator.tsx +0 -202
- package/src/navigators/NavigationRef.tsx +0 -7
- package/src/navigators/RootNavigator.tsx +0 -269
- package/src/pages/Account.tsx +0 -34
- package/src/pages/AddressForm.tsx +0 -62
- package/src/pages/AddressList.tsx +0 -24
- package/src/pages/BusinessProductsList.tsx +0 -81
- package/src/pages/BusinessesListing.tsx +0 -43
- package/src/pages/CartList.tsx +0 -49
- package/src/pages/Checkout.tsx +0 -101
- package/src/pages/ForgotPassword.tsx +0 -24
- package/src/pages/Help.tsx +0 -23
- package/src/pages/HelpAccountAndPayment.tsx +0 -23
- package/src/pages/HelpGuide.tsx +0 -23
- package/src/pages/HelpOrder.tsx +0 -23
- package/src/pages/Home.tsx +0 -36
- package/src/pages/IntroductoryTutorial.tsx +0 -170
- package/src/pages/Login.tsx +0 -47
- package/src/pages/MomentOption.tsx +0 -30
- package/src/pages/MultiCheckout.tsx +0 -31
- package/src/pages/MultiOrdersDetails.tsx +0 -27
- package/src/pages/MyOrders.tsx +0 -40
- package/src/pages/NetworkError.tsx +0 -24
- package/src/pages/NotFound.tsx +0 -22
- package/src/pages/OrderDetails.tsx +0 -25
- package/src/pages/ProductDetails.tsx +0 -55
- package/src/pages/Profile.tsx +0 -36
- package/src/pages/ReviewDriver.tsx +0 -30
- package/src/pages/ReviewOrder.tsx +0 -32
- package/src/pages/ReviewProducts.tsx +0 -30
- package/src/pages/Sessions.tsx +0 -22
- package/src/pages/Signup.tsx +0 -53
- package/src/pages/SpinnerLoader.tsx +0 -10
- package/src/pages/Splash.tsx +0 -21
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import DatePicker from 'react-native-date-picker'
|
|
3
|
+
import { DateContainer } from './styles';
|
|
4
|
+
import { useLanguage } from 'ordering-components/native';
|
|
5
|
+
|
|
6
|
+
export const DatePickerUI = (props: any) => {
|
|
7
|
+
const {
|
|
8
|
+
birthdate,
|
|
9
|
+
onConfirm,
|
|
10
|
+
onCancel,
|
|
11
|
+
open,
|
|
12
|
+
} = props;
|
|
13
|
+
|
|
14
|
+
const [, t] = useLanguage();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<DateContainer>
|
|
18
|
+
<DatePicker
|
|
19
|
+
modal
|
|
20
|
+
mode="date"
|
|
21
|
+
open={open}
|
|
22
|
+
title={t('SELECT_A_DATE', 'Select a date')}
|
|
23
|
+
confirmText={t('CONFIRM', 'Confirm')}
|
|
24
|
+
cancelText={t('CANCEL', 'Cancel')}
|
|
25
|
+
date={birthdate ? new Date(birthdate) : new Date()}
|
|
26
|
+
onConfirm={date => onConfirm(date)}
|
|
27
|
+
onCancel={onCancel}
|
|
28
|
+
maximumDate={new Date()}
|
|
29
|
+
/>
|
|
30
|
+
</DateContainer>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import styled from 'styled-components/native';
|
|
2
|
+
|
|
3
|
+
export const DateContainer = styled.View`
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
margin-bottom: 20px;
|
|
7
|
+
|
|
8
|
+
input {
|
|
9
|
+
border-radius: 20px;
|
|
10
|
+
width: 140px;
|
|
11
|
+
outline: none;
|
|
12
|
+
padding: 10px 15px;
|
|
13
|
+
border: 1px solid #E9ECEF;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.react-datepicker__triangle {
|
|
17
|
+
transform: translate(40px, 0px) !important;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
`
|
|
@@ -23,6 +23,7 @@ const DriverTipsUI = (props: any) => {
|
|
|
23
23
|
driverTip,
|
|
24
24
|
driverTipsOptions,
|
|
25
25
|
isMulti,
|
|
26
|
+
isLoading,
|
|
26
27
|
cart,
|
|
27
28
|
carts,
|
|
28
29
|
isDriverTipUseCustom,
|
|
@@ -79,8 +80,10 @@ const DriverTipsUI = (props: any) => {
|
|
|
79
80
|
<TouchableOpacity
|
|
80
81
|
key={i}
|
|
81
82
|
onPress={() => {
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
if (!isLoading) {
|
|
84
|
+
handlerChangeOption(option)
|
|
85
|
+
setCustomTip(false)
|
|
86
|
+
}
|
|
84
87
|
}}
|
|
85
88
|
>
|
|
86
89
|
<DTCard
|
|
@@ -95,7 +98,7 @@ const DriverTipsUI = (props: any) => {
|
|
|
95
98
|
))}
|
|
96
99
|
{isDriverTipUseCustom && (
|
|
97
100
|
<TouchableOpacity
|
|
98
|
-
onPress={() => setCustomTip(true)}
|
|
101
|
+
onPress={() => { !isLoading && setCustomTip(true) }}
|
|
99
102
|
>
|
|
100
103
|
<DTCard
|
|
101
104
|
style={style.semicircle}
|
|
@@ -35,16 +35,20 @@ export const Favorite = (props: any) => {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
|
-
<Container
|
|
39
|
-
pdng={Platform.OS === 'ios' ? '10px' : '20px'}
|
|
40
|
-
>
|
|
38
|
+
<Container>
|
|
41
39
|
<NavBar
|
|
42
40
|
title={t('FAVORITE', 'Favorite')}
|
|
43
41
|
titleAlign={'center'}
|
|
44
42
|
onActionLeft={goToBack}
|
|
45
43
|
showCall={false}
|
|
46
|
-
paddingTop={10}
|
|
44
|
+
paddingTop={Platform.OS === 'ios' ? 20 : 10}
|
|
45
|
+
style={{ paddingVertical: 0 }}
|
|
47
46
|
btnStyle={{ paddingLeft: 0 }}
|
|
47
|
+
buttonProps={{
|
|
48
|
+
bgColor: theme.colors.white,
|
|
49
|
+
borderColor: theme.colors.white,
|
|
50
|
+
textStyle: { color: theme.colors.btnFont }
|
|
51
|
+
}}
|
|
48
52
|
/>
|
|
49
53
|
<TabContainer>
|
|
50
54
|
{tabList.map((menu, i) => (
|
|
@@ -125,6 +125,11 @@ const ForgotPasswordUI = (props: any) => {
|
|
|
125
125
|
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
126
126
|
titleStyle={{ width: '100%', marginLeft: 0, paddingLeft: 0 }}
|
|
127
127
|
titleWrapStyle={{ paddingHorizontal: 0, paddingStart: 0, flex: 1 }}
|
|
128
|
+
buttonProps={{
|
|
129
|
+
bgColor: theme.colors.white,
|
|
130
|
+
borderColor: theme.colors.white,
|
|
131
|
+
textStyle: { color: theme.colors.btnFont }
|
|
132
|
+
}}
|
|
128
133
|
/>
|
|
129
134
|
<FormSide>
|
|
130
135
|
<OText
|
|
@@ -12,7 +12,8 @@ export const GPSButton = (props: any) => {
|
|
|
12
12
|
handleGPS,
|
|
13
13
|
apiKey,
|
|
14
14
|
IconButton,
|
|
15
|
-
IconLoadingButton
|
|
15
|
+
IconLoadingButton,
|
|
16
|
+
isIntGeoCoder
|
|
16
17
|
} = props
|
|
17
18
|
|
|
18
19
|
const [isLoading, setLoading] = useState(false);
|
|
@@ -31,7 +32,7 @@ export const GPSButton = (props: any) => {
|
|
|
31
32
|
break
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
let data
|
|
35
|
+
let data : any
|
|
35
36
|
const details = {
|
|
36
37
|
geometry: { location: { lat: pos.latitude, lng: pos.longitude } }
|
|
37
38
|
}
|
|
@@ -60,7 +61,7 @@ export const GPSButton = (props: any) => {
|
|
|
60
61
|
if (trackingStatus === 'not-determined') {
|
|
61
62
|
trackingStatus = await requestTrackingPermission()
|
|
62
63
|
}
|
|
63
|
-
if (trackingStatus === 'authorized' || trackingStatus === 'unavailable') {
|
|
64
|
+
if ( trackingStatus === 'authorized' || trackingStatus === 'denied' || trackingStatus === 'unavailable') {
|
|
64
65
|
setLoading(true)
|
|
65
66
|
Geolocation.getCurrentPosition((pos) => {
|
|
66
67
|
geoCodePosition(pos.coords)
|
|
@@ -68,14 +69,15 @@ export const GPSButton = (props: any) => {
|
|
|
68
69
|
setLoading(false);
|
|
69
70
|
console.log(`ERROR(${err.code}): ${err.message}`)
|
|
70
71
|
}, {
|
|
71
|
-
enableHighAccuracy:
|
|
72
|
+
enableHighAccuracy: false, timeout: 30000, maximumAge: 1000
|
|
72
73
|
})
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
useEffect(() => {
|
|
78
|
+
if (isIntGeoCoder) return
|
|
77
79
|
Geocoder.init(apiKey);
|
|
78
|
-
}, [])
|
|
80
|
+
}, [isIntGeoCoder])
|
|
79
81
|
|
|
80
82
|
return (
|
|
81
83
|
<GpsButtonStyle
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { useLanguage } from 'ordering-components/native';
|
|
3
|
+
import { useTheme } from 'styled-components/native';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { OText } from '../../shared'
|
|
6
|
+
import { VerticalGiftCardOrdersLayout } from '../VerticalGiftCardOrdersLayout'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
Container,
|
|
10
|
+
NoOrdersWrapper
|
|
11
|
+
} from './styles'
|
|
12
|
+
|
|
13
|
+
export const GiftCardOrdersList = (props: any) => {
|
|
14
|
+
const {
|
|
15
|
+
onNavigationRedirect
|
|
16
|
+
} = props;
|
|
17
|
+
|
|
18
|
+
const theme = useTheme();
|
|
19
|
+
const [, t] = useLanguage();
|
|
20
|
+
const [isEmptyPending, setIsEmptyPending] = useState(false);
|
|
21
|
+
const [isEmptySent, setIsEmptySent] = useState(false);
|
|
22
|
+
const [isEmptyRedeemed, setIsEmptyRedeemed] = useState(false);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Container>
|
|
26
|
+
<VerticalGiftCardOrdersLayout
|
|
27
|
+
title={t('PENDING', 'Pending')}
|
|
28
|
+
defaultStatus='pending'
|
|
29
|
+
setIsEmpty={setIsEmptyPending}
|
|
30
|
+
onNavigationRedirect={onNavigationRedirect}
|
|
31
|
+
/>
|
|
32
|
+
|
|
33
|
+
{!isEmptyPending && (
|
|
34
|
+
<View
|
|
35
|
+
style={{
|
|
36
|
+
height: 8,
|
|
37
|
+
backgroundColor: theme.colors.backgroundGray100,
|
|
38
|
+
marginHorizontal: -40,
|
|
39
|
+
}}
|
|
40
|
+
/>
|
|
41
|
+
)}
|
|
42
|
+
|
|
43
|
+
<VerticalGiftCardOrdersLayout
|
|
44
|
+
title={t('SENT', 'Sent')}
|
|
45
|
+
defaultStatus='sent'
|
|
46
|
+
setIsEmpty={setIsEmptySent}
|
|
47
|
+
onNavigationRedirect={onNavigationRedirect}
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
<VerticalGiftCardOrdersLayout
|
|
51
|
+
title={t('REDEEMED', 'Redeemed')}
|
|
52
|
+
defaultStatus='activated'
|
|
53
|
+
setIsEmpty={setIsEmptyRedeemed}
|
|
54
|
+
onNavigationRedirect={onNavigationRedirect}
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
{isEmptyPending && isEmptySent && isEmptyRedeemed && (
|
|
58
|
+
<NoOrdersWrapper>
|
|
59
|
+
<OText size={16} color={theme.colors.textNormal}>{t('YOU_DONT_HAVE_CARDS', 'You don\'t have cards')}</OText>
|
|
60
|
+
</NoOrdersWrapper>
|
|
61
|
+
)}
|
|
62
|
+
</Container>
|
|
63
|
+
)
|
|
64
|
+
}
|
|
@@ -56,7 +56,7 @@ export const GiftCardUI = React.memo((props: any) => {
|
|
|
56
56
|
<View style={style.actionWrapper}>
|
|
57
57
|
<OButton
|
|
58
58
|
onClick={() => setOpenModal('purchase')}
|
|
59
|
-
text={t('
|
|
59
|
+
text={t('PURCHASE', 'Purchase')}
|
|
60
60
|
bgColor={theme.colors.primary}
|
|
61
61
|
borderColor={theme.colors.primary}
|
|
62
62
|
textStyle={{ color: 'white', fontSize: 13 }}
|
|
@@ -66,7 +66,7 @@ export const GiftCardUI = React.memo((props: any) => {
|
|
|
66
66
|
|
|
67
67
|
<OButton
|
|
68
68
|
onClick={() => setOpenModal('redeem')}
|
|
69
|
-
text={t('
|
|
69
|
+
text={t('REDEEM', 'Redeem')}
|
|
70
70
|
bgColor={theme.colors.lightPrimary}
|
|
71
71
|
borderColor={theme.colors.lightPrimary}
|
|
72
72
|
textStyle={{ color: theme.colors.primary, fontSize: 13 }}
|
|
@@ -79,13 +79,18 @@ export const GiftCardUI = React.memo((props: any) => {
|
|
|
79
79
|
open={openModal === 'purchase'}
|
|
80
80
|
onClose={() => setOpenModal(null)}
|
|
81
81
|
entireModal
|
|
82
|
+
customClose
|
|
82
83
|
>
|
|
83
|
-
<PurchaseGiftCard
|
|
84
|
+
<PurchaseGiftCard
|
|
85
|
+
handleCustomGoToCheckout={handleCustomGoToCheckout}
|
|
86
|
+
onClose={() => setOpenModal(null)}
|
|
87
|
+
/>
|
|
84
88
|
</OModal>
|
|
85
89
|
<OModal
|
|
86
90
|
open={openModal === 'redeem'}
|
|
87
91
|
onClose={() => setOpenModal(null)}
|
|
88
92
|
entireModal
|
|
93
|
+
customClose
|
|
89
94
|
>
|
|
90
95
|
<RedeemGiftCard
|
|
91
96
|
onClose={() => setOpenModal(null)}
|
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
useLanguage,
|
|
4
4
|
PurchaseGiftCard as PurchaseGiftCardController
|
|
5
5
|
} from 'ordering-components/native'
|
|
6
|
-
import { StyleSheet, View, TouchableOpacity, ScrollView } from 'react-native'
|
|
6
|
+
import { StyleSheet, View, TouchableOpacity, ScrollView, Platform } from 'react-native'
|
|
7
7
|
import { Fade, Placeholder, PlaceholderLine } from 'rn-placeholder';
|
|
8
8
|
import { useTheme } from 'styled-components/native';
|
|
9
9
|
import { OText, OButton, OIcon } from '../../shared';
|
|
10
|
+
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
10
11
|
|
|
11
12
|
import {
|
|
12
13
|
Container
|
|
@@ -17,7 +18,8 @@ const PurchaseGiftCardUI = (props: any) => {
|
|
|
17
18
|
productsListState,
|
|
18
19
|
selectedProduct,
|
|
19
20
|
setSelectedProduct,
|
|
20
|
-
handleAccept
|
|
21
|
+
handleAccept,
|
|
22
|
+
onClose
|
|
21
23
|
} = props
|
|
22
24
|
|
|
23
25
|
const theme = useTheme()
|
|
@@ -42,7 +44,38 @@ const PurchaseGiftCardUI = (props: any) => {
|
|
|
42
44
|
|
|
43
45
|
return (
|
|
44
46
|
<Container>
|
|
45
|
-
<
|
|
47
|
+
<View style={{
|
|
48
|
+
marginBottom: 40,
|
|
49
|
+
marginTop: Platform.OS === 'ios' ? 30 : 50,
|
|
50
|
+
display: 'flex',
|
|
51
|
+
flexDirection: 'row',
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
}}>
|
|
54
|
+
<OButton
|
|
55
|
+
imgLeftStyle={{ width: 18 }}
|
|
56
|
+
imgRightSrc={null}
|
|
57
|
+
style={{
|
|
58
|
+
borderWidth: 0,
|
|
59
|
+
width: 26,
|
|
60
|
+
height: 26,
|
|
61
|
+
backgroundColor: '#FFF',
|
|
62
|
+
borderColor: '#FFF',
|
|
63
|
+
shadowColor: '#FFF',
|
|
64
|
+
paddingLeft: 0,
|
|
65
|
+
paddingRight: 0,
|
|
66
|
+
}}
|
|
67
|
+
onClick={onClose}
|
|
68
|
+
icon={AntDesignIcon}
|
|
69
|
+
iconProps={{
|
|
70
|
+
name: 'arrowleft',
|
|
71
|
+
size: 26,
|
|
72
|
+
style: {
|
|
73
|
+
color: theme.colors.textNormal
|
|
74
|
+
}
|
|
75
|
+
}}
|
|
76
|
+
/>
|
|
77
|
+
<OText color={theme.colors.textNormal} weight='bold' size={20} mLeft={10}>{t('PURCHASE_GIFT_CARD', 'Purchase gift card')}</OText>
|
|
78
|
+
</View>
|
|
46
79
|
<OText color={theme.colors.textNormal} size={14}>{t('SELECT_ONE_OPTION', 'Select one option')}</OText>
|
|
47
80
|
<ScrollView
|
|
48
81
|
contentContainerStyle={{
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import React, { useEffect } from 'react'
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import {
|
|
3
3
|
useLanguage, useUtils, RedeemGiftCard as RedeemGiftCardController
|
|
4
4
|
} from 'ordering-components/native'
|
|
5
5
|
import { useForm, Controller } from 'react-hook-form'
|
|
6
|
-
import { StyleSheet, View, Alert } from 'react-native';
|
|
6
|
+
import { StyleSheet, View, Alert, Platform } from 'react-native';
|
|
7
7
|
import { useTheme } from 'styled-components/native';
|
|
8
8
|
import { OText, OButton, OInput } from '../../shared';
|
|
9
|
+
import AntDesignIcon from 'react-native-vector-icons/AntDesign'
|
|
9
10
|
|
|
10
11
|
import {
|
|
11
12
|
Container,
|
|
@@ -26,6 +27,8 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
26
27
|
const { handleSubmit, control, errors } = useForm()
|
|
27
28
|
const [{ parsePrice }] = useUtils()
|
|
28
29
|
|
|
30
|
+
const [codeValue, setCodeValue] = useState('')
|
|
31
|
+
|
|
29
32
|
const style = StyleSheet.create({
|
|
30
33
|
btnStyle: {
|
|
31
34
|
borderRadius: 7.6,
|
|
@@ -43,6 +46,14 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
43
46
|
handleApply(values)
|
|
44
47
|
}
|
|
45
48
|
|
|
49
|
+
const handleChangeCode = (string: any) => {
|
|
50
|
+
string = string.replace(/-/g, '')
|
|
51
|
+
if (!string) return
|
|
52
|
+
const codeSlices = string.match(/.{1,4}/g)
|
|
53
|
+
string = codeSlices.join('-')
|
|
54
|
+
setCodeValue(string)
|
|
55
|
+
}
|
|
56
|
+
|
|
46
57
|
useEffect(() => {
|
|
47
58
|
if (Object.keys(errors).length > 0) {
|
|
48
59
|
const list = Object.values(errors)
|
|
@@ -83,17 +94,51 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
83
94
|
<Container>
|
|
84
95
|
{!redeemedGiftCard ? (
|
|
85
96
|
<View>
|
|
86
|
-
<
|
|
97
|
+
<View style={{
|
|
98
|
+
marginBottom: 40,
|
|
99
|
+
marginTop: Platform.OS === 'ios' ? 30 : 50,
|
|
100
|
+
display: 'flex',
|
|
101
|
+
flexDirection: 'row',
|
|
102
|
+
alignItems: 'center',
|
|
103
|
+
}}>
|
|
104
|
+
<OButton
|
|
105
|
+
imgLeftStyle={{ width: 18 }}
|
|
106
|
+
imgRightSrc={null}
|
|
107
|
+
style={{
|
|
108
|
+
borderWidth: 0,
|
|
109
|
+
width: 26,
|
|
110
|
+
height: 26,
|
|
111
|
+
backgroundColor: '#FFF',
|
|
112
|
+
borderColor: '#FFF',
|
|
113
|
+
shadowColor: '#FFF',
|
|
114
|
+
paddingLeft: 0,
|
|
115
|
+
paddingRight: 0,
|
|
116
|
+
}}
|
|
117
|
+
onClick={onClose}
|
|
118
|
+
icon={AntDesignIcon}
|
|
119
|
+
iconProps={{
|
|
120
|
+
name: 'arrowleft',
|
|
121
|
+
size: 26,
|
|
122
|
+
style: {
|
|
123
|
+
color: theme.colors.textNormal
|
|
124
|
+
}
|
|
125
|
+
}}
|
|
126
|
+
/>
|
|
127
|
+
<OText color={theme.colors.textNormal} weight='bold' size={20} mLeft={10}>{t('REDEEM_GIFT_CARD', 'Redeem a gift card')}</OText>
|
|
128
|
+
</View>
|
|
87
129
|
<FormController>
|
|
88
130
|
<OText color={theme.colors.textNormal} size={14} mBottom={10}>{t('GIFT_CARD_CODE', 'Gift card code')}</OText>
|
|
89
131
|
<Controller
|
|
90
132
|
control={control}
|
|
91
133
|
render={({ onChange, value }: any) => (
|
|
92
134
|
<OInput
|
|
93
|
-
placeholder='
|
|
94
|
-
value={
|
|
95
|
-
onChange={(val: any) =>
|
|
96
|
-
|
|
135
|
+
placeholder='XXXX-XXXX-XXXX-XXXX'
|
|
136
|
+
value={codeValue}
|
|
137
|
+
onChange={(val: any) => {
|
|
138
|
+
onChange(val)
|
|
139
|
+
handleChangeCode(val)
|
|
140
|
+
}}
|
|
141
|
+
autoCapitalize='characters'
|
|
97
142
|
autoCorrect={false}
|
|
98
143
|
blurOnSubmit={false}
|
|
99
144
|
style={style.inputStyle}
|
|
@@ -143,7 +188,38 @@ const RedeemGiftCardUI = (props: any) => {
|
|
|
143
188
|
</View>
|
|
144
189
|
) : (
|
|
145
190
|
<>
|
|
146
|
-
<
|
|
191
|
+
<View style={{
|
|
192
|
+
marginBottom: 40,
|
|
193
|
+
marginTop: Platform.OS === 'ios' ? 30 : 50,
|
|
194
|
+
display: 'flex',
|
|
195
|
+
flexDirection: 'row',
|
|
196
|
+
alignItems: 'center',
|
|
197
|
+
}}>
|
|
198
|
+
<OButton
|
|
199
|
+
imgLeftStyle={{ width: 18 }}
|
|
200
|
+
imgRightSrc={null}
|
|
201
|
+
style={{
|
|
202
|
+
borderWidth: 0,
|
|
203
|
+
width: 26,
|
|
204
|
+
height: 26,
|
|
205
|
+
backgroundColor: '#FFF',
|
|
206
|
+
borderColor: '#FFF',
|
|
207
|
+
shadowColor: '#FFF',
|
|
208
|
+
paddingLeft: 0,
|
|
209
|
+
paddingRight: 0,
|
|
210
|
+
}}
|
|
211
|
+
onClick={onClose}
|
|
212
|
+
icon={AntDesignIcon}
|
|
213
|
+
iconProps={{
|
|
214
|
+
name: 'arrowleft',
|
|
215
|
+
size: 26,
|
|
216
|
+
style: {
|
|
217
|
+
color: theme.colors.textNormal
|
|
218
|
+
}
|
|
219
|
+
}}
|
|
220
|
+
/>
|
|
221
|
+
<OText color={theme.colors.textNormal} weight='bold' size={20} mLeft={10}>{t('GIFT_CARD', 'Gift card')}</OText>
|
|
222
|
+
</View>
|
|
147
223
|
<View>
|
|
148
224
|
<OText color={theme.colors.textNormal} size={14} mBottom={6}>{t('TYPE', 'Type')}: {redeemedGiftCard?.type}</OText>
|
|
149
225
|
<OText color={theme.colors.textNormal} size={14} mBottom={6}>{t('AMOUNT', 'Amount')}: {parsePrice(redeemedGiftCard?.amount)}</OText>
|
|
@@ -84,12 +84,12 @@ const SendGiftCardUI = (props: any) => {
|
|
|
84
84
|
/>
|
|
85
85
|
</FormController>
|
|
86
86
|
<FormController>
|
|
87
|
-
<OText color={theme.colors.textNormal} size={14} mBottom={10}>{t('
|
|
87
|
+
<OText color={theme.colors.textNormal} size={14} mBottom={10}>{t('NAME', 'Name')}</OText>
|
|
88
88
|
<Controller
|
|
89
89
|
control={control}
|
|
90
90
|
render={({ onChange, value }: any) => (
|
|
91
91
|
<OInput
|
|
92
|
-
placeholder={t('
|
|
92
|
+
placeholder={t('WRITE_A_NAME', 'Write a name')}
|
|
93
93
|
value={value}
|
|
94
94
|
onChange={(val: any) => onChange(val)}
|
|
95
95
|
autoCapitalize='none'
|
|
@@ -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
|
+
}
|