ordering-ui-react-native 0.14.30 → 0.14.31
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/BusinessPreorder/index.tsx +2 -1
- package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
- package/themes/original/src/components/DriverTips/index.tsx +3 -3
- package/themes/original/src/components/DriverTips/styles.tsx +5 -5
- package/themes/original/src/components/ProductItemAccordion/index.tsx +2 -2
- package/themes/original/src/components/SingleProductCard/index.tsx +3 -4
- package/themes/original/src/components/SingleProductCard/styles.tsx +3 -1
- package/themes/original/src/types/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
82
82
|
paddingBottom: 15,
|
|
83
83
|
borderBottomWidth: 1,
|
|
84
84
|
borderColor: theme.colors.backgroundGray200,
|
|
85
|
-
height:
|
|
85
|
+
height: 100
|
|
86
86
|
},
|
|
87
87
|
calendarHeaderContainer: {
|
|
88
88
|
flex: 1,
|
|
@@ -400,6 +400,7 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
400
400
|
iconStyle={{borderWidth: 1}}
|
|
401
401
|
selectedDate={selectDate}
|
|
402
402
|
datesWhitelist={datesWhitelist}
|
|
403
|
+
dayContainerStyle={{height: 40}}
|
|
403
404
|
disabledDateNameStyle={styles.disabledDateName}
|
|
404
405
|
disabledDateNumberStyle={styles.disabledDateNumber}
|
|
405
406
|
disabledDateOpacity={0.6}
|
|
@@ -49,7 +49,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
|
|
|
49
49
|
product={product}
|
|
50
50
|
businessId={businessId}
|
|
51
51
|
onProductClick={() => onProductClick(product)}
|
|
52
|
-
|
|
52
|
+
productAddedToCartLength={currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
|
|
53
53
|
/>
|
|
54
54
|
))}
|
|
55
55
|
|
|
@@ -72,7 +72,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
|
|
|
72
72
|
product={product}
|
|
73
73
|
businessId={businessId}
|
|
74
74
|
onProductClick={onProductClick}
|
|
75
|
-
|
|
75
|
+
productAddedToCartLength={currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
|
|
76
76
|
/>
|
|
77
77
|
),
|
|
78
78
|
)}
|
|
@@ -117,7 +117,7 @@ const BusinessProductsListUI = (props: BusinessProductsListParams) => {
|
|
|
117
117
|
businessId={businessId}
|
|
118
118
|
product={product}
|
|
119
119
|
onProductClick={onProductClick}
|
|
120
|
-
|
|
120
|
+
productAddedToCartLength={currentCart?.products?.reduce((productsLength: number, Cproduct: any) => { return productsLength + (Cproduct?.id === product?.id ? Cproduct?.quantity : 0) }, 0)}
|
|
121
121
|
/>
|
|
122
122
|
))}
|
|
123
123
|
</>
|
|
@@ -44,7 +44,7 @@ const DriverTipsUI = (props: any) => {
|
|
|
44
44
|
borderWidth: 1,
|
|
45
45
|
borderColor: theme.colors.inputDisabled,
|
|
46
46
|
marginRight: 10,
|
|
47
|
-
height:
|
|
47
|
+
height: 50
|
|
48
48
|
}
|
|
49
49
|
})
|
|
50
50
|
|
|
@@ -63,7 +63,7 @@ const DriverTipsUI = (props: any) => {
|
|
|
63
63
|
return (
|
|
64
64
|
<DTContainer>
|
|
65
65
|
<DTWrapperTips>
|
|
66
|
-
{driverTipsOptions.map((option: any, i: number) => (
|
|
66
|
+
{driverTipsOptions.map((option: any, i: number) => (
|
|
67
67
|
<TouchableOpacity
|
|
68
68
|
key={i}
|
|
69
69
|
onPress={() => handlerChangeOption(option)}
|
|
@@ -72,7 +72,7 @@ const DriverTipsUI = (props: any) => {
|
|
|
72
72
|
style={style.circle}
|
|
73
73
|
isActive={option === optionSelected}
|
|
74
74
|
>
|
|
75
|
-
<OText size={
|
|
75
|
+
<OText size={12} numberOfLines={1} color={option === optionSelected ? '#FFF' : theme.colors.textSecondary}>
|
|
76
76
|
{`${isFixedPrice ? parsePrice(option) : `${option}%`}`}
|
|
77
77
|
</OText>
|
|
78
78
|
</DTCard>
|
|
@@ -15,7 +15,7 @@ export const DTWrapperTips = styled.View`
|
|
|
15
15
|
width: 100%;
|
|
16
16
|
justify-content: space-evenly;
|
|
17
17
|
align-items: center;
|
|
18
|
-
flex-wrap:
|
|
18
|
+
flex-wrap: wrap;
|
|
19
19
|
`
|
|
20
20
|
|
|
21
21
|
export const DTCard = styled.View`
|
|
@@ -24,10 +24,10 @@ export const DTCard = styled.View`
|
|
|
24
24
|
align-items: center;
|
|
25
25
|
border: 1px solid ${(props: any) => props.isActive ? props.theme.colors.primary : props.theme.colors.border};
|
|
26
26
|
text-transform: capitalize;
|
|
27
|
-
min-height:
|
|
28
|
-
min-width:
|
|
29
|
-
max-width:
|
|
30
|
-
max-height:
|
|
27
|
+
min-height: 55px;
|
|
28
|
+
min-width: 55px;
|
|
29
|
+
max-width: 55px;
|
|
30
|
+
max-height: 55px;
|
|
31
31
|
margin-right: 10px;
|
|
32
32
|
margin-left: 10px;
|
|
33
33
|
margin-top: 10px;
|
|
@@ -212,8 +212,8 @@ export const ProductItemAccordion = (props: ProductItemAccordionParams) => {
|
|
|
212
212
|
</View>
|
|
213
213
|
{((isCartProduct && !isCartPending && product?.valid_menu && !product?.valid_quantity) ||
|
|
214
214
|
(!product?.valid_menu && isCartProduct && !isCartPending)) && (
|
|
215
|
-
<View style={{ alignItems: 'flex-end', width: '100%' }}>
|
|
216
|
-
<OText size={14} color={theme.colors.red} style={{ textAlign: 'right',
|
|
215
|
+
<View style={{ alignItems: 'flex-end', width: '100%', }}>
|
|
216
|
+
<OText size={14} color={theme.colors.red} style={{ textAlign: 'right', marginTop: 5 }}>
|
|
217
217
|
{t('NOT_AVAILABLE', 'Not available')}
|
|
218
218
|
</OText>
|
|
219
219
|
</View>
|
|
@@ -13,7 +13,7 @@ import { OText, OIcon } from '../shared';
|
|
|
13
13
|
import FastImage from 'react-native-fast-image'
|
|
14
14
|
|
|
15
15
|
export const SingleProductCard = (props: SingleProductCardParams) => {
|
|
16
|
-
const { businessId, product, isSoldOut, onProductClick,
|
|
16
|
+
const { businessId, product, isSoldOut, onProductClick, productAddedToCartLength } = props;
|
|
17
17
|
|
|
18
18
|
const theme = useTheme();
|
|
19
19
|
|
|
@@ -90,7 +90,6 @@ export const SingleProductCard = (props: SingleProductCardParams) => {
|
|
|
90
90
|
maxCartProductConfig,
|
|
91
91
|
maxCartProductInventory,
|
|
92
92
|
);
|
|
93
|
-
|
|
94
93
|
return (
|
|
95
94
|
<CardContainer
|
|
96
95
|
style={[
|
|
@@ -98,11 +97,11 @@ export const SingleProductCard = (props: SingleProductCardParams) => {
|
|
|
98
97
|
(isSoldOut || maxProductQuantity <= 0) && styles.soldOutBackgroundStyle,
|
|
99
98
|
]}
|
|
100
99
|
onPress={() => onProductClick?.(product)}>
|
|
101
|
-
{
|
|
100
|
+
{productAddedToCartLength > 0 && (
|
|
102
101
|
<QuantityContainer style={[styles.quantityContainer, {
|
|
103
102
|
transform: [{ translateX: 10 }, { translateY: -10 }],
|
|
104
103
|
}]}>
|
|
105
|
-
<OText color={theme.colors.white}>{
|
|
104
|
+
<OText size={12} color={theme.colors.white}>{productAddedToCartLength.toString()}</OText>
|
|
106
105
|
</QuantityContainer>
|
|
107
106
|
)}
|
|
108
107
|
<CardInfo>
|
|
@@ -221,7 +221,7 @@ export interface SingleProductCardParams {
|
|
|
221
221
|
product: any;
|
|
222
222
|
isSoldOut: boolean;
|
|
223
223
|
onProductClick: any;
|
|
224
|
-
|
|
224
|
+
productAddedToCartLength: number
|
|
225
225
|
}
|
|
226
226
|
export interface BusinessInformationParams {
|
|
227
227
|
navigation?: any,
|