ordering-ui-react-native 0.14.99 → 0.15.0-release
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 +6 -3
- package/src/DeliveryApp.tsx +32 -1
- package/src/components/BusinessTypeFilter/index.tsx +9 -2
- package/src/components/BusinessTypeFilter/styles.tsx +1 -1
- package/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/Checkout/index.tsx +0 -1
- package/src/components/Home/index.tsx +3 -5
- package/src/components/LanguageSelector/index.tsx +65 -97
- package/src/components/LanguageSelector/styles.tsx +4 -17
- package/src/components/Messages/index.tsx +38 -30
- package/src/components/MomentOption/index.tsx +3 -1
- package/src/components/OrderDetails/index.tsx +25 -4
- package/src/components/PaymentOptions/index.tsx +7 -16
- package/src/components/PaymentOptionsWebView/index.tsx +123 -124
- package/src/components/ProductForm/index.tsx +1 -1
- package/src/components/ProductForm/styles.tsx +1 -0
- package/src/components/StripeElementsForm/index.tsx +27 -48
- package/src/components/UserProfileForm/index.tsx +35 -1
- package/src/components/VerifyPhone/styles.tsx +1 -2
- package/src/config.json +0 -2
- package/src/pages/Checkout.tsx +1 -1
- package/src/types/index.tsx +2 -9
- package/src/utils/index.tsx +2 -1
- package/themes/business/index.tsx +2 -0
- package/themes/business/src/components/Chat/index.tsx +32 -31
- package/themes/business/src/components/OrderDetails/Business.tsx +1 -0
- package/themes/business/src/components/OrderDetails/OrderHeaderComponent.tsx +85 -17
- package/themes/business/src/components/OrdersListManager/index.tsx +874 -0
- package/themes/business/src/components/OrdersListManager/styles.tsx +123 -0
- package/themes/business/src/components/OrdersListManager/utils.tsx +216 -0
- package/themes/business/src/components/OrdersOption/index.tsx +70 -116
- package/themes/business/src/components/OrdersOption/styles.tsx +2 -5
- package/themes/business/src/components/PreviousOrders/index.tsx +82 -23
- package/themes/doordash/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/doordash/src/components/LoginForm/index.tsx +1 -2
- package/themes/instacart/src/components/BusinessesListing/index.tsx +1 -1
- package/themes/kiosk/src/components/BusinessController/index.tsx +27 -6
- package/themes/kiosk/src/components/BusinessController/styles.tsx +1 -1
- package/themes/kiosk/src/components/BusinessProductsListing/index.tsx +51 -24
- package/themes/kiosk/src/components/Cart/index.tsx +1 -1
- package/themes/kiosk/src/components/CartBottomSheet/index.tsx +1 -1
- package/themes/kiosk/src/components/CartBottomSheet/styles.tsx +1 -1
- package/themes/kiosk/src/components/CartContent/index.tsx +13 -3
- package/themes/kiosk/src/components/CartItem/index.tsx +20 -8
- package/themes/kiosk/src/components/CategoriesMenu/index.tsx +7 -5
- package/themes/kiosk/src/components/CustomerName/index.tsx +89 -88
- package/themes/kiosk/src/components/Intro/index.tsx +13 -13
- package/themes/kiosk/src/components/LanguageSelector/index.tsx +12 -8
- package/themes/kiosk/src/components/NavBar/index.tsx +14 -14
- package/themes/kiosk/src/components/OptionCard/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderDetails/index.tsx +2 -2
- package/themes/kiosk/src/components/OrderSummary/index.tsx +1 -1
- package/themes/kiosk/src/components/OrderTypeCardSelector/index.tsx +10 -12
- package/themes/kiosk/src/components/ProductForm/index.tsx +172 -124
- package/themes/kiosk/src/components/ProductForm/styles.tsx +1 -1
- package/themes/kiosk/src/components/ProductOption/index.tsx +1 -0
- package/themes/kiosk/src/components/ProductOption/styles.tsx +1 -0
- package/themes/kiosk/src/components/UpsellingProducts/index.tsx +48 -34
- package/themes/kiosk/src/components/shared/OButton.tsx +5 -18
- package/themes/kiosk/src/components/shared/OCard.tsx +112 -78
- package/themes/original/index.tsx +179 -2
- package/themes/original/src/components/AddressForm/index.tsx +15 -10
- package/themes/original/src/components/AddressList/index.tsx +27 -1
- package/themes/original/src/components/AnalyticsSegment/index.tsx +127 -0
- package/themes/original/src/components/BusinessBasicInformation/index.tsx +100 -45
- package/themes/original/src/components/BusinessBasicInformation/styles.tsx +28 -1
- package/themes/original/src/components/BusinessController/index.tsx +36 -22
- package/themes/original/src/components/BusinessMenuList/index.tsx +14 -5
- package/themes/original/src/components/BusinessPreorder/index.tsx +142 -121
- package/themes/original/src/components/BusinessProductsCategories/index.tsx +7 -5
- package/themes/original/src/components/BusinessProductsList/index.tsx +3 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +23 -30
- package/themes/original/src/components/BusinessReviews/index.tsx +4 -3
- package/themes/original/src/components/BusinessTypeFilter/index.tsx +2 -13
- package/themes/original/src/components/BusinessesListing/index.tsx +41 -58
- package/themes/original/src/components/Cart/index.tsx +40 -7
- package/themes/original/src/components/CartContent/index.tsx +2 -2
- package/themes/original/src/components/Checkout/index.tsx +58 -33
- package/themes/original/src/components/Checkout/styles.tsx +7 -0
- package/themes/original/src/components/CouponControl/index.tsx +1 -0
- package/themes/original/src/components/DriverTips/index.tsx +1 -1
- package/themes/original/src/components/ForgotPasswordForm/index.tsx +8 -12
- package/themes/original/src/components/HighestRatedBusinesses/index.tsx +105 -90
- package/themes/original/src/components/LoginForm/index.tsx +83 -68
- package/themes/original/src/components/Messages/index.tsx +52 -45
- package/themes/original/src/components/Messages/styles.tsx +1 -3
- package/themes/original/src/components/MomentOption/index.tsx +127 -152
- package/themes/original/src/components/MomentOption/styles.tsx +42 -18
- package/themes/original/src/components/OrderDetails/index.tsx +102 -123
- package/themes/original/src/components/OrderDetails/styles.tsx +3 -1
- package/themes/original/src/components/OrderProgress/index.tsx +6 -7
- package/themes/original/src/components/OrderProgress/styles.tsx +1 -0
- package/themes/original/src/components/OrderSummary/index.tsx +34 -1
- package/themes/original/src/components/OrdersOption/index.tsx +15 -46
- package/themes/original/src/components/OrdersOption/styles.tsx +0 -6
- package/themes/original/src/components/PaymentOptionWallet/index.tsx +6 -2
- package/themes/original/src/components/PaymentOptions/index.tsx +24 -25
- package/themes/original/src/components/PhoneInputNumber/index.tsx +15 -8
- package/themes/original/src/components/PlaceSpot/index.tsx +114 -0
- package/themes/original/src/components/PlaceSpot/styles.tsx +11 -0
- package/themes/original/src/components/PreviousOrders/index.tsx +19 -13
- package/themes/original/src/components/ProductForm/index.tsx +153 -104
- package/themes/original/src/components/ProductForm/styles.tsx +5 -3
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +6 -1
- package/themes/original/src/components/ReviewOrder/index.tsx +10 -9
- package/themes/original/src/components/ReviewProducts/index.tsx +1 -1
- package/themes/original/src/components/SearchBar/index.tsx +4 -10
- package/themes/original/src/components/SignupForm/index.tsx +173 -154
- package/themes/original/src/components/SingleProductCard/index.tsx +2 -10
- package/themes/original/src/components/StripeElementsForm/index.tsx +55 -72
- package/themes/original/src/components/UpsellingProducts/index.tsx +6 -6
- package/themes/original/src/components/UserDetails/index.tsx +4 -95
- package/themes/original/src/components/UserFormDetails/index.tsx +2 -14
- package/themes/original/src/components/UserProfile/index.tsx +16 -11
- package/themes/original/src/components/UserProfileForm/index.tsx +16 -8
- package/themes/original/src/components/VerifyPhone/index.tsx +10 -7
- package/themes/original/src/components/VerifyPhone/styles.tsx +2 -1
- package/themes/original/src/components/shared/HeaderTitle.tsx +21 -0
- package/themes/original/src/components/shared/OInput.tsx +1 -2
- package/themes/original/src/components/shared/index.tsx +2 -0
- package/themes/original/src/types/index.tsx +25 -28
- package/themes/single-business/src/components/OrderTypeSelector/index.tsx +5 -5
- package/themes/uber-eats/src/components/BusinessesListing/index.tsx +1 -1
- package/src/components/StripeMethodForm/index.tsx +0 -168
- package/themes/original/src/components/BusinessListingSearch/index.tsx +0 -469
- package/themes/original/src/components/BusinessListingSearch/styles.tsx +0 -76
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import moment from 'moment';
|
|
3
|
-
import CalendarStrip from 'react-native-calendar-strip'
|
|
1
|
+
import React, { useState, useEffect, useCallback } from 'react';
|
|
2
|
+
import moment, { Moment } from 'moment';
|
|
4
3
|
import {
|
|
5
4
|
useLanguage,
|
|
6
5
|
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'
|
|
12
11
|
import {
|
|
12
|
+
ImageStore,
|
|
13
13
|
StyleSheet,
|
|
14
|
+
useWindowDimensions,
|
|
14
15
|
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
|
-
|
|
25
|
-
TimeListWrapper,
|
|
26
|
-
TimeContentWrapper,
|
|
27
|
-
TimeItem
|
|
24
|
+
WrapDelveryTime,
|
|
28
25
|
} from './styles';
|
|
26
|
+
import CalendarPicker from 'react-native-calendar-picker';
|
|
29
27
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
28
|
+
import SelectDropdown from 'react-native-select-dropdown';
|
|
30
29
|
|
|
31
30
|
const MomentOptionUI = (props: MomentOptionParams) => {
|
|
32
31
|
const {
|
|
33
32
|
navigation,
|
|
33
|
+
nopadding,
|
|
34
34
|
datesList,
|
|
35
35
|
hoursList,
|
|
36
36
|
dateSelected,
|
|
@@ -76,62 +76,12 @@ 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'
|
|
130
79
|
}
|
|
131
80
|
});
|
|
132
81
|
|
|
133
82
|
const [, t] = useLanguage();
|
|
134
83
|
const [{ configs }] = useConfig();
|
|
84
|
+
const [{ parseTime }] = useUtils();
|
|
135
85
|
const [orderState] = useOrder();
|
|
136
86
|
const [optionSelected, setOptionSelected] = useState({
|
|
137
87
|
isAsap: false,
|
|
@@ -141,11 +91,14 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
141
91
|
isLoading: 0,
|
|
142
92
|
isEditing: false,
|
|
143
93
|
});
|
|
94
|
+
const { width } = useWindowDimensions();
|
|
144
95
|
const { bottom } = useSafeAreaInsets();
|
|
145
96
|
|
|
146
|
-
const [
|
|
147
|
-
const [
|
|
148
|
-
const [
|
|
97
|
+
const [toggleTime, setToggleTime] = useState(false);
|
|
98
|
+
const [selectedTime, setSelectedTime] = useState(timeSelected);
|
|
99
|
+
const [minDate, setMinDate] = useState(new Date())
|
|
100
|
+
const [maxDate, setMaxDate] = useState(new Date)
|
|
101
|
+
const [alert, setAlert] = useState<any>({ show: false })
|
|
149
102
|
|
|
150
103
|
const goToBack = () => navigation?.canGoBack() && navigation.goBack();
|
|
151
104
|
|
|
@@ -173,6 +126,19 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
173
126
|
.utc()
|
|
174
127
|
.format('YYYY-MM-DD HH:mm:ss');
|
|
175
128
|
|
|
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
|
+
|
|
176
142
|
useEffect(() => {
|
|
177
143
|
if (orderState.options?.moment) {
|
|
178
144
|
setOptionSelected({ isAsap: false, isSchedule: true });
|
|
@@ -194,34 +160,14 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
194
160
|
}
|
|
195
161
|
}, [momentState.isLoading]);
|
|
196
162
|
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
}
|
|
163
|
+
const customDayHeaderStylesCallback = () => {
|
|
164
|
+
return {
|
|
165
|
+
textStyle: {
|
|
166
|
+
color: theme.colors.disabled,
|
|
167
|
+
fontSize: 12,
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
};
|
|
225
171
|
|
|
226
172
|
useEffect(() => {
|
|
227
173
|
if (datesList?.length > 0) {
|
|
@@ -230,22 +176,11 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
230
176
|
const maxDateParts = _datesList[_datesList.length - 1].split('-')
|
|
231
177
|
const _minDate = new Date(minDateParts[0], minDateParts[1] - 1, minDateParts[2])
|
|
232
178
|
const _maxDate = new Date(maxDateParts[0], maxDateParts[1] - 1, maxDateParts[2])
|
|
233
|
-
|
|
179
|
+
setMinDate(_minDate)
|
|
180
|
+
setMaxDate(_maxDate)
|
|
234
181
|
}
|
|
235
182
|
}, [datesList])
|
|
236
183
|
|
|
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
|
-
|
|
249
184
|
return (
|
|
250
185
|
<>
|
|
251
186
|
<Container style={{ paddingLeft: 40, paddingRight: 40 }}>
|
|
@@ -299,55 +234,95 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
299
234
|
</WrapSelectOption>
|
|
300
235
|
|
|
301
236
|
{optionSelected.isSchedule && (
|
|
302
|
-
<
|
|
303
|
-
|
|
304
|
-
{
|
|
305
|
-
<
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
237
|
+
<WrapDelveryTime>
|
|
238
|
+
{datesList.length > 0 && (
|
|
239
|
+
<View style={styles.dateWrap}>
|
|
240
|
+
<View style={styles.dateLabel}>
|
|
241
|
+
<OText size={12} color={theme.colors.textNormal}>{dateSelected}</OText>
|
|
242
|
+
</View>
|
|
243
|
+
<SelectDropdown
|
|
244
|
+
defaultButtonText={timeSelected ? timeSelected : t('DELIVERY_TIME', 'Delivery Time')}
|
|
245
|
+
defaultValue={74}
|
|
246
|
+
data={hoursList}
|
|
247
|
+
disabled={orderState.loading}
|
|
248
|
+
onSelect={(selectedItem, index) => {
|
|
249
|
+
setSelectedTime(selectedItem.startTime)
|
|
250
|
+
}}
|
|
251
|
+
buttonTextAfterSelection={(selectedItem, index) => {
|
|
252
|
+
return `${selectedItem.startTime} - ${selectedItem.endTime}`
|
|
253
|
+
}}
|
|
254
|
+
rowTextForSelection={(item, index) => {
|
|
255
|
+
return `${item.startTime} - ${item.endTime}`
|
|
256
|
+
}}
|
|
257
|
+
buttonStyle={{
|
|
258
|
+
backgroundColor: theme.colors.white,
|
|
259
|
+
borderColor: theme.colors.border,
|
|
260
|
+
borderWidth: 1,
|
|
261
|
+
borderRadius: 8,
|
|
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
|
+
}}
|
|
290
|
+
/>
|
|
291
|
+
<CalendarPicker
|
|
292
|
+
nextTitle=">"
|
|
293
|
+
width={width - 80}
|
|
294
|
+
previousTitle="<"
|
|
295
|
+
nextComponent={
|
|
296
|
+
<OIcon
|
|
297
|
+
src={theme.images.general.chevron_right}
|
|
298
|
+
color={theme.colors.disabled}
|
|
299
|
+
width={12}
|
|
300
|
+
style={{ marginHorizontal: 4 }}
|
|
301
|
+
/>
|
|
302
|
+
}
|
|
303
|
+
previousComponent={
|
|
304
|
+
<OIcon
|
|
305
|
+
src={theme.images.general.chevron_left}
|
|
306
|
+
color={theme.colors.disabled}
|
|
307
|
+
width={12}
|
|
308
|
+
style={{ marginHorizontal: 4 }}
|
|
309
|
+
/>
|
|
310
|
+
}
|
|
311
|
+
onDateChange={(date: moment.Moment) =>
|
|
312
|
+
handleChangeDate(date.format('YYYY-MM-DD'))
|
|
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}
|
|
327
322
|
/>
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
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>
|
|
323
|
+
</View>
|
|
324
|
+
)}
|
|
325
|
+
</WrapDelveryTime>
|
|
351
326
|
)}
|
|
352
327
|
</View>
|
|
353
328
|
<Spinner visible={momentState.isLoading === 1} />
|
|
@@ -6,37 +6,61 @@ export const Container = styled.ScrollView`
|
|
|
6
6
|
padding: 0 20px;
|
|
7
7
|
padding-bottom: 20px;
|
|
8
8
|
`
|
|
9
|
-
|
|
9
|
+
export const HeaderTitle = styled.View`
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
margin-bottom: 20px;
|
|
12
|
+
`
|
|
10
13
|
export const WrapSelectOption = styled.TouchableOpacity`
|
|
11
14
|
flex-direction: row;
|
|
12
15
|
align-items: center;
|
|
13
16
|
margin-vertical: 5px;
|
|
14
17
|
`
|
|
15
|
-
export const
|
|
16
|
-
|
|
18
|
+
export const Days = styled.View`
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
margin-vertical: 10px;
|
|
17
22
|
`
|
|
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};
|
|
18
32
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
33
|
+
${(props: any) => props.borderLeftShow && css`
|
|
34
|
+
border-left-width: 1px;
|
|
35
|
+
`}
|
|
22
36
|
`
|
|
23
|
-
|
|
24
|
-
|
|
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;
|
|
44
|
+
`
|
|
45
|
+
export const Hours = styled.View`
|
|
25
46
|
flex: 1;
|
|
26
47
|
flex-wrap: wrap;
|
|
27
48
|
flex-direction: row;
|
|
28
49
|
justify-content: space-between;
|
|
50
|
+
margin: 0 20px;
|
|
29
51
|
`
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
width: 86px;
|
|
33
|
-
height: 34px;
|
|
34
|
-
background: #E9ECEF;
|
|
35
|
-
border-radius: 7.6px;
|
|
52
|
+
export const Hour = styled.TouchableOpacity`
|
|
53
|
+
flex-direction: row;
|
|
36
54
|
justify-content: center;
|
|
37
55
|
align-items: center;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
56
|
+
padding: 5px;
|
|
57
|
+
border-width: 1px;
|
|
58
|
+
border-radius: 7.6px;
|
|
59
|
+
border-color: ${(props: any) => props.theme.colors.border};
|
|
60
|
+
width: 90px;
|
|
61
|
+
margin-vertical: 7px;
|
|
62
|
+
`
|
|
63
|
+
|
|
64
|
+
export const WrapDelveryTime = styled.View`
|
|
65
|
+
flex: 1;
|
|
42
66
|
`
|