ordering-ui-react-native 0.17.33 → 0.17.34
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
CHANGED
|
@@ -36,6 +36,7 @@ export const MyOrders = (props: any) => {
|
|
|
36
36
|
{ key: 'products', value: t('PRODUCTS', 'Products') }
|
|
37
37
|
]
|
|
38
38
|
const isChewLayout = theme?.business_view?.components?.header?.components?.layout?.type === 'chew'
|
|
39
|
+
const showNavbar = theme?.bar_menu?.components?.orders?.hidden
|
|
39
40
|
|
|
40
41
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack()
|
|
41
42
|
|
|
@@ -72,47 +73,48 @@ export const MyOrders = (props: any) => {
|
|
|
72
73
|
onRefresh={() => handleOnRefresh()}
|
|
73
74
|
/>
|
|
74
75
|
}>
|
|
75
|
-
{isChewLayout && (
|
|
76
|
+
{(isChewLayout || showNavbar) && (
|
|
76
77
|
<View style={{
|
|
77
78
|
width: '100%',
|
|
78
79
|
display: 'flex',
|
|
79
80
|
flexDirection: 'row',
|
|
80
81
|
alignItems: 'center',
|
|
81
|
-
paddingHorizontal: 40
|
|
82
|
+
paddingHorizontal: 40,
|
|
83
|
+
marginTop: Platform.OS === 'android' ? 50 : 30,
|
|
82
84
|
}}>
|
|
85
|
+
<OButton
|
|
86
|
+
imgLeftStyle={{ width: 18 }}
|
|
87
|
+
imgRightSrc={null}
|
|
88
|
+
style={{
|
|
89
|
+
borderWidth: 0,
|
|
90
|
+
width: 26,
|
|
91
|
+
height: 26,
|
|
92
|
+
backgroundColor: '#FFF',
|
|
93
|
+
borderColor: '#FFF',
|
|
94
|
+
shadowColor: '#FFF',
|
|
95
|
+
paddingLeft: 0,
|
|
96
|
+
paddingRight: 0
|
|
97
|
+
}}
|
|
98
|
+
onClick={goToBack}
|
|
99
|
+
icon={AntDesignIcon}
|
|
100
|
+
iconProps={{
|
|
101
|
+
name: 'arrowleft',
|
|
102
|
+
size: 26
|
|
103
|
+
}}
|
|
104
|
+
/>
|
|
83
105
|
<OText
|
|
84
106
|
size={24}
|
|
85
107
|
style={{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
108
|
+
textTransform: 'capitalize',
|
|
109
|
+
marginLeft: 20,
|
|
110
|
+
top: 2
|
|
89
111
|
}}
|
|
90
112
|
>
|
|
91
|
-
<OButton
|
|
92
|
-
imgLeftStyle={{ width: 18 }}
|
|
93
|
-
imgRightSrc={null}
|
|
94
|
-
style={{
|
|
95
|
-
borderWidth: 0,
|
|
96
|
-
width: 26,
|
|
97
|
-
height: 26,
|
|
98
|
-
backgroundColor: '#FFF',
|
|
99
|
-
borderColor: '#FFF',
|
|
100
|
-
shadowColor: '#FFF',
|
|
101
|
-
paddingLeft: 0,
|
|
102
|
-
paddingRight: 0,
|
|
103
|
-
}}
|
|
104
|
-
onClick={goToBack}
|
|
105
|
-
icon={AntDesignIcon}
|
|
106
|
-
iconProps={{
|
|
107
|
-
name: 'arrowleft',
|
|
108
|
-
size: 26
|
|
109
|
-
}}
|
|
110
|
-
/>
|
|
111
113
|
{t('MY_ORDERS', 'My Orders')}
|
|
112
114
|
</OText>
|
|
113
115
|
</View>
|
|
114
116
|
)}
|
|
115
|
-
{!hideOrders && !isChewLayout && (
|
|
117
|
+
{!hideOrders && !isChewLayout && !showNavbar && (
|
|
116
118
|
<HeaderTitle text={t('MY_ORDERS', 'My Orders')} />
|
|
117
119
|
)}
|
|
118
120
|
{!allEmpty && (
|
|
@@ -114,7 +114,6 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
114
114
|
const [confirm, setConfirm] = useState<any>({ open: false, content: null, handleOnAccept: null, id: null, title: null })
|
|
115
115
|
const isWalletEnabled = configs?.cash_wallet?.value && configs?.wallet_enabled?.value === '1' && (configs?.wallet_cash_enabled?.value === '1' || configs?.wallet_credit_point_enabled?.value === '1')
|
|
116
116
|
const IsPromotionsEnabled = configs?.advanced_offers_module?.value === '1' || configs?.advanced_offers_module?.value === true
|
|
117
|
-
const isChewLayout = theme?.business_view?.components?.header?.components?.layout?.type === 'chew'
|
|
118
117
|
const onRedirect = (route: string, params?: any) => {
|
|
119
118
|
navigation.navigate(route, params)
|
|
120
119
|
}
|
|
@@ -200,12 +199,10 @@ const ProfileListUI = (props: ProfileParams) => {
|
|
|
200
199
|
<MessageCircle name='message1' style={styles.messageIconStyle} color={theme.colors.textNormal} />
|
|
201
200
|
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('MESSAGES', 'Messages')}</OText>
|
|
202
201
|
</ListItem>
|
|
203
|
-
{
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
</ListItem>
|
|
208
|
-
)}
|
|
202
|
+
<ListItem onPress={() => onRedirect('MyOrders', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
|
|
203
|
+
<FontAwesome name='list-alt' style={styles.messageIconStyle} color={theme.colors.textNormal} />
|
|
204
|
+
<OText size={14} lineHeight={24} weight={'400'} color={theme.colors.textNormal}>{t('MY_ORDERS', 'My Orders')}</OText>
|
|
205
|
+
</ListItem>
|
|
209
206
|
{isWalletEnabled && (
|
|
210
207
|
<ListItem onPress={() => onRedirect('Wallets', { isFromProfile: true, isGoBack: true })} activeOpacity={0.7}>
|
|
211
208
|
<Ionicons name='wallet-outline' style={styles.messageIconStyle} color={theme.colors.textNormal} />
|