@bjsdistribution/dms-client-return 0.0.44 → 0.0.46

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.44",
2
+ "version": "0.0.46",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -119,7 +119,7 @@ function SelectionFilter() {
119
119
  }, [accountNumber, urlCustomerId]);
120
120
 
121
121
  useEffect(() => {
122
- if (urlCustomerId && clientOptions?.length > 0) {
122
+ if (urlCustomerId) {
123
123
  const filteredClient = clientOptions?.find(
124
124
  (client: any) => client?.value == urlCustomerId
125
125
  );
@@ -162,11 +162,15 @@ 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
+
167
+ if (!currentSearch.includes('filter')) {
168
+ // for dev
169
+ navigate(`filter?${queryParams.toString()}`);
167
170
 
168
- //for local
169
- //navigate(`/filter?${queryParams.toString()}`);
171
+ // for local
172
+ // navigate(`/filter?${queryParams.toString()}`);
173
+ }
170
174
  }
171
175
 
172
176
  const selectedClientValue = clientOptions?.find(
@@ -188,8 +192,8 @@ function SelectionFilter() {
188
192
  setLocationOptions(
189
193
  Array.isArray(clientLocations)
190
194
  ? clientLocations?.map(location => ({
191
- label: location,
192
- value: location,
195
+ label: location?.location_name,
196
+ value: location?.token,
193
197
  }))
194
198
  : []
195
199
  );
@@ -253,7 +253,11 @@ const ReturnTable: React.FC = () => {
253
253
  fontWeight: key?.RTS > 0 ? 600 : 'normal',
254
254
  cursor: key?.RTS > 0 ? 'pointer' : 'default',
255
255
  }}
256
- onClick={() => handleRedirectRTS(key?.customer_id, 'RTS')}
256
+ onClick={
257
+ key?.RTS > 0
258
+ ? () => handleRedirectRTS(key?.customer_id, 'RTS')
259
+ : undefined
260
+ }
257
261
  >
258
262
  <ColumStyle>
259
263
  <GreyBox
@@ -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`