ordering-ui-react-native 0.23.30 → 0.23.32
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
|
@@ -25,14 +25,15 @@ const FloatingButtonUI = (props: FloatingButtonParams) => {
|
|
|
25
25
|
secondButton,
|
|
26
26
|
widthButton,
|
|
27
27
|
isPadding,
|
|
28
|
-
isHideRejectButtons
|
|
28
|
+
isHideRejectButtons,
|
|
29
|
+
principalButtonColor
|
|
29
30
|
} = props;
|
|
30
31
|
|
|
31
32
|
const theme = useTheme();
|
|
32
33
|
|
|
33
34
|
const styles = StyleSheet.create({
|
|
34
35
|
primaryBtn: {
|
|
35
|
-
backgroundColor: theme.colors.primary,
|
|
36
|
+
backgroundColor: principalButtonColor ?? theme.colors.primary,
|
|
36
37
|
},
|
|
37
38
|
secodaryBtn: {
|
|
38
39
|
backgroundColor: theme.colors.textSecondary,
|
|
@@ -12,7 +12,8 @@ import {
|
|
|
12
12
|
useSession,
|
|
13
13
|
ToastType,
|
|
14
14
|
useUtils,
|
|
15
|
-
useConfig
|
|
15
|
+
useConfig,
|
|
16
|
+
useApi
|
|
16
17
|
} from 'ordering-components/native';
|
|
17
18
|
|
|
18
19
|
import Alert from '../../providers/AlertProvider';
|
|
@@ -58,8 +59,9 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
58
59
|
const [, { showToast }] = useToast();
|
|
59
60
|
const [{ parsePrice, parseNumber }] = useUtils();
|
|
60
61
|
const [{ configs }] = useConfig();
|
|
61
|
-
|
|
62
|
+
const [ordering] = useApi()
|
|
62
63
|
const { order } = props.order
|
|
64
|
+
const isDelosiProject = ['delosi', 'delosipruebas'].includes(ordering?.project)
|
|
63
65
|
|
|
64
66
|
const hideTimer = configs?.hidden_driver_eta_time?.value === '1'
|
|
65
67
|
const isAllowedDriverRejectOrder = configs?.allow_driver_reject_order?.value === '1'
|
|
@@ -95,6 +97,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
95
97
|
|
|
96
98
|
const deliveryTypes = [1, 7]
|
|
97
99
|
|
|
100
|
+
|
|
98
101
|
const showFloatButtonsPickUp: any = {
|
|
99
102
|
8: !isHideRejectButtons,
|
|
100
103
|
3: true,
|
|
@@ -646,7 +649,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
646
649
|
isHideRejectButtons={isHideRejectButtons || !isEnabledFailedPickupDriver}
|
|
647
650
|
/>
|
|
648
651
|
)}
|
|
649
|
-
{(validStatusComplete.includes(order?.status)) && (
|
|
652
|
+
{(validStatusComplete.includes(order?.status)) && !(isDelosiProject && order?.status !== 26 && isHideRejectButtons) && (
|
|
650
653
|
<>
|
|
651
654
|
<FloatingButton
|
|
652
655
|
disabled={props.order?.loading || disabledActionsByInternet}
|
|
@@ -659,10 +662,11 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
659
662
|
handleViewActionOrder && handleViewActionOrder('deliveryFailed')
|
|
660
663
|
}
|
|
661
664
|
secondBtnText={t('DELIVERY_COMPLETE', 'Delivery complete')}
|
|
662
|
-
secondButton={true}
|
|
665
|
+
secondButton={isDelosiProject ? order?.status === 26 : true}
|
|
663
666
|
firstColorCustom={theme.colors.red}
|
|
667
|
+
principalButtonColor={theme.colors.red}
|
|
664
668
|
secondColorCustom={theme.colors.green}
|
|
665
|
-
widthButton={isHideRejectButtons ? '100%' : '45%'}
|
|
669
|
+
widthButton={isHideRejectButtons || (isDelosiProject && order?.status !== 26) ? '100%' : '45%'}
|
|
666
670
|
isHideRejectButtons={isHideRejectButtons}
|
|
667
671
|
/>
|
|
668
672
|
</>
|
|
@@ -503,7 +503,8 @@ export interface FloatingButtonParams {
|
|
|
503
503
|
firstColorCustom?: string;
|
|
504
504
|
secondColorCustom?: string;
|
|
505
505
|
paddingBottomIos?: any;
|
|
506
|
-
isHideRejectButtons?: boolean
|
|
506
|
+
isHideRejectButtons?: boolean;
|
|
507
|
+
principalButtonColor?: string;
|
|
507
508
|
}
|
|
508
509
|
export interface MomentOptionParams {
|
|
509
510
|
navigation: any;
|
|
@@ -54,6 +54,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
54
54
|
: theme?.business_view?.components?.products?.components?.product?.components?.image?.hidden
|
|
55
55
|
const textSize = isChewLayout ? 12 : 10
|
|
56
56
|
const logoPosition = theme?.business_view?.components?.products?.components?.product?.components?.image?.position
|
|
57
|
+
const hideFavoriteIcon = theme?.business_view?.components?.products?.components?.product?.components?.favorite?.hidden
|
|
57
58
|
|
|
58
59
|
const styles = StyleSheet.create({
|
|
59
60
|
container: {
|
|
@@ -198,7 +199,7 @@ const SingleProductCardUI = React.memo((props: SingleProductCardParams) => {
|
|
|
198
199
|
style={{ ...styles.line18, flex: 1 }}>
|
|
199
200
|
{product?.name}
|
|
200
201
|
</OText>
|
|
201
|
-
{!isPreviously && (
|
|
202
|
+
{!isPreviously && !hideFavoriteIcon && (
|
|
202
203
|
<LottieAnimation
|
|
203
204
|
type='favorite'
|
|
204
205
|
onClick={handleChangeFavorite}
|