@bjsdistribution/dms-client-return 0.1.50-prod → 0.1.51-prod
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/dist/dms-client-return.cjs.development.js +22 -23
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +22 -23
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/order-view/order-actions/actions/cancel-order/index.tsx +14 -20
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@ function CancelOrder(props: IProps) {
|
|
|
43
43
|
|
|
44
44
|
const [cancelNotes, setCancelNotes] = useState<string>('');
|
|
45
45
|
|
|
46
|
-
const cancelReasonOptions = orderStaticData?.
|
|
46
|
+
const cancelReasonOptions = orderStaticData?.return_cancellation_reasons?.map(
|
|
47
47
|
(item: any) => {
|
|
48
48
|
return {
|
|
49
49
|
label: item?.reason,
|
|
@@ -68,17 +68,17 @@ function CancelOrder(props: IProps) {
|
|
|
68
68
|
const modifiedReceivedProducts =
|
|
69
69
|
receivedProducts?.length > 0
|
|
70
70
|
? receivedProducts?.map((product: any) => {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
return {
|
|
72
|
+
order_product_id: product?.id,
|
|
73
|
+
action: '',
|
|
74
|
+
return_action: '',
|
|
75
|
+
return_reason: '',
|
|
76
|
+
code: product?.code,
|
|
77
|
+
description: product?.description,
|
|
78
|
+
sku: product?.sku,
|
|
79
|
+
product_type: product?.order_product_type?.type,
|
|
80
|
+
};
|
|
81
|
+
})
|
|
82
82
|
: [];
|
|
83
83
|
setCancelOrderProducts(modifiedReceivedProducts);
|
|
84
84
|
}, [orderProductDetails]);
|
|
@@ -187,7 +187,7 @@ function CancelOrder(props: IProps) {
|
|
|
187
187
|
}
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
-
const showSubmitBtn = cancelReason !== undefined
|
|
190
|
+
const showSubmitBtn = cancelReason !== undefined;
|
|
191
191
|
|
|
192
192
|
return (
|
|
193
193
|
<OrderActionModal
|
|
@@ -218,8 +218,7 @@ function CancelOrder(props: IProps) {
|
|
|
218
218
|
<TopRight>
|
|
219
219
|
<Container>
|
|
220
220
|
<div style={{ display: 'flex', flexDirection: 'row' }}>
|
|
221
|
-
<Label>Cancellation Note</Label>
|
|
222
|
-
<RequiredAsterisk>*</RequiredAsterisk>
|
|
221
|
+
<Label>Cancellation Note</Label>
|
|
223
222
|
</div>
|
|
224
223
|
<TArea
|
|
225
224
|
rows={5}
|
|
@@ -237,11 +236,6 @@ function CancelOrder(props: IProps) {
|
|
|
237
236
|
</OrderActionModal>
|
|
238
237
|
);
|
|
239
238
|
}
|
|
240
|
-
const RequiredAsterisk = styled.span`
|
|
241
|
-
color: red;
|
|
242
|
-
margin-left: 2px;
|
|
243
|
-
font-size: x-small;
|
|
244
|
-
`;
|
|
245
239
|
|
|
246
240
|
const TArea = styled(TextArea)`
|
|
247
241
|
resize: none;
|