@bjsdistribution/dms-client-return 0.0.46 → 0.0.47

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.0.46",
2
+ "version": "0.0.47",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -163,13 +163,15 @@ function SelectionFilter() {
163
163
  customerId: selectedClient?.toString(),
164
164
  });
165
165
  const currentSearch = window.location.search;
166
+ console.log(currentSearch, 'currentSearch');
166
167
 
167
168
  if (!currentSearch.includes('filter')) {
169
+ console.log('inside include');
168
170
  // for dev
169
- navigate(`filter?${queryParams.toString()}`);
171
+ navigate(`/order/return/filter?${queryParams.toString()}`);
170
172
 
171
173
  // for local
172
- // navigate(`/filter?${queryParams.toString()}`);
174
+ //navigate(`/filter?${queryParams.toString()}`);
173
175
  }
174
176
  }
175
177
 
@@ -2,10 +2,15 @@ import { Input, Label } from '@bjsdistribution/dms-component-library';
2
2
  import React from 'react';
3
3
  import styled from 'styled-components';
4
4
  import { useOrderDetails } from '../../../store';
5
+ import CopyText from '../../../../../common/copy/CopyText';
5
6
 
6
7
  function RecipientReference() {
7
8
  const [orderDetails, setOrderDetails] = useOrderDetails();
8
-
9
+ const orderRecipient = orderDetails?.recipient_reference;
10
+ const showCopyIcon =
11
+ orderRecipient !== undefined &&
12
+ orderRecipient !== null &&
13
+ orderRecipient?.length > 0;
9
14
  const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
10
15
  setOrderDetails(prev => {
11
16
  return {
@@ -16,7 +21,10 @@ function RecipientReference() {
16
21
  };
17
22
  return (
18
23
  <Container>
19
- <Label label="Recipient Reference" htmlFor="recipient-reference" />
24
+ <Wrapper>
25
+ <Label label="Recipient Reference" htmlFor="recipient-reference" />
26
+ {showCopyIcon && <CopyText text={orderRecipient!} />}
27
+ </Wrapper>
20
28
  <Input
21
29
  name="recipient-reference"
22
30
  type="text"
@@ -36,4 +44,10 @@ const Container = styled.div`
36
44
  flex: 1;
37
45
  `;
38
46
 
47
+ const Wrapper = styled.div`
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 5px;
51
+ `;
52
+
39
53
  export default RecipientReference;
package/src/index.tsx CHANGED
@@ -120,13 +120,13 @@ function ReturnClient() {
120
120
  <Suspense fallback={<LoadingMessage />}>
121
121
  <Routes>
122
122
  {/* for local */}
123
- {/* <Route path="returnclient" element={<ReturnMainTable />} /> */}
123
+ {/* <Route path="order/return" element={<ReturnMainTable />} /> */}
124
124
 
125
125
  {/* for dev */}
126
126
  <Route path="" element={<ReturnMainTable />} />
127
127
 
128
- <Route path="order-return" element={<ReturnAfterTable />} />
129
- <Route path="order-return/:id" element={<OrderView />} />
128
+ <Route path="view" element={<ReturnAfterTable />} />
129
+ <Route path="view/:id" element={<OrderView />} />
130
130
  <Route path="filter" element={<ReturnTable />} />
131
131
 
132
132
  {/* <Route