ordering-ui-react-native 0.18.92 → 0.18.94
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/BusinessController/index.tsx +5 -2
- package/themes/original/src/components/BusinessController/styles.tsx +2 -2
- package/themes/original/src/components/BusinessPreorder/index.tsx +6 -3
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +1 -2
package/package.json
CHANGED
|
@@ -229,7 +229,10 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
229
229
|
)}
|
|
230
230
|
{(!isCustomLayout) && !hideBusinessOffer && (
|
|
231
231
|
getBusinessOffer((business?.offers)) &&
|
|
232
|
-
<OfferBox
|
|
232
|
+
<OfferBox
|
|
233
|
+
isClosed={!isBusinessOpen && (configState?.configs?.preorder_status_enabled?.value === '1')}
|
|
234
|
+
isRibbon={business?.ribbon?.enabled && !!business?.ribbon?.text}
|
|
235
|
+
>
|
|
233
236
|
<OText
|
|
234
237
|
size={10}
|
|
235
238
|
weight={'400'}
|
|
@@ -240,7 +243,7 @@ export const BusinessControllerUI = (props: BusinessControllerParams) => {
|
|
|
240
243
|
>{getBusinessOffer((business?.offers)) || parsePrice(0)}</OText>
|
|
241
244
|
</OfferBox>
|
|
242
245
|
)}
|
|
243
|
-
<BusinessState>
|
|
246
|
+
<BusinessState isRibbon={business?.ribbon?.enabled && !!business?.ribbon?.text}>
|
|
244
247
|
{!isBusinessOpen && (configState?.configs?.preorder_status_enabled?.value === '1') && (
|
|
245
248
|
<View style={styles.businessStateView}>
|
|
246
249
|
<OText
|
|
@@ -34,7 +34,7 @@ export const Metadata = styled.View`
|
|
|
34
34
|
|
|
35
35
|
export const BusinessState = styled.View`
|
|
36
36
|
position: absolute;
|
|
37
|
-
|
|
37
|
+
top: ${(props: any) => props.isRibbon ? '32px' : '15px'};
|
|
38
38
|
right: 15px;
|
|
39
39
|
`
|
|
40
40
|
|
|
@@ -86,7 +86,7 @@ export const OfferBox = styled.View`
|
|
|
86
86
|
position: absolute;
|
|
87
87
|
z-index: 1;
|
|
88
88
|
border-radius: 50px;
|
|
89
|
-
top: 15px;
|
|
89
|
+
top: ${(props: any) => props.isRibbon ? '32px' : '15px'};
|
|
90
90
|
right: ${(props: any) => props.isClosed ? '110px' : '15px'};
|
|
91
91
|
background: ${(props: any) => props.theme.colors.inputBorderColor};
|
|
92
92
|
padding: 3px 8px;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useFocusEffect } from '@react-navigation/native'
|
|
2
3
|
import { TouchableOpacity, StyleSheet, View, Dimensions, Platform } from 'react-native'
|
|
3
4
|
import { useLanguage, useUtils, useConfig, useOrder, MomentOption } from 'ordering-components/native'
|
|
4
5
|
import { OButton, OIcon, OText } from '../shared'
|
|
@@ -310,9 +311,11 @@ const BusinessPreorderUI = (props: BusinessPreorderParams) => {
|
|
|
310
311
|
}
|
|
311
312
|
}, [dateSelected])
|
|
312
313
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
314
|
+
useFocusEffect(
|
|
315
|
+
React.useCallback(() => {
|
|
316
|
+
handleAsap && handleAsap()
|
|
317
|
+
}, [])
|
|
318
|
+
)
|
|
316
319
|
|
|
317
320
|
return (
|
|
318
321
|
<>
|