ordering-ui-react-native 0.18.41 → 0.18.42
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
|
@@ -36,10 +36,11 @@ export const OrderEta = (props: any) => {
|
|
|
36
36
|
if (diffTimeAsMinutes <= 0) {
|
|
37
37
|
totalEta += (Math.floor(Math.abs(diffTimeAsMinutes / order?.eta_current_status_time) + 1) * order?.eta_current_status_penalty_time)
|
|
38
38
|
}
|
|
39
|
-
_estimatedTime =
|
|
39
|
+
_estimatedTime = moment.utc(_delivery).add(totalEta, 'minutes')
|
|
40
40
|
} else {
|
|
41
|
-
_estimatedTime =
|
|
41
|
+
_estimatedTime = moment.utc(_delivery).add(order?.eta_time, 'minutes')
|
|
42
42
|
}
|
|
43
|
+
_estimatedTime = outputFormat ? moment(_estimatedTime).format(outputFormat) : parseDate(_estimatedTime, { utc: false })
|
|
43
44
|
setEstimatedDeliveryTime(_estimatedTime)
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -49,11 +50,11 @@ export const OrderEta = (props: any) => {
|
|
|
49
50
|
getEstimatedDeliveryTime()
|
|
50
51
|
}, 1000)
|
|
51
52
|
return () => clearInterval(interval)
|
|
52
|
-
}, [order])
|
|
53
|
+
}, [order, outputFormat])
|
|
53
54
|
|
|
54
55
|
return (
|
|
55
56
|
<>
|
|
56
|
-
{
|
|
57
|
+
{estimatedDeliveryTime}
|
|
57
58
|
</>
|
|
58
59
|
)
|
|
59
60
|
}
|
|
@@ -121,7 +121,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
121
121
|
const mapValidStatuses = [9, 19, 23]
|
|
122
122
|
const placeSpotTypes = [3, 4, 5]
|
|
123
123
|
const directionTypes = [2, 3, 4, 5]
|
|
124
|
-
const activeStatus = [0, 3, 4, 7, 8, 9, 14, 18, 19, 20, 21, 22, 23]
|
|
124
|
+
const activeStatus = [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23]
|
|
125
125
|
const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
|
|
126
126
|
const isGiftCardOrder = !order?.business_id
|
|
127
127
|
const hideDeliveryDate = theme?.confirmation?.components?.order?.components?.date?.hidden
|