ordering-ui-react-native 0.12.85 → 0.12.86
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 +1 -1
- package/themes/business/src/components/AcceptOrRejectOrder/index.tsx +15 -1
- package/themes/business/src/components/OrderDetails/Delivery.tsx +5 -1
- package/themes/business/src/components/shared/OTextarea.tsx +1 -0
- package/themes/business/src/types/index.tsx +4 -1
- package/themes/single-business/src/types/index.tsx +1 -1
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
46
46
|
const phoneNumber = customerCellphone;
|
|
47
47
|
const titleOrder = t(orderTitle[action]?.key, orderTitle[action]?.text)
|
|
48
48
|
const buttonText = t(orderTitle[action]?.btnKey, orderTitle[action]?.btnText)
|
|
49
|
-
const showTextArea = ['reject', 'deliveryFailed', 'pickupFailed', 'notReady'].includes(action)
|
|
49
|
+
const showTextArea = ['reject', 'deliveryFailed', 'pickupFailed', 'notReady', 'forcePickUp', 'forceDelivery'].includes(action)
|
|
50
50
|
|
|
51
51
|
const handleFocus = () => {
|
|
52
52
|
viewRef?.current?.measure((x: any, y: any) => {
|
|
@@ -187,6 +187,14 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
187
187
|
orderNotReady: {
|
|
188
188
|
comment: comments,
|
|
189
189
|
status: 14
|
|
190
|
+
},
|
|
191
|
+
forcePickUp: {
|
|
192
|
+
reasons: comments,
|
|
193
|
+
status: 9
|
|
194
|
+
},
|
|
195
|
+
forceDelivery: {
|
|
196
|
+
reasons: comments,
|
|
197
|
+
status: 11
|
|
190
198
|
}
|
|
191
199
|
};
|
|
192
200
|
|
|
@@ -205,6 +213,12 @@ export const AcceptOrRejectOrder = (props: AcceptOrRejectOrderParams) => {
|
|
|
205
213
|
if (actions && action === 'notReady') {
|
|
206
214
|
bodyToSend = orderStatus[actions.notReady]
|
|
207
215
|
}
|
|
216
|
+
if (actions && action === 'forcePickUp') {
|
|
217
|
+
bodyToSend = orderStatus[actions.forcePickUp]
|
|
218
|
+
}
|
|
219
|
+
if (actions && action === 'forceDelivery') {
|
|
220
|
+
bodyToSend = orderStatus[actions.forceDelivery]
|
|
221
|
+
}
|
|
208
222
|
|
|
209
223
|
bodyToSend.id = orderId;
|
|
210
224
|
handleUpdateOrder && handleUpdateOrder(bodyToSend.status, bodyToSend);
|
|
@@ -51,7 +51,7 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
51
51
|
orderTitle,
|
|
52
52
|
appTitle,
|
|
53
53
|
handleClickLogisticOrder,
|
|
54
|
-
|
|
54
|
+
forceUpdate
|
|
55
55
|
} = props;
|
|
56
56
|
const [, { showToast }] = useToast();
|
|
57
57
|
const { order } = props.order
|
|
@@ -214,6 +214,10 @@ export const OrderDetailsUI = (props: OrderDetailsParams) => {
|
|
|
214
214
|
}
|
|
215
215
|
}, [messagesReadList]);
|
|
216
216
|
|
|
217
|
+
useEffect(() => {
|
|
218
|
+
forceUpdate && handleViewActionOrder && handleViewActionOrder(forceUpdate === 9 ? 'forcePickUp': 'forceDelivery')
|
|
219
|
+
},[forceUpdate])
|
|
220
|
+
|
|
217
221
|
const styles = StyleSheet.create({
|
|
218
222
|
btnPickUp: {
|
|
219
223
|
borderWidth: 0,
|
|
@@ -370,7 +370,8 @@ export interface OrderDetailsParams {
|
|
|
370
370
|
driverUpdateLocation?: any;
|
|
371
371
|
setDriverUpdateLocation?: any;
|
|
372
372
|
handleClickLogisticOrder?: (status: number, orderId: number) => void;
|
|
373
|
-
orderTitle?: any
|
|
373
|
+
orderTitle?: any;
|
|
374
|
+
forceUpdate?: number;
|
|
374
375
|
}
|
|
375
376
|
export interface ProductItemAccordionParams {
|
|
376
377
|
isCartPending?: boolean;
|
|
@@ -529,6 +530,8 @@ interface actions {
|
|
|
529
530
|
pickupFailed: string;
|
|
530
531
|
deliveryFailed: string;
|
|
531
532
|
notReady: string;
|
|
533
|
+
forcePickUp: string;
|
|
534
|
+
forceDelivery: string;
|
|
532
535
|
}
|
|
533
536
|
|
|
534
537
|
interface textTranslate {
|
|
@@ -229,7 +229,7 @@ export interface BusinessInformationParams {
|
|
|
229
229
|
export interface BusinessReviewsParams {
|
|
230
230
|
businessState: { business: any, loading: boolean, error: null };
|
|
231
231
|
reviewsList: { reviews: any, loading: boolean, error: null };
|
|
232
|
-
|
|
232
|
+
handleChangeSearch?: any;
|
|
233
233
|
}
|
|
234
234
|
export interface SearchBarParams {
|
|
235
235
|
searchValue?: any;
|