ordering-ui-react-native 0.18.71 → 0.18.73
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/original/src/components/AddressForm/index.tsx +6 -6
- package/themes/original/src/components/MultiCheckout/index.tsx +10 -2
- package/themes/original/src/components/MultiCheckout/styles.tsx +3 -1
- package/themes/original/src/components/SingleProductCard/styles.tsx +1 -5
package/package.json
CHANGED
|
@@ -436,16 +436,16 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
436
436
|
if (isEditing) {
|
|
437
437
|
if (formState?.changes?.location) {
|
|
438
438
|
const prevLocation = {
|
|
439
|
-
lat:
|
|
440
|
-
lng:
|
|
439
|
+
lat: locationChange?.lat?.toFixed(5),
|
|
440
|
+
lng: locationChange?.lng?.toFixed(5),
|
|
441
441
|
};
|
|
442
442
|
const newLocation = {
|
|
443
|
-
lat:
|
|
444
|
-
lng:
|
|
443
|
+
lat: formState?.changes?.location?.lat?.toFixed(5),
|
|
444
|
+
lng: formState?.changes?.location?.lng?.toFixed(5),
|
|
445
445
|
};
|
|
446
446
|
if (
|
|
447
|
-
prevLocation
|
|
448
|
-
prevLocation
|
|
447
|
+
prevLocation?.lat !== newLocation?.lat &&
|
|
448
|
+
prevLocation?.lng !== newLocation?.lng
|
|
449
449
|
) {
|
|
450
450
|
setLocationChange(formState?.changes?.location);
|
|
451
451
|
}
|
|
@@ -88,6 +88,7 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
88
88
|
const isPreOrder = configs?.preorder_status_enabled?.value === '1'
|
|
89
89
|
const isMultiDriverTips = configs?.checkout_multi_business_enabled?.value === '1'
|
|
90
90
|
const walletCarts = (Object.values(carts)?.filter((cart: any) => cart?.products && cart?.products?.length && cart?.status !== 2 && cart?.valid_schedule && cart?.valid_products && cart?.valid_address && cart?.valid_maximum && cart?.valid_minimum && cart?.wallets) || null) || []
|
|
91
|
+
const isChewLayout = theme?.header?.components?.layout?.type?.toLowerCase() === 'chew'
|
|
91
92
|
|
|
92
93
|
const walletName: any = {
|
|
93
94
|
cash: {
|
|
@@ -235,8 +236,15 @@ const MultiCheckoutUI = (props: any) => {
|
|
|
235
236
|
<ChContainer style={styles.pagePadding}>
|
|
236
237
|
<ChSection style={{ paddingTop: 0 }}>
|
|
237
238
|
<ChHeader>
|
|
238
|
-
<CHMomentWrapper onPress={() => navigation.navigate('OrderTypes', { configTypes: configTypes })}>
|
|
239
|
-
<OText
|
|
239
|
+
<CHMomentWrapper isCustomColor={isChewLayout} onPress={() => navigation.navigate('OrderTypes', { configTypes: configTypes })}>
|
|
240
|
+
<OText
|
|
241
|
+
size={12}
|
|
242
|
+
numberOfLines={1}
|
|
243
|
+
ellipsizeMode={'tail'}
|
|
244
|
+
color={theme.colors?.[isChewLayout ? 'white' : 'textSecondary']}
|
|
245
|
+
>
|
|
246
|
+
{t(getTypesText(options?.type || 1), 'Delivery')}
|
|
247
|
+
</OText>
|
|
240
248
|
<OIcon
|
|
241
249
|
src={theme.images.general.arrow_down}
|
|
242
250
|
width={10}
|
|
@@ -13,7 +13,9 @@ export const ChHeader = styled.View`
|
|
|
13
13
|
margin: 0px;
|
|
14
14
|
`
|
|
15
15
|
export const CHMomentWrapper = styled.TouchableOpacity`
|
|
16
|
-
background-color: ${(props: any) => props.
|
|
16
|
+
background-color: ${(props: any) => props.isCustomColor
|
|
17
|
+
? props.theme.colors.primary
|
|
18
|
+
: props.theme.colors.backgroundGray100};
|
|
17
19
|
border-radius: 7.6px;
|
|
18
20
|
font-size: 12px;
|
|
19
21
|
max-width: 240px;
|
|
@@ -18,11 +18,7 @@ export const QuantityContainer = styled.View`
|
|
|
18
18
|
background: ${({ theme }: any) => theme.colors.primary};
|
|
19
19
|
align-items: center;
|
|
20
20
|
justify-content: center;
|
|
21
|
-
|
|
22
|
-
left: 0;
|
|
23
|
-
` : css`
|
|
24
|
-
right: 0;
|
|
25
|
-
`}
|
|
21
|
+
left: 0;
|
|
26
22
|
`
|
|
27
23
|
export const PricesContainer = styled.View`
|
|
28
24
|
flex-direction: row;
|