ordering-ui-react-native 0.12.58 → 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/themes/doordash/src/components/Cart/index.tsx +1 -0
- package/themes/doordash/src/components/OrderSummary/index.tsx +1 -0
- package/themes/instacart/src/components/OrderDetails/index.tsx +2 -2
- package/themes/single-business/src/components/Cart/index.tsx +37 -2
- package/themes/single-business/src/components/OrderDetails/index.tsx +724 -708
- package/themes/single-business/src/components/OrderSummary/index.tsx +189 -154
package/package.json
CHANGED
|
@@ -480,8 +480,8 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
480
480
|
</Table>
|
|
481
481
|
{order?.comment && (
|
|
482
482
|
<Table>
|
|
483
|
-
<OText style={{ flex: 1 }}>{t('COMMENT', 'Comment')}</OText>
|
|
484
|
-
<OText style={{ maxWidth: '70%' }}>
|
|
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
485
|
{order?.comment}
|
|
486
486
|
</OText>
|
|
487
487
|
</Table>
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
useValidationFields,
|
|
9
9
|
} from 'ordering-components/native';
|
|
10
10
|
import { useTheme } from 'styled-components/native';
|
|
11
|
-
import { ScrollView, View, useWindowDimensions } from 'react-native';
|
|
11
|
+
import { ScrollView, View, useWindowDimensions, ActivityIndicator } from 'react-native';
|
|
12
12
|
import {
|
|
13
13
|
CheckoutAction,
|
|
14
14
|
OSBill,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import { ProductItemAccordion } from '../ProductItemAccordion';
|
|
27
27
|
import { CouponControl } from '../CouponControl';
|
|
28
28
|
|
|
29
|
-
import { OButton,
|
|
29
|
+
import { OButton, OInput, OModal, OText, OIcon } from '../shared';
|
|
30
30
|
import { ProductForm } from '../ProductForm';
|
|
31
31
|
import { UpsellingProducts } from '../UpsellingProducts';
|
|
32
32
|
import { convertHoursToMinutes, verifyDecimals } from '../../utils';
|
|
@@ -37,6 +37,7 @@ import AntIcon from 'react-native-vector-icons/AntDesign'
|
|
|
37
37
|
import MaterialCommunityIcon from 'react-native-vector-icons/MaterialCommunityIcons'
|
|
38
38
|
import { TaxInformation } from '../TaxInformation';
|
|
39
39
|
import { TouchableOpacity } from 'react-native';
|
|
40
|
+
|
|
40
41
|
const CartUI = (props: any) => {
|
|
41
42
|
const {
|
|
42
43
|
cart,
|
|
@@ -48,6 +49,8 @@ const CartUI = (props: any) => {
|
|
|
48
49
|
removeProduct,
|
|
49
50
|
handleCartOpen,
|
|
50
51
|
setIsCartsLoading,
|
|
52
|
+
handleChangeComment,
|
|
53
|
+
commentState
|
|
51
54
|
} = props
|
|
52
55
|
|
|
53
56
|
const theme = useTheme();
|
|
@@ -314,6 +317,38 @@ const CartUI = (props: any) => {
|
|
|
314
317
|
</OText>
|
|
315
318
|
</OSTable>
|
|
316
319
|
</OSTotal>
|
|
320
|
+
{cart?.status !== 2 && (
|
|
321
|
+
<OSTable>
|
|
322
|
+
<View style={{ width: '100%', marginTop: 20 }}>
|
|
323
|
+
<OText size={12}>{t('COMMENTS', 'Comments')}</OText>
|
|
324
|
+
<View style={{ flex: 1, width: '100%' }}>
|
|
325
|
+
<OInput
|
|
326
|
+
value={cart?.comment}
|
|
327
|
+
placeholder={t('SPECIAL_COMMENTS', 'Special Comments')}
|
|
328
|
+
onChange={(value: string) => handleChangeComment(value)}
|
|
329
|
+
style={{
|
|
330
|
+
alignItems: 'flex-start',
|
|
331
|
+
width: '100%',
|
|
332
|
+
height: 100,
|
|
333
|
+
borderColor: theme.colors.textSecondary,
|
|
334
|
+
paddingRight: 50,
|
|
335
|
+
marginTop: 10
|
|
336
|
+
}}
|
|
337
|
+
multiline
|
|
338
|
+
/>
|
|
339
|
+
{commentState?.loading && (
|
|
340
|
+
<View style={{ position: 'absolute', right: 20 }}>
|
|
341
|
+
<ActivityIndicator
|
|
342
|
+
size='large'
|
|
343
|
+
style={{ height: 100 }}
|
|
344
|
+
color={theme.colors.primary}
|
|
345
|
+
/>
|
|
346
|
+
</View>
|
|
347
|
+
)}
|
|
348
|
+
</View>
|
|
349
|
+
</View>
|
|
350
|
+
</OSTable>
|
|
351
|
+
)}
|
|
317
352
|
</OSBill>
|
|
318
353
|
)}
|
|
319
354
|
</View>
|