@bjsdistribution/dms-client-return 0.0.35 → 0.0.37

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.
@@ -8924,19 +8924,19 @@ function SelectionFilter() {
8924
8924
  });
8925
8925
  if (filteredClient) {
8926
8926
  var _filteredClient$actio, _filteredClient$retur;
8927
- var mappedActions = filteredClient == null || (_filteredClient$actio = filteredClient.actions) == null ? void 0 : _filteredClient$actio.map(function (action) {
8927
+ var mappedActions = Array.isArray(filteredClient == null ? void 0 : filteredClient.actions) ? filteredClient == null || (_filteredClient$actio = filteredClient.actions) == null ? void 0 : _filteredClient$actio.map(function (action) {
8928
8928
  return {
8929
8929
  label: action,
8930
8930
  value: action
8931
8931
  };
8932
- });
8932
+ }) : [];
8933
8933
  setActionTypeOptions(mappedActions);
8934
- var mappedLocations = filteredClient == null || (_filteredClient$retur = filteredClient.return_locations) == null ? void 0 : _filteredClient$retur.map(function (location) {
8934
+ var mappedLocations = Array.isArray(filteredClient == null ? void 0 : filteredClient.return_locations) ? filteredClient == null || (_filteredClient$retur = filteredClient.return_locations) == null ? void 0 : _filteredClient$retur.map(function (location) {
8935
8935
  return {
8936
8936
  label: location,
8937
8937
  value: location
8938
8938
  };
8939
- });
8939
+ }) : [];
8940
8940
  setLocationOptions(mappedLocations);
8941
8941
  }
8942
8942
  }
@@ -8962,18 +8962,18 @@ function SelectionFilter() {
8962
8962
  });
8963
8963
  var clientActions = (selectedClientValue == null ? void 0 : selectedClientValue.actions) || [];
8964
8964
  var clientLocations = (selectedClientValue == null ? void 0 : selectedClientValue.return_locations) || [];
8965
- setActionTypeOptions(clientActions == null ? void 0 : clientActions.map(function (action) {
8965
+ setActionTypeOptions(Array.isArray(clientActions) ? clientActions == null ? void 0 : clientActions.map(function (action) {
8966
8966
  return {
8967
8967
  label: action,
8968
8968
  value: action
8969
8969
  };
8970
- }));
8971
- setLocationOptions(clientLocations == null ? void 0 : clientLocations.map(function (action) {
8970
+ }) : []);
8971
+ setLocationOptions(Array.isArray(clientLocations) ? clientLocations == null ? void 0 : clientLocations.map(function (location) {
8972
8972
  return {
8973
- label: action,
8974
- value: action
8973
+ label: location,
8974
+ value: location
8975
8975
  };
8976
- }));
8976
+ }) : []);
8977
8977
  //client value
8978
8978
  if (storedClientId) {
8979
8979
  dispatch({
@@ -9002,7 +9002,7 @@ function SelectionFilter() {
9002
9002
  });
9003
9003
  }
9004
9004
  //location value
9005
- if (selectedLocationValue && selectedLocationValue.length > 0) {
9005
+ if (selectedLocationValue && (selectedLocationValue == null ? void 0 : selectedLocationValue.length) > 0) {
9006
9006
  dispatch({
9007
9007
  type: 'SET_LOCATION_FILTER',
9008
9008
  payload: selectedLocationValue