ordering-ui-react-native 0.14.56 → 0.14.57
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/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/original/src/components/BusinessPreorder/index.tsx +1 -2
- package/themes/original/src/components/BusinessProductsListing/index.tsx +8 -4
- package/themes/original/src/components/MomentOption/index.tsx +153 -132
- package/themes/original/src/components/MomentOption/styles.tsx +18 -42
- package/themes/original/src/components/ProductForm/index.tsx +1 -1
- package/themes/original/src/components/SingleProductCard/index.tsx +2 -2
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -191,7 +191,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
191
191
|
{isFarAway && (
|
|
192
192
|
<FarAwayMessage style={styles.farAwayMsg}>
|
|
193
193
|
<Ionicons name='md-warning-outline' style={styles.iconStyle} />
|
|
194
|
-
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', '
|
|
194
|
+
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address')}</OText>
|
|
195
195
|
</FarAwayMessage>
|
|
196
196
|
)}
|
|
197
197
|
</OrderControlContainer>
|
|
@@ -197,7 +197,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
197
197
|
{isFarAway && (
|
|
198
198
|
<FarAwayMessage style={styles.farAwayMsg}>
|
|
199
199
|
<Ionicons name='md-warning-outline' style={styles.iconStyle} />
|
|
200
|
-
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', '
|
|
200
|
+
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address')}</OText>
|
|
201
201
|
</FarAwayMessage>
|
|
202
202
|
)}
|
|
203
203
|
{!auth && (
|
|
@@ -155,7 +155,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
155
155
|
{isFarAway && (
|
|
156
156
|
<FarAwayMessage style={styles.farAwayMsg}>
|
|
157
157
|
<Ionicons name='md-warning-outline' style={styles.iconStyle} />
|
|
158
|
-
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', '
|
|
158
|
+
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address')}</OText>
|
|
159
159
|
</FarAwayMessage>
|
|
160
160
|
)}
|
|
161
161
|
<View style={styles.wrapperOrderOptions}>
|
|
@@ -155,6 +155,10 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
155
155
|
const handleTouchDrag = useCallback(() => {
|
|
156
156
|
setCategoryClicked(false);
|
|
157
157
|
}, []);
|
|
158
|
+
|
|
159
|
+
const handleBackNavigation = () => {
|
|
160
|
+
navigation?.canGoBack() ? navigation.goBack() : navigation.navigate('BottomTab')
|
|
161
|
+
}
|
|
158
162
|
|
|
159
163
|
return (
|
|
160
164
|
<SafeAreaView
|
|
@@ -169,7 +173,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
169
173
|
imgLeftSrc={theme.images.general.arrow_left}
|
|
170
174
|
imgRightSrc={null}
|
|
171
175
|
style={styles.btnBackArrow}
|
|
172
|
-
onClick={() =>
|
|
176
|
+
onClick={() => handleBackNavigation()}
|
|
173
177
|
imgLeftStyle={{ tintColor: theme.colors.textNormal, width: 16 }}
|
|
174
178
|
/>
|
|
175
179
|
</View>
|
|
@@ -231,7 +235,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
231
235
|
selectedCategoryId={selectedCategoryId}
|
|
232
236
|
lazyLoadProductsRecommended={business?.lazy_load_products_recommended}
|
|
233
237
|
setSelectedCategoryId={setSelectedCategoryId}
|
|
234
|
-
|
|
238
|
+
setCategoryClicked={setCategoryClicked}
|
|
235
239
|
/>
|
|
236
240
|
)}
|
|
237
241
|
</>
|
|
@@ -309,13 +313,13 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
309
313
|
business={currentCart?.business}
|
|
310
314
|
cartProducts={currentCart?.products}
|
|
311
315
|
cart={currentCart}
|
|
312
|
-
|
|
316
|
+
setOpenUpselling={setOpenUpselling}
|
|
313
317
|
handleUpsellingPage={handleUpsellingPage}
|
|
314
318
|
handleCloseUpsellingPage={handleCloseUpsellingPage}
|
|
315
319
|
openUpselling={openUpselling}
|
|
316
320
|
canOpenUpselling={canOpenUpselling}
|
|
317
321
|
setCanOpenUpselling={setCanOpenUpselling}
|
|
318
|
-
|
|
322
|
+
onRedirect={onRedirect}
|
|
319
323
|
/>
|
|
320
324
|
)}
|
|
321
325
|
</SafeAreaView>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import React, { useState, useEffect
|
|
2
|
-
import moment
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import moment from 'moment';
|
|
3
|
+
import CalendarStrip from 'react-native-calendar-strip'
|
|
3
4
|
import {
|
|
4
5
|
useLanguage,
|
|
5
6
|
useConfig,
|
|
6
|
-
useUtils,
|
|
7
7
|
useOrder,
|
|
8
8
|
MomentOption as MomentOptionController,
|
|
9
9
|
} from 'ordering-components/native';
|
|
10
10
|
import { useTheme } from 'styled-components/native';
|
|
11
|
+
import IconAntDesign from 'react-native-vector-icons/AntDesign'
|
|
11
12
|
import {
|
|
12
|
-
ImageStore,
|
|
13
13
|
StyleSheet,
|
|
14
|
-
useWindowDimensions,
|
|
15
14
|
View,
|
|
15
|
+
TouchableOpacity
|
|
16
16
|
} from 'react-native';
|
|
17
17
|
import Spinner from 'react-native-loading-spinner-overlay';
|
|
18
18
|
import { MomentOptionParams } from '../../types';
|
|
@@ -21,16 +21,16 @@ import { OButton, OIcon, OText } from '../shared';
|
|
|
21
21
|
import { Container } from '../../layouts/Container';
|
|
22
22
|
import {
|
|
23
23
|
WrapSelectOption,
|
|
24
|
-
|
|
24
|
+
OrderTimeWrapper,
|
|
25
|
+
TimeListWrapper,
|
|
26
|
+
TimeContentWrapper,
|
|
27
|
+
TimeItem
|
|
25
28
|
} from './styles';
|
|
26
|
-
import CalendarPicker from 'react-native-calendar-picker';
|
|
27
29
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
28
|
-
import SelectDropdown from 'react-native-select-dropdown';
|
|
29
30
|
|
|
30
31
|
const MomentOptionUI = (props: MomentOptionParams) => {
|
|
31
32
|
const {
|
|
32
33
|
navigation,
|
|
33
|
-
nopadding,
|
|
34
34
|
datesList,
|
|
35
35
|
hoursList,
|
|
36
36
|
dateSelected,
|
|
@@ -76,12 +76,62 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
76
76
|
paddingHorizontal: 16,
|
|
77
77
|
flexDirection: 'row',
|
|
78
78
|
alignItems: 'center'
|
|
79
|
+
},
|
|
80
|
+
calendar: {
|
|
81
|
+
paddingBottom: 15,
|
|
82
|
+
borderBottomWidth: 1,
|
|
83
|
+
borderColor: theme.colors.backgroundGray200,
|
|
84
|
+
height: 100
|
|
85
|
+
},
|
|
86
|
+
calendarHeaderContainer: {
|
|
87
|
+
flex: 1,
|
|
88
|
+
justifyContent: 'flex-start',
|
|
89
|
+
textAlign: 'left',
|
|
90
|
+
marginBottom: 17,
|
|
91
|
+
borderBottomWidth: 1,
|
|
92
|
+
borderColor: theme.colors.backgroundGray200
|
|
93
|
+
},
|
|
94
|
+
calendarHeader: {
|
|
95
|
+
color: '#344050',
|
|
96
|
+
alignSelf: 'flex-start',
|
|
97
|
+
fontSize: 14,
|
|
98
|
+
fontWeight: '400'
|
|
99
|
+
},
|
|
100
|
+
dateNumber: {
|
|
101
|
+
color: '#B1BCCC',
|
|
102
|
+
fontSize: 16,
|
|
103
|
+
fontWeight: '500',
|
|
104
|
+
},
|
|
105
|
+
dateName: {
|
|
106
|
+
color: '#B1BCCC',
|
|
107
|
+
fontSize: 12,
|
|
108
|
+
textTransform: 'capitalize',
|
|
109
|
+
},
|
|
110
|
+
highlightDateName: {
|
|
111
|
+
color: '#344050',
|
|
112
|
+
fontSize: 12,
|
|
113
|
+
textTransform: 'capitalize',
|
|
114
|
+
},
|
|
115
|
+
highlightDateNumber: {
|
|
116
|
+
color: '#344050',
|
|
117
|
+
fontSize: 16,
|
|
118
|
+
textTransform: 'capitalize',
|
|
119
|
+
},
|
|
120
|
+
disabledDateName: {
|
|
121
|
+
color: '#B1BCCC',
|
|
122
|
+
fontSize: 10,
|
|
123
|
+
textTransform: 'capitalize',
|
|
124
|
+
opacity: 1,
|
|
125
|
+
},
|
|
126
|
+
disabledDateNumber: {
|
|
127
|
+
color: '#B1BCCC',
|
|
128
|
+
fontSize: 14,
|
|
129
|
+
fontWeight: '500'
|
|
79
130
|
}
|
|
80
131
|
});
|
|
81
132
|
|
|
82
133
|
const [, t] = useLanguage();
|
|
83
134
|
const [{ configs }] = useConfig();
|
|
84
|
-
const [{ parseTime }] = useUtils();
|
|
85
135
|
const [orderState] = useOrder();
|
|
86
136
|
const [optionSelected, setOptionSelected] = useState({
|
|
87
137
|
isAsap: false,
|
|
@@ -91,14 +141,11 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
91
141
|
isLoading: 0,
|
|
92
142
|
isEditing: false,
|
|
93
143
|
});
|
|
94
|
-
const { width } = useWindowDimensions();
|
|
95
144
|
const { bottom } = useSafeAreaInsets();
|
|
96
145
|
|
|
97
|
-
const [
|
|
98
|
-
const [
|
|
99
|
-
const [
|
|
100
|
-
const [maxDate, setMaxDate] = useState(new Date)
|
|
101
|
-
const [alert, setAlert] = useState<any>({ show: false })
|
|
146
|
+
const [selectedTime, setSelectedTime] = useState(null);
|
|
147
|
+
const [datesWhitelist, setDateWhitelist] = useState<any>([{ start: null, end: null }])
|
|
148
|
+
const [selectDate, setSelectedDate] = useState<any>(null)
|
|
102
149
|
|
|
103
150
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack();
|
|
104
151
|
|
|
@@ -126,19 +173,6 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
126
173
|
.utc()
|
|
127
174
|
.format('YYYY-MM-DD HH:mm:ss');
|
|
128
175
|
|
|
129
|
-
const getTwoChar = (ori: string) => {
|
|
130
|
-
return ori.substring(0, 2);
|
|
131
|
-
};
|
|
132
|
-
const weekDays = [
|
|
133
|
-
getTwoChar(t('SUNDAY_ABBREVIATION', 'Su')),
|
|
134
|
-
getTwoChar(t('MONDAY_ABBREVIATION', 'Mo')),
|
|
135
|
-
getTwoChar(t('TUESDAY_ABBREVIATION', 'Tu')),
|
|
136
|
-
getTwoChar(t('WEDNESDAY_ABBREVIATION', 'We')),
|
|
137
|
-
getTwoChar(t('THURSDAY_ABBREVIATION', 'Th')),
|
|
138
|
-
getTwoChar(t('FRIDAY_ABBREVIATION', 'Fr')),
|
|
139
|
-
getTwoChar(t('SATURDAY_ABBREVIATION', 'Sa')),
|
|
140
|
-
];
|
|
141
|
-
|
|
142
176
|
useEffect(() => {
|
|
143
177
|
if (orderState.options?.moment) {
|
|
144
178
|
setOptionSelected({ isAsap: false, isSchedule: true });
|
|
@@ -160,14 +194,34 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
160
194
|
}
|
|
161
195
|
}, [momentState.isLoading]);
|
|
162
196
|
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
197
|
+
const onSelectDate = (val: any) => {
|
|
198
|
+
setSelectedDate(val)
|
|
199
|
+
if (handleChangeDate) handleChangeDate(moment(val).format('YYYY-MM-DD'))
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const LeftSelector = () => {
|
|
203
|
+
return (
|
|
204
|
+
<View style={{ height: '100%', justifyContent: 'flex-end' }}>
|
|
205
|
+
<IconAntDesign
|
|
206
|
+
name='caretleft'
|
|
207
|
+
color={theme.colors.textNormal}
|
|
208
|
+
size={16}
|
|
209
|
+
/>
|
|
210
|
+
</View>
|
|
211
|
+
)
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const RightSelector = () => {
|
|
215
|
+
return (
|
|
216
|
+
<View style={{ height: '100%', justifyContent: 'flex-end' }}>
|
|
217
|
+
<IconAntDesign
|
|
218
|
+
name='caretright'
|
|
219
|
+
color={theme.colors.textNormal}
|
|
220
|
+
size={16}
|
|
221
|
+
/>
|
|
222
|
+
</View>
|
|
223
|
+
)
|
|
224
|
+
}
|
|
171
225
|
|
|
172
226
|
useEffect(() => {
|
|
173
227
|
if (datesList?.length > 0) {
|
|
@@ -176,11 +230,22 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
176
230
|
const maxDateParts = _datesList[_datesList.length - 1].split('-')
|
|
177
231
|
const _minDate = new Date(minDateParts[0], minDateParts[1] - 1, minDateParts[2])
|
|
178
232
|
const _maxDate = new Date(maxDateParts[0], maxDateParts[1] - 1, maxDateParts[2])
|
|
179
|
-
|
|
180
|
-
setMaxDate(_maxDate)
|
|
233
|
+
setDateWhitelist([{ start: _minDate, end: _maxDate }])
|
|
181
234
|
}
|
|
182
235
|
}, [datesList])
|
|
183
236
|
|
|
237
|
+
useEffect(() => {
|
|
238
|
+
if (dateSelected) {
|
|
239
|
+
const dateParts = dateSelected.split('-')
|
|
240
|
+
const _dateSelected = new Date(dateParts[0], dateParts[1] - 1, dateParts[2])
|
|
241
|
+
setSelectedDate(_dateSelected)
|
|
242
|
+
}
|
|
243
|
+
}, [dateSelected])
|
|
244
|
+
|
|
245
|
+
useEffect(() => {
|
|
246
|
+
setSelectedTime(timeSelected)
|
|
247
|
+
}, [timeSelected])
|
|
248
|
+
|
|
184
249
|
return (
|
|
185
250
|
<>
|
|
186
251
|
<Container style={{ paddingLeft: 40, paddingRight: 40 }}>
|
|
@@ -212,7 +277,7 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
212
277
|
style={{ marginEnd: 24 }}
|
|
213
278
|
/>
|
|
214
279
|
)}
|
|
215
|
-
<OText color={optionSelected.isAsap ? theme.colors.textNormal : theme.colors.disabled}>{t('ASAP_ABBREVIATION', 'ASAP') + ` (${moment().format('dddd, MMM
|
|
280
|
+
<OText color={optionSelected.isAsap ? theme.colors.textNormal : theme.colors.disabled}>{t('ASAP_ABBREVIATION', 'ASAP') + ` (${moment().format('dddd, MMM d, yyyy h:mm A')} + delivery time)`}</OText>
|
|
216
281
|
</WrapSelectOption>
|
|
217
282
|
<WrapSelectOption
|
|
218
283
|
onPress={() => setOptionSelected({ isAsap: false, isSchedule: true })}
|
|
@@ -234,102 +299,58 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
234
299
|
</WrapSelectOption>
|
|
235
300
|
|
|
236
301
|
{optionSelected.isSchedule && (
|
|
237
|
-
<
|
|
238
|
-
{
|
|
239
|
-
|
|
240
|
-
<
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
height: 40,
|
|
263
|
-
width: '100%',
|
|
264
|
-
flexDirection: 'column',
|
|
265
|
-
alignItems: 'flex-start',
|
|
266
|
-
marginBottom: 20
|
|
267
|
-
}}
|
|
268
|
-
buttonTextStyle={{
|
|
269
|
-
color: theme.colors.textNormal,
|
|
270
|
-
fontSize: 12,
|
|
271
|
-
paddingTop: 10
|
|
272
|
-
}}
|
|
273
|
-
dropdownStyle={{
|
|
274
|
-
borderRadius: 8,
|
|
275
|
-
borderColor: theme.colors.lightGray,
|
|
276
|
-
}}
|
|
277
|
-
rowStyle={{
|
|
278
|
-
borderBottomColor: theme.colors.white,
|
|
279
|
-
backgroundColor: theme.colors.white,
|
|
280
|
-
height: 40,
|
|
281
|
-
flexDirection: 'column',
|
|
282
|
-
alignItems: 'flex-start',
|
|
283
|
-
paddingTop: 8,
|
|
284
|
-
paddingLeft: 22
|
|
285
|
-
}}
|
|
286
|
-
rowTextStyle={{
|
|
287
|
-
color: theme.colors.textNormal,
|
|
288
|
-
fontSize: 14,
|
|
289
|
-
}}
|
|
302
|
+
<OrderTimeWrapper>
|
|
303
|
+
<View style={{ flex: 1 }}>
|
|
304
|
+
{selectDate && datesWhitelist[0]?.start !== null && (
|
|
305
|
+
<CalendarStrip
|
|
306
|
+
scrollable
|
|
307
|
+
style={styles.calendar}
|
|
308
|
+
calendarHeaderContainerStyle={styles.calendarHeaderContainer}
|
|
309
|
+
calendarHeaderStyle={styles.calendarHeader}
|
|
310
|
+
dateNumberStyle={styles.dateNumber}
|
|
311
|
+
dateNameStyle={styles.dateName}
|
|
312
|
+
iconContainer={{ flex: 0.1 }}
|
|
313
|
+
highlightDateNameStyle={styles.highlightDateName}
|
|
314
|
+
highlightDateNumberStyle={styles.highlightDateNumber}
|
|
315
|
+
dayContainerStyle={{ height: '100%' }}
|
|
316
|
+
highlightDateContainerStyle={{ height: '100%' }}
|
|
317
|
+
calendarHeaderFormat='MMMM, YYYY'
|
|
318
|
+
iconStyle={{ borderWidth: 1 }}
|
|
319
|
+
selectedDate={selectDate}
|
|
320
|
+
datesWhitelist={datesWhitelist}
|
|
321
|
+
disabledDateNameStyle={styles.disabledDateName}
|
|
322
|
+
disabledDateNumberStyle={styles.disabledDateNumber}
|
|
323
|
+
disabledDateOpacity={0.6}
|
|
324
|
+
onDateSelected={(date) => onSelectDate(date)}
|
|
325
|
+
leftSelector={<LeftSelector />}
|
|
326
|
+
rightSelector={<RightSelector />}
|
|
290
327
|
/>
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
selectedDayColor={theme.colors.primaryContrast}
|
|
315
|
-
todayBackgroundColor={theme.colors.border}
|
|
316
|
-
dayLabelsWrapper={{ borderColor: theme.colors.clear }}
|
|
317
|
-
customDayHeaderStyles={customDayHeaderStylesCallback}
|
|
318
|
-
weekdays={weekDays}
|
|
319
|
-
selectedStartDate={momento}
|
|
320
|
-
minDate={minDate}
|
|
321
|
-
maxDate={maxDate}
|
|
322
|
-
/>
|
|
323
|
-
</View>
|
|
324
|
-
)}
|
|
325
|
-
</WrapDelveryTime>
|
|
328
|
+
)}
|
|
329
|
+
</View>
|
|
330
|
+
<TimeListWrapper nestedScrollEnabled={true}>
|
|
331
|
+
<TimeContentWrapper>
|
|
332
|
+
{hoursList.map((time: any, i: number) => (
|
|
333
|
+
<TouchableOpacity key={i} onPress={() => setSelectedTime(time.startTime)}>
|
|
334
|
+
<TimeItem active={selectedTime === time.startTime}>
|
|
335
|
+
<OText
|
|
336
|
+
size={14}
|
|
337
|
+
color={selectedTime === time.startTime ? theme.colors.primary : theme.colors.textNormal}
|
|
338
|
+
style={{
|
|
339
|
+
lineHeight: 24
|
|
340
|
+
}}
|
|
341
|
+
>{time.startTime}</OText>
|
|
342
|
+
</TimeItem>
|
|
343
|
+
</TouchableOpacity>
|
|
344
|
+
))}
|
|
345
|
+
{hoursList.length % 3 === 2 && (
|
|
346
|
+
<TimeItem style={{ backgroundColor: 'transparent' }} />
|
|
347
|
+
)}
|
|
348
|
+
</TimeContentWrapper>
|
|
349
|
+
</TimeListWrapper>
|
|
350
|
+
</OrderTimeWrapper>
|
|
326
351
|
)}
|
|
327
352
|
</View>
|
|
328
|
-
<Spinner visible={momentState.isLoading === 1} />
|
|
329
353
|
</Container>
|
|
330
|
-
<View style={{ position: 'absolute', bottom: bottom, paddingBottom: 20, paddingHorizontal: 40, backgroundColor: 'white', width: '100%' }}>
|
|
331
|
-
<OButton onClick={handleChangeMoment} isDisabled={!selectedTime} text={t('CONTINUE', 'Continue')} style={{ borderRadius: 7.6, height: 44, shadowOpacity: 0 }} textStyle={{ color: 'white', fontSize: 14 }} showNextIcon />
|
|
332
|
-
</View>
|
|
333
354
|
</>
|
|
334
355
|
);
|
|
335
356
|
};
|
|
@@ -6,61 +6,37 @@ export const Container = styled.ScrollView`
|
|
|
6
6
|
padding: 0 20px;
|
|
7
7
|
padding-bottom: 20px;
|
|
8
8
|
`
|
|
9
|
-
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
margin-bottom: 20px;
|
|
12
|
-
`
|
|
9
|
+
|
|
13
10
|
export const WrapSelectOption = styled.TouchableOpacity`
|
|
14
11
|
flex-direction: row;
|
|
15
12
|
align-items: center;
|
|
16
13
|
margin-vertical: 5px;
|
|
17
14
|
`
|
|
18
|
-
export const
|
|
19
|
-
|
|
20
|
-
flex-direction: row;
|
|
21
|
-
margin-vertical: 10px;
|
|
15
|
+
export const OrderTimeWrapper = styled.View`
|
|
16
|
+
margin-top: 34px;
|
|
22
17
|
`
|
|
23
|
-
export const Day = styled.TouchableOpacity`
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
align-items: center;
|
|
27
|
-
justify-content: center;
|
|
28
|
-
border-right-width: 1px;
|
|
29
|
-
width: 25%;
|
|
30
|
-
margin-vertical: 10px;
|
|
31
|
-
border-color: ${(props: any) => props.theme.colors.textSecondary};
|
|
32
18
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
`
|
|
37
|
-
export const WrapHours = styled.ScrollView`
|
|
38
|
-
border-width: 1px;
|
|
39
|
-
border-color: ${(props: any) => props.theme.colors.border};
|
|
40
|
-
border-radius: 7.6px;
|
|
41
|
-
margin-top: 6px;
|
|
42
|
-
height: 140px;
|
|
43
|
-
max-height: 140px;
|
|
19
|
+
export const TimeListWrapper = styled.ScrollView`
|
|
20
|
+
margin-top: 30px;
|
|
21
|
+
max-height: 160px;
|
|
44
22
|
`
|
|
45
|
-
|
|
23
|
+
|
|
24
|
+
export const TimeContentWrapper = styled.View`
|
|
46
25
|
flex: 1;
|
|
47
26
|
flex-wrap: wrap;
|
|
48
27
|
flex-direction: row;
|
|
49
28
|
justify-content: space-between;
|
|
50
|
-
margin: 0 20px;
|
|
51
29
|
`
|
|
52
|
-
|
|
53
|
-
|
|
30
|
+
|
|
31
|
+
export const TimeItem = styled.View`
|
|
32
|
+
width: 86px;
|
|
33
|
+
height: 34px;
|
|
34
|
+
background: #E9ECEF;
|
|
35
|
+
border-radius: 7.6px;
|
|
54
36
|
justify-content: center;
|
|
55
37
|
align-items: center;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
width: 90px;
|
|
61
|
-
margin-vertical: 7px;
|
|
62
|
-
`
|
|
63
|
-
|
|
64
|
-
export const WrapDelveryTime = styled.View`
|
|
65
|
-
flex: 1;
|
|
38
|
+
margin: 10px 0px;
|
|
39
|
+
${({ active }: any) => active && css`
|
|
40
|
+
background: #F5F9FF;
|
|
41
|
+
`}
|
|
66
42
|
`
|
|
@@ -458,7 +458,7 @@ export const ProductOptionsUI = (props: any) => {
|
|
|
458
458
|
textDecorationLine: 'line-through',
|
|
459
459
|
marginLeft: 7,
|
|
460
460
|
marginRight: 7
|
|
461
|
-
}}>{parsePrice(product?.offer_price)}</OText>
|
|
461
|
+
}}>{product?.offer_price ? parsePrice(product?.offer_price) : ''}</OText>
|
|
462
462
|
)}
|
|
463
463
|
</View>
|
|
464
464
|
)}
|
|
@@ -121,9 +121,9 @@ export const SingleProductCard = (props: SingleProductCardParams) => {
|
|
|
121
121
|
{product?.name}
|
|
122
122
|
</OText>
|
|
123
123
|
<PricesContainer>
|
|
124
|
-
<OText color={theme.colors.primary}>{parsePrice(product?.price)}</OText>
|
|
124
|
+
<OText color={theme.colors.primary}>{product?.price ? parsePrice(product?.price) : ''}</OText>
|
|
125
125
|
{product?.offer_price !== null && product?.in_offer && (
|
|
126
|
-
<OText style={styles.regularPriceStyle}>{parsePrice(product?.offer_price)}</OText>
|
|
126
|
+
<OText style={styles.regularPriceStyle}>{product?.offer_price ? parsePrice(product?.offer_price) : ''}</OText>
|
|
127
127
|
)}
|
|
128
128
|
</PricesContainer>
|
|
129
129
|
<OText
|
|
@@ -144,7 +144,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
144
144
|
{isFarAway && (
|
|
145
145
|
<FarAwayMessage style={styles.farAwayMsg}>
|
|
146
146
|
<Ionicons name='md-warning-outline' style={styles.iconStyle} />
|
|
147
|
-
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', '
|
|
147
|
+
<OText size={12} numberOfLines={1} ellipsizeMode={'tail'} color={theme.colors.textNormal}>{t('YOU_ARE_FAR_FROM_ADDRESS', 'You are far from this address')}</OText>
|
|
148
148
|
</FarAwayMessage>
|
|
149
149
|
)}
|
|
150
150
|
<View style={styles.wrapperOrderOptions}>
|