ordering-ui-react-native 0.22.32-release → 0.22.33-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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from 'react';
|
|
2
|
-
import { View, Pressable, StyleSheet, ScrollView, RefreshControl, Platform, TouchableOpacity
|
|
2
|
+
import { View, Pressable, StyleSheet, ScrollView, RefreshControl, Platform, TouchableOpacity } from 'react-native';
|
|
3
3
|
import { useLanguage, useUtils, OrderListGroups, useConfig } from 'ordering-components/native';
|
|
4
4
|
import SelectDropdown from 'react-native-select-dropdown'
|
|
5
5
|
import { Placeholder, PlaceholderLine, Fade } from 'rn-placeholder';
|
|
@@ -137,8 +137,6 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
137
137
|
const HEIGHT_SCREEN = orientationState?.dimensions?.height
|
|
138
138
|
const IS_PORTRAIT = orientationState.orientation === PORTRAIT
|
|
139
139
|
const showTagsList = !props.isAlsea && !props.isDriverApp && currentTabSelected !== 'logisticOrders'
|
|
140
|
-
const AnimatedFeatherIcon = Animated.createAnimatedComponent(FeatherIcon);
|
|
141
|
-
const spinValue = new Animated.Value(0);
|
|
142
140
|
|
|
143
141
|
const preorderTypeList = [
|
|
144
142
|
{ key: null, name: t('SLA', 'SLA\'s') },
|
|
@@ -459,25 +457,6 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
459
457
|
}
|
|
460
458
|
}, [isNetConnected]);
|
|
461
459
|
|
|
462
|
-
|
|
463
|
-
const handleInitAnimation = () => {
|
|
464
|
-
Animated.timing(
|
|
465
|
-
spinValue,
|
|
466
|
-
{
|
|
467
|
-
toValue: 1,
|
|
468
|
-
duration: 2000,
|
|
469
|
-
easing: Easing.linear,
|
|
470
|
-
useNativeDriver: true
|
|
471
|
-
}
|
|
472
|
-
).start()
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
useEffect(() => {
|
|
476
|
-
if (currentOrdersGroup?.loading || logisticOrders?.loading) {
|
|
477
|
-
handleInitAnimation()
|
|
478
|
-
}
|
|
479
|
-
}, [currentOrdersGroup?.loading, logisticOrders?.loading])
|
|
480
|
-
|
|
481
460
|
return (
|
|
482
461
|
<>
|
|
483
462
|
<View style={styles.header}>
|
|
@@ -487,19 +466,13 @@ const OrdersOptionUI = (props: OrdersOptionParams) => {
|
|
|
487
466
|
<WebsocketStatus />
|
|
488
467
|
</View>
|
|
489
468
|
{isNetConnected && (
|
|
490
|
-
<
|
|
469
|
+
<FeatherIcon
|
|
491
470
|
name='refresh-cw'
|
|
492
471
|
color={theme.colors.backgroundDark}
|
|
493
472
|
size={24}
|
|
494
473
|
onPress={() => currentTabSelected === 'logisticOrders' ? loadLogisticOrders && loadLogisticOrders() : loadOrders && loadOrders({ newFetch: true })}
|
|
495
474
|
style={{
|
|
496
|
-
marginRight: 20
|
|
497
|
-
transform: [{
|
|
498
|
-
rotate: spinValue.interpolate({
|
|
499
|
-
inputRange: [0, 0.3],
|
|
500
|
-
outputRange: ['0deg', '360deg'],
|
|
501
|
-
})
|
|
502
|
-
}]
|
|
475
|
+
marginRight: 20
|
|
503
476
|
}}
|
|
504
477
|
/>
|
|
505
478
|
)}
|