@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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.50-prod",
2
+ "version": "0.1.51-prod",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -99,4 +99,4 @@
99
99
  "react-switch-selector": "^2.2.1",
100
100
  "uuid": "^10.0.0"
101
101
  }
102
- }
102
+ }
@@ -43,7 +43,7 @@ function CancelOrder(props: IProps) {
43
43
 
44
44
  const [cancelNotes, setCancelNotes] = useState<string>('');
45
45
 
46
- const cancelReasonOptions = orderStaticData?.cancellation_reasons?.map(
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
- 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
- })
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 && cancelNotes?.length > 0;
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;