ordering-ui-react-native 0.12.55 → 0.12.59
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/Cart/index.tsx +50 -16
- package/src/components/OrderDetails/index.tsx +8 -0
- package/src/components/OrderSummary/index.tsx +38 -3
- package/src/layouts/Container.tsx +1 -1
- package/themes/business/src/components/OrderDetails/OrderContentComponent.tsx +8 -0
- package/themes/business/src/components/OrderDetails/styles.tsx +1 -0
- package/themes/business/src/layouts/Container.tsx +3 -1
- package/themes/doordash/src/components/Cart/index.tsx +37 -2
- package/themes/doordash/src/components/OrderDetails/index.tsx +8 -0
- package/themes/doordash/src/components/OrderSummary/index.tsx +37 -3
- package/themes/doordash/src/layouts/Container.tsx +1 -1
- package/themes/instacart/src/components/Cart/index.tsx +37 -3
- package/themes/instacart/src/components/OrderDetails/index.tsx +8 -0
- package/themes/instacart/src/components/OrderSummary/index.tsx +37 -4
- package/themes/instacart/src/layouts/Container.tsx +1 -1
- package/themes/kiosk/src/layouts/Container.tsx +2 -1
- package/themes/original/src/components/Cart/index.tsx +268 -234
- package/themes/original/src/components/OrderDetails/index.tsx +723 -715
- package/themes/original/src/components/OrderSummary/index.tsx +37 -3
- package/themes/original/src/layouts/Container.tsx +1 -1
- package/themes/single-business/src/components/Cart/index.tsx +127 -16
- package/themes/single-business/src/components/Cart/styles.tsx +39 -0
- package/themes/single-business/src/components/CartContent/index.tsx +56 -52
- package/themes/single-business/src/components/CartContent/styles.tsx +2 -16
- package/themes/single-business/src/components/OrderDetails/index.tsx +724 -708
- package/themes/single-business/src/components/OrderSummary/index.tsx +189 -154
- package/themes/single-business/src/layouts/Container.tsx +1 -1
- package/themes/uber-eats/src/components/Cart/index.tsx +37 -3
- package/themes/uber-eats/src/components/OrderDetails/index.tsx +8 -0
- package/themes/uber-eats/src/components/OrderSummary/index.tsx +40 -6
- package/themes/uber-eats/src/layouts/Container.tsx +1 -1
- package/themes/franchises/index.tsx +0 -111
- package/themes/franchises/src/components/ActiveOrders/index.tsx +0 -134
- package/themes/franchises/src/components/ActiveOrders/styles.tsx +0 -44
- package/themes/franchises/src/components/AddressDetails/index.tsx +0 -77
- package/themes/franchises/src/components/AddressDetails/styles.tsx +0 -21
- package/themes/franchises/src/components/AddressForm/index.tsx +0 -837
- package/themes/franchises/src/components/AddressForm/styles.tsx +0 -27
- package/themes/franchises/src/components/AddressList/index.tsx +0 -338
- package/themes/franchises/src/components/AddressList/styles.tsx +0 -20
- package/themes/franchises/src/components/AppleLogin/index.tsx +0 -149
- package/themes/franchises/src/components/AppleLogin/styles.tsx +0 -21
- package/themes/franchises/src/components/BottomWrapper/index.tsx +0 -29
- package/themes/franchises/src/components/BusinessBasicInformation/index.tsx +0 -310
- package/themes/franchises/src/components/BusinessBasicInformation/styles.tsx +0 -66
- package/themes/franchises/src/components/BusinessController/index.tsx +0 -184
- package/themes/franchises/src/components/BusinessController/styles.tsx +0 -64
- package/themes/franchises/src/components/BusinessFeaturedController/index.tsx +0 -189
- package/themes/franchises/src/components/BusinessFeaturedController/styles.tsx +0 -50
- package/themes/franchises/src/components/BusinessInformation/index.tsx +0 -202
- package/themes/franchises/src/components/BusinessInformation/styles.tsx +0 -39
- package/themes/franchises/src/components/BusinessItemAccordion/index.tsx +0 -125
- package/themes/franchises/src/components/BusinessItemAccordion/styles.tsx +0 -54
- package/themes/franchises/src/components/BusinessProductsCategories/index.tsx +0 -87
- package/themes/franchises/src/components/BusinessProductsCategories/styles.tsx +0 -8
- package/themes/franchises/src/components/BusinessProductsList/index.tsx +0 -199
- package/themes/franchises/src/components/BusinessProductsList/styles.tsx +0 -14
- package/themes/franchises/src/components/BusinessProductsListing/index.tsx +0 -292
- package/themes/franchises/src/components/BusinessProductsListing/styles.tsx +0 -30
- package/themes/franchises/src/components/BusinessReviews/index.tsx +0 -249
- package/themes/franchises/src/components/BusinessReviews/styles.tsx +0 -59
- package/themes/franchises/src/components/BusinessTypeFilter/index.tsx +0 -127
- package/themes/franchises/src/components/BusinessTypeFilter/styles.tsx +0 -40
- package/themes/franchises/src/components/BusinessesListing/index.tsx +0 -339
- package/themes/franchises/src/components/BusinessesListing/styles.tsx +0 -92
- package/themes/franchises/src/components/Cart/index.tsx +0 -298
- package/themes/franchises/src/components/Cart/styles.tsx +0 -28
- package/themes/franchises/src/components/CartContent/index.tsx +0 -60
- package/themes/franchises/src/components/CartContent/styles.tsx +0 -19
- package/themes/franchises/src/components/Checkout/index.tsx +0 -664
- package/themes/franchises/src/components/Checkout/styles.tsx +0 -89
- package/themes/franchises/src/components/CouponControl/index.tsx +0 -119
- package/themes/franchises/src/components/CouponControl/styles.tsx +0 -22
- package/themes/franchises/src/components/DriverTips/index.tsx +0 -167
- package/themes/franchises/src/components/DriverTips/styles.tsx +0 -63
- package/themes/franchises/src/components/FacebookLogin/index.tsx +0 -107
- package/themes/franchises/src/components/FacebookLogin/styles.tsx +0 -21
- package/themes/franchises/src/components/FloatingButton/index.tsx +0 -100
- package/themes/franchises/src/components/FloatingButton/styles.tsx +0 -26
- package/themes/franchises/src/components/ForgotPasswordForm/index.tsx +0 -156
- package/themes/franchises/src/components/ForgotPasswordForm/styles.tsx +0 -11
- package/themes/franchises/src/components/GPSButton/index.tsx +0 -84
- package/themes/franchises/src/components/GPSButton/styles.ts +0 -6
- package/themes/franchises/src/components/GoogleLogin/index.tsx +0 -122
- package/themes/franchises/src/components/GoogleLogin/styles.tsx +0 -23
- package/themes/franchises/src/components/GoogleMap/index.tsx +0 -229
- package/themes/franchises/src/components/Help/index.tsx +0 -56
- package/themes/franchises/src/components/Help/styles.tsx +0 -11
- package/themes/franchises/src/components/HelpAccountAndPayment/index.tsx +0 -68
- package/themes/franchises/src/components/HelpAccountAndPayment/styles.tsx +0 -6
- package/themes/franchises/src/components/HelpGuide/index.tsx +0 -67
- package/themes/franchises/src/components/HelpGuide/styles.tsx +0 -6
- package/themes/franchises/src/components/HelpOrder/index.tsx +0 -79
- package/themes/franchises/src/components/HelpOrder/styles.tsx +0 -6
- package/themes/franchises/src/components/Home/index.tsx +0 -102
- package/themes/franchises/src/components/Home/styles.tsx +0 -18
- package/themes/franchises/src/components/LanguageSelector/index.tsx +0 -98
- package/themes/franchises/src/components/LanguageSelector/styles.tsx +0 -7
- package/themes/franchises/src/components/LastOrder/index.tsx +0 -168
- package/themes/franchises/src/components/LastOrder/styles.tsx +0 -16
- package/themes/franchises/src/components/LastOrders/index.tsx +0 -104
- package/themes/franchises/src/components/LastOrders/styles.tsx +0 -17
- package/themes/franchises/src/components/LoginForm/index.tsx +0 -512
- package/themes/franchises/src/components/LoginForm/styles.tsx +0 -77
- package/themes/franchises/src/components/LogoutButton/index.tsx +0 -36
- package/themes/franchises/src/components/Messages/index.tsx +0 -359
- package/themes/franchises/src/components/Messages/styles.tsx +0 -20
- package/themes/franchises/src/components/MomentOption/index.tsx +0 -321
- package/themes/franchises/src/components/MomentOption/styles.tsx +0 -66
- package/themes/franchises/src/components/NavBar/index.tsx +0 -129
- package/themes/franchises/src/components/NotFoundSource/index.tsx +0 -50
- package/themes/franchises/src/components/NotFoundSource/styles.tsx +0 -16
- package/themes/franchises/src/components/Notifications/index.tsx +0 -120
- package/themes/franchises/src/components/Notifications/styles.ts +0 -21
- package/themes/franchises/src/components/OrderDetails/index.tsx +0 -820
- package/themes/franchises/src/components/OrderDetails/styles.tsx +0 -120
- package/themes/franchises/src/components/OrderSummary/index.tsx +0 -232
- package/themes/franchises/src/components/OrderSummary/styles.tsx +0 -41
- package/themes/franchises/src/components/OrderTypeSelector/index.tsx +0 -92
- package/themes/franchises/src/components/OrderTypeSelector/styles.tsx +0 -27
- package/themes/franchises/src/components/OrdersOption/index.tsx +0 -243
- package/themes/franchises/src/components/OrdersOption/styles.tsx +0 -5
- package/themes/franchises/src/components/PaymentOptionCash/index.tsx +0 -102
- package/themes/franchises/src/components/PaymentOptionCash/styles.tsx +0 -18
- package/themes/franchises/src/components/PaymentOptionStripe/index.tsx +0 -234
- package/themes/franchises/src/components/PaymentOptionStripe/styles.tsx +0 -71
- package/themes/franchises/src/components/PaymentOptions/index.tsx +0 -430
- package/themes/franchises/src/components/PaymentOptions/styles.tsx +0 -77
- package/themes/franchises/src/components/PhoneInputNumber/index.tsx +0 -127
- package/themes/franchises/src/components/PhoneInputNumber/styles.tsx +0 -3
- package/themes/franchises/src/components/PreviousOrders/index.tsx +0 -188
- package/themes/franchises/src/components/PreviousOrders/styles.tsx +0 -33
- package/themes/franchises/src/components/ProductForm/index.tsx +0 -695
- package/themes/franchises/src/components/ProductForm/styles.tsx +0 -78
- package/themes/franchises/src/components/ProductIngredient/index.tsx +0 -43
- package/themes/franchises/src/components/ProductIngredient/styles.tsx +0 -7
- package/themes/franchises/src/components/ProductItemAccordion/index.tsx +0 -276
- package/themes/franchises/src/components/ProductItemAccordion/styles.tsx +0 -57
- package/themes/franchises/src/components/ProductOption/index.tsx +0 -50
- package/themes/franchises/src/components/ProductOption/styles.tsx +0 -11
- package/themes/franchises/src/components/ProductOptionSubOption/index.tsx +0 -146
- package/themes/franchises/src/components/ProductOptionSubOption/styles.tsx +0 -32
- package/themes/franchises/src/components/ReviewDriver/index.tsx +0 -221
- package/themes/franchises/src/components/ReviewDriver/styles.tsx +0 -46
- package/themes/franchises/src/components/ReviewOrder/index.tsx +0 -325
- package/themes/franchises/src/components/ReviewOrder/styles.tsx +0 -46
- package/themes/franchises/src/components/ReviewProduct/index.tsx +0 -275
- package/themes/franchises/src/components/ReviewProduct/styles.tsx +0 -53
- package/themes/franchises/src/components/SearchBar/index.tsx +0 -139
- package/themes/franchises/src/components/SignupForm/index.tsx +0 -643
- package/themes/franchises/src/components/SignupForm/styles.tsx +0 -27
- package/themes/franchises/src/components/SingleProductCard/index.tsx +0 -124
- package/themes/franchises/src/components/SingleProductCard/styles.tsx +0 -23
- package/themes/franchises/src/components/StripeCardForm/index.tsx +0 -97
- package/themes/franchises/src/components/StripeCardForm/naked.tsx +0 -128
- package/themes/franchises/src/components/StripeCardForm/styles.tsx +0 -32
- package/themes/franchises/src/components/StripeCardsList/index.tsx +0 -182
- package/themes/franchises/src/components/StripeElementsForm/index.tsx +0 -204
- package/themes/franchises/src/components/StripeElementsForm/naked.tsx +0 -90
- package/themes/franchises/src/components/StripeElementsForm/styles.tsx +0 -13
- package/themes/franchises/src/components/StripeRedirectForm/index.tsx +0 -159
- package/themes/franchises/src/components/StripeRedirectForm/styles.tsx +0 -23
- package/themes/franchises/src/components/TagSelector/index.tsx +0 -94
- package/themes/franchises/src/components/TagSelector/styles.ts +0 -0
- package/themes/franchises/src/components/TaxInformation/index.tsx +0 -51
- package/themes/franchises/src/components/TaxInformation/styles.tsx +0 -9
- package/themes/franchises/src/components/UpsellingProducts/index.tsx +0 -222
- package/themes/franchises/src/components/UpsellingProducts/styles.tsx +0 -50
- package/themes/franchises/src/components/UserDetails/index.tsx +0 -134
- package/themes/franchises/src/components/UserDetails/styles.tsx +0 -26
- package/themes/franchises/src/components/UserFormDetails/index.tsx +0 -351
- package/themes/franchises/src/components/UserFormDetails/styles.tsx +0 -35
- package/themes/franchises/src/components/UserProfile/index.tsx +0 -179
- package/themes/franchises/src/components/UserProfile/styles.ts +0 -42
- package/themes/franchises/src/components/UserProfileForm/index.tsx +0 -253
- package/themes/franchises/src/components/UserProfileForm/styles.tsx +0 -29
- package/themes/franchises/src/components/VerifyPhone/index.tsx +0 -188
- package/themes/franchises/src/components/VerifyPhone/styles.tsx +0 -43
- package/themes/franchises/src/components/shared/OAlert.tsx +0 -55
- package/themes/franchises/src/components/shared/OBottomPopup.tsx +0 -73
- package/themes/franchises/src/components/shared/OBottomStickBar.tsx +0 -62
- package/themes/franchises/src/components/shared/OButton.tsx +0 -132
- package/themes/franchises/src/components/shared/ODropDown.tsx +0 -169
- package/themes/franchises/src/components/shared/OIcon.tsx +0 -53
- package/themes/franchises/src/components/shared/OIconButton.tsx +0 -127
- package/themes/franchises/src/components/shared/OIconText.tsx +0 -54
- package/themes/franchises/src/components/shared/OInput.tsx +0 -113
- package/themes/franchises/src/components/shared/OKeyButton.tsx +0 -35
- package/themes/franchises/src/components/shared/OModal.tsx +0 -172
- package/themes/franchises/src/components/shared/OText.tsx +0 -52
- package/themes/franchises/src/components/shared/OTextarea.tsx +0 -36
- package/themes/franchises/src/components/shared/OToast.tsx +0 -93
- package/themes/franchises/src/components/shared/OToggle.tsx +0 -158
- package/themes/franchises/src/components/shared/index.tsx +0 -29
- package/themes/franchises/src/config/constants.tsx +0 -57
- package/themes/franchises/src/layouts/Container.tsx +0 -23
- package/themes/franchises/src/layouts/SafeAreaContainer.tsx +0 -6
- package/themes/franchises/src/providers/AlertProvider.tsx +0 -43
- package/themes/franchises/src/providers/StoreUtil.tsx +0 -50
- package/themes/franchises/src/types/index.tsx +0 -445
- package/themes/franchises/src/utils/index.tsx +0 -222
package/package.json
CHANGED
|
@@ -16,14 +16,14 @@ import { ProductItemAccordion } from '../ProductItemAccordion';
|
|
|
16
16
|
import { BusinessItemAccordion } from '../BusinessItemAccordion';
|
|
17
17
|
import { CouponControl } from '../CouponControl';
|
|
18
18
|
|
|
19
|
-
import { OButton, OModal, OText } from '../shared';
|
|
19
|
+
import { OButton, OModal, OText, OInput } from '../shared';
|
|
20
20
|
import { ProductForm } from '../ProductForm';
|
|
21
21
|
import { UpsellingProducts } from '../UpsellingProducts';
|
|
22
22
|
import { verifyDecimals } from '../../utils';
|
|
23
23
|
import { useTheme } from 'styled-components/native';
|
|
24
24
|
import AntIcon from 'react-native-vector-icons/AntDesign'
|
|
25
25
|
import { TaxInformation } from '../TaxInformation';
|
|
26
|
-
import { TouchableOpacity } from 'react-native';
|
|
26
|
+
import { ActivityIndicator, TouchableOpacity, View } from 'react-native';
|
|
27
27
|
|
|
28
28
|
const CartUI = (props: any) => {
|
|
29
29
|
const {
|
|
@@ -35,6 +35,8 @@ const CartUI = (props: any) => {
|
|
|
35
35
|
removeProduct,
|
|
36
36
|
handleCartOpen,
|
|
37
37
|
setIsCartsLoading,
|
|
38
|
+
handleChangeComment,
|
|
39
|
+
commentState
|
|
38
40
|
} = props
|
|
39
41
|
|
|
40
42
|
const theme = useTheme()
|
|
@@ -180,19 +182,19 @@ const CartUI = (props: any) => {
|
|
|
180
182
|
))
|
|
181
183
|
}
|
|
182
184
|
{
|
|
183
|
-
cart?.fees?.length > 0 && cart?.fees?.filter((fee
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
185
|
+
cart?.fees?.length > 0 && cart?.fees?.filter((fee: any) => !(fee.fixed === 0 && fee.percentage === 0)).map((fee: any) => (
|
|
186
|
+
<OSTable key={fee?.id}>
|
|
187
|
+
<OSRow>
|
|
188
|
+
<OText numberOfLines={1}>
|
|
189
|
+
{fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}{' '}
|
|
190
|
+
({parsePrice(fee?.fixed)} + {fee?.percentage}%){' '}
|
|
191
|
+
</OText>
|
|
192
|
+
<TouchableOpacity onPress={() => setOpenTaxModal({ open: true, data: fee })} >
|
|
193
|
+
<AntIcon name='exclamationcircleo' size={18} color={theme.colors.primary} />
|
|
194
|
+
</TouchableOpacity>
|
|
195
|
+
</OSRow>
|
|
196
|
+
<OText>{parsePrice(fee?.summary?.fixed + fee?.summary?.percentage || 0)}</OText>
|
|
197
|
+
</OSTable>
|
|
196
198
|
))
|
|
197
199
|
}
|
|
198
200
|
{orderState?.options?.type === 1 && cart?.delivery_price > 0 && (
|
|
@@ -235,6 +237,38 @@ const CartUI = (props: any) => {
|
|
|
235
237
|
</OText>
|
|
236
238
|
</OSTable>
|
|
237
239
|
</OSTotal>
|
|
240
|
+
{cart?.status !== 2 && (
|
|
241
|
+
<OSTable>
|
|
242
|
+
<View style={{ width: '100%', marginTop: 20 }}>
|
|
243
|
+
<OText>{t('COMMENTS', 'Comments')}</OText>
|
|
244
|
+
<View style={{ flex: 1, width: '100%' }}>
|
|
245
|
+
<OInput
|
|
246
|
+
value={cart?.comment}
|
|
247
|
+
placeholder={t('SPECIAL_COMMENTS', 'Special Comments')}
|
|
248
|
+
onChange={(value: string) => handleChangeComment(value)}
|
|
249
|
+
style={{
|
|
250
|
+
alignItems: 'flex-start',
|
|
251
|
+
width: '100%',
|
|
252
|
+
height: 100,
|
|
253
|
+
borderColor: theme.colors.textSecondary,
|
|
254
|
+
paddingRight: 50,
|
|
255
|
+
marginTop: 10
|
|
256
|
+
}}
|
|
257
|
+
multiline
|
|
258
|
+
/>
|
|
259
|
+
{commentState?.loading && (
|
|
260
|
+
<View style={{ position: 'absolute', right: 20 }}>
|
|
261
|
+
<ActivityIndicator
|
|
262
|
+
size='large'
|
|
263
|
+
style={{ height: 100 }}
|
|
264
|
+
color={theme.colors.primary}
|
|
265
|
+
/>
|
|
266
|
+
</View>
|
|
267
|
+
)}
|
|
268
|
+
</View>
|
|
269
|
+
</View>
|
|
270
|
+
</OSTable>
|
|
271
|
+
)}
|
|
238
272
|
</OSBill>
|
|
239
273
|
)}
|
|
240
274
|
{cart?.valid_products && (
|
|
@@ -294,7 +328,7 @@ const CartUI = (props: any) => {
|
|
|
294
328
|
onClose={() => setOpenTaxModal({ open: false, data: null })}
|
|
295
329
|
entireModal
|
|
296
330
|
>
|
|
297
|
-
<TaxInformation data={openTaxModal.data} products={cart
|
|
331
|
+
<TaxInformation data={openTaxModal.data} products={cart?.products} />
|
|
298
332
|
</OModal>
|
|
299
333
|
</CContainer>
|
|
300
334
|
)
|
|
@@ -527,6 +527,14 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
527
527
|
</OText>
|
|
528
528
|
</Table>
|
|
529
529
|
</Total>
|
|
530
|
+
{order?.comment && (
|
|
531
|
+
<Table>
|
|
532
|
+
<OText style={{flex: 1}}>{t('COMMENT', 'Comment')}</OText>
|
|
533
|
+
<OText style={{maxWidth: '70%'}}>
|
|
534
|
+
{order?.comment}
|
|
535
|
+
</OText>
|
|
536
|
+
</Table>
|
|
537
|
+
)}
|
|
530
538
|
{
|
|
531
539
|
(
|
|
532
540
|
parseInt(order?.status) === 1 ||
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { TouchableOpacity, View } from 'react-native'
|
|
2
|
+
import { ActivityIndicator, TouchableOpacity, View } from 'react-native'
|
|
3
3
|
import {
|
|
4
4
|
Cart,
|
|
5
5
|
useOrder,
|
|
@@ -19,12 +19,13 @@ import {
|
|
|
19
19
|
|
|
20
20
|
import { ProductItemAccordion } from '../ProductItemAccordion';
|
|
21
21
|
import { CouponControl } from '../CouponControl';
|
|
22
|
-
import { OModal, OText } from '../shared';
|
|
22
|
+
import { OInput, OModal, OText } from '../shared';
|
|
23
23
|
import { ProductForm } from '../ProductForm';
|
|
24
24
|
import { verifyDecimals } from '../../utils';
|
|
25
25
|
import { useTheme } from 'styled-components/native';
|
|
26
26
|
import { TaxInformation } from '../TaxInformation';
|
|
27
27
|
import AntIcon from 'react-native-vector-icons/AntDesign'
|
|
28
|
+
|
|
28
29
|
const OrderSummaryUI = (props: any) => {
|
|
29
30
|
const {
|
|
30
31
|
cart,
|
|
@@ -33,7 +34,9 @@ const OrderSummaryUI = (props: any) => {
|
|
|
33
34
|
offsetDisabled,
|
|
34
35
|
removeProduct,
|
|
35
36
|
isCartPending,
|
|
36
|
-
isFromCheckout
|
|
37
|
+
isFromCheckout,
|
|
38
|
+
commentState,
|
|
39
|
+
handleChangeComment
|
|
37
40
|
} = props;
|
|
38
41
|
|
|
39
42
|
const theme = useTheme();
|
|
@@ -186,6 +189,38 @@ const OrderSummaryUI = (props: any) => {
|
|
|
186
189
|
</OSTable>
|
|
187
190
|
</View>
|
|
188
191
|
)}
|
|
192
|
+
{cart?.status !== 2 && (
|
|
193
|
+
<OSTable>
|
|
194
|
+
<View style={{ width: '100%', marginTop: 20 }}>
|
|
195
|
+
<OText>{t('COMMENTS', 'Comments')}</OText>
|
|
196
|
+
<View style={{ flex: 1, width: '100%' }}>
|
|
197
|
+
<OInput
|
|
198
|
+
value={cart?.comment}
|
|
199
|
+
placeholder={t('SPECIAL_COMMENTS', 'Special Comments')}
|
|
200
|
+
onChange={(value: string) => handleChangeComment(value)}
|
|
201
|
+
style={{
|
|
202
|
+
alignItems: 'flex-start',
|
|
203
|
+
width: '100%',
|
|
204
|
+
height: 100,
|
|
205
|
+
borderColor: theme.colors.textSecondary,
|
|
206
|
+
paddingRight: 50,
|
|
207
|
+
marginTop: 10
|
|
208
|
+
}}
|
|
209
|
+
multiline
|
|
210
|
+
/>
|
|
211
|
+
{commentState?.loading && (
|
|
212
|
+
<View style={{ position: 'absolute', right: 20 }}>
|
|
213
|
+
<ActivityIndicator
|
|
214
|
+
size='large'
|
|
215
|
+
style={{ height: 100 }}
|
|
216
|
+
color={theme.colors.primary}
|
|
217
|
+
/>
|
|
218
|
+
</View>
|
|
219
|
+
)}
|
|
220
|
+
</View>
|
|
221
|
+
</View>
|
|
222
|
+
</OSTable>
|
|
223
|
+
)}
|
|
189
224
|
</OSBill>
|
|
190
225
|
)}
|
|
191
226
|
<OModal
|
|
@@ -19,7 +19,7 @@ const SafeAreaStyled = styled.SafeAreaView`
|
|
|
19
19
|
export const Container = (props: any) => {
|
|
20
20
|
return (
|
|
21
21
|
<SafeAreaStyled>
|
|
22
|
-
<ContainerStyled
|
|
22
|
+
<ContainerStyled ref={props?.forwardRef} nopadding={props.nopadding} keyboardShouldPersistTaps='handled'>
|
|
23
23
|
{props.children}
|
|
24
24
|
</ContainerStyled>
|
|
25
25
|
</SafeAreaStyled>
|
|
@@ -428,6 +428,14 @@ export const OrderContentComponent = (props: OrderContent) => {
|
|
|
428
428
|
{parsePrice(order?.summary?.total ?? 0)}
|
|
429
429
|
</OText>
|
|
430
430
|
</Table>
|
|
431
|
+
{order?.comment && (
|
|
432
|
+
<Table>
|
|
433
|
+
<OText style={{ flex: 1 }}>{t('COMMENT', 'Comment')}</OText>
|
|
434
|
+
<OText style={{ maxWidth: '70%' }}>
|
|
435
|
+
{order?.comment}
|
|
436
|
+
</OText>
|
|
437
|
+
</Table>
|
|
438
|
+
)}
|
|
431
439
|
</Total>
|
|
432
440
|
</OrderBill >
|
|
433
441
|
<OModal
|
|
@@ -46,7 +46,9 @@ export const Container = (props: any) => {
|
|
|
46
46
|
<ContainerStyled
|
|
47
47
|
contentContainerStyle={props.style}
|
|
48
48
|
keyboardShouldPersistTaps="handled"
|
|
49
|
-
orientation={orientation}
|
|
49
|
+
orientation={orientation}
|
|
50
|
+
ref={props?.forwardRef}
|
|
51
|
+
>
|
|
50
52
|
{props.children}
|
|
51
53
|
</ContainerStyled>
|
|
52
54
|
</SafeAreaStyled>
|
|
@@ -16,12 +16,12 @@ import { ProductItemAccordion } from '../ProductItemAccordion';
|
|
|
16
16
|
import { BusinessItemAccordion } from '../BusinessItemAccordion';
|
|
17
17
|
import { CouponControl } from '../CouponControl';
|
|
18
18
|
|
|
19
|
-
import { OButton, OModal, OText } from '../shared';
|
|
19
|
+
import { OButton, OInput, OModal, OText } from '../shared';
|
|
20
20
|
import { useTheme } from 'styled-components/native';
|
|
21
21
|
import { ProductForm } from '../ProductForm';
|
|
22
22
|
import { UpsellingProducts } from '../UpsellingProducts';
|
|
23
23
|
import { verifyDecimals } from '../../utils';
|
|
24
|
-
import { Platform } from 'react-native';
|
|
24
|
+
import { ActivityIndicator, Platform, View } from 'react-native';
|
|
25
25
|
import { TaxInformation } from '../TaxInformation';
|
|
26
26
|
import { TouchableOpacity } from 'react-native';
|
|
27
27
|
import AntIcon from 'react-native-vector-icons/AntDesign'
|
|
@@ -36,6 +36,8 @@ const CartUI = (props: any) => {
|
|
|
36
36
|
removeProduct,
|
|
37
37
|
handleCartOpen,
|
|
38
38
|
setIsCartsLoading,
|
|
39
|
+
handleChangeComment,
|
|
40
|
+
commentState
|
|
39
41
|
// isFromCart
|
|
40
42
|
} = props
|
|
41
43
|
const theme = useTheme();
|
|
@@ -222,6 +224,39 @@ const CartUI = (props: any) => {
|
|
|
222
224
|
</OText>
|
|
223
225
|
</OSTable>
|
|
224
226
|
</OSTotal>
|
|
227
|
+
{cart?.status !== 2 && (
|
|
228
|
+
<OSTable>
|
|
229
|
+
<View style={{ width: '100%', marginTop: 20 }}>
|
|
230
|
+
<OText>{t('COMMENTS', 'Comments')}</OText>
|
|
231
|
+
<View style={{ flex: 1, width: '100%' }}>
|
|
232
|
+
<OInput
|
|
233
|
+
value={cart?.comment}
|
|
234
|
+
placeholder={t('SPECIAL_COMMENTS', 'Special Comments')}
|
|
235
|
+
onChange={(value: string) => handleChangeComment(value)}
|
|
236
|
+
style={{
|
|
237
|
+
alignItems: 'flex-start',
|
|
238
|
+
width: '100%',
|
|
239
|
+
height: 100,
|
|
240
|
+
borderColor: theme.colors.textSecondary,
|
|
241
|
+
paddingRight: 50,
|
|
242
|
+
marginTop: 10
|
|
243
|
+
}}
|
|
244
|
+
multiline
|
|
245
|
+
inputStyle={{color: theme.colors.textPrimary}}
|
|
246
|
+
/>
|
|
247
|
+
{commentState?.loading && (
|
|
248
|
+
<View style={{ position: 'absolute', right: 20 }}>
|
|
249
|
+
<ActivityIndicator
|
|
250
|
+
size='large'
|
|
251
|
+
color={theme.colors.primary}
|
|
252
|
+
style={{ height: 100 }}
|
|
253
|
+
/>
|
|
254
|
+
</View>
|
|
255
|
+
)}
|
|
256
|
+
</View>
|
|
257
|
+
</View>
|
|
258
|
+
</OSTable>
|
|
259
|
+
)}
|
|
225
260
|
</OSBill>
|
|
226
261
|
)}
|
|
227
262
|
{cart?.valid_products && (
|
|
@@ -445,6 +445,14 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
445
445
|
<OText size={12} weight={Platform.OS === 'ios' ? '600' : 'bold'}>{parsePrice(order?.summary?.total || order?.total)}</OText>
|
|
446
446
|
</Table>
|
|
447
447
|
</Total>
|
|
448
|
+
{order?.comment && (
|
|
449
|
+
<Table>
|
|
450
|
+
<OText style={{ flex: 1 }}>{t('COMMENT', 'Comment')}</OText>
|
|
451
|
+
<OText style={{ maxWidth: '70%' }}>
|
|
452
|
+
{order?.comment}
|
|
453
|
+
</OText>
|
|
454
|
+
</Table>
|
|
455
|
+
)}
|
|
448
456
|
</OrderBill>
|
|
449
457
|
</OrderContent>
|
|
450
458
|
</>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { TextStyle, TouchableOpacity, View } from 'react-native'
|
|
2
|
+
import { ActivityIndicator, TextStyle, TouchableOpacity, View } from 'react-native'
|
|
3
3
|
import {
|
|
4
4
|
Cart,
|
|
5
5
|
useOrder,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
|
|
20
20
|
import { ProductItemAccordion } from '../ProductItemAccordion';
|
|
21
21
|
import { CouponControl } from '../CouponControl';
|
|
22
|
-
import { OModal, OText } from '../shared';
|
|
22
|
+
import { OInput, OModal, OText } from '../shared';
|
|
23
23
|
import { useTheme } from 'styled-components/native';
|
|
24
24
|
import { ProductForm } from '../ProductForm';
|
|
25
25
|
import { verifyDecimals } from '../../utils';
|
|
@@ -40,6 +40,8 @@ const OrderSummaryUI = (props: any) => {
|
|
|
40
40
|
title,
|
|
41
41
|
paddingH,
|
|
42
42
|
isMini,
|
|
43
|
+
commentState,
|
|
44
|
+
handleChangeComment
|
|
43
45
|
} = props;
|
|
44
46
|
|
|
45
47
|
const theme = useTheme();
|
|
@@ -235,7 +237,39 @@ const OrderSummaryUI = (props: any) => {
|
|
|
235
237
|
)}
|
|
236
238
|
</View>
|
|
237
239
|
) : null}
|
|
238
|
-
|
|
240
|
+
{cart?.status !== 2 && (
|
|
241
|
+
<OSTable>
|
|
242
|
+
<View style={{ width: '100%', marginTop: 20 }}>
|
|
243
|
+
<OText>{t('COMMENTS', 'Comments')}</OText>
|
|
244
|
+
<View style={{ flex: 1, width: '100%' }}>
|
|
245
|
+
<OInput
|
|
246
|
+
value={cart?.comment}
|
|
247
|
+
placeholder={t('SPECIAL_COMMENTS', 'Special Comments')}
|
|
248
|
+
onChange={(value: string) => handleChangeComment(value)}
|
|
249
|
+
style={{
|
|
250
|
+
alignItems: 'flex-start',
|
|
251
|
+
width: '100%',
|
|
252
|
+
height: 100,
|
|
253
|
+
borderColor: theme.colors.textSecondary,
|
|
254
|
+
paddingRight: 50,
|
|
255
|
+
marginTop: 10
|
|
256
|
+
}}
|
|
257
|
+
multiline
|
|
258
|
+
inputStyle={{color: theme.colors.textPrimary}}
|
|
259
|
+
/>
|
|
260
|
+
{commentState?.loading && (
|
|
261
|
+
<View style={{ position: 'absolute', right: 20 }}>
|
|
262
|
+
<ActivityIndicator
|
|
263
|
+
size='large'
|
|
264
|
+
style={{ height: 100 }}
|
|
265
|
+
color={theme.colors.primary}
|
|
266
|
+
/>
|
|
267
|
+
</View>
|
|
268
|
+
)}
|
|
269
|
+
</View>
|
|
270
|
+
</View>
|
|
271
|
+
</OSTable>
|
|
272
|
+
)}
|
|
239
273
|
</OSBill>
|
|
240
274
|
)}
|
|
241
275
|
<OModal
|
|
@@ -18,7 +18,7 @@ const SafeAreaStyled = styled.SafeAreaView`
|
|
|
18
18
|
export const Container = (props: any) => {
|
|
19
19
|
return (
|
|
20
20
|
<SafeAreaStyled>
|
|
21
|
-
<ContainerStyled style={props?.style} {...props} keyboardShouldPersistTaps='handled'>
|
|
21
|
+
<ContainerStyled ref={props?.forwardRef} style={props?.style} {...props} keyboardShouldPersistTaps='handled'>
|
|
22
22
|
{props.children}
|
|
23
23
|
</ContainerStyled>
|
|
24
24
|
</SafeAreaStyled>
|
|
@@ -16,12 +16,12 @@ import { ProductItemAccordion } from '../ProductItemAccordion';
|
|
|
16
16
|
import { BusinessItemAccordion } from '../BusinessItemAccordion';
|
|
17
17
|
import { CouponControl } from '../CouponControl';
|
|
18
18
|
|
|
19
|
-
import { OButton, OModal, OText } from '../shared';
|
|
19
|
+
import { OButton, OInput, OModal, OText } from '../shared';
|
|
20
20
|
import { ProductForm } from '../ProductForm';
|
|
21
21
|
import { UpsellingProducts } from '../UpsellingProducts';
|
|
22
22
|
import { verifyDecimals } from '../../utils';
|
|
23
23
|
import { useTheme } from 'styled-components/native';
|
|
24
|
-
import { TouchableOpacity } from 'react-native';
|
|
24
|
+
import { ActivityIndicator, TouchableOpacity, View } from 'react-native';
|
|
25
25
|
import AntIcon from 'react-native-vector-icons/AntDesign'
|
|
26
26
|
import { TaxInformation } from '../TaxInformation';
|
|
27
27
|
const CartUI = (props: any) => {
|
|
@@ -34,7 +34,9 @@ const CartUI = (props: any) => {
|
|
|
34
34
|
removeProduct,
|
|
35
35
|
handleCartOpen,
|
|
36
36
|
setIsCartsLoading,
|
|
37
|
-
isExpanded
|
|
37
|
+
isExpanded,
|
|
38
|
+
handleChangeComment,
|
|
39
|
+
commentState
|
|
38
40
|
} = props
|
|
39
41
|
|
|
40
42
|
const theme = useTheme()
|
|
@@ -245,6 +247,38 @@ const CartUI = (props: any) => {
|
|
|
245
247
|
</OText>
|
|
246
248
|
</OSTable>
|
|
247
249
|
</OSTotal>
|
|
250
|
+
{cart?.status !== 2 && (
|
|
251
|
+
<OSTable>
|
|
252
|
+
<View style={{ width: '100%', marginTop: 20 }}>
|
|
253
|
+
<OText>{t('COMMENTS', 'Comments')}</OText>
|
|
254
|
+
<View style={{ flex: 1, width: '100%' }}>
|
|
255
|
+
<OInput
|
|
256
|
+
value={cart?.comment}
|
|
257
|
+
placeholder={t('SPECIAL_COMMENTS', 'Special Comments')}
|
|
258
|
+
onChange={(value: string) => handleChangeComment(value)}
|
|
259
|
+
style={{
|
|
260
|
+
alignItems: 'flex-start',
|
|
261
|
+
width: '100%',
|
|
262
|
+
height: 100,
|
|
263
|
+
borderColor: theme.colors.textSecondary,
|
|
264
|
+
paddingRight: 50,
|
|
265
|
+
marginTop: 10
|
|
266
|
+
}}
|
|
267
|
+
multiline
|
|
268
|
+
/>
|
|
269
|
+
{commentState?.loading && (
|
|
270
|
+
<View style={{ position: 'absolute', right: 20 }}>
|
|
271
|
+
<ActivityIndicator
|
|
272
|
+
size='large'
|
|
273
|
+
style={{ height: 100 }}
|
|
274
|
+
color={theme.colors.primary}
|
|
275
|
+
/>
|
|
276
|
+
</View>
|
|
277
|
+
)}
|
|
278
|
+
</View>
|
|
279
|
+
</View>
|
|
280
|
+
</OSTable>
|
|
281
|
+
)}
|
|
248
282
|
</OSBill>
|
|
249
283
|
)}
|
|
250
284
|
{cart?.valid_products && (
|
|
@@ -478,6 +478,14 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
478
478
|
<OText style={{ ...theme.labels.normal, fontWeight: '600', color: theme.colors.textPrimary }}>{t('TOTAL', 'Total')}</OText>
|
|
479
479
|
<OText style={{ ...theme.labels.normal, fontWeight: '600', color: theme.colors.textPrimary }}>{parsePrice(order?.summary?.total || order?.total)}</OText>
|
|
480
480
|
</Table>
|
|
481
|
+
{order?.comment && (
|
|
482
|
+
<Table>
|
|
483
|
+
<OText color={theme.colors.textPrimary} size={12} style={{ flex: 1 }}>{t('COMMENT', 'Comment')}</OText>
|
|
484
|
+
<OText color={theme.colors.textPrimary} size={12} style={{ maxWidth: '70%' }}>
|
|
485
|
+
{order?.comment}
|
|
486
|
+
</OText>
|
|
487
|
+
</Table>
|
|
488
|
+
)}
|
|
481
489
|
</OrderBill>
|
|
482
490
|
</OrderContent>
|
|
483
491
|
</>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { TouchableOpacity, View } from 'react-native'
|
|
2
|
+
import { ActivityIndicator, TouchableOpacity, View } from 'react-native'
|
|
3
3
|
import {
|
|
4
4
|
Cart,
|
|
5
5
|
useOrder,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
|
|
20
20
|
import { ProductItemAccordion } from '../ProductItemAccordion';
|
|
21
21
|
import { CouponControl } from '../CouponControl';
|
|
22
|
-
import { OIcon, OModal, OText } from '../shared';
|
|
22
|
+
import { OIcon, OInput, OModal, OText } from '../shared';
|
|
23
23
|
import { ProductForm } from '../ProductForm';
|
|
24
24
|
import { verifyDecimals } from '../../utils';
|
|
25
25
|
import { useTheme } from 'styled-components/native';
|
|
@@ -38,7 +38,9 @@ const OrderSummaryUI = (props: any) => {
|
|
|
38
38
|
isFromCheckout,
|
|
39
39
|
isDriverTips,
|
|
40
40
|
handleProductDelete,
|
|
41
|
-
handleProductEdit
|
|
41
|
+
handleProductEdit,
|
|
42
|
+
handleChangeComment,
|
|
43
|
+
commentState
|
|
42
44
|
} = props;
|
|
43
45
|
|
|
44
46
|
const theme = useTheme();
|
|
@@ -218,7 +220,38 @@ const OrderSummaryUI = (props: any) => {
|
|
|
218
220
|
</View>
|
|
219
221
|
</View>
|
|
220
222
|
)}
|
|
221
|
-
|
|
223
|
+
{cart?.status !== 2 && (
|
|
224
|
+
<OSTable>
|
|
225
|
+
<View style={{ width: '100%', marginTop: 20 }}>
|
|
226
|
+
<OText>{t('COMMENTS', 'Comments')}</OText>
|
|
227
|
+
<View style={{ flex: 1, width: '100%' }}>
|
|
228
|
+
<OInput
|
|
229
|
+
value={cart?.comment}
|
|
230
|
+
placeholder={t('SPECIAL_COMMENTS', 'Special Comments')}
|
|
231
|
+
onChange={(value: string) => handleChangeComment(value)}
|
|
232
|
+
style={{
|
|
233
|
+
alignItems: 'flex-start',
|
|
234
|
+
width: '100%',
|
|
235
|
+
height: 100,
|
|
236
|
+
borderColor: theme.colors.textSecondary,
|
|
237
|
+
paddingRight: 50,
|
|
238
|
+
marginTop: 10
|
|
239
|
+
}}
|
|
240
|
+
multiline
|
|
241
|
+
/>
|
|
242
|
+
{commentState?.loading && (
|
|
243
|
+
<View style={{ position: 'absolute', right: 20 }}>
|
|
244
|
+
<ActivityIndicator
|
|
245
|
+
size='large'
|
|
246
|
+
style={{ height: 100 }}
|
|
247
|
+
color={theme.colors.primary}
|
|
248
|
+
/>
|
|
249
|
+
</View>
|
|
250
|
+
)}
|
|
251
|
+
</View>
|
|
252
|
+
</View>
|
|
253
|
+
</OSTable>
|
|
254
|
+
)}
|
|
222
255
|
</OSBill>
|
|
223
256
|
)}
|
|
224
257
|
<OModal
|
|
@@ -20,7 +20,7 @@ export const Container = (props: any) => {
|
|
|
20
20
|
{props.children}
|
|
21
21
|
</View>
|
|
22
22
|
) : (
|
|
23
|
-
<ContainerStyled keyboardShouldPersistTaps='handled' {...props} style={{ padding: props.nopadding ? 0 : 40, paddingTop: 0 }}>
|
|
23
|
+
<ContainerStyled {...props} ref={props?.forwardRef} keyboardShouldPersistTaps='handled' {...props} style={{ padding: props.nopadding ? 0 : 40, paddingTop: 0 }}>
|
|
24
24
|
{props.children}
|
|
25
25
|
</ContainerStyled>
|
|
26
26
|
)}
|
|
@@ -22,7 +22,7 @@ export const Container = (props: Props) => {
|
|
|
22
22
|
<SafeAreStyled
|
|
23
23
|
nestedScrollEnabled={props.nestedScrollEnabled}
|
|
24
24
|
>
|
|
25
|
-
<ContainerStyled {...props}>{props.children}</ContainerStyled>
|
|
25
|
+
<ContainerStyled {...props} ref={props?.forwardRef}>{props.children}</ContainerStyled>
|
|
26
26
|
</SafeAreStyled>
|
|
27
27
|
);
|
|
28
28
|
};
|
|
@@ -35,4 +35,5 @@ interface Props {
|
|
|
35
35
|
nestedScrollEnabled: boolean,
|
|
36
36
|
nopadding?: boolean;
|
|
37
37
|
children?: any;
|
|
38
|
+
forwardRef?: any
|
|
38
39
|
}
|