ordering-ui-react-native 0.21.45 → 0.21.46
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
|
@@ -125,6 +125,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
125
125
|
const directionTypes = [2, 3, 4, 5]
|
|
126
126
|
const activeStatus = [0, 3, 4, 7, 8, 9, 13, 14, 18, 19, 20, 21, 22, 23]
|
|
127
127
|
const reorderStatus = [1, 2, 5, 6, 10, 11, 12]
|
|
128
|
+
const [isPickup, setIsPickup] = useState(order?.delivery_type === 2)
|
|
128
129
|
const enabledPoweredByOrdering = configs?.powered_by_ordering_module?.value
|
|
129
130
|
const isGiftCardOrder = !order?.business_id
|
|
130
131
|
const hideDeliveryDate = theme?.confirmation?.components?.order?.components?.date?.hidden
|
|
@@ -138,6 +139,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
138
139
|
const hideDriverMessages = theme?.confirmation?.components?.driver?.components?.messages?.hidden
|
|
139
140
|
const hideCustomerPhone = theme?.confirmation?.components?.customer?.components?.phone?.hidden
|
|
140
141
|
const hideCustomerAddress = theme?.confirmation?.components?.customer?.components?.address?.hidden
|
|
142
|
+
const progressBarObjt = isPickup ? getOrderStatuPickUp : getOrderStatus
|
|
141
143
|
const walletName: any = {
|
|
142
144
|
cash: {
|
|
143
145
|
name: t('PAY_WITH_CASH_WALLET', 'Pay with Cash Wallet'),
|
|
@@ -346,7 +348,11 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
346
348
|
}
|
|
347
349
|
}, [props?.order?.error, props?.order?.loading])
|
|
348
350
|
|
|
349
|
-
|
|
351
|
+
|
|
352
|
+
useEffect(() => {
|
|
353
|
+
if (!order?.delivery_type) return
|
|
354
|
+
setIsPickup(order?.delivery_type === 2)
|
|
355
|
+
}, [order?.delivery_type])
|
|
350
356
|
|
|
351
357
|
return (
|
|
352
358
|
<OrderDetailsContainer
|