@bjsdistribution/dms-client-return 0.0.13 → 0.0.15

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.
@@ -797,6 +797,12 @@ var SeteauditLogToggle = function SeteauditLogToggle() {
797
797
  // Popup state Manage
798
798
  var initialState = null;
799
799
  var popupReducer = function popupReducer(state, action) {
800
+ if (action.type === 'create-return') {
801
+ state = 'create-return';
802
+ return {
803
+ state: state
804
+ };
805
+ }
800
806
  if (action.type === 'bulkUpdate') {
801
807
  state = 'bulkUpdate';
802
808
  return {
@@ -8452,6 +8458,7 @@ function OrderView() {
8452
8458
  setLocationOptions = _useLocationOptions[1];
8453
8459
  var _useApiCalling = useApiCalling(),
8454
8460
  apiCalling = _useApiCalling[0];
8461
+ console.log(paths, 'paths');
8455
8462
  var _useOrderProductsReso = useOrderProductsResources(),
8456
8463
  orderResources = _useOrderProductsReso[0],
8457
8464
  setOrderResources = _useOrderProductsReso[1];
@@ -8519,7 +8526,7 @@ function OrderView() {
8519
8526
  }, [apiCalling]);
8520
8527
  useEffect(function () {
8521
8528
  if (paths.length > 1) {
8522
- setOrderId(paths[1]);
8529
+ setOrderId(paths[2]);
8523
8530
  }
8524
8531
  // for local
8525
8532
  // if (paths.length >= 0) {
@@ -10292,8 +10299,7 @@ var CreateReturnModal = function CreateReturnModal() {
10292
10299
  load = _usePostLoading[0];
10293
10300
  var _useGroupedPayload = useGroupedPayload(),
10294
10301
  groupedPayload = _useGroupedPayload[0];
10295
- var _useSelectedConfirmLo2 = useSelectedConfirmLoc(),
10296
- forDisabledCheck = _useSelectedConfirmLo2[0];
10302
+ // const [forDisabledCheck] = useSelectedConfirmLoc();
10297
10303
  var _useFinalPayload = useFinalPayload(),
10298
10304
  setNew = _useFinalPayload[1];
10299
10305
  var handleSelectLocations = function handleSelectLocations(id) {
@@ -10318,9 +10324,9 @@ var CreateReturnModal = function CreateReturnModal() {
10318
10324
  return acc;
10319
10325
  }, []);
10320
10326
  useEffect(function () {
10321
- if ((groupedPayload == null ? void 0 : groupedPayload.length) > 0 && (forDisabledCheck == null ? void 0 : forDisabledCheck.length) > 0) {
10327
+ if ((groupedPayload == null ? void 0 : groupedPayload.length) > 0 && (selectedlocation == null ? void 0 : selectedlocation.length) > 0) {
10322
10328
  var matchedItems = groupedPayload == null ? void 0 : groupedPayload.filter(function (item) {
10323
- return forDisabledCheck.includes(item.id);
10329
+ return selectedlocation.includes(item.id);
10324
10330
  });
10325
10331
  if (matchedItems.length > 0) {
10326
10332
  var finalPayload = matchedItems == null ? void 0 : matchedItems.map(function (_ref) {
@@ -10330,7 +10336,7 @@ var CreateReturnModal = function CreateReturnModal() {
10330
10336
  setNew(finalPayload);
10331
10337
  }
10332
10338
  }
10333
- }, [forDisabledCheck]);
10339
+ }, [selectedlocation]);
10334
10340
  return React.createElement(React.Fragment, null, load && React.createElement(Loader, null), React.createElement(Wrapper$l, null, React.createElement(Alert, {
10335
10341
  onClose: function onClose() {},
10336
10342
  description: "",