@bjsdistribution/dms-client-return 0.0.44 → 0.0.45

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.45",
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
  );
@@ -188,8 +188,8 @@ function SelectionFilter() {
188
188
  setLocationOptions(
189
189
  Array.isArray(clientLocations)
190
190
  ? clientLocations?.map(location => ({
191
- label: location,
192
- value: location,
191
+ label: location?.location_name,
192
+ value: location?.token,
193
193
  }))
194
194
  : []
195
195
  );
@@ -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