ordering-ui-react-native 0.23.24 → 0.23.26
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
|
@@ -156,7 +156,7 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
156
156
|
setCurrentEvent({ evt: 2, orderId: value?.id ?? value?.order_id })
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
if ((!orderStatus.includes(value.status) && evtType !== 1 && isBusinessApp && orderStatus?.length > 0) || value?.author_id === user.id) return
|
|
159
|
+
if ((!orderStatus.includes(value.status) && evtType !== 1 && isBusinessApp && orderStatus?.length > 0) || value?.author_id === user.id) return
|
|
160
160
|
setCurrentEvent({
|
|
161
161
|
evt: evtType,
|
|
162
162
|
orderId: value?.driver
|
|
@@ -178,21 +178,11 @@ const NewOrderNotificationUI = (props: any) => {
|
|
|
178
178
|
handleEventNotification(3, o, orderStatus)
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
if (!events?._events?.order_updated_notification || events?._events?.order_updated_notification?.length < 2) {
|
|
188
|
-
events.on('order_updated_notification', handleEventTypeThree)
|
|
189
|
-
}
|
|
190
|
-
if (!events?._events?.request_register_notification || events?._events?.request_register_notification?.length < 2) {
|
|
191
|
-
events.on('request_register_notification', handleEventTypeTwo)
|
|
192
|
-
}
|
|
193
|
-
if (!events?._events?.request_update_notification || events?._events?.request_update_notification?.length < 2) {
|
|
194
|
-
events.on('request_update_notification', handleEventTypeThree)
|
|
195
|
-
}
|
|
181
|
+
events.on('message_added_notification', handleEventTypeOne)
|
|
182
|
+
events.on('order_added_notification', handleEventTypeTwo)
|
|
183
|
+
events.on('order_updated_notification', handleEventTypeThree)
|
|
184
|
+
events.on('request_register_notification', handleEventTypeTwo)
|
|
185
|
+
events.on('request_update_notification', handleEventTypeThree)
|
|
196
186
|
|
|
197
187
|
return () => {
|
|
198
188
|
events.off('message_added_notification', handleEventTypeOne)
|
|
@@ -85,16 +85,16 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
85
85
|
key?: string | null;
|
|
86
86
|
}>({ open: false, content: [], key: null });
|
|
87
87
|
|
|
88
|
-
const disabledActionsByInternet =
|
|
88
|
+
const disabledActionsByInternet = isNetConnected !== null && !isNetConnected && canSaveChangesOffline === false
|
|
89
89
|
|
|
90
90
|
const validStatusComplete = [9, 19, 23, 26]
|
|
91
91
|
|
|
92
92
|
const pendingOrderStatus = [1, 4, 7, 13]
|
|
93
93
|
|
|
94
94
|
const logisticOrderStatus = [4, 6, 7]
|
|
95
|
-
|
|
95
|
+
|
|
96
96
|
const deliveryTypes = [1, 7]
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
const showFloatButtonsPickUp: any = {
|
|
99
99
|
8: !isHideRejectButtons,
|
|
100
100
|
3: true,
|