ordering-ui-react-native 0.15.79 → 0.15.82
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/business/src/components/OrderDetails/Delivery.tsx +12 -5
- package/themes/business/src/types/index.tsx +2 -1
- package/themes/kiosk/src/components/Cart/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderDetails/index.tsx +1 -1
- package/themes/original/index.tsx +2 -0
- package/themes/original/src/components/AddressForm/index.tsx +1 -1
- package/themes/original/src/components/AddressList/index.tsx +2 -2
- package/themes/original/src/components/Cart/index.tsx +1 -1
- package/themes/original/src/components/Checkout/index.tsx +14 -16
- package/themes/original/src/components/Messages/index.tsx +1 -1
- package/themes/original/src/components/Promotions/index.tsx +129 -128
- package/themes/original/src/components/Promotions/styles.tsx +2 -0
- package/themes/original/src/components/UpsellingProducts/index.tsx +2 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -51,7 +51,8 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
51
51
|
orderTitle,
|
|
52
52
|
appTitle,
|
|
53
53
|
handleClickLogisticOrder,
|
|
54
|
-
forceUpdate
|
|
54
|
+
forceUpdate,
|
|
55
|
+
getPermissions
|
|
55
56
|
} = props;
|
|
56
57
|
const [, { showToast }] = useToast();
|
|
57
58
|
const { order } = props.order
|
|
@@ -101,9 +102,14 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
101
102
|
};
|
|
102
103
|
|
|
103
104
|
const handleOpenMapView = async () => {
|
|
104
|
-
|
|
105
|
+
const _permissions = await getPermissions()
|
|
106
|
+
|
|
107
|
+
const isBlocked = _permissions.some((_permission: string) => permissions?.locationStatus?.[_permission] === 'blocked')
|
|
108
|
+
const isGranted = _permissions.reduce((allPermissions: boolean, _permission: string) => allPermissions && permissions?.locationStatus?.[_permission] === 'granted', true)
|
|
109
|
+
|
|
110
|
+
if (isGranted) {
|
|
105
111
|
setOpenModalForMapView(!openModalForMapView);
|
|
106
|
-
} else if (
|
|
112
|
+
} else if (isBlocked) {
|
|
107
113
|
// redirectToSettings();
|
|
108
114
|
showToast(
|
|
109
115
|
ToastType.Error,
|
|
@@ -114,8 +120,9 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
114
120
|
);
|
|
115
121
|
} else {
|
|
116
122
|
const response = await askLocationPermission();
|
|
117
|
-
|
|
118
|
-
|
|
123
|
+
const isGranted = _permissions.reduce((allPermissions: boolean, _permission: string) => allPermissions && response?.locationStatus?.[_permission] === 'granted', true)
|
|
124
|
+
if (isGranted) {
|
|
125
|
+
setOpenModalForMapView(true)
|
|
119
126
|
}
|
|
120
127
|
}
|
|
121
128
|
};
|
|
@@ -373,6 +373,7 @@ export interface OrderDetailsParams {
|
|
|
373
373
|
handleClickLogisticOrder?: (status: number, orderId: number) => void;
|
|
374
374
|
orderTitle?: any;
|
|
375
375
|
forceUpdate?: number;
|
|
376
|
+
getPermissions?: any
|
|
376
377
|
}
|
|
377
378
|
export interface ProductItemAccordionParams {
|
|
378
379
|
isCartPending?: boolean;
|
|
@@ -578,4 +579,4 @@ export interface ReviewCustomerParams {
|
|
|
578
579
|
|
|
579
580
|
export interface NoNetworkParams {
|
|
580
581
|
image?: any;
|
|
581
|
-
}
|
|
582
|
+
}
|
|
@@ -281,7 +281,7 @@ const CartUI = (props: any) => {
|
|
|
281
281
|
<OSRow>
|
|
282
282
|
<OText>
|
|
283
283
|
{fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}{' '}
|
|
284
|
-
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)} + `}{fee.percentage}
|
|
284
|
+
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)}${fee.percentage > 0 ? ' + ' : ''}`}{fee.percentage > 0 && `${fee.percentage}%`}){' '}
|
|
285
285
|
</OText>
|
|
286
286
|
</OSRow>
|
|
287
287
|
<OText>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</OText>
|
|
@@ -525,7 +525,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
525
525
|
<OSRow>
|
|
526
526
|
<OText>
|
|
527
527
|
{fee.name || t('INHERIT_FROM_BUSINESS', 'Inherit from business')}
|
|
528
|
-
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)} + `}{fee.percentage}
|
|
528
|
+
({fee?.fixed > 0 && `${parsePrice(fee?.fixed)}${fee.percentage > 0 ? ' + ' : ''}`}{fee.percentage > 0 && `${fee.percentage}%`}){' '}
|
|
529
529
|
</OText>
|
|
530
530
|
</OSRow>
|
|
531
531
|
<OText>{parsePrice(fee?.summary?.fixed + (fee?.summary?.percentage_after_discount ?? fee?.summary?.percentage) ?? 0)}</OText>
|
|
@@ -77,6 +77,7 @@ import { StripeCardsList } from './src/components/StripeCardsList';
|
|
|
77
77
|
import { ProductIngredient } from './src/components/ProductIngredient';
|
|
78
78
|
import { ProductOption } from './src/components/ProductOption';
|
|
79
79
|
import { ProductOptionSubOption } from './src/components/ProductOptionSubOption';
|
|
80
|
+
import { Sessions } from './src/components/Sessions';
|
|
80
81
|
import { SingleProductReview } from './src/components/SingleProductReview';
|
|
81
82
|
import { LogoutButton } from './src/components/LogoutButton';
|
|
82
83
|
import { UserFormDetailsUI } from './src/components/UserFormDetails';
|
|
@@ -227,6 +228,7 @@ export {
|
|
|
227
228
|
ProductIngredient,
|
|
228
229
|
ProductOption,
|
|
229
230
|
ProductOptionSubOption,
|
|
231
|
+
Sessions,
|
|
230
232
|
SingleProductReview,
|
|
231
233
|
LogoutButton,
|
|
232
234
|
UserFormDetailsUI,
|
|
@@ -510,7 +510,7 @@ const AddressFormUI = (props: AddressFormParams) => {
|
|
|
510
510
|
onActionLeft={goToBack}
|
|
511
511
|
showCall={false}
|
|
512
512
|
btnStyle={{ paddingLeft: 0 }}
|
|
513
|
-
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
513
|
+
style={{ flexDirection: 'column', alignItems: 'flex-start', marginTop: Platform.OS === 'ios' ? 0 : 30 }}
|
|
514
514
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
515
515
|
titleStyle={{ marginRight: 0, marginLeft: 0 }}
|
|
516
516
|
/>
|
|
@@ -158,7 +158,7 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
158
158
|
titleAlign={'center'}
|
|
159
159
|
onActionLeft={goToBack}
|
|
160
160
|
showCall={false}
|
|
161
|
-
style={{ paddingHorizontal: 40, paddingVertical: Platform.OS === 'ios' ? 0 : 20 }}
|
|
161
|
+
style={{ paddingHorizontal: 40, paddingVertical: Platform.OS === 'ios' ? 0 : 20, marginTop: Platform.OS === 'ios' ? 0 : 30 }}
|
|
162
162
|
/>
|
|
163
163
|
)}
|
|
164
164
|
{(!addressList.loading || (isFromProductsList || isFromBusinesses || isFromProfile || isProfile)) && (
|
|
@@ -179,7 +179,7 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
179
179
|
showCall={false}
|
|
180
180
|
btnStyle={{ paddingLeft: 0 }}
|
|
181
181
|
paddingTop={0}
|
|
182
|
-
style={{ flexDirection: 'column', alignItems: 'flex-start' }}
|
|
182
|
+
style={{ flexDirection: 'column', alignItems: 'flex-start', marginTop: Platform.OS === 'ios' ? 0 : 40 }}
|
|
183
183
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
184
184
|
titleStyle={{ marginLeft: 0, marginRight: 0 }}
|
|
185
185
|
/>
|
|
@@ -162,7 +162,7 @@ const CartUI = (props: any) => {
|
|
|
162
162
|
handleClearProducts={handleClearProducts}
|
|
163
163
|
handleCartOpen={handleCartOpen}
|
|
164
164
|
onNavigationRedirect={props.onNavigationRedirect}
|
|
165
|
-
handleChangeStore={
|
|
165
|
+
handleChangeStore={() => setOpenChangeStore(true)}
|
|
166
166
|
handleClickCheckout={() => setOpenUpselling(true)}
|
|
167
167
|
checkoutButtonDisabled={(openUpselling && !canOpenUpselling) || cart?.subtotal < cart?.minimum || !cart?.valid_address}
|
|
168
168
|
>
|
|
@@ -597,21 +597,19 @@ const CheckoutUI = (props: any) => {
|
|
|
597
597
|
</OText>
|
|
598
598
|
</TouchableOpacity>
|
|
599
599
|
</CartHeader>
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
600
|
+
<TouchableOpacity
|
|
601
|
+
onPress={() => setOpenChangeStore(true)}
|
|
602
|
+
style={{ alignSelf: 'flex-start' }}
|
|
603
|
+
>
|
|
604
|
+
<OText
|
|
605
|
+
size={12}
|
|
606
|
+
lineHeight={18}
|
|
607
|
+
color={theme.colors.textSecondary}
|
|
608
|
+
style={{ textDecorationLine: 'underline' }}
|
|
604
609
|
>
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
color={theme.colors.textSecondary}
|
|
609
|
-
style={{ textDecorationLine: 'underline' }}
|
|
610
|
-
>
|
|
611
|
-
{t('CHANGE_STORE', 'Change store')}
|
|
612
|
-
</OText>
|
|
613
|
-
</TouchableOpacity>
|
|
614
|
-
)}
|
|
610
|
+
{t('CHANGE_STORE', 'Change store')}
|
|
611
|
+
</OText>
|
|
612
|
+
</TouchableOpacity>
|
|
615
613
|
<OrderSummary
|
|
616
614
|
cart={cart}
|
|
617
615
|
isCartPending={cart?.status === 2}
|
|
@@ -664,7 +662,7 @@ const CheckoutUI = (props: any) => {
|
|
|
664
662
|
</View>
|
|
665
663
|
)}
|
|
666
664
|
<OModal
|
|
667
|
-
open={openChangeStore
|
|
665
|
+
open={openChangeStore}
|
|
668
666
|
entireModal
|
|
669
667
|
customClose
|
|
670
668
|
onClose={() => setOpenChangeStore(false)}
|
|
@@ -873,7 +871,7 @@ export const Checkout = (props: any) => {
|
|
|
873
871
|
...props,
|
|
874
872
|
UIComponent: CheckoutUI,
|
|
875
873
|
cartState,
|
|
876
|
-
|
|
874
|
+
uuid: cartUuid
|
|
877
875
|
}
|
|
878
876
|
|
|
879
877
|
return (
|
|
@@ -39,7 +39,7 @@ const ORDER_STATUS: any = {
|
|
|
39
39
|
23: 'ORDER_DRIVER_ON_WAY'
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
const filterSpecialStatus = ['prepared_in', 'delivered_in']
|
|
42
|
+
const filterSpecialStatus = ['prepared_in', 'delivered_in', 'delivery_datetime']
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
const MessagesUI = (props: MessagesParams) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
|
-
import { PromotionsController, useLanguage, useUtils
|
|
2
|
+
import { PromotionsController, useLanguage, useUtils } from 'ordering-components/native'
|
|
3
3
|
import {
|
|
4
4
|
PromotionsContainer,
|
|
5
5
|
SingleOfferContainer,
|
|
@@ -17,9 +17,11 @@ import { useTheme } from 'styled-components/native';
|
|
|
17
17
|
import { OButton, OIcon, OModal, OText } from '../shared'
|
|
18
18
|
import { Placeholder, PlaceholderLine } from 'rn-placeholder'
|
|
19
19
|
import { NotFoundSource } from '../NotFoundSource'
|
|
20
|
-
import { View, StyleSheet, ScrollView } from 'react-native'
|
|
20
|
+
import { View, StyleSheet, ScrollView, Platform } from 'react-native'
|
|
21
21
|
import FastImage from 'react-native-fast-image'
|
|
22
22
|
import { PromotionParams } from '../../types'
|
|
23
|
+
import { Container } from '../../layouts/Container'
|
|
24
|
+
|
|
23
25
|
const PromotionsUI = (props: PromotionParams) => {
|
|
24
26
|
const {
|
|
25
27
|
navigation,
|
|
@@ -85,139 +87,138 @@ const PromotionsUI = (props: PromotionParams) => {
|
|
|
85
87
|
: t('SERVICE_FEE', 'Service fee')
|
|
86
88
|
|
|
87
89
|
return (
|
|
88
|
-
<
|
|
90
|
+
<Container noPadding>
|
|
89
91
|
<NavBar
|
|
90
|
-
onActionLeft={() => navigation.goBack()}
|
|
91
|
-
btnStyle={{ paddingLeft: 0 }}
|
|
92
|
-
paddingTop={20}
|
|
93
|
-
style={{ paddingBottom: 0, flexDirection: 'column', alignItems: 'flex-start' }}
|
|
94
92
|
title={t('PROMOTIONS', 'Promotions')}
|
|
95
93
|
titleAlign={'center'}
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
onActionLeft={() => navigation.goBack()}
|
|
95
|
+
showCall={false}
|
|
96
|
+
style={{ paddingVertical: Platform.OS === 'ios' ? 0 : 20, marginLeft: 20 }}
|
|
98
97
|
/>
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
<PromotionsContainer>
|
|
99
|
+
<SearchBarContainer>
|
|
100
|
+
<SearchBar
|
|
101
|
+
placeholder={t('SEARCH_OFFERS', 'Search offers')}
|
|
102
|
+
onSearch={handleSearchValue}
|
|
103
|
+
/>
|
|
104
|
+
</SearchBarContainer>
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
</OText>
|
|
133
|
-
<AvailableBusinesses>
|
|
134
|
-
<OText style={styles.offerExtraInfo} numberOfLines={1}>
|
|
135
|
-
{t('APPLY_FOR', 'Apply for')}:
|
|
136
|
-
{offer.businesses.map((business: any, i: number) => (
|
|
137
|
-
<React.Fragment key={i}>{' '}{business?.name}{i + 1 < offer.businesses?.length ? ',' : ''}</React.Fragment>
|
|
138
|
-
))}
|
|
106
|
+
{offersState?.loading && (
|
|
107
|
+
<>
|
|
108
|
+
{[...Array(5).keys()].map((key, i) => (
|
|
109
|
+
<Placeholder key={i} style={{ flexDirection: 'row', marginBottom: 20 }}>
|
|
110
|
+
<PlaceholderLine height={10} width={45} />
|
|
111
|
+
<PlaceholderLine height={10} width={60} />
|
|
112
|
+
<PlaceholderLine height={10} width={75} />
|
|
113
|
+
</Placeholder>
|
|
114
|
+
))}
|
|
115
|
+
</>
|
|
116
|
+
)}
|
|
117
|
+
{((!offersState?.loading && filteredOffers?.length === 0) || offersState?.error) && (
|
|
118
|
+
<NotFoundSource
|
|
119
|
+
content={offersState?.error || t('NOT_FOUND_OFFERS', 'Not found offers')}
|
|
120
|
+
/>
|
|
121
|
+
)}
|
|
122
|
+
<ScrollView>
|
|
123
|
+
{!offersState?.loading && offersState.offers?.length > 0 && filteredOffers?.map((offer: any) => (
|
|
124
|
+
<SingleOfferContainer key={offer.id}>
|
|
125
|
+
<OfferInformation>
|
|
126
|
+
<OText style={styles.offerTitle} numberOfLines={2}>{offer?.name}</OText>
|
|
127
|
+
{offer?.description && (
|
|
128
|
+
<OText style={styles.offerDescription} numberOfLines={2}>{offer?.description}</OText>
|
|
129
|
+
)}
|
|
130
|
+
<OText style={styles.offerExtraInfo}>
|
|
131
|
+
{t('EXPIRES', 'Expires')} {parseDate(offer?.end, { outputFormat: 'MMM DD, YYYY' })}
|
|
139
132
|
</OText>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
133
|
+
<AvailableBusinesses>
|
|
134
|
+
<OText style={styles.offerExtraInfo} numberOfLines={1}>
|
|
135
|
+
{t('APPLY_FOR', 'Apply for')}:
|
|
136
|
+
{offer.businesses.map((business: any, i: number) => (
|
|
137
|
+
<React.Fragment key={i}>{' '}{business?.name}{i + 1 < offer.businesses?.length ? ',' : ''}</React.Fragment>
|
|
138
|
+
))}
|
|
139
|
+
</OText>
|
|
140
|
+
</AvailableBusinesses>
|
|
141
|
+
</OfferInformation>
|
|
142
|
+
<OButton
|
|
143
|
+
onClick={() => handleClickOffer(offer)}
|
|
144
|
+
text={t('VIEW', 'View')}
|
|
145
|
+
style={styles.buttonStyle}
|
|
146
|
+
textStyle={{ fontSize: 10, color: '#fff', flexWrap: 'nowrap' }}
|
|
147
|
+
/>
|
|
148
|
+
</SingleOfferContainer>
|
|
149
|
+
))}
|
|
150
|
+
</ScrollView>
|
|
151
|
+
<OModal
|
|
152
|
+
open={openModal}
|
|
153
|
+
onClose={() => setOpenModal(false)}
|
|
154
|
+
entireModal
|
|
155
155
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
156
|
+
title={``}
|
|
157
|
+
>
|
|
158
|
+
<View style={{ padding: 20 }}>
|
|
159
|
+
<OText style={{ alignSelf: 'center', fontWeight: '700' }} mBottom={20}>
|
|
160
|
+
{offerSelected?.name} / {t('VALUE_OF_OFFER', 'Value of offer')}: {offerSelected?.rate_type === 1 ? `${offerSelected?.rate}%` : `${parsePrice(offerSelected?.rate)}`}
|
|
161
|
+
</OText>
|
|
162
|
+
<OfferData>
|
|
163
|
+
{offerSelected?.type === 2 && (
|
|
164
|
+
<Code>
|
|
165
|
+
<OText>{t('YOUR_CODE', 'Your code')}</OText>
|
|
166
|
+
<OText color={theme.colors.primary}>{offerSelected.coupon}</OText>
|
|
167
|
+
</Code>
|
|
168
|
+
)}
|
|
169
|
+
<OText>{t('APPLIES_TO', 'Applies to')}: {targetString}</OText>
|
|
170
|
+
{offerSelected?.auto && (
|
|
171
|
+
<OText>{t('OFFER_AUTOMATIC', 'This offer applies automatic')}</OText>
|
|
172
|
+
)}
|
|
173
|
+
{offerSelected?.minimum && (
|
|
174
|
+
<OText>{t('MINIMUM_PURCHASE_FOR_OFFER', 'Minimum purchase for use this offer')}: {parsePrice(offerSelected?.minimum)}</OText>
|
|
175
|
+
)}
|
|
176
|
+
{offerSelected?.max_discount && (
|
|
177
|
+
<OText>{t('MAX_DISCOUNT_ALLOWED', 'Max discount allowed')}: {parsePrice(offerSelected?.max_discount)}</OText>
|
|
178
|
+
)}
|
|
179
|
+
{offerSelected?.description && (
|
|
180
|
+
<OText>{offerSelected?.description}</OText>
|
|
181
|
+
)}
|
|
182
|
+
</OfferData>
|
|
183
|
+
<OText style={{ marginTop: 10, marginBottom: 10 }}>
|
|
184
|
+
{t('AVAILABLE_BUSINESSES_FOR_OFFER', 'Available businesses for this offer')}:
|
|
185
|
+
</OText>
|
|
186
|
+
<ScrollView style={{ height: '75%' }}>
|
|
187
|
+
{offerSelected?.businesses?.map((business: any) => {
|
|
188
|
+
return (
|
|
189
|
+
<SingleBusinessOffer key={business.id}>
|
|
190
|
+
{business?.logo ? (
|
|
191
|
+
<FastImage
|
|
192
|
+
style={styles.productStyle}
|
|
193
|
+
source={{
|
|
194
|
+
uri: optimizeImage(business?.logo, 'h_250,c_limit'),
|
|
195
|
+
priority: FastImage.priority.normal,
|
|
196
|
+
}}
|
|
197
|
+
resizeMode={FastImage.resizeMode.cover}
|
|
198
|
+
/>
|
|
199
|
+
) : (
|
|
200
|
+
<OIcon
|
|
201
|
+
src={theme?.images?.dummies?.product}
|
|
202
|
+
style={styles.productStyle}
|
|
203
|
+
/>
|
|
204
|
+
)}
|
|
205
|
+
<BusinessInfo>
|
|
206
|
+
<OText style={{ maxWidth: '60%' }}>{business.name}</OText>
|
|
207
|
+
<OButton
|
|
208
|
+
onClick={() => handleBusinessClick(business)}
|
|
209
|
+
text={t('GO_TO_BUSINESSS', 'Go to business')}
|
|
210
|
+
style={styles.modalButtonStyle}
|
|
211
|
+
textStyle={{ fontSize: 10, color: '#fff' }}
|
|
212
|
+
/>
|
|
213
|
+
</BusinessInfo>
|
|
214
|
+
</SingleBusinessOffer>
|
|
215
|
+
)
|
|
216
|
+
})}
|
|
217
|
+
</ScrollView>
|
|
218
|
+
</View>
|
|
219
|
+
</OModal>
|
|
220
|
+
</PromotionsContainer>
|
|
221
|
+
</Container>
|
|
221
222
|
)
|
|
222
223
|
}
|
|
223
224
|
|
|
@@ -163,7 +163,7 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
163
163
|
const UpsellingContent = () => {
|
|
164
164
|
return (
|
|
165
165
|
<>
|
|
166
|
-
<View style={{ ...styles.headerItem, flex: 1 }}>
|
|
166
|
+
<View style={{ ...styles.headerItem, flex: 1, marginTop: Platform.OS == 'ios' ? 35 : 70 }}>
|
|
167
167
|
<OButton
|
|
168
168
|
imgLeftSrc={theme.images.general.arrow_left}
|
|
169
169
|
imgRightSrc={null}
|
|
@@ -172,7 +172,7 @@ const UpsellingProductsUI = (props: UpsellingProductsParams) => {
|
|
|
172
172
|
imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 16 }}
|
|
173
173
|
/>
|
|
174
174
|
</View>
|
|
175
|
-
<ScrollView style={{ marginBottom: props.isPage ? 40 : bottom + (Platform.OS == 'ios' ? 96 : 130) }} showsVerticalScrollIndicator={false}>
|
|
175
|
+
<ScrollView style={{ marginTop: 10, marginBottom: props.isPage ? 40 : bottom + (Platform.OS == 'ios' ? 96 : 130) }} showsVerticalScrollIndicator={false}>
|
|
176
176
|
{productsList.length > 0 &&
|
|
177
177
|
<View style={{ paddingHorizontal: 40, overflow: 'visible' }}>
|
|
178
178
|
<OText size={16} lineHeight={24} weight={'500'}>{t('WANT_SOMETHING_ELSE', 'Do you want something else?')}</OText>
|
|
@@ -283,7 +283,7 @@ const ProfileUI = (props: ProfileParams) => {
|
|
|
283
283
|
titleAlign={'center'}
|
|
284
284
|
onActionLeft={() => navigation.goBack()}
|
|
285
285
|
showCall={false}
|
|
286
|
-
style={{ paddingHorizontal: 40, paddingVertical: Platform.OS === 'ios' ? 0 : 30 }}
|
|
286
|
+
style={{ paddingHorizontal: 40, paddingVertical: Platform.OS === 'ios' ? 0 : 30 , marginTop: Platform.OS === 'ios' ? 50 : 40 }}
|
|
287
287
|
/>
|
|
288
288
|
<KeyboardAvoidingView behavior={Platform.OS == 'ios' ? 'padding' : 'height'} enabled style={{ flex: 1, flexDirection: 'column', justifyContent: 'center' }}>
|
|
289
289
|
<Container noPadding>
|