ordering-ui-react-native 0.17.69 → 0.17.71
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/AcceptOrRejectOrder/index.tsx +259 -238
- package/themes/business/src/components/AcceptOrRejectOrder/styles.tsx +6 -4
- package/themes/business/src/components/OrdersOption/index.tsx +4 -5
- package/themes/business/src/components/PreviousOrders/OrdersGroupedItem.tsx +1 -1
- package/themes/business/src/components/PreviousOrders/index.tsx +143 -143
- package/themes/business/src/types/index.tsx +6 -3
- package/themes/original/src/components/AddressList/index.tsx +7 -3
- package/themes/original/src/components/BusinessProductsListing/index.tsx +2 -3
- package/themes/original/src/components/BusinessesListing/Layout/Appointment/index.tsx +1 -1
- package/themes/original/src/components/BusinessesListing/Layout/Original/index.tsx +2 -2
- package/themes/original/src/components/Favorite/index.tsx +7 -4
- package/themes/original/src/components/Favorite/styles.tsx +1 -1
- package/themes/original/src/components/FloatingButton/index.tsx +1 -1
- package/themes/original/src/components/FloatingButton/styles.tsx +1 -1
- package/themes/original/src/components/Help/index.tsx +7 -7
- package/themes/original/src/components/LottieAnimation/index.tsx +16 -7
- package/themes/original/src/components/MomentOption/index.tsx +6 -4
- package/themes/original/src/components/Notifications/index.tsx +8 -2
- package/themes/original/src/components/ProductForm/index.tsx +2 -2
- package/themes/original/src/components/ProductOptionSubOption/index.tsx +1 -1
- package/themes/original/src/components/Promotions/index.tsx +3 -2
- package/themes/original/src/components/UserProfileForm/index.tsx +14 -12
- package/themes/original/src/types/index.tsx +1 -0
|
@@ -15,7 +15,6 @@ import { GoogleMap } from '../GoogleMap';
|
|
|
15
15
|
export const PreviousOrders = (props: any) => {
|
|
16
16
|
const {
|
|
17
17
|
orders,
|
|
18
|
-
ordersGrouped,
|
|
19
18
|
onNavigationRedirect,
|
|
20
19
|
getOrderStatus,
|
|
21
20
|
handleClickOrder,
|
|
@@ -186,153 +185,154 @@ export const PreviousOrders = (props: any) => {
|
|
|
186
185
|
|
|
187
186
|
return (
|
|
188
187
|
<>
|
|
189
|
-
{
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
188
|
+
{orders && orders?.length > 0 && orders.map((_order: any) => {
|
|
189
|
+
const order = !Array.isArray(_order) && (_order?.isLogistic && !_order?.order_group && isLogisticOrder ? _order?.order : _order)
|
|
190
|
+
const _ordersGrouped = Array.isArray(_order) && Object.fromEntries(_order)
|
|
191
|
+
return (
|
|
192
|
+
_ordersGrouped ? (
|
|
193
|
+
<View key={_order[0]} style={{ marginBottom: 10 }}>
|
|
194
|
+
{Object.keys(_ordersGrouped).map((k, idx) => (
|
|
195
|
+
<OrdersGroupedItem
|
|
196
|
+
key={`${k}_${idx}`}
|
|
197
|
+
groupId={k}
|
|
198
|
+
orders={_ordersGrouped[k]}
|
|
199
|
+
>
|
|
200
|
+
{_ordersGrouped[k]?.length > 0 &&
|
|
201
|
+
_ordersGrouped[k]
|
|
202
|
+
?.filter((order: any) => hash[order?.id] ? false : (hash[order?.id] = true))
|
|
203
|
+
?.map((_order: any) => {
|
|
204
|
+
const order_ = _order?.isLogistic && !_order?.order_group && isLogisticOrder ? _order?.order : _order
|
|
205
|
+
return (
|
|
206
|
+
<OrdersList key={order_.id} order={order_} _order={_order} hideBtns />
|
|
207
|
+
)
|
|
208
|
+
}
|
|
204
209
|
)
|
|
205
210
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
211
|
+
{_ordersGrouped[k][0]?.status === 0 && (
|
|
212
|
+
<AcceptOrRejectOrderStyle>
|
|
213
|
+
<OButton
|
|
214
|
+
text={t('REJECT_ALL', 'Reject all')}
|
|
215
|
+
bgColor={theme.colors.danger100}
|
|
216
|
+
borderColor={theme.colors.danger100}
|
|
217
|
+
imgRightSrc={null}
|
|
218
|
+
style={{ borderRadius: 7, height: 40 }}
|
|
219
|
+
parentStyle={{ width: '45%' }}
|
|
220
|
+
textStyle={{ color: theme.colors.danger500, fontSize: 12 }}
|
|
221
|
+
onClick={() => onNavigationRedirect('AcceptOrRejectOrder', {
|
|
222
|
+
action: 'reject',
|
|
223
|
+
order: _ordersGrouped[k][0],
|
|
224
|
+
ids: _ordersGrouped[k].map((o: any) => o.id),
|
|
225
|
+
handleChangeOrderStatus
|
|
226
|
+
})}
|
|
227
|
+
/>
|
|
228
|
+
<OButton
|
|
229
|
+
text={t('ACCEPT_ALL', 'Accept all')}
|
|
230
|
+
bgColor={theme.colors.success100}
|
|
231
|
+
borderColor={theme.colors.success100}
|
|
232
|
+
imgRightSrc={null}
|
|
233
|
+
style={{ borderRadius: 7, height: 40 }}
|
|
234
|
+
parentStyle={{ width: '45%' }}
|
|
235
|
+
textStyle={{ color: theme.colors.success500, fontSize: 12 }}
|
|
236
|
+
onClick={() => onNavigationRedirect('AcceptOrRejectOrder', {
|
|
237
|
+
action: 'accept',
|
|
238
|
+
order: _ordersGrouped[k][0],
|
|
239
|
+
ids: _ordersGrouped[k].map((o: any) => o.id),
|
|
240
|
+
handleChangeOrderStatus
|
|
241
|
+
})}
|
|
242
|
+
/>
|
|
243
|
+
</AcceptOrRejectOrderStyle>
|
|
244
|
+
)}
|
|
245
|
+
<View>
|
|
246
|
+
{_ordersGrouped[k][0]?.status === 7 && (
|
|
247
|
+
<OButton
|
|
248
|
+
text={t('READY_FOR_PICKUP', 'Ready for pickup')}
|
|
249
|
+
bgColor={theme.colors.primaryLight}
|
|
250
|
+
borderColor={theme.colors.primaryLight}
|
|
251
|
+
imgRightSrc={null}
|
|
252
|
+
style={{ borderRadius: 7, height: 40 }}
|
|
253
|
+
parentStyle={{ width: '100%' }}
|
|
254
|
+
textStyle={{ color: theme.colors.primary, fontSize: 12 }}
|
|
255
|
+
onClick={() => handleChangeOrderStatus(
|
|
256
|
+
4,
|
|
257
|
+
_ordersGrouped[k].map((o: any) => o.id),
|
|
258
|
+
)}
|
|
259
|
+
/>
|
|
253
260
|
)}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
onClick={() => handleOpenMapView({ orders: ordersGrouped[k] })}
|
|
268
|
-
/>
|
|
269
|
-
)}
|
|
270
|
-
</View>
|
|
271
|
-
{ordersGrouped[k][0]?.status === 4 &&
|
|
272
|
-
![1].includes(ordersGrouped[k][0]?.delivery_type) &&
|
|
273
|
-
(
|
|
274
|
-
<AcceptOrRejectOrderStyle>
|
|
275
|
-
<OButton
|
|
276
|
-
text={t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', 'Order not picked up by customer')}
|
|
277
|
-
bgColor={theme.colors.danger100}
|
|
278
|
-
borderColor={theme.colors.danger100}
|
|
279
|
-
imgRightSrc={null}
|
|
280
|
-
style={{ borderRadius: 7, height: 40, paddingLeft: 10, paddingRight: 10 }}
|
|
281
|
-
parentStyle={{ width: '45%' }}
|
|
282
|
-
textStyle={{ color: theme.colors.danger500, fontSize: 12, textAlign: 'center' }}
|
|
283
|
-
onClick={() => handleChangeOrderStatus(
|
|
284
|
-
17,
|
|
285
|
-
ordersGrouped[k].map((o: any) => o.id),
|
|
261
|
+
</View>
|
|
262
|
+
<View>
|
|
263
|
+
{viewMapStatus.includes(_ordersGrouped[k][0]?.status) && (
|
|
264
|
+
<OButton
|
|
265
|
+
text={t('TRACK_REAL_TIME_POSITION', 'Track real time position')}
|
|
266
|
+
bgColor={theme.colors.primaryLight}
|
|
267
|
+
borderColor={theme.colors.primaryLight}
|
|
268
|
+
imgRightSrc={null}
|
|
269
|
+
style={{ borderRadius: 7, height: 40 }}
|
|
270
|
+
parentStyle={{ width: '100%' }}
|
|
271
|
+
textStyle={{ color: theme.colors.primary, fontSize: 12 }}
|
|
272
|
+
onClick={() => handleOpenMapView({ orders: _ordersGrouped[k] })}
|
|
273
|
+
/>
|
|
286
274
|
)}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
275
|
+
</View>
|
|
276
|
+
{_ordersGrouped[k][0]?.status === 4 &&
|
|
277
|
+
![1].includes(_ordersGrouped[k][0]?.delivery_type) &&
|
|
278
|
+
(
|
|
279
|
+
<AcceptOrRejectOrderStyle>
|
|
280
|
+
<OButton
|
|
281
|
+
text={t('ORDER_NOT_PICKEDUP_BY_CUSTOMER', 'Order not picked up by customer')}
|
|
282
|
+
bgColor={theme.colors.danger100}
|
|
283
|
+
borderColor={theme.colors.danger100}
|
|
284
|
+
imgRightSrc={null}
|
|
285
|
+
style={{ borderRadius: 7, height: 40, paddingLeft: 10, paddingRight: 10 }}
|
|
286
|
+
parentStyle={{ width: '45%' }}
|
|
287
|
+
textStyle={{ color: theme.colors.danger500, fontSize: 12, textAlign: 'center' }}
|
|
288
|
+
onClick={() => handleChangeOrderStatus(
|
|
289
|
+
17,
|
|
290
|
+
_ordersGrouped[k].map((o: any) => o.id),
|
|
291
|
+
)}
|
|
292
|
+
/>
|
|
293
|
+
<OButton
|
|
294
|
+
text={t('PICKUP_COMPLETED_BY_CUSTOMER', 'Pickup completed by customer')}
|
|
295
|
+
bgColor={theme.colors.success100}
|
|
296
|
+
borderColor={theme.colors.success100}
|
|
297
|
+
imgRightSrc={null}
|
|
298
|
+
style={{ borderRadius: 7, height: 40, paddingLeft: 10, paddingRight: 10 }}
|
|
299
|
+
parentStyle={{ width: '45%' }}
|
|
300
|
+
textStyle={{ color: theme.colors.success500, fontSize: 12, textAlign: 'center' }}
|
|
301
|
+
onClick={() => handleChangeOrderStatus(
|
|
302
|
+
15,
|
|
303
|
+
_ordersGrouped[k].map((o: any) => o.id),
|
|
304
|
+
)}
|
|
305
|
+
/>
|
|
306
|
+
</AcceptOrRejectOrderStyle>
|
|
307
|
+
)}
|
|
308
|
+
{!_ordersGrouped[k][0]?.user_review &&
|
|
309
|
+
pastOrderStatuses.includes(_ordersGrouped[k][0]?.status) &&
|
|
310
|
+
(
|
|
311
|
+
<OButton
|
|
312
|
+
text={t('REVIEW_CUSTOMER', 'Review customer')}
|
|
313
|
+
bgColor={theme.colors.primary}
|
|
314
|
+
borderColor={theme.colors.primary}
|
|
315
|
+
imgRightSrc={null}
|
|
316
|
+
style={{ borderRadius: 8, height: 40 }}
|
|
317
|
+
parentStyle={{ width: '100%' }}
|
|
318
|
+
textStyle={{ color: theme.colors.white }}
|
|
319
|
+
onClick={() => setOpenReviewModal({
|
|
320
|
+
order: _ordersGrouped[k][0],
|
|
321
|
+
customerId: _ordersGrouped[k][0]?.customer_id,
|
|
322
|
+
ids: _ordersGrouped[k].map((o: any) => o.id)
|
|
323
|
+
})}
|
|
324
|
+
/>
|
|
325
|
+
)}
|
|
326
|
+
</OrdersGroupedItem>
|
|
327
|
+
))}
|
|
328
|
+
</View>
|
|
329
|
+
) : (
|
|
330
|
+
<View key={order.id}>
|
|
331
|
+
<OrdersList order={order} _order={_order} />
|
|
332
|
+
</View>
|
|
333
|
+
)
|
|
334
334
|
)
|
|
335
|
-
}
|
|
335
|
+
})}
|
|
336
336
|
|
|
337
337
|
<OModal
|
|
338
338
|
open={openModal}
|
|
@@ -311,7 +311,7 @@ export interface OrdersOptionParams {
|
|
|
311
311
|
isLogisticActivated?: boolean;
|
|
312
312
|
isAlsea?: boolean;
|
|
313
313
|
checkNotification?: boolean;
|
|
314
|
-
|
|
314
|
+
ordersFormatted?: any;
|
|
315
315
|
handleChangeOrderStatus?: () => void;
|
|
316
316
|
handleSendCustomerReview?: () => void;
|
|
317
317
|
orderDetailsProps?: any;
|
|
@@ -573,14 +573,17 @@ export interface AcceptOrRejectOrderParams {
|
|
|
573
573
|
loading?: boolean;
|
|
574
574
|
action: string;
|
|
575
575
|
orderId?: number;
|
|
576
|
-
handleUpdateOrder?: () =>
|
|
576
|
+
handleUpdateOrder?: (p1: any, p2: any) => {};
|
|
577
577
|
notShowCustomerPhone?: boolean | undefined;
|
|
578
|
-
actions?:
|
|
578
|
+
actions?: any;
|
|
579
579
|
titleAccept?: textTranslate;
|
|
580
580
|
titleReject?: textTranslate;
|
|
581
581
|
titleNotReady?: textTranslate;
|
|
582
582
|
appTitle?: textTranslate;
|
|
583
583
|
orderTitle?: any
|
|
584
|
+
isPage?: boolean
|
|
585
|
+
navigation?: any
|
|
586
|
+
route?: any
|
|
584
587
|
}
|
|
585
588
|
|
|
586
589
|
export interface MapViewParams {
|
|
@@ -138,7 +138,8 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
138
138
|
}, [])
|
|
139
139
|
|
|
140
140
|
return (
|
|
141
|
-
<Container
|
|
141
|
+
<Container
|
|
142
|
+
pt={20}
|
|
142
143
|
noPadding
|
|
143
144
|
refreshControl={
|
|
144
145
|
<RefreshControl
|
|
@@ -153,7 +154,10 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
153
154
|
titleAlign={'center'}
|
|
154
155
|
onActionLeft={goToBack}
|
|
155
156
|
showCall={false}
|
|
156
|
-
style={{
|
|
157
|
+
style={{
|
|
158
|
+
paddingHorizontal: 40,
|
|
159
|
+
marginTop: Platform.OS === 'ios' ? 0 : 10
|
|
160
|
+
}}
|
|
157
161
|
/>
|
|
158
162
|
)}
|
|
159
163
|
{(!addressList.loading || (isFromProductsList || isFromBusinesses || isFromProfile || isProfile)) && (
|
|
@@ -174,7 +178,7 @@ const AddressListUI = (props: AddressListParams) => {
|
|
|
174
178
|
showCall={false}
|
|
175
179
|
btnStyle={{ paddingLeft: 0 }}
|
|
176
180
|
paddingTop={0}
|
|
177
|
-
style={{ marginTop:
|
|
181
|
+
style={{ marginTop: 0 }}
|
|
178
182
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
179
183
|
titleStyle={{ marginLeft: 0, marginRight: 0 }}
|
|
180
184
|
/>
|
|
@@ -30,7 +30,6 @@ import {
|
|
|
30
30
|
WrapSearchBar,
|
|
31
31
|
WrapContent,
|
|
32
32
|
FiltProductsContainer,
|
|
33
|
-
ContainerSafeAreaView,
|
|
34
33
|
BackgroundGray,
|
|
35
34
|
ProfessionalFilterWrapper,
|
|
36
35
|
NearBusiness,
|
|
@@ -353,7 +352,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
353
352
|
<FiltProductsContainer
|
|
354
353
|
style={{
|
|
355
354
|
height: Dimensions.get('window').height - filtProductsHeight,
|
|
356
|
-
top: Platform.OS === 'ios' ? searchBarHeight + insets.top : searchBarHeight
|
|
355
|
+
top: Platform.OS === 'ios' ? (searchBarHeight - 10) + insets.top : searchBarHeight
|
|
357
356
|
}}
|
|
358
357
|
contentContainerStyle={{ flexGrow: 1 }}
|
|
359
358
|
>
|
|
@@ -515,7 +514,7 @@ const BusinessProductsListingUI = (props: BusinessProductsListingParams) => {
|
|
|
515
514
|
)}
|
|
516
515
|
</IOScrollView>
|
|
517
516
|
{!loading && auth && currentCart?.products?.length > 0 && categoryState.products.length !== 0 && (
|
|
518
|
-
<View style={{ marginBottom:
|
|
517
|
+
<View style={{ marginBottom: 0, zIndex: 20000 }}>
|
|
519
518
|
<FloatingButton
|
|
520
519
|
btnText={
|
|
521
520
|
openUpselling
|
|
@@ -284,7 +284,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
284
284
|
style={{ paddingTop: top + 20 }}>
|
|
285
285
|
{!auth && (
|
|
286
286
|
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
|
|
287
|
-
<
|
|
287
|
+
<OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
|
|
288
288
|
</TouchableOpacity>
|
|
289
289
|
)}
|
|
290
290
|
<Search>
|
|
@@ -80,7 +80,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
80
80
|
const isChewLayout = theme?.header?.components?.layout?.type === 'chew'
|
|
81
81
|
const hideCities = theme?.business_listing_view?.components?.cities?.hidden ?? true
|
|
82
82
|
const [refreshing] = useState(false);
|
|
83
|
-
const bgHeader =
|
|
83
|
+
const bgHeader = orderingTheme?.theme?.business_listing_view?.components?.business_hero?.components?.image
|
|
84
84
|
const styles = StyleSheet.create({
|
|
85
85
|
container: {
|
|
86
86
|
marginBottom: 0,
|
|
@@ -474,7 +474,7 @@ const BusinessesListingUI = (props: BusinessesListingParams) => {
|
|
|
474
474
|
{!auth && (
|
|
475
475
|
|
|
476
476
|
<TouchableOpacity onPress={() => navigation?.canGoBack() && navigation.goBack()} style={{ position: 'absolute', marginStart: 40, paddingVertical: 20 }}>
|
|
477
|
-
<
|
|
477
|
+
<OIcon src={theme.images.general.arrow_left} color={theme.colors.textNormal} />
|
|
478
478
|
</TouchableOpacity>
|
|
479
479
|
)}
|
|
480
480
|
</HeaderWrapper>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import { useLanguage, useOrder } from 'ordering-components/native'
|
|
3
3
|
import { useTheme } from 'styled-components/native'
|
|
4
|
+
import { Platform } from 'react-native'
|
|
4
5
|
import { FavoriteList } from '../FavoriteList'
|
|
5
6
|
import NavBar from '../NavBar'
|
|
6
7
|
import { OText } from '../shared'
|
|
@@ -34,7 +35,9 @@ export const Favorite = (props: any) => {
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
return (
|
|
37
|
-
<Container
|
|
38
|
+
<Container
|
|
39
|
+
pdng={Platform.OS === 'ios' ? '20px' : '30px'}
|
|
40
|
+
>
|
|
38
41
|
<NavBar
|
|
39
42
|
title={t('FAVORITE', 'Favorite')}
|
|
40
43
|
titleAlign={'center'}
|
|
@@ -52,9 +55,9 @@ export const Favorite = (props: any) => {
|
|
|
52
55
|
>
|
|
53
56
|
<OText
|
|
54
57
|
color={menu.key === tabSelected ? theme.colors.textNormal : theme.colors.disabled}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
size={14}
|
|
59
|
+
weight={menu.key === tabSelected ? '500' : '400'}
|
|
60
|
+
style={{ marginBottom: 12 }}
|
|
58
61
|
>
|
|
59
62
|
{menu.name}
|
|
60
63
|
</OText>
|
|
@@ -63,7 +63,7 @@ const FloatingButtonUI = (props: FloatingButtonParams) => {
|
|
|
63
63
|
return (
|
|
64
64
|
<Container
|
|
65
65
|
style={{
|
|
66
|
-
paddingBottom: Platform.OS === 'ios' ?
|
|
66
|
+
paddingBottom: Platform.OS === 'ios' ? 20 : bottom + 16
|
|
67
67
|
}}>
|
|
68
68
|
|
|
69
69
|
<View style={styles.infoCont}>
|
|
@@ -31,20 +31,20 @@ export const Help = (props: HelpParams) => {
|
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<Container
|
|
34
|
+
pt={10}
|
|
34
35
|
noPadding
|
|
35
36
|
refreshControl={
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
<RefreshControl
|
|
38
|
+
refreshing={refreshing}
|
|
39
|
+
onRefresh={() => handleOnRefresh()}
|
|
40
|
+
/>
|
|
41
|
+
}
|
|
41
42
|
>
|
|
42
43
|
<NavBar
|
|
43
44
|
title={t('HELP', 'Help')}
|
|
44
45
|
titleAlign={'center'}
|
|
45
46
|
onActionLeft={goToBack}
|
|
46
47
|
showCall={false}
|
|
47
|
-
paddingTop={10}
|
|
48
48
|
btnStyle={{ paddingLeft: 0 }}
|
|
49
49
|
/>
|
|
50
50
|
<HelpSubItem
|
|
@@ -53,7 +53,7 @@ export const Help = (props: HelpParams) => {
|
|
|
53
53
|
<OText size={14}>{t('HELP_WITH_ORDER', 'Help with an order')}</OText>
|
|
54
54
|
</HelpSubItem>
|
|
55
55
|
<HelpSubItem
|
|
56
|
-
onPress={() => onRedirect('HelpAccountAndPayment')}
|
|
56
|
+
onPress={() => onRedirect('HelpAccountAndPayment')}
|
|
57
57
|
>
|
|
58
58
|
<OText size={14}>{t('ACCOUNT_PAYMENT_OPTIONS', 'Account and Payment Options')}</OText>
|
|
59
59
|
</HelpSubItem>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef } from 'react'
|
|
1
|
+
import React, { useRef, useState } from 'react'
|
|
2
2
|
import Lottie from 'lottie-react-native';
|
|
3
3
|
import { TouchableOpacity, Easing, ViewStyle, Animated } from 'react-native';
|
|
4
4
|
import IconAntDesign from 'react-native-vector-icons/AntDesign'
|
|
@@ -13,9 +13,9 @@ interface Props {
|
|
|
13
13
|
duration?: number,
|
|
14
14
|
type: 'favorite', // animation types
|
|
15
15
|
isActive: boolean,
|
|
16
|
-
animationType?: ((value
|
|
16
|
+
animationType?: ((value: number) => number);
|
|
17
17
|
useNativeDriver?: boolean,
|
|
18
|
-
iconProps?: {color?: string, size?: number, style?: ViewStyle}
|
|
18
|
+
iconProps?: { color?: string, size?: number, style?: ViewStyle }
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export const LottieAnimation = (props: Props) => {
|
|
@@ -34,30 +34,39 @@ export const LottieAnimation = (props: Props) => {
|
|
|
34
34
|
} = props
|
|
35
35
|
const theme = useTheme()
|
|
36
36
|
const animationProgress = useRef(new Animated.Value(initialValue))
|
|
37
|
+
const [isHide, setIsHide] = useState(true)
|
|
37
38
|
const favoriteArray = ['heart', 'hearto']
|
|
38
39
|
const icon = type === 'favorite' ? favoriteArray : []
|
|
39
40
|
const animationGif = type === 'favorite' ? theme.images?.general?.heart : ''
|
|
40
41
|
const onPressLottie = () => {
|
|
41
42
|
if (!disableAnimation) {
|
|
43
|
+
setIsHide(false)
|
|
42
44
|
Animated.timing(animationProgress.current, {
|
|
43
45
|
toValue,
|
|
44
46
|
duration: duration || 5000,
|
|
45
47
|
easing: animationType || Easing.linear,
|
|
46
48
|
useNativeDriver: useNativeDriver ?? true
|
|
47
49
|
}).start();
|
|
50
|
+
hideLottie()
|
|
48
51
|
}
|
|
49
52
|
onClick()
|
|
50
53
|
}
|
|
51
54
|
|
|
55
|
+
const hideLottie = () => {
|
|
56
|
+
setTimeout(() => setIsHide(true), 4500)
|
|
57
|
+
}
|
|
58
|
+
|
|
52
59
|
return (
|
|
53
60
|
<TouchableOpacity
|
|
54
61
|
onPress={onPressLottie}
|
|
55
62
|
style={style}
|
|
56
63
|
>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
{!isHide &&
|
|
65
|
+
<Lottie
|
|
66
|
+
progress={animationProgress.current}
|
|
67
|
+
source={animationGif}
|
|
68
|
+
/>
|
|
69
|
+
}
|
|
61
70
|
<IconAntDesign
|
|
62
71
|
name={isActive ? icon[0] : icon[1]}
|
|
63
72
|
color={iconProps?.color || theme.colors.danger5}
|
|
@@ -253,19 +253,21 @@ const MomentOptionUI = (props: MomentOptionParams) => {
|
|
|
253
253
|
|
|
254
254
|
return (
|
|
255
255
|
<>
|
|
256
|
-
<Container
|
|
257
|
-
|
|
256
|
+
<Container
|
|
257
|
+
style={{
|
|
258
|
+
paddingLeft: 40,
|
|
259
|
+
paddingRight: 40
|
|
260
|
+
}}>
|
|
261
|
+
<View style={{ paddingBottom: 90, paddingRight: 20 }}>
|
|
258
262
|
<NavBar
|
|
259
263
|
onActionLeft={() => goToBack()}
|
|
260
264
|
btnStyle={{ paddingLeft: 0 }}
|
|
261
|
-
paddingTop={0}
|
|
262
265
|
style={{ paddingBottom: 0 }}
|
|
263
266
|
title={t('QUESTION_WHEN_ORDER', 'When do you want your order?')}
|
|
264
267
|
titleAlign={'center'}
|
|
265
268
|
titleStyle={{ fontSize: 20, marginRight: 0, marginLeft: 0 }}
|
|
266
269
|
titleWrapStyle={{ paddingHorizontal: 0 }}
|
|
267
270
|
/>
|
|
268
|
-
|
|
269
271
|
<WrapSelectOption
|
|
270
272
|
onPress={() => _handleAsap()}
|
|
271
273
|
disabled={orderState.loading} style={{ alignItems: 'flex-start' }}>
|
|
@@ -70,13 +70,19 @@ const NotificationsUI = (props: any) => {
|
|
|
70
70
|
}, [notificationsList])
|
|
71
71
|
|
|
72
72
|
return (
|
|
73
|
-
<Container
|
|
73
|
+
<Container
|
|
74
|
+
noPadding
|
|
75
|
+
pt={10}
|
|
76
|
+
>
|
|
74
77
|
<NavBar
|
|
75
78
|
title={t('NOTIFICATIONS', 'Notifications')}
|
|
76
79
|
titleAlign={'center'}
|
|
77
80
|
onActionLeft={goToBack}
|
|
78
81
|
showCall={false}
|
|
79
|
-
style={{
|
|
82
|
+
style={{
|
|
83
|
+
paddingHorizontal: 40,
|
|
84
|
+
paddingVertical: 0,
|
|
85
|
+
}}
|
|
80
86
|
/>
|
|
81
87
|
{showCustomerPromotions && showNotifications && (
|
|
82
88
|
<>
|