@bjsdistribution/dms-client-return 0.0.39 → 0.0.41

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.
@@ -54,7 +54,7 @@ function _objectWithoutPropertiesLoose(r, e) {
54
54
  if (null == r) return {};
55
55
  var t = {};
56
56
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
57
- if (e.indexOf(n) >= 0) continue;
57
+ if (e.includes(n)) continue;
58
58
  t[n] = r[n];
59
59
  }
60
60
  return t;
@@ -498,7 +498,7 @@ function SpokePhoneIcon() {
498
498
 
499
499
  function useCopyToClipboard() {
500
500
  var copy = /*#__PURE__*/function () {
501
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
501
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
502
502
  return _regeneratorRuntime().wrap(function _callee$(_context) {
503
503
  while (1) switch (_context.prev = _context.next) {
504
504
  case 0:
@@ -2372,7 +2372,7 @@ function useUpdateOrder() {
2372
2372
  var controller;
2373
2373
  var ssoToken = getCookie('id_token');
2374
2374
  var update = /*#__PURE__*/function () {
2375
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
2375
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
2376
2376
  var endpoint, signal, requestOptions, response, json;
2377
2377
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2378
2378
  while (1) switch (_context.prev = _context.next) {
@@ -2479,7 +2479,7 @@ function OrderDetailsFooter() {
2479
2479
  return !isSame;
2480
2480
  };
2481
2481
  var onSave = /*#__PURE__*/function () {
2482
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2482
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2483
2483
  var _response$data;
2484
2484
  var payload, response, _response$data$, _response$data$2;
2485
2485
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -2598,7 +2598,7 @@ function AddNote() {
2598
2598
  notificationData = _useState2[0],
2599
2599
  setNotificationData = _useState2[1];
2600
2600
  var saveNote = /*#__PURE__*/function () {
2601
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2601
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2602
2602
  var endpoint, payload, response, message, error;
2603
2603
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2604
2604
  while (1) switch (_context.prev = _context.next) {
@@ -3104,7 +3104,7 @@ var tableColumns = [{
3104
3104
  function useGetEventNotes() {
3105
3105
  var ssoToken = getCookie('id_token');
3106
3106
  var perform = /*#__PURE__*/function () {
3107
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3107
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3108
3108
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
3109
3109
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3110
3110
  while (1) switch (_context.prev = _context.next) {
@@ -3189,7 +3189,7 @@ function SystemLogs() {
3189
3189
  setNotesData = _useEventNotesData[1];
3190
3190
  // const gsitId = orderDetails?.gsit_order_id;
3191
3191
  var fetchReminderData = /*#__PURE__*/function () {
3192
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3192
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3193
3193
  var result;
3194
3194
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3195
3195
  while (1) switch (_context.prev = _context.next) {
@@ -5578,7 +5578,7 @@ function ConfirmOrder() {
5578
5578
  return Object.keys(obj).length === 1 && obj.hasOwnProperty('id');
5579
5579
  }
5580
5580
  var ConfirmOrder = /*#__PURE__*/function () {
5581
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5581
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5582
5582
  var keysToRemovefromOrders, filteredOrderDetails, filteredPrevOrderDetails, payload, notUpdateOrder, _response$data, _response;
5583
5583
  return _regeneratorRuntime().wrap(function _callee$(_context) {
5584
5584
  while (1) switch (_context.prev = _context.next) {
@@ -6396,7 +6396,7 @@ function useFetchSingleReminderData() {
6396
6396
  setLoading = _useFlagsLoading[1];
6397
6397
  var ssoToken = getCookie('id_token');
6398
6398
  var res = /*#__PURE__*/function () {
6399
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6399
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6400
6400
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
6401
6401
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6402
6402
  while (1) switch (_context.prev = _context.next) {
@@ -6495,7 +6495,7 @@ function useUpdateReminder() {
6495
6495
  var _useFlagsLoading = useFlagsLoading(),
6496
6496
  setLoading = _useFlagsLoading[1];
6497
6497
  var update = /*#__PURE__*/function () {
6498
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
6498
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
6499
6499
  var endpoint, requestOptions, response, json;
6500
6500
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6501
6501
  while (1) switch (_context.prev = _context.next) {
@@ -6565,7 +6565,7 @@ function useFetchReminders() {
6565
6565
  var _useOrderDetails = useOrderDetails(),
6566
6566
  OrderData = _useOrderDetails[0];
6567
6567
  var perform = /*#__PURE__*/function () {
6568
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6568
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6569
6569
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
6570
6570
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6571
6571
  while (1) switch (_context.prev = _context.next) {
@@ -6673,7 +6673,7 @@ var ViewReminderModal = function ViewReminderModal() {
6673
6673
  setCurrentAction(undefined);
6674
6674
  };
6675
6675
  var fetchReminderData = /*#__PURE__*/function () {
6676
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6676
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6677
6677
  var result;
6678
6678
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6679
6679
  while (1) switch (_context.prev = _context.next) {
@@ -6746,7 +6746,7 @@ var ViewReminderModal = function ViewReminderModal() {
6746
6746
  }));
6747
6747
  };
6748
6748
  var handleEditReminder = /*#__PURE__*/function () {
6749
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
6749
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
6750
6750
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
6751
6751
  while (1) switch (_context2.prev = _context2.next) {
6752
6752
  case 0:
@@ -7067,7 +7067,7 @@ function useCreateReminder() {
7067
7067
  var _useFlagsLoading = useFlagsLoading(),
7068
7068
  setLoading = _useFlagsLoading[1];
7069
7069
  var create = /*#__PURE__*/function () {
7070
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
7070
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
7071
7071
  var endpoint, requestOptions, response, json;
7072
7072
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7073
7073
  while (1) switch (_context.prev = _context.next) {
@@ -7145,7 +7145,7 @@ function useFetchUnresolvedTasks() {
7145
7145
  var _useOrderDetails = useOrderDetails(),
7146
7146
  OrderData = _useOrderDetails[0];
7147
7147
  var perform = /*#__PURE__*/function () {
7148
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7148
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7149
7149
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
7150
7150
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7151
7151
  while (1) switch (_context.prev = _context.next) {
@@ -7295,7 +7295,7 @@ function TaskReminderModal() {
7295
7295
  setReminderPayload(initialValue);
7296
7296
  };
7297
7297
  var handleReminderSubmit = /*#__PURE__*/function () {
7298
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7298
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7299
7299
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7300
7300
  while (1) switch (_context.prev = _context.next) {
7301
7301
  case 0:
@@ -7345,7 +7345,7 @@ function OrderLock() {
7345
7345
  setCurrentAction(undefined);
7346
7346
  };
7347
7347
  var onComplete = /*#__PURE__*/function () {
7348
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7348
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7349
7349
  var isLocked, payload, response;
7350
7350
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7351
7351
  while (1) switch (_context.prev = _context.next) {
@@ -7392,7 +7392,7 @@ function useUpdateFlag() {
7392
7392
  var _useFlagsLoading = useFlagsLoading(),
7393
7393
  setLoading = _useFlagsLoading[1];
7394
7394
  var create = /*#__PURE__*/function () {
7395
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
7395
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
7396
7396
  var endpoint, requestOptions, response, json;
7397
7397
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7398
7398
  while (1) switch (_context.prev = _context.next) {
@@ -7484,7 +7484,7 @@ function HeaderSection() {
7484
7484
  setIsModalOpen(false);
7485
7485
  };
7486
7486
  var saveButton = /*#__PURE__*/function () {
7487
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7487
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7488
7488
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7489
7489
  while (1) switch (_context.prev = _context.next) {
7490
7490
  case 0:
@@ -7660,7 +7660,7 @@ function ActionSection() {
7660
7660
  setLoading = _useFlagsLoading[1];
7661
7661
  var updateFlag = useUpdateFlag();
7662
7662
  var onSubmit = /*#__PURE__*/function () {
7663
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7663
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7664
7664
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7665
7665
  while (1) switch (_context.prev = _context.next) {
7666
7666
  case 0:
@@ -7767,7 +7767,7 @@ function useFetchSingleFlagsData() {
7767
7767
  var ssoToken = getCookie('id_token');
7768
7768
  console.log(loading, 'loading loading');
7769
7769
  var res = /*#__PURE__*/function () {
7770
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7770
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7771
7771
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
7772
7772
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7773
7773
  while (1) switch (_context.prev = _context.next) {
@@ -7898,7 +7898,7 @@ function ViewFlag() {
7898
7898
  }
7899
7899
  }, [staticData]);
7900
7900
  var fetchAndSetSingleFlagData = /*#__PURE__*/function () {
7901
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7901
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7902
7902
  var result;
7903
7903
  return _regeneratorRuntime().wrap(function _callee$(_context) {
7904
7904
  while (1) switch (_context.prev = _context.next) {
@@ -8082,7 +8082,7 @@ function useSystemLogs() {
8082
8082
  var _useOrderProductSyste = useOrderProductSystemLogs(),
8083
8083
  setSystemLogsEvents = _useOrderProductSyste[1];
8084
8084
  var perform = /*#__PURE__*/function () {
8085
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8085
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8086
8086
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
8087
8087
  return _regeneratorRuntime().wrap(function _callee$(_context) {
8088
8088
  while (1) switch (_context.prev = _context.next) {
@@ -8690,7 +8690,7 @@ function OrderView() {
8690
8690
  var _useOrderProductSyste = useOrderProductSystemLogs(),
8691
8691
  setSystemLogsEvents = _useOrderProductSyste[1];
8692
8692
  var fetchReminderData = /*#__PURE__*/function () {
8693
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8693
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8694
8694
  var result;
8695
8695
  return _regeneratorRuntime().wrap(function _callee$(_context) {
8696
8696
  while (1) switch (_context.prev = _context.next) {
@@ -8877,7 +8877,9 @@ function SelectionFilter() {
8877
8877
  var _useLocationOptions = useLocationOptions(),
8878
8878
  locationOptions = _useLocationOptions[0],
8879
8879
  setLocationOptions = _useLocationOptions[1];
8880
- var clientOptions = customers == null ? void 0 : customers.map(function (option) {
8880
+ var clientOptions = customers == null ? void 0 : customers.filter(function (option) {
8881
+ return 'customer_id' in option && option.customer_id != null;
8882
+ }).map(function (option) {
8881
8883
  var _option$customer_name, _option$customer_name2;
8882
8884
  return {
8883
8885
  label: (option == null || (_option$customer_name = option.customer_name) == null || (_option$customer_name = _option$customer_name.charAt(0)) == null ? void 0 : _option$customer_name.toUpperCase()) + (option == null || (_option$customer_name2 = option.customer_name) == null ? void 0 : _option$customer_name2.slice(1)),
@@ -8894,6 +8896,27 @@ function SelectionFilter() {
8894
8896
  localStorage.setItem('clientName', option == null ? void 0 : option.label);
8895
8897
  localStorage.setItem('clientId', value == null ? void 0 : value.toString());
8896
8898
  localStorage.setItem('account_number', option == null ? void 0 : option.account_number);
8899
+ var storedClientId = localStorage.getItem('clientId');
8900
+ var filteredClient = clientOptions == null ? void 0 : clientOptions.find(function (client) {
8901
+ return (client == null ? void 0 : client.value) == storedClientId;
8902
+ });
8903
+ if (filteredClient) {
8904
+ var _filteredClient$actio, _filteredClient$retur;
8905
+ var mappedActions = Array.isArray(filteredClient == null ? void 0 : filteredClient.actions) ? filteredClient == null || (_filteredClient$actio = filteredClient.actions) == null ? void 0 : _filteredClient$actio.map(function (action) {
8906
+ return {
8907
+ label: action,
8908
+ value: action
8909
+ };
8910
+ }) : [];
8911
+ setActionTypeOptions(mappedActions);
8912
+ 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) {
8913
+ return {
8914
+ label: location == null ? void 0 : location.location_name,
8915
+ value: location == null ? void 0 : location.token
8916
+ };
8917
+ }) : [];
8918
+ setLocationOptions(mappedLocations);
8919
+ }
8897
8920
  //set payload
8898
8921
  setReturnPayload(function (prevState) {
8899
8922
  return _extends({}, prevState, {
@@ -8929,15 +8952,15 @@ function SelectionFilter() {
8929
8952
  return (client == null ? void 0 : client.value) == storedClientId;
8930
8953
  });
8931
8954
  if (filteredClient) {
8932
- var _filteredClient$actio, _filteredClient$retur;
8933
- var mappedActions = Array.isArray(filteredClient == null ? void 0 : filteredClient.actions) ? filteredClient == null || (_filteredClient$actio = filteredClient.actions) == null ? void 0 : _filteredClient$actio.map(function (action) {
8955
+ var _filteredClient$actio2, _filteredClient$retur2;
8956
+ var mappedActions = Array.isArray(filteredClient == null ? void 0 : filteredClient.actions) ? filteredClient == null || (_filteredClient$actio2 = filteredClient.actions) == null ? void 0 : _filteredClient$actio2.map(function (action) {
8934
8957
  return {
8935
8958
  label: action,
8936
8959
  value: action
8937
8960
  };
8938
8961
  }) : [];
8939
8962
  setActionTypeOptions(mappedActions);
8940
- 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) {
8963
+ var mappedLocations = Array.isArray(filteredClient == null ? void 0 : filteredClient.return_locations) ? filteredClient == null || (_filteredClient$retur2 = filteredClient.return_locations) == null ? void 0 : _filteredClient$retur2.map(function (location) {
8941
8964
  return {
8942
8965
  label: location == null ? void 0 : location.location_name,
8943
8966
  value: location == null ? void 0 : location.token
@@ -9400,7 +9423,6 @@ var _templateObject$1V, _templateObject2$1p;
9400
9423
  var options = optionsForReturnPrint;
9401
9424
  var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
9402
9425
  var legacyProductId = _ref.legacyProductId;
9403
- console.log(legacyProductId, 'legacyProductId');
9404
9426
  var downloadFiles = function downloadFiles() {
9405
9427
  var url = "https://us.toolbox.bjshomedelivery.com/offload/return_label?gsit_products_id=" + legacyProductId;
9406
9428
  window.open(url, '_blank'); // Opens the URL in a new tab
@@ -9700,7 +9722,6 @@ var ReturnOrderTable = function ReturnOrderTable() {
9700
9722
  }, []);
9701
9723
  var mergedPayload = Object.values(groupedPayload);
9702
9724
  setGrouped(mergedPayload);
9703
- console.log(mergedPayload, 'mergedPayload');
9704
9725
  }, [newpayload]);
9705
9726
  return React.createElement(React.Fragment, null, postLoading && React.createElement(Loader, null), React.createElement(StyledTableWrapper, {
9706
9727
  className: "fortables"
@@ -9757,7 +9778,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
9757
9778
  }))) : (sortedData == null ? void 0 : sortedData.length) === 0 ? React.createElement("tr", null, React.createElement("td", {
9758
9779
  colSpan: 14
9759
9780
  }, React.createElement(EmptyDataContainer$1, null, React.createElement(Empty, null)))) : sortedData == null ? void 0 : sortedData.map(function (item, index) {
9760
- var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$order_product_r3, _item$return_reasons, _item$order_product_r4, _item$order_product_r5, _item$collection_reas;
9781
+ var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$return_location, _item$order_data, _item$order_data2, _item$order_product_r3, _item$return_reasons, _item$order_product_r4, _item$order_product_r5, _item$collection_reas;
9761
9782
  return React.createElement("tr", {
9762
9783
  key: item.id
9763
9784
  }, React.createElement("td", null, (item == null || (_item$order_product_r2 = item.order_product_return_action) == null ? void 0 : _item$order_product_r2.type) == 'RTS' ? React.createElement(React.Fragment, null, React.createElement(Checkbox$1, {
@@ -9772,7 +9793,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
9772
9793
  }
9773
9794
  })) : null), React.createElement("td", null, (item == null || (_item$orders_products = item.orders_products_stock) == null ? void 0 : _item$orders_products.location) !== null && (item == null || (_item$orders_products2 = item.orders_products_stock) == null ? void 0 : _item$orders_products2.location) !== undefined ? item.orders_products_stock.location : React.createElement("div", {
9774
9795
  className: "awaiting"
9775
- }, "Awaiting")), React.createElement("td", null, " ", displayValueOrNA(item == null ? void 0 : item.new_location)), React.createElement("td", null, React.createElement("ul", {
9796
+ }, "Awaiting")), React.createElement("td", null, ' ', displayValueOrNA(item == null || (_item$return_location = item.return_locations) == null ? void 0 : _item$return_location.location_name)), React.createElement("td", null, React.createElement("ul", {
9776
9797
  style: {
9777
9798
  listStyleType: 'none',
9778
9799
  padding: 0
@@ -9921,6 +9942,7 @@ var CreateReturnModal = function CreateReturnModal() {
9921
9942
  padding: 0
9922
9943
  }
9923
9944
  }, uniqueLocations == null ? void 0 : uniqueLocations.map(function (returnLoc) {
9945
+ var _returnLoc$return_loc;
9924
9946
  return React.createElement("li", {
9925
9947
  key: returnLoc.id,
9926
9948
  style: {
@@ -9937,7 +9959,7 @@ var CreateReturnModal = function CreateReturnModal() {
9937
9959
  style: {
9938
9960
  marginLeft: '8px'
9939
9961
  }
9940
- }, displayValueOrNA(returnLoc == null ? void 0 : returnLoc.new_location)));
9962
+ }, displayValueOrNA(returnLoc == null || (_returnLoc$return_loc = returnLoc.return_locations) == null ? void 0 : _returnLoc$return_loc.location_name)));
9941
9963
  })))));
9942
9964
  };
9943
9965
  var StyledText$1 = /*#__PURE__*/styled.div(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
@@ -9993,7 +10015,6 @@ var ModalManager = function ModalManager() {
9993
10015
  response = _useApiHook.data,
9994
10016
  setShouldPerformAction = _useApiHook.setShouldPerformAction,
9995
10017
  confirmLoading = _useApiHook.loading,
9996
- apiError = _useApiHook.error,
9997
10018
  setError = _useApiHook.setError;
9998
10019
  useEffect(function () {
9999
10020
  SetPostLoading(confirmLoading);
@@ -10010,11 +10031,12 @@ var ModalManager = function ModalManager() {
10010
10031
  };
10011
10032
  useEffect(function () {
10012
10033
  // @ts-ignore
10013
- if (apiError && (apiError == null ? void 0 : apiError.code) !== 200) {
10034
+ if (response && (response == null ? void 0 : response.code) == 500) {
10035
+ // @ts-ignore
10014
10036
  notification.error({
10015
10037
  message: 'Failure',
10016
10038
  // @ts-ignore
10017
- description: "" + (apiError == null ? void 0 : apiError.message)
10039
+ description: "" + (response == null ? void 0 : response.message)
10018
10040
  });
10019
10041
  dispatch({
10020
10042
  type: 'close'
@@ -10047,7 +10069,7 @@ var ModalManager = function ModalManager() {
10047
10069
  // for dev
10048
10070
  navigate('/returnclient/order-return');
10049
10071
  }
10050
- }, [response, apiError, postLoading]);
10072
+ }, [postLoading]);
10051
10073
  return React.createElement(React.Fragment, null, (popupName == null ? void 0 : popupName.state) === 'create-return' && React.createElement(React.Fragment, null, React.createElement(AntModal, {
10052
10074
  openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
10053
10075
  closeModal: function closeModal() {
@@ -11199,8 +11221,7 @@ var ReturnTable$1 = function ReturnTable() {
11199
11221
  updatedData = _useState[0],
11200
11222
  setUpdatedData = _useState[1];
11201
11223
  var _useStatsLoading = useStatsLoading(),
11202
- statsLoading = _useStatsLoading[0],
11203
- setLoading = _useStatsLoading[1];
11224
+ statsLoading = _useStatsLoading[0];
11204
11225
  var _useOrderStaticData = useOrderStaticData(),
11205
11226
  setOrderStaticData = _useOrderStaticData[1];
11206
11227
  var _useAtom = useAtom(filtersReducerAtom),
@@ -11256,7 +11277,7 @@ var ReturnTable$1 = function ReturnTable() {
11256
11277
  fetchedStaticData = _useApiHook.data,
11257
11278
  staticDataLoading = _useApiHook.loading;
11258
11279
  useEffect(function () {
11259
- setLoading(staticDataLoading);
11280
+ // setLoading(staticDataLoading);
11260
11281
  if (fetchedStaticData && fetchedStaticData.data) {
11261
11282
  var result = fetchedStaticData == null ? void 0 : fetchedStaticData.data;
11262
11283
  setOrderStaticData(result[0]);
@@ -11299,6 +11320,7 @@ var ReturnTable$1 = function ReturnTable() {
11299
11320
  //for local
11300
11321
  // navigate(`/filter/${customerId}`);
11301
11322
  };
11323
+ console.log(statsLoading, 'statsLoading');
11302
11324
  return React.createElement(React.Fragment, null, statsLoading && React.createElement(Loader, null), React.createElement(StyledTableWrapper$2, {
11303
11325
  id: "tableScrolling"
11304
11326
  }, React.createElement(StyledTable$3, null, React.createElement("thead", null, React.createElement("tr", null, [{