@bjsdistribution/dms-client-return 0.0.14 → 0.0.16

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.
@@ -8466,6 +8466,7 @@ function OrderView() {
8466
8466
  setLocationOptions = _useLocationOptions[1];
8467
8467
  var _useApiCalling = useApiCalling(),
8468
8468
  apiCalling = _useApiCalling[0];
8469
+ console.log(paths, 'paths');
8469
8470
  var _useOrderProductsReso = useOrderProductsResources(),
8470
8471
  orderResources = _useOrderProductsReso[0],
8471
8472
  setOrderResources = _useOrderProductsReso[1];
@@ -8533,7 +8534,7 @@ function OrderView() {
8533
8534
  }, [apiCalling]);
8534
8535
  React.useEffect(function () {
8535
8536
  if (paths.length > 1) {
8536
- setOrderId(paths[1]);
8537
+ setOrderId(paths[2]);
8537
8538
  }
8538
8539
  // for local
8539
8540
  // if (paths.length >= 0) {
@@ -10306,8 +10307,7 @@ var CreateReturnModal = function CreateReturnModal() {
10306
10307
  load = _usePostLoading[0];
10307
10308
  var _useGroupedPayload = useGroupedPayload(),
10308
10309
  groupedPayload = _useGroupedPayload[0];
10309
- var _useSelectedConfirmLo2 = useSelectedConfirmLoc(),
10310
- forDisabledCheck = _useSelectedConfirmLo2[0];
10310
+ // const [forDisabledCheck] = useSelectedConfirmLoc();
10311
10311
  var _useFinalPayload = useFinalPayload(),
10312
10312
  setNew = _useFinalPayload[1];
10313
10313
  var handleSelectLocations = function handleSelectLocations(id) {
@@ -10332,9 +10332,9 @@ var CreateReturnModal = function CreateReturnModal() {
10332
10332
  return acc;
10333
10333
  }, []);
10334
10334
  React.useEffect(function () {
10335
- if ((groupedPayload == null ? void 0 : groupedPayload.length) > 0 && (forDisabledCheck == null ? void 0 : forDisabledCheck.length) > 0) {
10335
+ if ((groupedPayload == null ? void 0 : groupedPayload.length) > 0 && (selectedlocation == null ? void 0 : selectedlocation.length) > 0) {
10336
10336
  var matchedItems = groupedPayload == null ? void 0 : groupedPayload.filter(function (item) {
10337
- return forDisabledCheck.includes(item.id);
10337
+ return selectedlocation.includes(item.id);
10338
10338
  });
10339
10339
  if (matchedItems.length > 0) {
10340
10340
  var finalPayload = matchedItems == null ? void 0 : matchedItems.map(function (_ref) {
@@ -10344,7 +10344,7 @@ var CreateReturnModal = function CreateReturnModal() {
10344
10344
  setNew(finalPayload);
10345
10345
  }
10346
10346
  }
10347
- }, [forDisabledCheck]);
10347
+ }, [selectedlocation]);
10348
10348
  return React__default.createElement(React__default.Fragment, null, load && React__default.createElement(Loader, null), React__default.createElement(Wrapper$l, null, React__default.createElement(dmsComponentLibrary.Alert, {
10349
10349
  onClose: function onClose() {},
10350
10350
  description: "",
@@ -10418,6 +10418,9 @@ var ModalManager = function ModalManager() {
10418
10418
  setGrouped = _useGroupedPayload[1];
10419
10419
  var _useSelectAll = useSelectAll(),
10420
10420
  setSelectAll = _useSelectAll[1];
10421
+ var _useState2 = React.useState(false),
10422
+ forCheck = _useState2[0],
10423
+ setStateCheck = _useState2[1];
10421
10424
  console.log(orderProduct, 'abcabcabcabcabcabcabcabcabcabcabc');
10422
10425
  var _closeModal = function closeModal() {
10423
10426
  dispatch({
@@ -10602,23 +10605,10 @@ var ModalManager = function ModalManager() {
10602
10605
  React.useEffect(function () {
10603
10606
  SetPostLoading(confirmLoading);
10604
10607
  }, [confirmLoading]);
10605
- console.log(response);
10606
- React.useEffect(function () {
10607
- if (response === null || response && response != null && response.data) {
10608
- dispatch({
10609
- type: 'close'
10610
- });
10611
- setNewGrouped([]);
10612
- setSelectedReturnOrder([]);
10613
- setCheck([]);
10614
- setNewPayload([]);
10615
- setGrouped([]);
10616
- setShouldPerformAction(false);
10617
- setSelectAll(false);
10618
- }
10619
- }, [response]);
10608
+ console.log(response, 'response');
10620
10609
  var handleConfirmReturn = function handleConfirmReturn() {
10621
10610
  setShouldPerformAction(false);
10611
+ setStateCheck(!forCheck);
10622
10612
  if (newGrouped.length > 0) {
10623
10613
  setShouldPerformAction(true);
10624
10614
  } else {
@@ -10628,6 +10618,18 @@ var ModalManager = function ModalManager() {
10628
10618
  type: 'close'
10629
10619
  });
10630
10620
  };
10621
+ React.useEffect(function () {
10622
+ dispatch({
10623
+ type: 'close'
10624
+ });
10625
+ setNewGrouped([]);
10626
+ setSelectedReturnOrder([]);
10627
+ setCheck([]);
10628
+ setNewPayload([]);
10629
+ setGrouped([]);
10630
+ setShouldPerformAction(false);
10631
+ setSelectAll(false);
10632
+ }, [response, forCheck]);
10631
10633
  return React__default.createElement(React__default.Fragment, null, (popupName == null ? void 0 : popupName.state) == 'create-return' && React__default.createElement(dmsComponentLibrary.AntModal, {
10632
10634
  openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
10633
10635
  closeModal: function closeModal() {