@bjsdistribution/dms-client-return 0.0.45 → 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.45",
2
+ "version": "0.0.47",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -162,11 +162,17 @@ function SelectionFilter() {
162
162
  const queryParams = new URLSearchParams({
163
163
  customerId: selectedClient?.toString(),
164
164
  });
165
- //for dev
166
- navigate(`filter?${queryParams.toString()}`);
165
+ const currentSearch = window.location.search;
166
+ console.log(currentSearch, 'currentSearch');
167
167
 
168
- //for local
169
- //navigate(`/filter?${queryParams.toString()}`);
168
+ if (!currentSearch.includes('filter')) {
169
+ console.log('inside include');
170
+ // for dev
171
+ navigate(`/order/return/filter?${queryParams.toString()}`);
172
+
173
+ // for local
174
+ //navigate(`/filter?${queryParams.toString()}`);
175
+ }
170
176
  }
171
177
 
172
178
  const selectedClientValue = clientOptions?.find(
@@ -88,6 +88,7 @@ const Heading = styled.div`
88
88
  font-style: normal;
89
89
  font-weight: 500;
90
90
  line-height: 18px;
91
+ text-transform: uppercase;
91
92
  `;
92
93
 
93
94
  const Container = styled.div`
@@ -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