@bjsdistribution/dms-client-return 0.0.19 → 0.0.21

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.
Files changed (27) hide show
  1. package/dist/components/order-daily-overview/store/store.d.ts +1 -1
  2. package/dist/components/order-view/utils.d.ts +2 -0
  3. package/dist/dms-client-return.cjs.development.js +519 -402
  4. package/dist/dms-client-return.cjs.development.js.map +1 -1
  5. package/dist/dms-client-return.cjs.production.min.js +1 -1
  6. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  7. package/dist/dms-client-return.esm.js +520 -403
  8. package/dist/dms-client-return.esm.js.map +1 -1
  9. package/package.json +2 -2
  10. package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +58 -58
  11. package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +85 -46
  12. package/src/components/order-daily-overview/header-filters/Styledfilters.tsx +1 -0
  13. package/src/components/order-daily-overview/header-filters/filterStore.ts +17 -1
  14. package/src/components/order-daily-overview/index.tsx +9 -8
  15. package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +9 -5
  16. package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +5 -5
  17. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +1 -0
  18. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +22 -19
  19. package/src/components/order-daily-overview/return-after-table/table-filters/TableFilters.tsx +55 -55
  20. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +73 -38
  21. package/src/components/order-daily-overview/return-order-table/return-orders-filters/RightFilters.tsx +42 -43
  22. package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +1 -0
  23. package/src/components/order-daily-overview/store/store.ts +1 -1
  24. package/src/components/order-view/index.tsx +6 -6
  25. package/src/components/order-view/modalsPopup/ModalManager.tsx +69 -31
  26. package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +21 -2
  27. package/src/index.tsx +74 -1
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState, useMemo, useCallback, useRef, Suspense } from 'react';
2
- import { useLocation, useParams, NavLink, useNavigate, Routes, Route } from 'react-router-dom';
2
+ import { useLocation, useParams, useNavigate, NavLink, Routes, Route } from 'react-router-dom';
3
3
  import styled, { css, keyframes } from 'styled-components';
4
4
  import { Label as Label$h, Input as Input$1, TextArea, FormSection, displayValueOrNA as displayValueOrNA$1, SelectDropdown, dropdownStyles, RadioButtonGroup as RadioButtonGroup$1, Switch, getBaseEndpoint, Button as Button$1, useApiHook, formatDateTime, Checkbox as Checkbox$1, SectionHeader, CrossIcon, AntSelect, Alert, CustomRating, AntTable, CancelationModal, CancelAndCompleteAction, filterDropdownStyles, BackgroundModal as BackgroundModal$1, AntModal } from '@bjsdistribution/dms-component-library';
5
5
  import { useAtom, atom } from 'jotai';
@@ -3475,7 +3475,7 @@ var Section = /*#__PURE__*/styled.div(_templateObject$T || (_templateObject$T =
3475
3475
  var _templateObject19, _templateObject20, _templateObject21;
3476
3476
  var StyledTable$1 = /*#__PURE__*/styled.table(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n white-space: nowrap;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n position: relative;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .custom-check {\n position: absloute;\n }\n .emailInvoiceNo {\n padding-left: 0px;\n }\n .emailInvoiceShare {\n width: 100px;\n }\n th {\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n }\n tbody {\n tr {\n td {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 12px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n position: relative;\n .actionbox {\n display: flex;\n gap: 5px;\n }\n .shareIconContainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n gap: 8px;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-101, #e2e0db);\n background: #fff;\n list-style-type: none;\n /* padding-left: 0; */\n /* fontWeight: 600,\n paddingLeft: 0, */\n cursor: pointer;\n position: relative;\n }\n .statusCancelled {\n color: #e95252;\n /* background: rgba(233, 82, 82, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOnHold {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusSubContracted {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusAwaiting {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusCompleted {\n color: #1f9254;\n /* background: rgba(41, 204, 106, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOutstanding {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusUnknown {\n color: #000;\n /* background: #fff; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n .statustext {\n color: #1f9254;\n font-family: 'Open Sans';\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n }\n .downloadcontainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n\n width: 28px;\n height: 28px;\n flex-direction: column;\n\n border-radius: 14px;\n border: 1px solid #e2e0db;\n background: #fff;\n }\n .statuscontainer {\n display: flex;\n padding: 5px 30px 5px 30px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n flex: 1 0 0;\n border-radius: 22px;\n background: rgba(41, 204, 106, 0.15);\n }\n .awaiting {\n display: flex;\n min-width: 85px;\n padding: 6px 10px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n border-radius: 22px;\n background: rgba(233, 82, 82, 0.15);\n color: #e95252;\n font-family: 'Open Sans';\n font-size: 12px;\n font-weight: 600;\n }\n ul > li > a {\n text-decoration: none !important;\n color: #0099ff;\n }\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .flex {\n display: flex;\n flex-direction: row;\n gap: 5px;\n height: 29px;\n align-items: center;\n }\n\n &.insideTable {\n td {\n border-radius: 0;\n border: none;\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n table {\n border-spacing: 0;\n width: 100%;\n border-radius: 5px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n overflow: hidden;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n thead {\n tr {\n border-bottom: none;\n th {\n padding: 14px 20px;\n text-align: left;\n border-top: 0;\n border-right: 0;\n border-left: 0;\n background: #f8fafc;\n\n &:first-child {\n border-radius: 0;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n border-top-left-radius: 15px;\n }\n &:last-child {\n border-radius: 0;\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 14px 20px;\n text-align: left;\n border-bottom: 1px solid rgba(58, 54, 48, 0.15);\n background: #fff;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n }\n }\n }\n }\n }\n }\n .actions {\n display: flex;\n align-items: center;\n gap: 20px;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n\n .close-icon {\n transform: scale(1.3);\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n"])));
3477
3477
  // Styled components
3478
- var StyledTableWrapper = /*#__PURE__*/styled.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: 60vh;\n scrollbar-width: none;\n /* height: 600px; */\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n"])));
3478
+ var StyledTableWrapper = /*#__PURE__*/styled.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: 60vh;\n scrollbar-width: none;\n min-height: 60vh;\n /* height: 600px; */\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n"])));
3479
3479
  var CustomDrop = /*#__PURE__*/styled.div(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #fff;\n display: flex;\n padding: 4px 8px;\n gap: 8px;\n align-items: center; */\n cursor: pointer;\n &.active .drop {\n transform: rotate(180deg);\n }\n"])));
3480
3480
 
3481
3481
  var ActionIcon = function ActionIcon() {
@@ -3557,6 +3557,7 @@ function useFinalPayload() {
3557
3557
  }
3558
3558
 
3559
3559
  var ReturnProductTable = function ReturnProductTable() {
3560
+ var _orderStaticData$retu;
3560
3561
  var _useSelectedOrders = useSelectedOrders(),
3561
3562
  selectedInvoices = _useSelectedOrders[0];
3562
3563
  var _useState = useState(false),
@@ -3607,6 +3608,21 @@ var ReturnProductTable = function ReturnProductTable() {
3607
3608
  return !prevSelectAll;
3608
3609
  });
3609
3610
  }, []);
3611
+ // const returnreason =
3612
+ var _useOrderStaticData = useOrderStaticData(),
3613
+ orderStaticData = _useOrderStaticData[0];
3614
+ var returnReasonsOptions = orderStaticData == null || (_orderStaticData$retu = orderStaticData.return_reasons) == null ? void 0 : _orderStaticData$retu.map(function (option) {
3615
+ return {
3616
+ label: option.reason,
3617
+ value: option.id
3618
+ };
3619
+ });
3620
+ var getReturnReasonLabel = function getReturnReasonLabel(returnReasonId) {
3621
+ var matchedReason = returnReasonsOptions == null ? void 0 : returnReasonsOptions.find(function (option) {
3622
+ return option.value === returnReasonId;
3623
+ });
3624
+ return matchedReason ? matchedReason.label : 'N/A'; // Return label or 'N/A' if no match found
3625
+ };
3610
3626
  return React.createElement("div", null, React.createElement(StyledTableWrapper, {
3611
3627
  id: "tableScrolling"
3612
3628
  }, React.createElement(StyledTable$1, null, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", {
@@ -3621,7 +3637,7 @@ var ReturnProductTable = function ReturnProductTable() {
3621
3637
  checked: selectedInvoices.some(function (selectedInvoice) {
3622
3638
  return selectedInvoice.id === invoice.id;
3623
3639
  })
3624
- })), React.createElement("td", null, 'N/A'), React.createElement("td", null, 'N/A'), React.createElement("td", null, invoice.code), React.createElement("td", null, invoice.description), React.createElement("td", null, 'N/A'), React.createElement("td", null, "1 of 1"), React.createElement("td", null, React.createElement("div", {
3640
+ })), React.createElement("td", null, 'N/A'), React.createElement("td", null, 'N/A'), React.createElement("td", null, invoice.code), React.createElement("td", null, invoice.description), React.createElement("td", null, getReturnReasonLabel(invoice == null ? void 0 : invoice.return_reason_id)), ' ', React.createElement("td", null, "1 of 1"), React.createElement("td", null, React.createElement("div", {
3625
3641
  onClick: function onClick() {
3626
3642
  handleActionClick(invoice.id);
3627
3643
  onDeleteProducts();
@@ -9050,13 +9066,13 @@ function OrderView() {
9050
9066
  }
9051
9067
  }, [apiCalling]);
9052
9068
  useEffect(function () {
9053
- if (paths.length > 1) {
9054
- setOrderId(paths[2]);
9055
- }
9056
- // for local
9057
- // if (paths.length >= 0) {
9058
- // setOrderId(paths[1]);
9069
+ // if (paths.length > 1) {
9070
+ // setOrderId(paths[2]);
9059
9071
  // }
9072
+ // for local
9073
+ if (paths.length >= 0) {
9074
+ setOrderId(paths[1]);
9075
+ }
9060
9076
  }, [paths]);
9061
9077
  useEffect(function () {
9062
9078
  setLoading(staticDataLoading);
@@ -9241,7 +9257,7 @@ var Wrapper$k = /*#__PURE__*/styled.div(_templateObject5$j || (_templateObject5$
9241
9257
  var Label$g = /*#__PURE__*/styled.div(_templateObject7$d || (_templateObject7$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8e8a85;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
9242
9258
  var FilterRow = /*#__PURE__*/styled.div(_templateObject8$8 || (_templateObject8$8 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 20px;\n align-self: stretch;\n justify-content: space-between;\n"])));
9243
9259
  var FilterColumn = /*#__PURE__*/styled.div(_templateObject9$5 || (_templateObject9$5 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 6px;\n align-self: stretch;\n margin: 10px;\n"])));
9244
- var RightColumn$1 = /*#__PURE__*/styled.div(_templateObject10$3 || (_templateObject10$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex-direction: row;\n display: flex;\n"])));
9260
+ var RightColumn$1 = /*#__PURE__*/styled.div(_templateObject10$3 || (_templateObject10$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex-direction: row;\n display: flex;\n gap: 15px;\n"])));
9245
9261
  var LeftColumn = /*#__PURE__*/styled.div(_templateObject11$2 || (_templateObject11$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex-direction: row;\n display: flex;\n"])));
9246
9262
  var ApplyButton = /*#__PURE__*/styled.button(_templateObject14$2 || (_templateObject14$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 15px;\n display: flex;\n padding: 7px 12px;\n justify-content: center;\n align-items: center;\n font-size: 14px;\n font-family: 'Lato', sans-serif;\n background: transparent;\n color: #3a3620;\n border: 1px solid #3a3630;\n cursor: pointer;\n\n &:not(:disabled):hover {\n background: #feba30;\n }\n\n &:disabled {\n background: #ccc;\n cursor: not-allowed;\n opacity: 0.6;\n }\n"])));
9247
9263
 
@@ -9250,7 +9266,7 @@ var initialState$1 = {
9250
9266
  'x-filters': [],
9251
9267
  'x-pagination': {
9252
9268
  page: 1,
9253
- per_page: 5
9269
+ per_page: 50
9254
9270
  }
9255
9271
  };
9256
9272
  var filterReducer = function filterReducer(state, action) {
@@ -9303,6 +9319,18 @@ var filterReducer = function filterReducer(state, action) {
9303
9319
  value: action.payload
9304
9320
  }])
9305
9321
  });
9322
+ case 'CLEAR_CLIENT':
9323
+ return _extends({}, state, {
9324
+ 'x-filters': state['x-filters'].filter(function (f) {
9325
+ return f.field !== 'order.customer_id';
9326
+ })
9327
+ });
9328
+ case 'CLEAR_ACTION':
9329
+ return _extends({}, state, {
9330
+ 'x-filters': state['x-filters'].filter(function (f) {
9331
+ return f.field !== 'product_return_action_id';
9332
+ })
9333
+ });
9306
9334
  case 'CLEAR_LOC':
9307
9335
  return _extends({}, state, {
9308
9336
  'x-filters': state['x-filters'].filter(function (f) {
@@ -9382,6 +9410,8 @@ function SelectionFilter() {
9382
9410
  setSelectedReturnOrder = _useSelectedOrders[1];
9383
9411
  var _useSelectAll = useSelectAll(),
9384
9412
  setSelectAll = _useSelectAll[1];
9413
+ var _useSelectedConfirmLo = useSelectedConfirmLoc(),
9414
+ setCheck = _useSelectedConfirmLo[1];
9385
9415
  //client options
9386
9416
  var clientOptions = customers == null ? void 0 : customers.map(function (option) {
9387
9417
  var _option$customer_name, _option$customer_name2;
@@ -9447,6 +9477,7 @@ function SelectionFilter() {
9447
9477
  setNewPayload([]);
9448
9478
  setGrouped([]);
9449
9479
  setSelectAll(false);
9480
+ setCheck([]);
9450
9481
  };
9451
9482
  useEffect(function () {
9452
9483
  var accountNumberFromStorage = localStorage.getItem('account_number');
@@ -9481,52 +9512,69 @@ function SelectionFilter() {
9481
9512
  }
9482
9513
  }, [storedUuid, locationData]);
9483
9514
  //location change
9484
- var handleLocationChange = function handleLocationChange(value, option) {
9485
- var selectedLabel = option == null ? void 0 : option.label;
9515
+ var handleLocationChange = function handleLocationChange(value) {
9486
9516
  setSelectedLocationValue(value);
9487
- if (selectedLocationValue === selectedLabel) {
9488
- dispatch({
9489
- type: 'CLEAR_ALL_FILTERS',
9490
- payload: null
9491
- });
9492
- }
9493
9517
  };
9494
9518
  //action type
9495
9519
  var handleActionClick = function handleActionClick(value) {
9496
9520
  setSelectedFilterValue(value);
9497
- if (selectedFilterValue === value) {
9498
- dispatch({
9499
- type: 'CLEAR_ALL_FILTERS',
9500
- payload: null
9501
- });
9502
- }
9503
9521
  };
9522
+ var storedName = localStorage.getItem('clientName');
9523
+ var storedClientId = localStorage.getItem('clientId');
9504
9524
  //Apply filters
9505
9525
  var applyFilters = function applyFilters() {
9506
9526
  if (storedName) {
9507
9527
  setClientLabel(storedName);
9508
9528
  }
9529
+ //client value
9509
9530
  if (storedClientId) {
9510
9531
  dispatch({
9511
9532
  type: 'SET_CLIENT_FILTER',
9512
9533
  payload: storedClientId
9513
9534
  });
9535
+ // Reset to the first page
9536
+ dispatch({
9537
+ type: 'SET_PAGE',
9538
+ payload: 1
9539
+ });
9540
+ } else {
9541
+ dispatch({
9542
+ type: 'SET_CLIENT_FILTER',
9543
+ payload: []
9544
+ });
9514
9545
  }
9546
+ //action value
9515
9547
  if (selectedFilterValue) {
9516
9548
  dispatch({
9517
9549
  type: 'SET_ACTIONS_FILTER',
9518
9550
  payload: selectedFilterValue
9519
9551
  });
9552
+ // Reset to the first page
9553
+ dispatch({
9554
+ type: 'SET_PAGE',
9555
+ payload: 1
9556
+ });
9520
9557
  }
9521
- if (selectedLocationValue) {
9558
+ //location value
9559
+ if (selectedLocationValue && selectedLocationValue.length > 0) {
9522
9560
  dispatch({
9523
9561
  type: 'SET_LOCATION_FILTER',
9524
9562
  payload: selectedLocationValue
9525
9563
  });
9564
+ // Reset to the first page
9565
+ dispatch({
9566
+ type: 'SET_PAGE',
9567
+ payload: 1
9568
+ });
9526
9569
  }
9527
9570
  };
9528
- var storedName = localStorage.getItem('clientName');
9529
- var storedClientId = localStorage.getItem('clientId');
9571
+ useEffect(function () {
9572
+ return function () {
9573
+ dispatch({
9574
+ type: 'CLEAR_CLIENT'
9575
+ });
9576
+ };
9577
+ }, []);
9530
9578
  useEffect(function () {
9531
9579
  if (storedClientId) {
9532
9580
  dispatch({
@@ -9542,6 +9590,19 @@ function SelectionFilter() {
9542
9590
  setIsButtonEnabled(false);
9543
9591
  }
9544
9592
  }, [storedName, selectedFilterValue, selectedLocationValue]);
9593
+ useEffect(function () {}, [location.pathname]);
9594
+ useEffect(function () {
9595
+ if (!selectedFilterValue || selectedFilterValue === null) {
9596
+ dispatch({
9597
+ type: 'CLEAR_ACTION'
9598
+ });
9599
+ }
9600
+ if (!selectedLocationValue || Array.isArray(selectedLocationValue) && selectedLocationValue.length === 0) {
9601
+ dispatch({
9602
+ type: 'CLEAR_LOC'
9603
+ });
9604
+ }
9605
+ }, [selectedFilterValue, selectedLocationValue]);
9545
9606
  return React.createElement(Wrapper$k, null, React.createElement(FilterRow, null, React.createElement(LeftColumn, null, React.createElement(FilterColumn, null, React.createElement(Label$g, null, "Clients"), React.createElement(StyledAntSelect$4, {
9546
9607
  options: clientOptions,
9547
9608
  placeholder: "Select Client Name",
@@ -9550,7 +9611,7 @@ function SelectionFilter() {
9550
9611
  minWidth: '14vw'
9551
9612
  },
9552
9613
  value: storedName
9553
- })), React.createElement(FilterColumn, null, React.createElement(Label$g, null, "Action Type"), React.createElement(StyledAntSelect$4, {
9614
+ })), storedName && location.pathname.includes("/filter/") ? React.createElement(React.Fragment, null, React.createElement(FilterColumn, null, React.createElement(Label$g, null, "Action Type"), React.createElement(StyledAntSelect$4, {
9554
9615
  options: actionTypeOptions,
9555
9616
  placeholder: "Select Action Type",
9556
9617
  value: selectedFilterValue,
@@ -9569,76 +9630,72 @@ function SelectionFilter() {
9569
9630
  },
9570
9631
  allowClear: true,
9571
9632
  mode: "multiple"
9572
- }))), React.createElement(RightColumn$1, null, React.createElement(ApplyButton, {
9633
+ }))) : null), React.createElement(RightColumn$1, null, React.createElement(ApplyButton, {
9573
9634
  onClick: applyFilters,
9574
9635
  disabled: !isButtonEnabled
9575
9636
  }, "Apply"))));
9576
9637
  }
9577
- var StyledAntSelect$4 = /*#__PURE__*/styled(Select)(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n"])));
9638
+ var StyledAntSelect$4 = /*#__PURE__*/styled(Select)(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n"])));
9578
9639
 
9640
+ // import { ApiResponse } from '../../types';
9641
+ // import { useApiHook } from '@bjsdistribution/dms-component-library';
9642
+ // import {
9643
+ // useActionType,
9644
+ // useCustomerData,
9645
+ // useLocationData,
9646
+ // useStatusOrderData,
9647
+ // } from '../../store';
9579
9648
  function HeaderFilter() {
9580
- var _useCustomerData = useCustomerData(),
9581
- setCustomers = _useCustomerData[1];
9582
- var _useActionType = useActionType(),
9583
- setActionType = _useActionType[1];
9584
- var _useLocationData = useLocationData(),
9585
- setLocationData = _useLocationData[1];
9586
- var _useStatusOrderData = useStatusOrderData(),
9587
- setStatusOfOrders = _useStatusOrderData[1];
9649
+ // const [, setCustomers] = useCustomerData();
9650
+ // const [, setActionType] = useActionType();
9651
+ // const [, setLocationData] = useLocationData();
9652
+ // const [, setStatusOfOrders] = useStatusOrderData();
9588
9653
  //API for client data
9589
- var _useApiHook = useApiHook({
9590
- endpoint: "/customers/",
9591
- method: 'GET',
9592
- pagination: {
9593
- page: 1,
9594
- per_page: 50
9595
- }
9596
- }),
9597
- fetchedCustomerData = _useApiHook.data,
9598
- loading = _useApiHook.loading;
9599
- //API for action type
9600
- var _useApiHook2 = useApiHook({
9601
- endpoint: "/orders/getStaticData/all/",
9602
- method: 'GET',
9603
- pagination: {
9604
- page: 1,
9605
- per_page: 50
9606
- }
9607
- }),
9608
- fetchedStaticData = _useApiHook2.data,
9609
- actionLoading = _useApiHook2.loading;
9610
- //API for return locations
9611
- var _useApiHook3 = useApiHook({
9612
- endpoint: "/return_locations/",
9613
- method: 'GET',
9614
- pagination: {
9615
- page: 1,
9616
- per_page: 50
9617
- }
9618
- }),
9619
- fetchedLocationData = _useApiHook3.data,
9620
- locationloading = _useApiHook3.loading;
9621
- useEffect(function () {
9622
- if (fetchedCustomerData && fetchedCustomerData != null && fetchedCustomerData.data) {
9623
- setCustomers(fetchedCustomerData == null ? void 0 : fetchedCustomerData.data);
9624
- }
9625
- }, [loading, fetchedCustomerData]);
9626
- useEffect(function () {
9627
- if (fetchedStaticData && fetchedStaticData != null && fetchedStaticData.data) {
9628
- var _fetchedStaticData$da, _fetchedStaticData$da2;
9629
- setActionType(fetchedStaticData == null || (_fetchedStaticData$da = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da.flatMap(function (i) {
9630
- return i == null ? void 0 : i.order_product_return_action;
9631
- }));
9632
- setStatusOfOrders(fetchedStaticData == null || (_fetchedStaticData$da2 = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da2.flatMap(function (i) {
9633
- return i == null ? void 0 : i.order_stock_alias;
9634
- }));
9635
- }
9636
- }, [actionLoading, fetchedStaticData]);
9637
- useEffect(function () {
9638
- if (fetchedLocationData && fetchedLocationData != null && fetchedLocationData.data) {
9639
- setLocationData(fetchedLocationData == null ? void 0 : fetchedLocationData.data);
9640
- }
9641
- }, [locationloading, fetchedLocationData]);
9654
+ // const { data: fetchedCustomerData, loading: loading } = useApiHook<
9655
+ // ApiResponse
9656
+ // >({
9657
+ // endpoint: `/customers/`,
9658
+ // method: 'GET',
9659
+ // // pagination: { page: 1, per_page: 50 },
9660
+ // });
9661
+ // //API for action type
9662
+ // const { data: fetchedStaticData, loading: actionLoading } = useApiHook<
9663
+ // ApiResponse
9664
+ // >({
9665
+ // endpoint: `/orders/getStaticData/all/`,
9666
+ // method: 'GET',
9667
+ // // pagination: { page: 1, per_page: 50 },
9668
+ // });
9669
+ // //API for return locations
9670
+ // const { data: fetchedLocationData, loading: locationloading } = useApiHook<
9671
+ // ApiResponse
9672
+ // >({
9673
+ // endpoint: `/return_locations/`,
9674
+ // method: 'GET',
9675
+ // pagination: { page: 1, per_page: 50 },
9676
+ // });
9677
+ // useEffect(() => {
9678
+ // if (fetchedCustomerData && fetchedCustomerData?.data) {
9679
+ // setCustomers(fetchedCustomerData?.data);
9680
+ // }
9681
+ // }, [loading]);
9682
+ // useEffect(() => {
9683
+ // if (fetchedStaticData && fetchedStaticData?.data) {
9684
+ // setActionType(
9685
+ // fetchedStaticData?.data?.flatMap(
9686
+ // (i: any) => i?.order_product_return_action
9687
+ // )
9688
+ // );
9689
+ // setStatusOfOrders(
9690
+ // fetchedStaticData?.data?.flatMap((i: any) => i?.order_stock_alias)
9691
+ // );
9692
+ // }
9693
+ // }, [actionLoading]);
9694
+ // useEffect(() => {
9695
+ // if (fetchedLocationData && fetchedLocationData?.data) {
9696
+ // setLocationData(fetchedLocationData?.data);
9697
+ // }
9698
+ // }, [locationloading]);
9642
9699
  return React.createElement(CoverPage, null, React.createElement(SelectionFilter, null));
9643
9700
  }
9644
9701
 
@@ -9652,46 +9709,10 @@ var Text$7 = /*#__PURE__*/styled.div(_templateObject7$e || (_templateObject7$e =
9652
9709
  // Right side filter
9653
9710
  var StyledTableFilter = /*#__PURE__*/styled.div(_templateObject8$9 || (_templateObject8$9 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9654
9711
 
9655
- var _templateObject2$1n;
9656
- var StyledBulkItem = /*#__PURE__*/styled.div(_templateObject2$1n || (_templateObject2$1n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 8px 12px;\n display: flex;\n align-items: center;\n /* border-right: 1px solid #d0d5dd; */\n gap: 8px;\n cursor: pointer;\n position: relative;\n\n @media screen and (max-width: 1030px) {\n padding: 8px 11px;\n }\n\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n top: 54px;\n }\n &:last-child {\n border-right: none;\n }\n &.active svg.arrowDown {\n transform: rotate(180deg);\n }\n label {\n color: #6a7378;\n text-align: center;\n font-family: 'Open Sans';\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n cursor: pointer;\n }\n\n &.noPadding {\n padding: 0;\n }\n"])));
9657
-
9658
- var _templateObject$1Z, _templateObject2$1o;
9659
- var SearchType = function SearchType() {
9660
- var _useState = useState(''),
9661
- searchText = _useState[0],
9662
- setSearchText = _useState[1];
9663
- var handleInputChange = function handleInputChange(event) {
9664
- setSearchText(event.target.value);
9665
- };
9666
- return React.createElement(Search, null, React.createElement(SearchIcon, null), React.createElement(SearchInput, {
9667
- type: "text",
9668
- placeholder: "Search",
9669
- value: searchText,
9670
- onChange: handleInputChange
9671
- }));
9672
- };
9673
- var Search = /*#__PURE__*/styled.div(_templateObject$1Z || (_templateObject$1Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n svg {\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n }\n"])));
9674
- var SearchInput = /*#__PURE__*/styled.input(_templateObject2$1o || (_templateObject2$1o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #e0e2e7;\n background: #fff;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n display: flex;\n padding: 8.5px 12px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n padding-left: 39px;\n"])));
9675
-
9676
- function DownloadIcon() {
9677
- return React.createElement("svg", {
9678
- xmlns: "http://www.w3.org/2000/svg",
9679
- width: "24",
9680
- height: "24",
9681
- viewBox: "0 0 24 24",
9682
- fill: "none"
9683
- }, React.createElement("path", {
9684
- opacity: "0.4",
9685
- d: "M5.55196 20.968C5.20681 20.9583 4.86712 20.8793 4.55308 20.7358C4.23903 20.5923 3.95704 20.3871 3.72384 20.1324C3.49065 19.8778 3.31101 19.5789 3.19559 19.2534C3.08017 18.928 3.03133 18.5827 3.05196 18.238C3.03996 16.085 3.05196 13.932 3.05196 11.779C3.05196 11.6464 3.10464 11.5192 3.19841 11.4255C3.29218 11.3317 3.41936 11.279 3.55196 11.279C3.68457 11.279 3.81175 11.3317 3.90552 11.4255C3.99929 11.5192 4.05196 11.6464 4.05196 11.779C4.05196 13.979 4.01996 16.179 4.05196 18.379C4.06796 19.486 4.89996 19.968 5.88996 19.968H18.353C18.6677 19.9757 18.9773 19.8872 19.2403 19.7142C19.5034 19.5412 19.7074 19.292 19.825 19C19.9209 18.6551 19.9547 18.2958 19.925 17.939V11.779C19.925 11.6464 19.9776 11.5192 20.0714 11.4255C20.1652 11.3317 20.2924 11.279 20.425 11.279C20.5576 11.279 20.6847 11.3317 20.7785 11.4255C20.8723 11.5192 20.925 11.6464 20.925 11.779C20.925 14.003 21.01 16.244 20.925 18.466C20.9164 18.8063 20.8402 19.1414 20.7008 19.452C20.5615 19.7625 20.3618 20.0423 20.1133 20.2749C19.8648 20.5076 19.5726 20.6885 19.2535 20.8071C18.9345 20.9258 18.5951 20.9798 18.255 20.966L5.55196 20.968Z",
9686
- fill: "#3A3630"
9687
- }), React.createElement("path", {
9688
- opacity: "0.4",
9689
- d: "M11.63 15.818C11.7124 15.9024 11.8242 15.9518 11.942 15.956C11.956 15.956 11.969 15.961 11.984 15.962C11.999 15.963 12.011 15.962 12.025 15.956C12.1429 15.952 12.2547 15.9025 12.337 15.818L16.006 12.149C16.0971 12.0547 16.1475 11.9284 16.1464 11.7973C16.1452 11.6662 16.0926 11.5408 15.9999 11.4481C15.9072 11.3554 15.7818 11.3028 15.6507 11.3017C15.5196 11.3005 15.3933 11.3509 15.299 11.442L12.484 14.257V3.515C12.484 3.38239 12.4314 3.25521 12.3376 3.16145C12.2438 3.06768 12.1166 3.015 11.984 3.015C11.8514 3.015 11.7242 3.06768 11.6305 3.16145C11.5367 3.25521 11.484 3.38239 11.484 3.515V14.257L8.66803 11.442C8.57373 11.3509 8.44743 11.3005 8.31633 11.3017C8.18524 11.3028 8.05983 11.3554 7.96713 11.4481C7.87442 11.5408 7.82184 11.6662 7.8207 11.7973C7.81956 11.9284 7.86996 12.0547 7.96103 12.149L11.63 15.818Z",
9690
- fill: "#3A3630"
9691
- }));
9692
- }
9693
-
9694
- var _templateObject$1_, _templateObject2$1p, _templateObject3$T, _templateObject4$w, _templateObject5$l;
9712
+ var _templateObject$1Z, _templateObject2$1n;
9713
+ // import { StyledBulkItem } from '../../filters/BulkFilterStyle';
9714
+ // import SearchType from '../../header/route-header/search/SearchType';
9715
+ // import DownloadIcon from '../../../../assets/icons/DownloadIcon';
9695
9716
  var RightFilters = function RightFilters() {
9696
9717
  var _useAtom = useAtom(countReducerAtom),
9697
9718
  dispatch = _useAtom[1];
@@ -9704,13 +9725,18 @@ var RightFilters = function RightFilters() {
9704
9725
  });
9705
9726
  },
9706
9727
  disabled: (selectedReturnOrder == null ? void 0 : selectedReturnOrder.length) === 0
9707
- }, "Create Return"), React.createElement(StyledBulkItem, null, React.createElement(SearchType, null)), React.createElement(IconConatiner, null, React.createElement(Mid, null, React.createElement(IconText, null, "Export"), React.createElement(DownloadIcon, null))));
9728
+ }, "Create Return"));
9708
9729
  };
9709
- var Container$13 = /*#__PURE__*/styled.div(_templateObject$1_ || (_templateObject$1_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
9710
- var Mid = /*#__PURE__*/styled.div(_templateObject2$1p || (_templateObject2$1p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 4px 10px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n border-radius: 15px 0px 0px 15px;\n"])));
9711
- var ButtonText = /*#__PURE__*/styled.button(_templateObject3$T || (_templateObject3$T = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: white;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n\n display: flex;\n padding: 7px 12px;\n justify-content: center;\n align-items: center;\n gap: 2px;\n border-radius: 15px;\n background: #3a3630;\n font-family: 'Lato';\n cursor: pointer;\n border: none;\n\n &:disabled {\n border-radius: 15px;\n background: rgba(136, 128, 117, 0.35);\n color: #888075;\n cursor: not-allowed;\n }\n"])));
9712
- var IconConatiner = /*#__PURE__*/styled.div(_templateObject4$w || (_templateObject4$w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* display: flex;\n height: 34px;\n padding: 4px 10px; \n align-items: flex-start;\n border-radius: 8px 8px 8px 8px; */\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n background: #f0f2f2;\n border: 1px solid #e2e0db;\n display: flex;\n padding: 7px 12px;\n justify-content: center;\n align-items: center;\n gap: 2px;\n border-radius: 15px;\n height: 34px;\n"])));
9713
- var IconText = /*#__PURE__*/styled.div(_templateObject5$l || (_templateObject5$l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n text-align: center;\n\n /* body/captions */\n font-family: 'Lato';\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n"])));
9730
+ var Container$13 = /*#__PURE__*/styled.div(_templateObject$1Z || (_templateObject$1Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
9731
+ // const Mid = styled.div`
9732
+ // display: flex;
9733
+ // padding: 4px 10px;
9734
+ // align-items: center;
9735
+ // gap: 8px;
9736
+ // align-self: stretch;
9737
+ // border-radius: 15px 0px 0px 15px;
9738
+ // `;
9739
+ var ButtonText = /*#__PURE__*/styled.button(_templateObject2$1n || (_templateObject2$1n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: white;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n\n display: flex;\n padding: 7px 12px;\n justify-content: center;\n align-items: center;\n gap: 2px;\n border-radius: 15px;\n background: #3a3630;\n font-family: 'Lato';\n cursor: pointer;\n border: none;\n\n &:disabled {\n border-radius: 15px;\n background: rgba(136, 128, 117, 0.35);\n color: #888075;\n cursor: not-allowed;\n }\n"])));
9714
9740
 
9715
9741
  var ReturnFilter = function ReturnFilter() {
9716
9742
  var _useParams = useParams(),
@@ -9718,12 +9744,12 @@ var ReturnFilter = function ReturnFilter() {
9718
9744
  return React.createElement(React.Fragment, null, React.createElement(StyledFiter, null, React.createElement(Text$7, null, " ", clientName), React.createElement(StyledFIlterELements, null, React.createElement(StyledTableFilter, null)), React.createElement(RightFilters, null)));
9719
9745
  };
9720
9746
 
9721
- var _templateObject$1$, _templateObject2$1q, _templateObject3$U, _templateObject4$x, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
9722
- var ColumStyle = /*#__PURE__*/styled.div(_templateObject$1$ || (_templateObject$1$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 67px;\n align-items: center;\n gap: 7px;\n"])));
9723
- var GreyBox = /*#__PURE__*/styled.div(_templateObject2$1q || (_templateObject2$1q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 3px 12px;\n align-items: flex-start;\n gap: 24px;\n border-radius: 6px;\n background: rgba(153, 153, 153, 0.1);\n"])));
9747
+ var _templateObject$1_, _templateObject2$1o, _templateObject3$T, _templateObject4$w, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
9748
+ var ColumStyle = /*#__PURE__*/styled.div(_templateObject$1_ || (_templateObject$1_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 67px;\n align-items: center;\n gap: 7px;\n"])));
9749
+ var GreyBox = /*#__PURE__*/styled.div(_templateObject2$1o || (_templateObject2$1o = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 3px 12px;\n align-items: flex-start;\n gap: 24px;\n border-radius: 6px;\n background: rgba(153, 153, 153, 0.1);\n"])));
9724
9750
  // Styled components
9725
- var StyledTableWrapper$2 = /*#__PURE__*/styled.div(_templateObject3$U || (_templateObject3$U = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\n scrollbar-width: none;\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n"])));
9726
- var StyledTable$4 = /*#__PURE__*/styled.table(_templateObject4$x || (_templateObject4$x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .emailInvoiceNo {\n padding-left: 0px;\n }\n .emailInvoiceShare {\n width: 100px;\n }\n th {\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n }\n tbody {\n tr {\n td {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 12px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n\n .shareIconContainer {\n display: flex;\n width: 24px;\n height: 24px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 10px;\n flex-shrink: 0;\n border-radius: 15px;\n background: #edebe8;\n cursor: pointer;\n }\n .statuscontainer {\n display: flex;\n padding: 6px 10px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n flex: 1 0 0;\n border-radius: 22px;\n background: rgba(41, 204, 106, 0.15);\n }\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .flex {\n display: flex;\n flex-direction: row;\n gap: 5px;\n height: 29px;\n align-items: center;\n }\n\n &.insideTable {\n td {\n border-radius: 0;\n border: none;\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n table {\n border-spacing: 0;\n width: 100%;\n border-radius: 5px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n overflow: hidden;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n thead {\n tr {\n border-bottom: none;\n th {\n padding: 14px 20px;\n text-align: left;\n border-top: 0;\n border-right: 0;\n border-left: 0;\n background: #f8fafc;\n\n &:first-child {\n border-radius: 0;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n border-top-left-radius: 15px;\n }\n &:last-child {\n border-radius: 0;\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 14px 20px;\n text-align: left;\n border-bottom: 1px solid rgba(58, 54, 48, 0.15);\n background: #fff;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n }\n }\n }\n }\n }\n }\n .actions {\n display: flex;\n align-items: center;\n gap: 20px;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n\n .close-icon {\n transform: scale(1.3);\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n"])));
9751
+ var StyledTableWrapper$2 = /*#__PURE__*/styled.div(_templateObject3$T || (_templateObject3$T = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\n scrollbar-width: none;\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n"])));
9752
+ var StyledTable$4 = /*#__PURE__*/styled.table(_templateObject4$w || (_templateObject4$w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .emailInvoiceNo {\n padding-left: 0px;\n }\n .emailInvoiceShare {\n width: 100px;\n }\n th {\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n }\n tbody {\n tr {\n td {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 12px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n\n .shareIconContainer {\n display: flex;\n width: 24px;\n height: 24px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 10px;\n flex-shrink: 0;\n border-radius: 15px;\n background: #edebe8;\n cursor: pointer;\n }\n .statuscontainer {\n display: flex;\n padding: 6px 10px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n flex: 1 0 0;\n border-radius: 22px;\n background: rgba(41, 204, 106, 0.15);\n }\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .flex {\n display: flex;\n flex-direction: row;\n gap: 5px;\n height: 29px;\n align-items: center;\n }\n\n &.insideTable {\n td {\n border-radius: 0;\n border: none;\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n table {\n border-spacing: 0;\n width: 100%;\n border-radius: 5px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n overflow: hidden;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n thead {\n tr {\n border-bottom: none;\n th {\n padding: 14px 20px;\n text-align: left;\n border-top: 0;\n border-right: 0;\n border-left: 0;\n background: #f8fafc;\n\n &:first-child {\n border-radius: 0;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n border-top-left-radius: 15px;\n }\n &:last-child {\n border-radius: 0;\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 14px 20px;\n text-align: left;\n border-bottom: 1px solid rgba(58, 54, 48, 0.15);\n background: #fff;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n }\n }\n }\n }\n }\n }\n .actions {\n display: flex;\n align-items: center;\n gap: 20px;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n\n .close-icon {\n transform: scale(1.3);\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n"])));
9727
9753
  var EmptyDataContainer$1 = /*#__PURE__*/styled.div(_templateObject34 || (_templateObject34 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
9728
9754
  var ClearAll = /*#__PURE__*/styled.div(_templateObject35 || (_templateObject35 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #edebe8;\n background: #fff;\n display: flex;\n padding: 6px 6px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n\n &.active {\n background: #313130;\n & > div {\n color: #fff;\n }\n }\n"])));
9729
9755
  var StyledFilterBtnIcon = /*#__PURE__*/styled.div(_templateObject36 || (_templateObject36 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 24px;\n height: 24px;\n justify-content: center;\n align-items: center;\n border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #f1f5f6;\n .cross {\n position: relative;\n &:after {\n display: inline-block;\n content: 'X';\n font-style: normal;\n font-size: 14px;\n color: #000;\n }\n }\n"])));
@@ -9911,7 +9937,7 @@ var optionsForReturnPrint = [{
9911
9937
  label: 'Print Return Labels'
9912
9938
  }];
9913
9939
 
9914
- var _templateObject$20, _templateObject2$1r;
9940
+ var _templateObject$1$, _templateObject2$1p;
9915
9941
  var options$1 = optionsForReturnPrint;
9916
9942
  var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
9917
9943
  var legacyProductId = _ref.legacyProductId;
@@ -9928,8 +9954,8 @@ var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
9928
9954
  }, IconComponent && React.createElement(IconComponent, null), " ", item.label);
9929
9955
  }));
9930
9956
  };
9931
- var OptionsList = /*#__PURE__*/styled.ul(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n border-radius: 6px;\n border: 1px solid rgba(224, 226, 231, 0.5);\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n width: 177px;\n padding: 5px 1px 3px 1px;\n position: absolute;\n top: 26px;\n right: 0;\n z-index: 99;\n min-width: 194px;\n"])));
9932
- var OptionsListLi = /*#__PURE__*/styled.li(_templateObject2$1r || (_templateObject2$1r = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom: 1px solid #f0f2f2;\n padding: 8px 10px;\n display: flex;\n gap: 12px;\n align-items: center;\n font-size: 13px;\n cursor: pointer;\n &:last-child {\n border: none;\n }\n"])));
9957
+ var OptionsList = /*#__PURE__*/styled.ul(_templateObject$1$ || (_templateObject$1$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n border-radius: 6px;\n border: 1px solid rgba(224, 226, 231, 0.5);\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n width: 177px;\n padding: 5px 1px 3px 1px;\n position: absolute;\n top: 26px;\n right: 0;\n z-index: 99;\n min-width: 194px;\n"])));
9958
+ var OptionsListLi = /*#__PURE__*/styled.li(_templateObject2$1p || (_templateObject2$1p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom: 1px solid #f0f2f2;\n padding: 8px 10px;\n display: flex;\n gap: 12px;\n align-items: center;\n font-size: 13px;\n cursor: pointer;\n &:last-child {\n border: none;\n }\n"])));
9933
9959
 
9934
9960
  var _excluded$3 = ["count"];
9935
9961
  var ReturnOrderTable = function ReturnOrderTable() {
@@ -9974,6 +10000,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
9974
10000
  return prevIndex === index ? null : index;
9975
10001
  });
9976
10002
  };
10003
+ console.log(newpayload, 'newpayload');
9977
10004
  // Close dropdown outside click
9978
10005
  useEffect(function () {
9979
10006
  document.addEventListener('mousedown', handleClickOutside);
@@ -10032,7 +10059,10 @@ var ReturnOrderTable = function ReturnOrderTable() {
10032
10059
  var handleSelectAll = function handleSelectAll(e) {
10033
10060
  setSelectAll(e.target.checked);
10034
10061
  if (e.target.checked) {
10035
- setSelectedReturnOrder(returnData == null ? void 0 : returnData.map(function (loc) {
10062
+ setSelectedReturnOrder(returnData == null ? void 0 : returnData.filter(function (loc) {
10063
+ var _loc$order_product_re;
10064
+ return (loc == null || (_loc$order_product_re = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re.type) === 'RTS';
10065
+ }).map(function (loc) {
10036
10066
  return {
10037
10067
  id: loc.id,
10038
10068
  return_locations: loc == null ? void 0 : loc.return_locations,
@@ -10043,14 +10073,17 @@ var ReturnOrderTable = function ReturnOrderTable() {
10043
10073
  new_location: loc == null ? void 0 : loc.new_location
10044
10074
  };
10045
10075
  }));
10046
- setNewPayload(returnData == null ? void 0 : returnData.map(function (loc) {
10047
- var _loc$order_product_re;
10076
+ setNewPayload(returnData == null ? void 0 : returnData.filter(function (loc) {
10077
+ var _loc$order_product_re2;
10078
+ return (loc == null || (_loc$order_product_re2 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re2.type) === 'RTS';
10079
+ }).map(function (loc) {
10080
+ var _loc$order_product_re3;
10048
10081
  return {
10049
10082
  id: loc.id,
10050
10083
  account_number: createReturn == null ? void 0 : createReturn.account_number,
10051
10084
  customer_id: +(createReturn == null ? void 0 : createReturn.customer_id),
10052
10085
  products: [loc == null ? void 0 : loc.legacy_product_id],
10053
- return_action: [loc == null || (_loc$order_product_re = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re.type] || null,
10086
+ return_action: loc == null || (_loc$order_product_re3 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re3.type,
10054
10087
  return_location_token: (loc == null ? void 0 : loc.return_location) || null,
10055
10088
  new_location: loc == null ? void 0 : loc.new_location
10056
10089
  };
@@ -10061,6 +10094,8 @@ var ReturnOrderTable = function ReturnOrderTable() {
10061
10094
  setGrouped([]);
10062
10095
  }
10063
10096
  };
10097
+ console.log(selectedReturnOrder, 'selectedReturnOrder');
10098
+ console.log(newpayload, 'newpayload');
10064
10099
  var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action, new_location, legacy_product_id) {
10065
10100
  setSelectedReturnOrder(function (prevSelectedLocations) {
10066
10101
  var isSelected = prevSelectedLocations == null ? void 0 : prevSelectedLocations.some(function (loc) {
@@ -10135,12 +10170,15 @@ var ReturnOrderTable = function ReturnOrderTable() {
10135
10170
  var mergedPayload = Object.values(groupedPayload);
10136
10171
  setGrouped(mergedPayload);
10137
10172
  }, [newpayload]);
10138
- return React.createElement(React.Fragment, null, React.createElement(StyledTableWrapper, null, React.createElement(StyledTable$1, null, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", {
10173
+ return React.createElement(React.Fragment, null, React.createElement(StyledTableWrapper, null, React.createElement(StyledTable$1, null, React.createElement("thead", null, React.createElement("tr", null, returnData != null && returnData.some(function (item) {
10174
+ var _item$order_product_r;
10175
+ return (item == null || (_item$order_product_r = item.order_product_return_action) == null ? void 0 : _item$order_product_r.type) === 'RTS';
10176
+ }) ? React.createElement("th", {
10139
10177
  className: "emailInvoiceCheckbox"
10140
10178
  }, React.createElement(Checkbox$1, {
10141
10179
  checked: selectAll,
10142
10180
  onChange: handleSelectAll
10143
- })), React.createElement("th", null, "Product Location"), React.createElement("th", null, "Return Location"), React.createElement("th", null, "Recipient"), React.createElement("th", null, "Code"), React.createElement("th", null, "Description"), React.createElement("th", null, "Part"), React.createElement("th", null, "Weight"), React.createElement("th", null, "CBM"), React.createElement("th", null, "Return Reason"), React.createElement("th", null, "Collected"), React.createElement("th", null, "Collection Reason"), React.createElement("th", {
10181
+ })) : React.createElement("th", null), React.createElement("th", null, "Product Location"), React.createElement("th", null, "Return Location"), React.createElement("th", null, "Recipient"), React.createElement("th", null, "Return Action Type"), React.createElement("th", null, "Code"), React.createElement("th", null, "Description"), React.createElement("th", null, "Part"), React.createElement("th", null, "Weight"), React.createElement("th", null, "CBM"), React.createElement("th", null, "Return Reason"), React.createElement("th", null, "Collected"), React.createElement("th", null, "Collection Reason"), React.createElement("th", {
10144
10182
  className: "emailInvoiceShare"
10145
10183
  }, "Labels"))), React.createElement("tbody", null, load ? React.createElement("tr", null, React.createElement("td", {
10146
10184
  colSpan: 6
@@ -10151,10 +10189,10 @@ var ReturnOrderTable = function ReturnOrderTable() {
10151
10189
  })) : (returnData == null ? void 0 : returnData.length) === 0 ? React.createElement("tr", null, React.createElement("td", {
10152
10190
  colSpan: 14
10153
10191
  }, React.createElement(EmptyDataContainer$1, null, React.createElement(Empty, null)))) : returnData == null ? void 0 : returnData.map(function (item, index) {
10154
- var _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$return_reasons, _item$order_product_r, _item$collection_reas;
10192
+ 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$collection_reas;
10155
10193
  return React.createElement("tr", {
10156
10194
  key: item.id
10157
- }, React.createElement("td", null, React.createElement(Checkbox$1, {
10195
+ }, 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, {
10158
10196
  className: "custom-check",
10159
10197
  checked: selectedReturnOrder == null ? void 0 : selectedReturnOrder.some(function (selectedInvoice) {
10160
10198
  return (selectedInvoice == null ? void 0 : selectedInvoice.id) === item.id;
@@ -10162,7 +10200,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
10162
10200
  onChange: function onChange() {
10163
10201
  return handleSelectOrderReturn(item.id, item.return_location, item.return_locations, item.order_product_return_action, item.new_location, item.legacy_product_id);
10164
10202
  }
10165
- })), 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", {
10203
+ })) : 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", {
10166
10204
  className: "awaiting"
10167
10205
  }, "Awaiting")), React.createElement("td", null, " ", displayValueOrNA(item == null ? void 0 : item.new_location)), React.createElement("td", null, React.createElement("ul", {
10168
10206
  style: {
@@ -10179,7 +10217,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
10179
10217
  style: {
10180
10218
  color: '#888075'
10181
10219
  }
10182
- }, displayValueOrNA(item == null || (_item$order_data2 = item.order_data) == null || (_item$order_data2 = _item$order_data2.order_recipient) == null ? void 0 : _item$order_data2.postcode)))), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.code)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.description)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.parts_count)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), ' ', item != null && item.weight && (item == null ? void 0 : item.weight) !== null ? 'KG' : ''), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React.createElement("td", null, displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React.createElement("td", null, (item == null || (_item$order_product_r = item.order_product_returns) == null ? void 0 : _item$order_product_r.length) > 0 ? item.order_product_returns.map(function (ret) {
10220
+ }, displayValueOrNA(item == null || (_item$order_data2 = item.order_data) == null || (_item$order_data2 = _item$order_data2.order_recipient) == null ? void 0 : _item$order_data2.postcode)))), React.createElement("td", null, displayValueOrNA(item == null || (_item$order_product_r3 = item.order_product_return_action) == null ? void 0 : _item$order_product_r3.type)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.code)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.description)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.parts_count)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), ' ', item != null && item.weight && (item == null ? void 0 : item.weight) !== null ? 'KG' : ''), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React.createElement("td", null, displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React.createElement("td", null, (item == null || (_item$order_product_r4 = item.order_product_returns) == null ? void 0 : _item$order_product_r4.length) > 0 ? item.order_product_returns.map(function (ret) {
10183
10221
  return ret != null && ret.collected_at ? format(new Date(ret.collected_at), 'dd/MM/yyyy') : 'UNKNOWN';
10184
10222
  }) : 'UNKNOWN'), React.createElement("td", null, displayValueOrNA(item == null || (_item$collection_reas = item.collection_reasons) == null ? void 0 : _item$collection_reas.reason)), React.createElement("td", null, React.createElement("ul", {
10185
10223
  className: "actionbox"
@@ -10251,7 +10289,7 @@ var DefectConfirm = [{
10251
10289
  value: 'no'
10252
10290
  }];
10253
10291
 
10254
- var _templateObject$21, _templateObject2$1s, _templateObject3$V, _templateObject4$y;
10292
+ var _templateObject$20, _templateObject2$1q, _templateObject3$U, _templateObject4$x;
10255
10293
  var DefetcDetails = function DefetcDetails() {
10256
10294
  var handleSelectChange = function handleSelectChange() {
10257
10295
  console.log('Option selected');
@@ -10293,12 +10331,12 @@ var DefetcDetails = function DefetcDetails() {
10293
10331
  selectWrapperClass: "rounded"
10294
10332
  }))));
10295
10333
  };
10296
- var StyledAntSelect$5 = /*#__PURE__*/styled(AntSelect)(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
10297
- var Container$14 = /*#__PURE__*/styled.div(_templateObject2$1s || (_templateObject2$1s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n border: 1px solid #ccc;\n border-radius: 15px;\n padding: 10px;\n white-space: nowrap;\n"])));
10298
- var Flex$7 = /*#__PURE__*/styled.div(_templateObject3$V || (_templateObject3$V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n\n @media (max-width: 768px) {\n flex-direction: column;\n }\n"])));
10299
- var LabelWrapper = /*#__PURE__*/styled.div(_templateObject4$y || (_templateObject4$y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
10334
+ var StyledAntSelect$5 = /*#__PURE__*/styled(AntSelect)(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
10335
+ var Container$14 = /*#__PURE__*/styled.div(_templateObject2$1q || (_templateObject2$1q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n border: 1px solid #ccc;\n border-radius: 15px;\n padding: 10px;\n white-space: nowrap;\n"])));
10336
+ var Flex$7 = /*#__PURE__*/styled.div(_templateObject3$U || (_templateObject3$U = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n\n @media (max-width: 768px) {\n flex-direction: column;\n }\n"])));
10337
+ var LabelWrapper = /*#__PURE__*/styled.div(_templateObject4$x || (_templateObject4$x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
10300
10338
 
10301
- var _templateObject$22;
10339
+ var _templateObject$21;
10302
10340
  var RepackProduct = function RepackProduct() {
10303
10341
  var options = [{
10304
10342
  value: 'bjsCouriers',
@@ -10358,9 +10396,9 @@ var RepackProduct = function RepackProduct() {
10358
10396
  }
10359
10397
  })));
10360
10398
  };
10361
- var GLobalPopupContent$1 = /*#__PURE__*/styled.div(_templateObject$22 || (_templateObject$22 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10399
+ var GLobalPopupContent$1 = /*#__PURE__*/styled.div(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10362
10400
 
10363
- var _templateObject$23, _templateObject2$1t, _templateObject3$W, _templateObject4$z, _templateObject5$m, _templateObject6$e;
10401
+ var _templateObject$22, _templateObject2$1r, _templateObject3$V, _templateObject4$y, _templateObject5$l, _templateObject6$e;
10364
10402
  var RepackDetails = function RepackDetails() {
10365
10403
  var _useState = useState(false),
10366
10404
  isAdditionalBoxChecked = _useState[0],
@@ -10407,14 +10445,14 @@ var RepackDetails = function RepackDetails() {
10407
10445
  }
10408
10446
  }, "Have any other boxes repacked into this one?"), isRepacked && React.createElement(RepackProduct, null)))));
10409
10447
  };
10410
- var StyledAntSelect$6 = /*#__PURE__*/styled(AntSelect)(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
10411
- var CheckboxContainer$1 = /*#__PURE__*/styled.div(_templateObject2$1t || (_templateObject2$1t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin-top: 10px;\n"])));
10412
- var InputWrapper = /*#__PURE__*/styled.div(_templateObject3$W || (_templateObject3$W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 5px;\n margin-left: 24px; // Indent input field to align with the checkbox\n"])));
10413
- var Container$15 = /*#__PURE__*/styled.div(_templateObject4$z || (_templateObject4$z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 15px;\n border: 1px solid #ccc;\n border-radius: 15px;\n padding: 10px;\n white-space: nowrap;\n"])));
10414
- var Flex$8 = /*#__PURE__*/styled.div(_templateObject5$m || (_templateObject5$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n\n @media (max-width: 768px) {\n flex-direction: column;\n }\n"])));
10448
+ var StyledAntSelect$6 = /*#__PURE__*/styled(AntSelect)(_templateObject$22 || (_templateObject$22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
10449
+ var CheckboxContainer$1 = /*#__PURE__*/styled.div(_templateObject2$1r || (_templateObject2$1r = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin-top: 10px;\n"])));
10450
+ var InputWrapper = /*#__PURE__*/styled.div(_templateObject3$V || (_templateObject3$V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 5px;\n margin-left: 24px; // Indent input field to align with the checkbox\n"])));
10451
+ var Container$15 = /*#__PURE__*/styled.div(_templateObject4$y || (_templateObject4$y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 15px;\n border: 1px solid #ccc;\n border-radius: 15px;\n padding: 10px;\n white-space: nowrap;\n"])));
10452
+ var Flex$8 = /*#__PURE__*/styled.div(_templateObject5$l || (_templateObject5$l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n\n @media (max-width: 768px) {\n flex-direction: column;\n }\n"])));
10415
10453
  var LabelWrapper$1 = /*#__PURE__*/styled.div(_templateObject6$e || (_templateObject6$e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
10416
10454
 
10417
- var _templateObject$24, _templateObject2$1u, _templateObject3$X, _templateObject4$A;
10455
+ var _templateObject$23, _templateObject2$1s, _templateObject3$W, _templateObject4$z;
10418
10456
  var OtherDamage = function OtherDamage() {
10419
10457
  var handleSelectChange = function handleSelectChange() {
10420
10458
  console.log('Option selected');
@@ -10470,12 +10508,12 @@ var OtherDamage = function OtherDamage() {
10470
10508
  selectWrapperClass: "rounded"
10471
10509
  }))));
10472
10510
  };
10473
- var StyledAntSelect$7 = /*#__PURE__*/styled(AntSelect)(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
10474
- var Container$16 = /*#__PURE__*/styled.div(_templateObject2$1u || (_templateObject2$1u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n border: 1px solid #ccc;\n border-radius: 15px;\n padding: 10px;\n white-space: nowrap;\n"])));
10475
- var Flex$9 = /*#__PURE__*/styled.div(_templateObject3$X || (_templateObject3$X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n\n @media (max-width: 768px) {\n flex-direction: column;\n }\n"])));
10476
- var LabelWrapper$2 = /*#__PURE__*/styled.div(_templateObject4$A || (_templateObject4$A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
10511
+ var StyledAntSelect$7 = /*#__PURE__*/styled(AntSelect)(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
10512
+ var Container$16 = /*#__PURE__*/styled.div(_templateObject2$1s || (_templateObject2$1s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n border: 1px solid #ccc;\n border-radius: 15px;\n padding: 10px;\n white-space: nowrap;\n"])));
10513
+ var Flex$9 = /*#__PURE__*/styled.div(_templateObject3$W || (_templateObject3$W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n\n @media (max-width: 768px) {\n flex-direction: column;\n }\n"])));
10514
+ var LabelWrapper$2 = /*#__PURE__*/styled.div(_templateObject4$z || (_templateObject4$z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
10477
10515
 
10478
- var _templateObject$25, _templateObject2$1v, _templateObject3$Y, _templateObject4$B, _templateObject5$n;
10516
+ var _templateObject$24, _templateObject2$1t, _templateObject3$X, _templateObject4$A, _templateObject5$m;
10479
10517
  var AddDefect = function AddDefect() {
10480
10518
  var _useState = useState({
10481
10519
  actionDuring: '',
@@ -10538,13 +10576,13 @@ var AddDefect = function AddDefect() {
10538
10576
  selectWrapperClass: "rounded"
10539
10577
  }))), state.productRepacked === 'yes' && React.createElement(RepackDetails, null)));
10540
10578
  };
10541
- var StyledAntSelect$8 = /*#__PURE__*/styled(AntSelect)(_templateObject$25 || (_templateObject$25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
10542
- var Container$17 = /*#__PURE__*/styled.div(_templateObject2$1v || (_templateObject2$1v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n flex-direction: column;\n border: 1px solid #e6e6e6;\n border-radius: 15px;\n padding: 10px;\n"])));
10543
- var Flex$a = /*#__PURE__*/styled.div(_templateObject3$Y || (_templateObject3$Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n /* justify-content: space-between; */\n"])));
10544
- var LabelWrapper$3 = /*#__PURE__*/styled.div(_templateObject4$B || (_templateObject4$B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 20vw;\n"])));
10545
- var AddButton = /*#__PURE__*/styled(Button$1)(_templateObject5$n || (_templateObject5$n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 10px;\n border-radius: 30px;\n"])));
10579
+ var StyledAntSelect$8 = /*#__PURE__*/styled(AntSelect)(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
10580
+ var Container$17 = /*#__PURE__*/styled.div(_templateObject2$1t || (_templateObject2$1t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n flex-direction: column;\n border: 1px solid #e6e6e6;\n border-radius: 15px;\n padding: 10px;\n"])));
10581
+ var Flex$a = /*#__PURE__*/styled.div(_templateObject3$X || (_templateObject3$X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n /* justify-content: space-between; */\n"])));
10582
+ var LabelWrapper$3 = /*#__PURE__*/styled.div(_templateObject4$A || (_templateObject4$A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 20vw;\n"])));
10583
+ var AddButton = /*#__PURE__*/styled(Button$1)(_templateObject5$m || (_templateObject5$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 10px;\n border-radius: 30px;\n"])));
10546
10584
 
10547
- var _templateObject$26, _templateObject2$1w, _templateObject3$Z, _templateObject4$C;
10585
+ var _templateObject$25, _templateObject2$1u, _templateObject3$Y, _templateObject4$B;
10548
10586
  var QCLogs = function QCLogs() {
10549
10587
  var handleSelectChange = function handleSelectChange() {
10550
10588
  console.log('Option selected');
@@ -10565,12 +10603,12 @@ var QCLogs = function QCLogs() {
10565
10603
  selectWrapperClass: "rounded"
10566
10604
  }))), React.createElement(AddDefect, null));
10567
10605
  };
10568
- var StyledAntSelect$9 = /*#__PURE__*/styled(AntSelect)(_templateObject$26 || (_templateObject$26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
10569
- var Container$18 = /*#__PURE__*/styled.div(_templateObject2$1w || (_templateObject2$1w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n flex-direction: column;\n"])));
10570
- var Flex$b = /*#__PURE__*/styled.div(_templateObject3$Z || (_templateObject3$Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n"])));
10571
- var LabelWrapper$4 = /*#__PURE__*/styled.div(_templateObject4$C || (_templateObject4$C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 20vw;\n"])));
10606
+ var StyledAntSelect$9 = /*#__PURE__*/styled(AntSelect)(_templateObject$25 || (_templateObject$25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
10607
+ var Container$18 = /*#__PURE__*/styled.div(_templateObject2$1u || (_templateObject2$1u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n flex-direction: column;\n"])));
10608
+ var Flex$b = /*#__PURE__*/styled.div(_templateObject3$Y || (_templateObject3$Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n"])));
10609
+ var LabelWrapper$4 = /*#__PURE__*/styled.div(_templateObject4$B || (_templateObject4$B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 20vw;\n"])));
10572
10610
 
10573
- var _templateObject$27, _templateObject2$1x, _templateObject3$_, _templateObject4$D, _templateObject5$o;
10611
+ var _templateObject$26, _templateObject2$1v, _templateObject3$Z, _templateObject4$C, _templateObject5$n;
10574
10612
  function UpdateProduct() {
10575
10613
  var _orderStaticData$coll, _orderStaticData$orde, _orderStaticData$retu, _orderStaticData$orde2;
10576
10614
  var _useState = useState(),
@@ -10667,13 +10705,13 @@ function UpdateProduct() {
10667
10705
  selectWrapperClass: "rounded"
10668
10706
  }))));
10669
10707
  }
10670
- var CollectionBox = /*#__PURE__*/styled.div(_templateObject$27 || (_templateObject$27 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 32px;\n"])));
10671
- var ReturnBox = /*#__PURE__*/styled.div(_templateObject2$1x || (_templateObject2$1x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n margin-top: 32px;\n justify-content: space-between;\n"])));
10672
- var Container$19 = /*#__PURE__*/styled.div(_templateObject3$_ || (_templateObject3$_ = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10673
- var LabelWrapper$5 = /*#__PURE__*/styled.div(_templateObject4$D || (_templateObject4$D = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
10674
- var StyledAntSelect$a = /*#__PURE__*/styled(AntSelect)(_templateObject5$o || (_templateObject5$o = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10708
+ var CollectionBox = /*#__PURE__*/styled.div(_templateObject$26 || (_templateObject$26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 32px;\n"])));
10709
+ var ReturnBox = /*#__PURE__*/styled.div(_templateObject2$1v || (_templateObject2$1v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n margin-top: 32px;\n justify-content: space-between;\n"])));
10710
+ var Container$19 = /*#__PURE__*/styled.div(_templateObject3$Z || (_templateObject3$Z = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10711
+ var LabelWrapper$5 = /*#__PURE__*/styled.div(_templateObject4$C || (_templateObject4$C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
10712
+ var StyledAntSelect$a = /*#__PURE__*/styled(AntSelect)(_templateObject5$n || (_templateObject5$n = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10675
10713
 
10676
- var _templateObject$28, _templateObject2$1y, _templateObject3$$;
10714
+ var _templateObject$27, _templateObject2$1w, _templateObject3$_;
10677
10715
  function UnReceiveProduct() {
10678
10716
  var _orderStaticData$unre;
10679
10717
  var _useRecieveOrderProdu = useRecieveOrderProducts(),
@@ -10721,11 +10759,11 @@ function UnReceiveProduct() {
10721
10759
  onNotesChange: handleNotesChange
10722
10760
  })));
10723
10761
  }
10724
- var Container$1a = /*#__PURE__*/styled.div(_templateObject$28 || (_templateObject$28 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10725
- var LabelWrapper$6 = /*#__PURE__*/styled.div(_templateObject2$1y || (_templateObject2$1y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
10726
- var StyledAntSelect$b = /*#__PURE__*/styled(AntSelect)(_templateObject3$$ || (_templateObject3$$ = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10762
+ var Container$1a = /*#__PURE__*/styled.div(_templateObject$27 || (_templateObject$27 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10763
+ var LabelWrapper$6 = /*#__PURE__*/styled.div(_templateObject2$1w || (_templateObject2$1w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
10764
+ var StyledAntSelect$b = /*#__PURE__*/styled(AntSelect)(_templateObject3$_ || (_templateObject3$_ = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10727
10765
 
10728
- var _templateObject$29, _templateObject2$1z;
10766
+ var _templateObject$28, _templateObject2$1x;
10729
10767
  var ProductAction = function ProductAction() {
10730
10768
  var _useAtom = useAtom(selectedTabKeyAtom),
10731
10769
  setSelectedTabKey = _useAtom[1];
@@ -10750,10 +10788,10 @@ var ProductAction = function ProductAction() {
10750
10788
  }]
10751
10789
  }))));
10752
10790
  };
10753
- var GLobalPopupContent$2 = /*#__PURE__*/styled.div(_templateObject$29 || (_templateObject$29 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10754
- var Container$1b = /*#__PURE__*/styled.div(_templateObject2$1z || (_templateObject2$1z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n height: 50vh;\n padding-bottom: 30px;\n flex-direction: column;\n align-items: flex-start;\n gap: 20px;\n align-self: stretch;\n border-radius: 6px;\n border: 1px solid #edebe8;\n padding: 15px;\n overflow-y: scroll;\n .ant-tabs {\n width: 100%;\n }\n .ant-tabs-tab-active {\n .ant-tabs-tab-btn {\n color: #3a3630 !important;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n }\n }\n .ant-tabs-ink-bar {\n background: #feba30;\n }\n"])));
10791
+ var GLobalPopupContent$2 = /*#__PURE__*/styled.div(_templateObject$28 || (_templateObject$28 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10792
+ var Container$1b = /*#__PURE__*/styled.div(_templateObject2$1x || (_templateObject2$1x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n height: 50vh;\n padding-bottom: 30px;\n flex-direction: column;\n align-items: flex-start;\n gap: 20px;\n align-self: stretch;\n border-radius: 6px;\n border: 1px solid #edebe8;\n padding: 15px;\n overflow-y: scroll;\n .ant-tabs {\n width: 100%;\n }\n .ant-tabs-tab-active {\n .ant-tabs-tab-btn {\n color: #3a3630 !important;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n }\n }\n .ant-tabs-ink-bar {\n background: #feba30;\n }\n"])));
10755
10793
 
10756
- var _templateObject$2a;
10794
+ var _templateObject$29;
10757
10795
  var LogsTable = function LogsTable() {
10758
10796
  var options = [{
10759
10797
  value: 'bjsCouriers',
@@ -10828,9 +10866,9 @@ var LogsTable = function LogsTable() {
10828
10866
  }
10829
10867
  })));
10830
10868
  };
10831
- var GlobalPopupContent = /*#__PURE__*/styled.div(_templateObject$2a || (_templateObject$2a = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10869
+ var GlobalPopupContent = /*#__PURE__*/styled.div(_templateObject$29 || (_templateObject$29 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10832
10870
 
10833
- var _templateObject$2b, _templateObject2$1A;
10871
+ var _templateObject$2a, _templateObject2$1y;
10834
10872
  var DefectsModal = function DefectsModal() {
10835
10873
  var options = [{
10836
10874
  value: 'bjsCouriers',
@@ -10882,10 +10920,10 @@ var DefectsModal = function DefectsModal() {
10882
10920
  }
10883
10921
  }))));
10884
10922
  };
10885
- var StyledConatiner = /*#__PURE__*/styled.div(_templateObject$2b || (_templateObject$2b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* tex: nowrap; */\n"])));
10886
- var GLobalPopupContent$3 = /*#__PURE__*/styled.div(_templateObject2$1A || (_templateObject2$1A = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10923
+ var StyledConatiner = /*#__PURE__*/styled.div(_templateObject$2a || (_templateObject$2a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* tex: nowrap; */\n"])));
10924
+ var GLobalPopupContent$3 = /*#__PURE__*/styled.div(_templateObject2$1y || (_templateObject2$1y = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10887
10925
 
10888
- var _templateObject$2c;
10926
+ var _templateObject$2b;
10889
10927
  var repackModal = function repackModal() {
10890
10928
  var columns = [{
10891
10929
  key: 'packaging_type',
@@ -10915,9 +10953,9 @@ var repackModal = function repackModal() {
10915
10953
  }
10916
10954
  }))));
10917
10955
  };
10918
- var StyledConatiner$1 = /*#__PURE__*/styled.div(_templateObject$2c || (_templateObject$2c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* text-wrap: nowrap; */\n"])));
10956
+ var StyledConatiner$1 = /*#__PURE__*/styled.div(_templateObject$2b || (_templateObject$2b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* text-wrap: nowrap; */\n"])));
10919
10957
 
10920
- var _templateObject$2d, _templateObject2$1B, _templateObject3$10;
10958
+ var _templateObject$2c, _templateObject2$1z, _templateObject3$$;
10921
10959
  var _excluded$4 = ["id"];
10922
10960
  var CreateReturnModal = function CreateReturnModal() {
10923
10961
  var _useSelectedConfirmLo = useSelectedConfirmLoc(),
@@ -10997,9 +11035,9 @@ var CreateReturnModal = function CreateReturnModal() {
10997
11035
  }, displayValueOrNA(returnLoc == null ? void 0 : returnLoc.new_location)));
10998
11036
  })))));
10999
11037
  };
11000
- var StyledText$1 = /*#__PURE__*/styled.div(_templateObject$2d || (_templateObject$2d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
11001
- var Container$1c = /*#__PURE__*/styled.div(_templateObject2$1B || (_templateObject2$1B = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
11002
- var Wrapper$l = /*#__PURE__*/styled.div(_templateObject3$10 || (_templateObject3$10 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 15px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 15px;\n align-self: stretch;\n border-radius: 8px;\n background: #f8fafc;\n box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1);\n"])));
11038
+ var StyledText$1 = /*#__PURE__*/styled.div(_templateObject$2c || (_templateObject$2c = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
11039
+ var Container$1c = /*#__PURE__*/styled.div(_templateObject2$1z || (_templateObject2$1z = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
11040
+ var Wrapper$l = /*#__PURE__*/styled.div(_templateObject3$$ || (_templateObject3$$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 15px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 15px;\n align-self: stretch;\n border-radius: 8px;\n background: #f8fafc;\n box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1);\n"])));
11003
11041
 
11004
11042
  var ModalManager = function ModalManager() {
11005
11043
  var _useAtom = useAtom(countReducerAtom),
@@ -11035,11 +11073,13 @@ var ModalManager = function ModalManager() {
11035
11073
  setCheck = _useSelectedConfirmLo[1];
11036
11074
  var _useNewReturnPayload = useNewReturnPayload(),
11037
11075
  setNewPayload = _useNewReturnPayload[1];
11038
- // const [, setGrouped] = useGroupedPayload();
11076
+ var _useGroupedPayload = useGroupedPayload(),
11077
+ setGrouped = _useGroupedPayload[1];
11039
11078
  var _useSelectAll = useSelectAll(),
11040
11079
  setSelectAll = _useSelectAll[1];
11041
11080
  var _usefetchAgain = usefetchAgain(),
11042
11081
  setCallForFetch = _usefetchAgain[1];
11082
+ var navigate = useNavigate();
11043
11083
  console.log(orderProduct, 'abcabcabcabcabcabcabcabcabcabcabc');
11044
11084
  var _closeModal = function closeModal() {
11045
11085
  dispatch({
@@ -11118,14 +11158,13 @@ var ModalManager = function ModalManager() {
11118
11158
  response = _useApiHook3.data,
11119
11159
  setShouldPerformAction = _useApiHook3.setShouldPerformAction,
11120
11160
  confirmLoading = _useApiHook3.loading,
11121
- error = _useApiHook3.error,
11161
+ apiError = _useApiHook3.error,
11122
11162
  setError = _useApiHook3.setError;
11123
11163
  console.log(response, 'data'), useEffect(function () {
11124
11164
  SetPostLoading(confirmLoading);
11125
11165
  }, [confirmLoading]);
11126
11166
  var handleConfirmReturn = function handleConfirmReturn() {
11127
- // setStateCheck(!forCheck);
11128
- if (newGrouped.length > 0) {
11167
+ if ((newGrouped == null ? void 0 : newGrouped.length) > 0) {
11129
11168
  setShouldPerformAction(true);
11130
11169
  setCallForFetch(true);
11131
11170
  }
@@ -11133,35 +11172,72 @@ var ModalManager = function ModalManager() {
11133
11172
  type: 'close'
11134
11173
  });
11135
11174
  };
11175
+ // useEffect(() => {
11176
+ // console.log(error, 'error');
11177
+ // //@ts-ignore
11178
+ // if (!confirmLoading) {
11179
+ // // if (error && error.errorStatus !== 200) {
11180
+ // // console.log(error, 'errorINsodeofIFFFFFF');
11181
+ // // notification.error({
11182
+ // // message: error.errorStatus || 'Error',
11183
+ // // description: error.errorMessage || 'Something went wrong',
11184
+ // // });
11185
+ // // setError(null);
11186
+ // // }
11187
+ // //@ts-ignore
11188
+ // if (error === null && response && response?.code === 200) {
11189
+ // notification.success({
11190
+ // message: 'Success',
11191
+ // // @ts-ignore
11192
+ // description: `${response?.message}`,
11193
+ // });
11194
+ // dispatch({ type: 'close' });
11195
+ // setSelectedReturnOrder([]);
11196
+ // setCheck([]);
11197
+ // setNewPayload([]);
11198
+ // setSelectAll(false);
11199
+ // }
11200
+ // }
11201
+ // }, [confirmLoading]); //forCheck
11136
11202
  useEffect(function () {
11137
- console.log(error, 'error');
11138
- //@ts-ignore
11139
- if (!confirmLoading) {
11140
- if (error && error.errorStatus !== 200) {
11141
- console.log(error, 'errorINsodeofIFFFFFF');
11142
- notification.error({
11143
- message: error.errorStatus || 'Error',
11144
- description: error.errorMessage || 'Something went wrong'
11145
- });
11146
- setError(null);
11147
- }
11148
- //@ts-ignore
11149
- if (error === null && response && (response == null ? void 0 : response.code) === 200) {
11150
- notification.success({
11151
- message: 'Success',
11152
- // @ts-ignore
11153
- description: "" + (response == null ? void 0 : response.message)
11154
- });
11155
- dispatch({
11156
- type: 'close'
11157
- });
11158
- setSelectedReturnOrder([]);
11159
- setCheck([]);
11160
- setNewPayload([]);
11161
- setSelectAll(false);
11162
- }
11163
- }
11164
- }, [confirmLoading]); //forCheck
11203
+ // @ts-ignore
11204
+ if (apiError && (apiError == null ? void 0 : apiError.code) !== 200) {
11205
+ dispatch({
11206
+ type: 'close'
11207
+ });
11208
+ setSelectedReturnOrder([]);
11209
+ setCheck([]);
11210
+ setNewPayload([]);
11211
+ setGrouped([]);
11212
+ setSelectAll(false);
11213
+ setShouldPerformAction(false);
11214
+ notification.error({
11215
+ message: 'Failure',
11216
+ // @ts-ignore
11217
+ description: "" + (apiError == null ? void 0 : apiError.message)
11218
+ });
11219
+ setError(null);
11220
+ // @ts-ignore
11221
+ } else if ((response == null ? void 0 : response.code) === 200) {
11222
+ notification.success({
11223
+ message: 'Success',
11224
+ // @ts-ignore
11225
+ description: "" + (response == null ? void 0 : response.message)
11226
+ });
11227
+ dispatch({
11228
+ type: 'close'
11229
+ });
11230
+ setSelectedReturnOrder([]);
11231
+ setCheck([]);
11232
+ setNewPayload([]);
11233
+ setShouldPerformAction(false);
11234
+ setSelectAll(false);
11235
+ setError(null);
11236
+ navigate('/order-return');
11237
+ }
11238
+ }, [response, apiError]);
11239
+ console.log(apiError, 'apiError apiError');
11240
+ console.log(response, 'response response ');
11165
11241
  return React.createElement(React.Fragment, null, (popupName == null ? void 0 : popupName.state) == 'create-return' && React.createElement(AntModal, {
11166
11242
  openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
11167
11243
  closeModal: function closeModal() {
@@ -11256,11 +11332,11 @@ var ModalManager = function ModalManager() {
11256
11332
  }));
11257
11333
  };
11258
11334
 
11259
- var _templateObject$2e, _templateObject2$1C, _templateObject3$11, _templateObject4$E, _templateObject6$f, _templateObject7$f;
11260
- var StyledContainer = /*#__PURE__*/styled.div(_templateObject$2e || (_templateObject$2e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n padding: 0;\n max-width: 100%;\n margin-top: 11px;\n margin-bottom: 0;\n"])));
11261
- var StyledContentWrapper = /*#__PURE__*/styled.div(_templateObject2$1C || (_templateObject2$1C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 12px;\n"])));
11262
- var StyledInfoBox = /*#__PURE__*/styled.div(_templateObject3$11 || (_templateObject3$11 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #fff;\n color: #8e8a85;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0.07px;\n padding: 6px 10px;\n"])));
11263
- var StyledLabel$2 = /*#__PURE__*/styled.div(_templateObject4$E || (_templateObject4$E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8e8a85;\n\n font-size: 13px;\n font-weight: 400;\n line-height: 16px;\n display: flex;\n align-items: center;\n"])));
11335
+ var _templateObject$2d, _templateObject2$1A, _templateObject3$10, _templateObject4$D, _templateObject6$f, _templateObject7$f;
11336
+ var StyledContainer = /*#__PURE__*/styled.div(_templateObject$2d || (_templateObject$2d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n padding: 0;\n max-width: 100%;\n margin-top: 11px;\n margin-bottom: 0;\n"])));
11337
+ var StyledContentWrapper = /*#__PURE__*/styled.div(_templateObject2$1A || (_templateObject2$1A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 12px;\n"])));
11338
+ var StyledInfoBox = /*#__PURE__*/styled.div(_templateObject3$10 || (_templateObject3$10 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #fff;\n color: #8e8a85;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0.07px;\n padding: 6px 10px;\n"])));
11339
+ var StyledLabel$2 = /*#__PURE__*/styled.div(_templateObject4$D || (_templateObject4$D = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8e8a85;\n\n font-size: 13px;\n font-weight: 400;\n line-height: 16px;\n display: flex;\n align-items: center;\n"])));
11264
11340
  var StyledPaginationWrapper = /*#__PURE__*/styled.div(_templateObject6$f || (_templateObject6$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 0;\n background-color: white;\n border: 1px solid rgba(208, 213, 221, 0.5);\n border-radius: 9999px;\n"])));
11265
11341
  var StyledPaginationItem = /*#__PURE__*/styled.button(_templateObject7$f || (_templateObject7$f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n background: ", ";\n color: ", ";\n border: none;\n border-left: 1px solid rgba(208, 213, 221, 0.5);\n padding: 0.5em 1em;\n border-radius: 0;\n cursor: pointer;\n &:hover {\n background: rgba(208, 213, 221, 0.8);\n color: #000;\n }\n &:disabled {\n background: #f0f0f0;\n cursor: not-allowed;\n }\n &:first-child {\n border-radius: 100px;\n padding: 0 1em;\n display: flex;\n align-items: center;\n }\n &:last-child {\n border-radius: 0 100px 100px 0;\n padding: 0 1em;\n display: flex;\n align-items: center;\n }\n"])), function (_ref) {
11266
11342
  var active = _ref.active;
@@ -11380,7 +11456,7 @@ var Pagination = function Pagination(_ref) {
11380
11456
  }, React.createElement(NextIcon, null)))));
11381
11457
  };
11382
11458
 
11383
- var _templateObject$2f, _templateObject2$1D;
11459
+ var _templateObject$2e, _templateObject2$1B;
11384
11460
  var ReturnTable = function ReturnTable() {
11385
11461
  var _UsePaginationData = UsePaginationData(),
11386
11462
  paginationObj = _UsePaginationData[0];
@@ -11407,8 +11483,8 @@ var ReturnTable = function ReturnTable() {
11407
11483
  onItemsPerPageChange: handleItemsPerPageChange
11408
11484
  })))), React.createElement(ModalManager, null));
11409
11485
  };
11410
- var Container$1d = /*#__PURE__*/styled.div(_templateObject$2f || (_templateObject$2f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
11411
- var DashBoardWrapper$1 = /*#__PURE__*/styled.section(_templateObject2$1D || (_templateObject2$1D = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
11486
+ var Container$1d = /*#__PURE__*/styled.div(_templateObject$2e || (_templateObject$2e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
11487
+ var DashBoardWrapper$1 = /*#__PURE__*/styled.section(_templateObject2$1B || (_templateObject2$1B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
11412
11488
 
11413
11489
  function LoadIcon() {
11414
11490
  return React.createElement("svg", {
@@ -11426,7 +11502,7 @@ function LoadIcon() {
11426
11502
  }));
11427
11503
  }
11428
11504
 
11429
- var _templateObject$2g, _templateObject2$1E;
11505
+ var _templateObject$2f, _templateObject2$1C;
11430
11506
  var PrintDropDown = function PrintDropDown(_ref) {
11431
11507
  var legacyProductId = _ref.legacyProductId;
11432
11508
  var downloadFiles = function downloadFiles(label) {
@@ -11453,8 +11529,8 @@ var PrintDropDown = function PrintDropDown(_ref) {
11453
11529
  }, IconComponent && React.createElement(IconComponent, null), item.label);
11454
11530
  }));
11455
11531
  };
11456
- var OptionsList$1 = /*#__PURE__*/styled.ul(_templateObject$2g || (_templateObject$2g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n border-radius: 6px;\n border: 1px solid rgba(224, 226, 231, 0.5);\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n width: 177px;\n padding: 5px 1px 3px 1px;\n position: absolute;\n top: 34px;\n right: 0;\n z-index: 99;\n min-width: 194px;\n"])));
11457
- var OptionsListLi$1 = /*#__PURE__*/styled.li(_templateObject2$1E || (_templateObject2$1E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom: 1px solid #f0f2f2;\n padding: 8px 10px;\n display: flex;\n gap: 12px;\n align-items: center;\n font-size: 13px;\n cursor: ", ";\n color: ", ";\n &:last-child {\n border: none;\n }\n &:hover {\n background-color: ", ";\n }\n"])), function (_ref2) {
11532
+ var OptionsList$1 = /*#__PURE__*/styled.ul(_templateObject$2f || (_templateObject$2f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n border-radius: 6px;\n border: 1px solid rgba(224, 226, 231, 0.5);\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n width: 177px;\n padding: 5px 1px 3px 1px;\n position: absolute;\n top: 34px;\n right: 0;\n z-index: 99;\n min-width: 194px;\n"])));
11533
+ var OptionsListLi$1 = /*#__PURE__*/styled.li(_templateObject2$1C || (_templateObject2$1C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom: 1px solid #f0f2f2;\n padding: 8px 10px;\n display: flex;\n gap: 12px;\n align-items: center;\n font-size: 13px;\n cursor: ", ";\n color: ", ";\n &:last-child {\n border: none;\n }\n &:hover {\n background-color: ", ";\n }\n"])), function (_ref2) {
11458
11534
  var disabled = _ref2.disabled;
11459
11535
  return disabled ? 'not-allowed' : 'pointer';
11460
11536
  }, function (_ref3) {
@@ -11562,10 +11638,6 @@ var OrderTable = function OrderTable(_ref) {
11562
11638
  setOrderId = _useOrderId[1];
11563
11639
  // console.log(id, 'idid');
11564
11640
  return React.createElement(React.Fragment, null, React.createElement(StyledTableWrapper, null, React.createElement(StyledTable$1, null, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", {
11565
- className: "emailInvoiceCheckbox"
11566
- }, React.createElement(Checkbox$1, {
11567
- checked: false
11568
- })), React.createElement("th", {
11569
11641
  className: "emailInvoiceNo"
11570
11642
  }, "Created"), React.createElement("th", null, "Return Location"), React.createElement("th", null, "Pick Up Location"), React.createElement("th", null, "Recipient"), React.createElement("th", null, " Client"), React.createElement("th", null, "Consignment"), React.createElement("th", null, "Return Order No"), React.createElement("th", null, " Total Parts"), React.createElement("th", null, "Total Weight"), React.createElement("th", null, "Total CBM"), React.createElement("th", null, "Assign"), React.createElement("th", null, "Status"), React.createElement("th", {
11571
11643
  className: "emailInvoiceShare"
@@ -11591,9 +11663,7 @@ var OrderTable = function OrderTable(_ref) {
11591
11663
  var statusClass = getStatusClass(status);
11592
11664
  return React.createElement("tr", {
11593
11665
  key: item.id
11594
- }, React.createElement("td", null, React.createElement(Checkbox$1, {
11595
- checked: false
11596
- })), React.createElement("td", null, formatDate$1(new Date(item == null ? void 0 : item.created_at))), 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, displayValueOrNA(item == null ? void 0 : item.pick_up_location)), React.createElement("td", {
11666
+ }, React.createElement("td", null, formatDate$1(new Date(item == null ? void 0 : item.created_at))), 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, displayValueOrNA(item == null ? void 0 : item.pick_up_location)), React.createElement("td", {
11597
11667
  onClick: function onClick() {
11598
11668
  return setOrderId(item.id);
11599
11669
  }
@@ -11652,9 +11722,10 @@ var OrderTable = function OrderTable(_ref) {
11652
11722
  })))));
11653
11723
  };
11654
11724
 
11655
- var _templateObject$2h, _templateObject2$1F, _templateObject3$12, _templateObject4$F;
11725
+ var _templateObject$2g;
11726
+ // import DownloadIcon from '../../../../assets/icons/DownloadIcon';
11656
11727
  var TableFilters = function TableFilters() {
11657
- return React.createElement(Container$1e, null, React.createElement(StyledBulkItem, null, React.createElement(SearchType, null)), React.createElement(IconConatiner$1, null, React.createElement(Mid$1, null, React.createElement(IconText$1, null, "Export"), React.createElement(DownloadIcon, null))));
11728
+ return React.createElement(Container$1e, null);
11658
11729
  // return (
11659
11730
  // // <StyledBulkFilterCover>
11660
11731
  // <StyledBulkItem>
@@ -11668,27 +11739,7 @@ var TableFilters = function TableFilters() {
11668
11739
  // // </StyledBulkFilterCover>
11669
11740
  // );
11670
11741
  };
11671
- var Container$1e = /*#__PURE__*/styled.div(_templateObject$2h || (_templateObject$2h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
11672
- var Mid$1 = /*#__PURE__*/styled.div(_templateObject2$1F || (_templateObject2$1F = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 10px 10px 10px 10px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n /* border-radius: 15px 15px 15px 15px; */\n"])));
11673
- // const TextConatiner = styled.div`
11674
- // display: flex;
11675
- // padding: 7px 12px;
11676
- // justify-content: center;
11677
- // align-items: center;
11678
- // gap: 2px;
11679
- // border-radius: 15px;
11680
- // background: rgba(136, 128, 117, 0.35);
11681
- // `;
11682
- // const Text = styled.div`
11683
- // color: #888075;
11684
- // font-family: "'Lato";
11685
- // font-size: 14px;
11686
- // font-style: normal;
11687
- // font-weight: 600;
11688
- // line-height: 20px;
11689
- // `;
11690
- var IconConatiner$1 = /*#__PURE__*/styled.div(_templateObject3$12 || (_templateObject3$12 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* display: flex;\n height: 34px;\n padding: 4px 10px; \n align-items: flex-start;\n border-radius: 8px 8px 8px 8px; */\n\n ///working\n /* box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n background: #f0f2f2;\n border: 1px solid #e2e0db;\n display: flex;\n padding: 7px 12px;\n justify-content: center;\n align-items: center;\n gap: 2px;\n border-radius: 15px;\n height: 34px; */\n ///////\n\n display: flex;\n height: 34px;\n padding: 1px;\n align-items: flex-start;\n background: #f0f2f2;\n border: 1px solid #e2e0db;\n border-radius: 20px 20px 20px 20px;\n\n /* shadow/shadow-xs */\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n"])));
11691
- var IconText$1 = /*#__PURE__*/styled.div(_templateObject4$F || (_templateObject4$F = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n text-align: center;\n\n /* body/captions */\n font-family: 'Lato';\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n"])));
11742
+ var Container$1e = /*#__PURE__*/styled.div(_templateObject$2g || (_templateObject$2g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
11692
11743
 
11693
11744
  var FilterIcon = function FilterIcon() {
11694
11745
  return React.createElement("svg", {
@@ -11749,6 +11800,50 @@ var ClientIcon = function ClientIcon() {
11749
11800
  }));
11750
11801
  };
11751
11802
 
11803
+ var StatusIcon = function StatusIcon() {
11804
+ return React.createElement("svg", {
11805
+ xmlns: "http://www.w3.org/2000/svg",
11806
+ width: "13",
11807
+ height: "12",
11808
+ viewBox: "0 0 13 12",
11809
+ fill: "none"
11810
+ }, React.createElement("path", {
11811
+ d: "M2.60002 6V4.83333C2.60002 3.90507 2.96877 3.01483 3.62514 2.35845C4.28152 1.70208 5.17176 1.33333 6.10002 1.33333C7.02827 1.33333 7.91851 1.70208 8.57489 2.35845C9.23127 3.01483 9.60002 3.90507 9.60002 4.83333V6M1.43335 9.5C1.43335 9.80941 1.55627 10.1062 1.77506 10.325C1.99385 10.5437 2.2906 10.6667 2.60002 10.6667C2.90944 10.6667 3.20618 10.5437 3.42497 10.325C3.64377 10.1062 3.76668 9.80941 3.76668 9.5C3.76668 9.19058 3.64377 8.89383 3.42497 8.67504C3.20618 8.45625 2.90944 8.33333 2.60002 8.33333C2.2906 8.33333 1.99385 8.45625 1.77506 8.67504C1.55627 8.89383 1.43335 9.19058 1.43335 9.5ZM8.43335 9.5C8.43335 9.80941 8.55627 10.1062 8.77506 10.325C8.99385 10.5437 9.2906 10.6667 9.60002 10.6667C9.90944 10.6667 10.2062 10.5437 10.425 10.325C10.6438 10.1062 10.7667 9.80941 10.7667 9.5C10.7667 9.19058 10.6438 8.89383 10.425 8.67504C10.2062 8.45625 9.90944 8.33333 9.60002 8.33333C9.2906 8.33333 8.99385 8.45625 8.77506 8.67504C8.55627 8.89383 8.43335 9.19058 8.43335 9.5Z",
11812
+ stroke: "#6D6B68",
11813
+ "stroke-width": "2",
11814
+ "stroke-linecap": "round",
11815
+ "stroke-linejoin": "round"
11816
+ }), React.createElement("path", {
11817
+ d: "M7.8501 4.25L9.6001 6L11.3501 4.25",
11818
+ stroke: "#6D6B68",
11819
+ "stroke-width": "2",
11820
+ "stroke-linecap": "round",
11821
+ "stroke-linejoin": "round"
11822
+ }));
11823
+ };
11824
+
11825
+ var AssigneIcon = function AssigneIcon() {
11826
+ return React.createElement("svg", {
11827
+ xmlns: "http://www.w3.org/2000/svg",
11828
+ width: "15",
11829
+ height: "14",
11830
+ viewBox: "0 0 15 14",
11831
+ fill: "none"
11832
+ }, React.createElement("g", {
11833
+ "clip-path": "url(#clip0_504_13636)"
11834
+ }, React.createElement("path", {
11835
+ d: "M4.4751 1.16667H12.6418V6.70834H11.4751V2.33334H10.3084V5.61051L8.55843 4.7355L6.80843 5.61051V2.33334H5.64176V5.54167H4.4751V1.16667ZM7.9751 2.33334V3.72284L8.55843 3.43117L9.14176 3.72284V2.33334H7.9751ZM5.02051 7.72917C4.92474 7.72892 4.82985 7.74755 4.74127 7.78398C4.65269 7.82041 4.57215 7.87394 4.50426 7.9415L3.30843 9.13734V11.375H6.59085L9.97593 10.5292L12.0363 9.6495C12.1064 9.61158 12.1601 9.54908 12.1871 9.47399C12.214 9.3989 12.2123 9.31652 12.1822 9.24263C12.1521 9.16875 12.0958 9.10857 12.0241 9.07364C11.9524 9.0387 11.8703 9.03147 11.7936 9.05334L11.7819 9.05625L8.0416 9.91667H5.93343V8.75H7.75635C7.89172 8.75 8.02154 8.69623 8.11727 8.60051C8.21299 8.50479 8.26676 8.37496 8.26676 8.23959C8.26676 8.10422 8.21299 7.97439 8.11727 7.87867C8.02154 7.78295 7.89172 7.72917 7.75635 7.72917H5.02051ZM9.42585 8.40117L11.4978 7.92459C11.7185 7.86656 11.9496 7.85988 12.1732 7.90505C12.3969 7.95022 12.6072 8.04605 12.7881 8.18518C12.969 8.3243 13.1155 8.50302 13.2166 8.70762C13.3176 8.91221 13.3704 9.13724 13.3709 9.36542C13.3707 9.64241 13.2934 9.91388 13.1478 10.1495C13.0021 10.3851 12.7938 10.5755 12.5461 10.6995L12.5303 10.7077L10.3487 11.6381L6.73435 12.5417H0.100098V8.3125H2.4836L3.6806 7.1155C3.85696 6.93974 4.06622 6.80044 4.29643 6.70555C4.52663 6.61067 4.77327 6.56206 5.02226 6.5625H7.75635C7.99023 6.56247 8.22153 6.61136 8.4354 6.70603C8.64926 6.8007 8.84096 6.93905 8.99818 7.11221C9.15541 7.28536 9.27467 7.48948 9.34832 7.71146C9.42198 7.93345 9.44838 8.16838 9.42585 8.40117ZM2.14176 9.47917H1.26676V11.375H2.14176V9.47917Z",
11836
+ fill: "#6D6B68"
11837
+ })), React.createElement("defs", null, React.createElement("clipPath", {
11838
+ id: "clip0_504_13636"
11839
+ }, React.createElement("rect", {
11840
+ width: "14",
11841
+ height: "14",
11842
+ fill: "white",
11843
+ transform: "translate(0.100098)"
11844
+ }))));
11845
+ };
11846
+
11752
11847
  var initialState$2 = {
11753
11848
  'x-filters': [],
11754
11849
  'x-pagination': {
@@ -11757,6 +11852,7 @@ var initialState$2 = {
11757
11852
  }
11758
11853
  };
11759
11854
  var filterReducer$1 = function filterReducer(state, action) {
11855
+ console.log(action, 'action');
11760
11856
  switch (action.type) {
11761
11857
  case 'SET_DATE_FILTER':
11762
11858
  return _extends({}, state, {
@@ -11821,51 +11917,7 @@ var filtersReducerReturnAtom = /*#__PURE__*/atom(function (get) {
11821
11917
  return set(filtersStateAtom$1, filterReducer$1(get(filtersStateAtom$1), action));
11822
11918
  });
11823
11919
 
11824
- var StatusIcon = function StatusIcon() {
11825
- return React.createElement("svg", {
11826
- xmlns: "http://www.w3.org/2000/svg",
11827
- width: "13",
11828
- height: "12",
11829
- viewBox: "0 0 13 12",
11830
- fill: "none"
11831
- }, React.createElement("path", {
11832
- d: "M2.60002 6V4.83333C2.60002 3.90507 2.96877 3.01483 3.62514 2.35845C4.28152 1.70208 5.17176 1.33333 6.10002 1.33333C7.02827 1.33333 7.91851 1.70208 8.57489 2.35845C9.23127 3.01483 9.60002 3.90507 9.60002 4.83333V6M1.43335 9.5C1.43335 9.80941 1.55627 10.1062 1.77506 10.325C1.99385 10.5437 2.2906 10.6667 2.60002 10.6667C2.90944 10.6667 3.20618 10.5437 3.42497 10.325C3.64377 10.1062 3.76668 9.80941 3.76668 9.5C3.76668 9.19058 3.64377 8.89383 3.42497 8.67504C3.20618 8.45625 2.90944 8.33333 2.60002 8.33333C2.2906 8.33333 1.99385 8.45625 1.77506 8.67504C1.55627 8.89383 1.43335 9.19058 1.43335 9.5ZM8.43335 9.5C8.43335 9.80941 8.55627 10.1062 8.77506 10.325C8.99385 10.5437 9.2906 10.6667 9.60002 10.6667C9.90944 10.6667 10.2062 10.5437 10.425 10.325C10.6438 10.1062 10.7667 9.80941 10.7667 9.5C10.7667 9.19058 10.6438 8.89383 10.425 8.67504C10.2062 8.45625 9.90944 8.33333 9.60002 8.33333C9.2906 8.33333 8.99385 8.45625 8.77506 8.67504C8.55627 8.89383 8.43335 9.19058 8.43335 9.5Z",
11833
- stroke: "#6D6B68",
11834
- "stroke-width": "2",
11835
- "stroke-linecap": "round",
11836
- "stroke-linejoin": "round"
11837
- }), React.createElement("path", {
11838
- d: "M7.8501 4.25L9.6001 6L11.3501 4.25",
11839
- stroke: "#6D6B68",
11840
- "stroke-width": "2",
11841
- "stroke-linecap": "round",
11842
- "stroke-linejoin": "round"
11843
- }));
11844
- };
11845
-
11846
- var AssigneIcon = function AssigneIcon() {
11847
- return React.createElement("svg", {
11848
- xmlns: "http://www.w3.org/2000/svg",
11849
- width: "15",
11850
- height: "14",
11851
- viewBox: "0 0 15 14",
11852
- fill: "none"
11853
- }, React.createElement("g", {
11854
- "clip-path": "url(#clip0_504_13636)"
11855
- }, React.createElement("path", {
11856
- d: "M4.4751 1.16667H12.6418V6.70834H11.4751V2.33334H10.3084V5.61051L8.55843 4.7355L6.80843 5.61051V2.33334H5.64176V5.54167H4.4751V1.16667ZM7.9751 2.33334V3.72284L8.55843 3.43117L9.14176 3.72284V2.33334H7.9751ZM5.02051 7.72917C4.92474 7.72892 4.82985 7.74755 4.74127 7.78398C4.65269 7.82041 4.57215 7.87394 4.50426 7.9415L3.30843 9.13734V11.375H6.59085L9.97593 10.5292L12.0363 9.6495C12.1064 9.61158 12.1601 9.54908 12.1871 9.47399C12.214 9.3989 12.2123 9.31652 12.1822 9.24263C12.1521 9.16875 12.0958 9.10857 12.0241 9.07364C11.9524 9.0387 11.8703 9.03147 11.7936 9.05334L11.7819 9.05625L8.0416 9.91667H5.93343V8.75H7.75635C7.89172 8.75 8.02154 8.69623 8.11727 8.60051C8.21299 8.50479 8.26676 8.37496 8.26676 8.23959C8.26676 8.10422 8.21299 7.97439 8.11727 7.87867C8.02154 7.78295 7.89172 7.72917 7.75635 7.72917H5.02051ZM9.42585 8.40117L11.4978 7.92459C11.7185 7.86656 11.9496 7.85988 12.1732 7.90505C12.3969 7.95022 12.6072 8.04605 12.7881 8.18518C12.969 8.3243 13.1155 8.50302 13.2166 8.70762C13.3176 8.91221 13.3704 9.13724 13.3709 9.36542C13.3707 9.64241 13.2934 9.91388 13.1478 10.1495C13.0021 10.3851 12.7938 10.5755 12.5461 10.6995L12.5303 10.7077L10.3487 11.6381L6.73435 12.5417H0.100098V8.3125H2.4836L3.6806 7.1155C3.85696 6.93974 4.06622 6.80044 4.29643 6.70555C4.52663 6.61067 4.77327 6.56206 5.02226 6.5625H7.75635C7.99023 6.56247 8.22153 6.61136 8.4354 6.70603C8.64926 6.8007 8.84096 6.93905 8.99818 7.11221C9.15541 7.28536 9.27467 7.48948 9.34832 7.71146C9.42198 7.93345 9.44838 8.16838 9.42585 8.40117ZM2.14176 9.47917H1.26676V11.375H2.14176V9.47917Z",
11857
- fill: "#6D6B68"
11858
- })), React.createElement("defs", null, React.createElement("clipPath", {
11859
- id: "clip0_504_13636"
11860
- }, React.createElement("rect", {
11861
- width: "14",
11862
- height: "14",
11863
- fill: "white",
11864
- transform: "translate(0.100098)"
11865
- }))));
11866
- };
11867
-
11868
- var _templateObject$2i, _templateObject2$1G;
11920
+ var _templateObject$2h, _templateObject2$1D;
11869
11921
  var ReturnOrderFilter = function ReturnOrderFilter() {
11870
11922
  var _useAtom = useAtom(filtersReducerReturnAtom),
11871
11923
  dispatch = _useAtom[1];
@@ -11882,6 +11934,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
11882
11934
  var _useState3 = useState(),
11883
11935
  statusOrder = _useState3[0],
11884
11936
  setStatusOfOrder = _useState3[1];
11937
+ console.log(selectedClient, 'fffffselectedClient');
11885
11938
  var zoneOptions = [{
11886
11939
  label: 'Zone 1',
11887
11940
  value: 'zone1'
@@ -11910,6 +11963,11 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
11910
11963
  type: 'SET_DATE_FILTER',
11911
11964
  payload: selectedDate
11912
11965
  });
11966
+ // Reset to the first page
11967
+ dispatch({
11968
+ type: 'SET_PAGE',
11969
+ payload: 1
11970
+ });
11913
11971
  }
11914
11972
  }, [selectedDate]);
11915
11973
  //client options
@@ -11920,6 +11978,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
11920
11978
  value: option == null ? void 0 : option.id
11921
11979
  };
11922
11980
  });
11981
+ console.log(clientOptions, 'clientOptions');
11923
11982
  //status of order
11924
11983
  var orderOptions = statusOfOrder == null ? void 0 : statusOfOrder.map(function (option) {
11925
11984
  var _option$status_type, _option$status_type2;
@@ -11929,20 +11988,32 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
11929
11988
  };
11930
11989
  });
11931
11990
  var handleClientChange = function handleClientChange(value) {
11991
+ if (value === selectedClient) return;
11932
11992
  console.log(value, 'value');
11933
11993
  setSelectedClient(value);
11934
11994
  dispatch({
11935
11995
  type: 'SET_CLIENT_FILTER',
11936
- payload: selectedClient
11996
+ payload: value
11997
+ });
11998
+ // Reset to the first page
11999
+ dispatch({
12000
+ type: 'SET_PAGE',
12001
+ payload: 1
11937
12002
  });
11938
12003
  };
11939
12004
  var handleStatusOfOrder = function handleStatusOfOrder(value) {
12005
+ if (value === statusOfOrder) return;
11940
12006
  console.log(value, 'value');
11941
12007
  setStatusOfOrder(value);
11942
12008
  dispatch({
11943
12009
  type: 'SET_STATUS_ORDER_FILTER',
11944
12010
  payload: value
11945
12011
  });
12012
+ // Reset to the first page
12013
+ dispatch({
12014
+ type: 'SET_PAGE',
12015
+ payload: 1
12016
+ });
11946
12017
  };
11947
12018
  var handleClearAll = function handleClearAll() {
11948
12019
  setSelectedDate(null);
@@ -11984,8 +12055,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
11984
12055
  style: {
11985
12056
  minWidth: '130px'
11986
12057
  },
11987
- value: statusOrder,
11988
- allowClear: true
12058
+ value: statusOrder
11989
12059
  }))), React.createElement("div", {
11990
12060
  className: "datefilter"
11991
12061
  }, React.createElement("div", {
@@ -11999,8 +12069,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
11999
12069
  style: {
12000
12070
  width: '125px',
12001
12071
  border: 'none'
12002
- },
12003
- allowClear: true
12072
+ }
12004
12073
  }))), React.createElement("div", {
12005
12074
  className: "datefilter",
12006
12075
  style: {
@@ -12018,15 +12087,15 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
12018
12087
  minWidth: '100px'
12019
12088
  },
12020
12089
  disabled: true
12021
- }))), selectedDate ? React.createElement(React.Fragment, null, React.createElement(ClearAll, {
12090
+ }))), selectedDate || statusOrder || selectedClient ? React.createElement(React.Fragment, null, React.createElement(ClearAll, {
12022
12091
  onClick: handleClearAll
12023
12092
  }, React.createElement(StyledFilterBtnIcon, null, React.createElement("i", {
12024
12093
  className: "cross"
12025
12094
  })), React.createElement(StyledFilterBtnLabel, null, "Clear all"))) : null)), React.createElement(TableFilters, null)));
12026
12095
  };
12027
- var StyledDatePicker = /*#__PURE__*/styled.div(_templateObject$2i || (_templateObject$2i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
12096
+ var StyledDatePicker = /*#__PURE__*/styled.div(_templateObject$2h || (_templateObject$2h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
12028
12097
  // const DropdownContainer = styled.div``;
12029
- var StyledAntSelect$c = /*#__PURE__*/styled.div(_templateObject2$1G || (_templateObject2$1G = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-select {\n border: none;\n width: 80px;\n }\n .ant-select-selector {\n border: 1px solid #ffffff !important;\n }\n :where(.css-dev-only-do-not-override-m4timi).ant-select-single:not(.ant-select-customize-input)\n .ant-select-selector {\n padding: 0 5px;\n }\n\n :where(.css-dev-only-do-not-override-m4timi).ant-select-outlined:not(.ant-select-customize-input)\n .ant-select-selector {\n border: none;\n }\n .roundbox {\n display: flex;\n width: 18px;\n height: 18px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n left: 359px;\n position: absolute;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n top: 16px;\n }\n"])));
12098
+ var StyledAntSelect$c = /*#__PURE__*/styled.div(_templateObject2$1D || (_templateObject2$1D = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-select {\n border: none;\n width: 80px;\n }\n .ant-select-selector {\n border: 1px solid #ffffff !important;\n }\n :where(.css-dev-only-do-not-override-m4timi).ant-select-single:not(.ant-select-customize-input)\n .ant-select-selector {\n padding: 0 5px;\n }\n :where(.css-dev-only-do-not-override-m4timi).ant-select-outlined:not(.ant-select-customize-input)\n .ant-select-selector {\n border: none;\n }\n .roundbox {\n display: flex;\n width: 18px;\n height: 18px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n left: 359px;\n position: absolute;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n top: 16px;\n }\n"])));
12030
12099
 
12031
12100
  var PAGE_SIZE_OPTIONS$1 = [50, 100, 150];
12032
12101
  var MAX_PAGES_TO_SHOW$1 = 5;
@@ -12112,7 +12181,7 @@ var ReturnPagination = function ReturnPagination(_ref) {
12112
12181
  }, React.createElement(NextIcon, null)))));
12113
12182
  };
12114
12183
 
12115
- var _templateObject$2j, _templateObject2$1H;
12184
+ var _templateObject$2i, _templateObject2$1E;
12116
12185
  var _excluded$5 = ["count"];
12117
12186
  var ReturnAfterTable = function ReturnAfterTable() {
12118
12187
  var _useReturnAfterOrderD = useReturnAfterOrderData(),
@@ -12123,6 +12192,14 @@ var ReturnAfterTable = function ReturnAfterTable() {
12123
12192
  state = _useAtom[0];
12124
12193
  var filters = state['x-filters'],
12125
12194
  pagination = state['x-pagination'];
12195
+ var splitPath = function splitPath(str) {
12196
+ var _str$split;
12197
+ var parts = str == null || (_str$split = str.split('/')) == null ? void 0 : _str$split.filter(function (part) {
12198
+ return part !== '';
12199
+ }); // Filter out empty parts
12200
+ return parts;
12201
+ };
12202
+ var paths = splitPath(location.pathname);
12126
12203
  var _UsePaginationReturnD = UsePaginationReturnData(),
12127
12204
  paginationObj = _UsePaginationReturnD[0];
12128
12205
  var _useState = useState(1),
@@ -12132,6 +12209,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
12132
12209
  setItemsPerPage = _useItemsPerReturnPag[1];
12133
12210
  var _UsePaginationData = UsePaginationData(),
12134
12211
  setPaginationObject = _UsePaginationData[1];
12212
+ console.log(paths, 'paths');
12135
12213
  var page = paginationObj.page,
12136
12214
  total = paginationObj.total;
12137
12215
  var handlePageChange = function handlePageChange(page) {
@@ -12167,7 +12245,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
12167
12245
  }, [fetchedReturnOrderData, staticDataLoading]);
12168
12246
  return React.createElement("div", null, React.createElement(DashBoardWrapper$2, null, React.createElement("div", {
12169
12247
  className: "Tableconatiner"
12170
- }, React.createElement(HeaderFilter, null), React.createElement(Container$1f, null, React.createElement(ReturnOrderFilter, null), React.createElement(OrderTable, null), total > 0 && React.createElement(ReturnPagination, {
12248
+ }, React.createElement(Container$1f, null, React.createElement(ReturnOrderFilter, null), React.createElement(OrderTable, null), total > 0 && React.createElement(ReturnPagination, {
12171
12249
  currentPage: page,
12172
12250
  totalItems: total,
12173
12251
  itemsPerPage: itemsPerPage,
@@ -12175,8 +12253,29 @@ var ReturnAfterTable = function ReturnAfterTable() {
12175
12253
  onItemsPerPageChange: handleItemsPerPageChange
12176
12254
  })))));
12177
12255
  };
12178
- var Container$1f = /*#__PURE__*/styled.div(_templateObject$2j || (_templateObject$2j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -30px;\n"])));
12179
- var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject2$1H || (_templateObject2$1H = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
12256
+ var Container$1f = /*#__PURE__*/styled.div(_templateObject$2i || (_templateObject$2i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n /* top: -30px; */\n"])));
12257
+ var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject2$1E || (_templateObject2$1E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
12258
+
12259
+ var _templateObject2$1F;
12260
+ var StyledBulkItem = /*#__PURE__*/styled.div(_templateObject2$1F || (_templateObject2$1F = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 8px 12px;\n display: flex;\n align-items: center;\n /* border-right: 1px solid #d0d5dd; */\n gap: 8px;\n cursor: pointer;\n position: relative;\n\n @media screen and (max-width: 1030px) {\n padding: 8px 11px;\n }\n\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n top: 54px;\n }\n &:last-child {\n border-right: none;\n }\n &.active svg.arrowDown {\n transform: rotate(180deg);\n }\n label {\n color: #6a7378;\n text-align: center;\n font-family: 'Open Sans';\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n cursor: pointer;\n }\n\n &.noPadding {\n padding: 0;\n }\n"])));
12261
+
12262
+ var _templateObject$2j, _templateObject2$1G;
12263
+ var SearchType = function SearchType() {
12264
+ var _useState = useState(''),
12265
+ searchText = _useState[0],
12266
+ setSearchText = _useState[1];
12267
+ var handleInputChange = function handleInputChange(event) {
12268
+ setSearchText(event.target.value);
12269
+ };
12270
+ return React.createElement(Search, null, React.createElement(SearchIcon, null), React.createElement(SearchInput, {
12271
+ type: "text",
12272
+ placeholder: "Search",
12273
+ value: searchText,
12274
+ onChange: handleInputChange
12275
+ }));
12276
+ };
12277
+ var Search = /*#__PURE__*/styled.div(_templateObject$2j || (_templateObject$2j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n svg {\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n }\n"])));
12278
+ var SearchInput = /*#__PURE__*/styled.input(_templateObject2$1G || (_templateObject2$1G = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #e0e2e7;\n background: #fff;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n display: flex;\n padding: 8.5px 12px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n padding-left: 39px;\n"])));
12180
12279
 
12181
12280
  var BulkFilter = function BulkFilter() {
12182
12281
  // const [printToogle, setPrintToggle] = useMenuDropDown();
@@ -12297,66 +12396,17 @@ var ReturnTable$1 = function ReturnTable(_ref) {
12297
12396
  })))));
12298
12397
  };
12299
12398
 
12300
- // let todayDate = new Date();
12301
- var initialState$3 = {
12302
- 'x-filters': [
12303
- // {
12304
- // field: 'action_date',
12305
- // op: '>=',
12306
- // value: `${format(new Date(todayDate), 'yyyy-MM-dd')}T00:00:00+00:00`,
12307
- // },
12308
- // {
12309
- // field: 'action_date',
12310
- // op: '<=',
12311
- // value: `${format(new Date(todayDate), 'yyyy-MM-dd')}T23:59:59+00:00`,
12312
- // },
12313
- // { field: 'status', op: 'count', value: '' },
12314
- ],
12315
- 'x-pagination': {
12316
- page: 1,
12317
- per_page: 50
12318
- }
12319
- };
12320
- var filterReducer$2 = function filterReducer(state, action) {
12321
- switch (action.type) {
12322
- case 'SET_PAGE':
12323
- return _extends({}, state, {
12324
- 'x-pagination': _extends({}, state['x-pagination'], {
12325
- page: action.payload
12326
- })
12327
- });
12328
- case 'SET_PERPAGE':
12329
- return _extends({}, state, {
12330
- 'x-pagination': _extends({}, state['x-pagination'], {
12331
- per_page: action.payload
12332
- })
12333
- });
12334
- case 'CLEAR_FILTERS':
12335
- return _extends({}, state);
12336
- case 'CLEAR_ALL_FILTER':
12337
- return _extends({}, state);
12338
- default:
12339
- return state;
12340
- }
12341
- };
12342
- var filtersStateAtom$2 = /*#__PURE__*/atom(initialState$3);
12343
- var overviewfiltersReducerAtom = /*#__PURE__*/atom(function (get) {
12344
- return get(filtersStateAtom$2);
12345
- }, function (get, set, action) {
12346
- return set(filtersStateAtom$2, filterReducer$2(get(filtersStateAtom$2), action));
12347
- });
12348
-
12349
- var _templateObject$2k, _templateObject2$1I, _templateObject3$13;
12399
+ var _templateObject$2k, _templateObject2$1H, _templateObject3$11;
12400
+ // import Pagination from './table-view/Pagination';
12401
+ // import { overviewfiltersReducerAtom } from './header-filters/overViewFilter';
12350
12402
  function ReturnMainTable() {
12351
- var _useAtom = useAtom(overviewfiltersReducerAtom),
12352
- state = _useAtom[0];
12403
+ // const [state] = useAtom(overviewfiltersReducerAtom);
12353
12404
  // const [paginationObj] = UsePaginationData();
12354
12405
  // const [, setCurrentPage] = useState(1);
12355
12406
  // const [itemsPerPage, setItemsPerPage] = useItemsPerPage();
12356
- var pagination = state['x-pagination'];
12407
+ // const { 'x-pagination': pagination } = state;
12357
12408
  // const { page, total } = paginationObj;
12358
- var _useTableName = useTableName(),
12359
- selectedClient = _useTableName[0];
12409
+ // const [selectedClient] = useTableName();
12360
12410
  // const [, setPaginationObject] = UsePaginationData();
12361
12411
  var _useStickyStatus = useStickyStatus(),
12362
12412
  isScrolled = _useStickyStatus[0];
@@ -12373,7 +12423,10 @@ function ReturnMainTable() {
12373
12423
  var _useApiHook = useApiHook({
12374
12424
  endpoint: "/return_orders/get/client-returns/",
12375
12425
  method: 'GET',
12376
- pagination: pagination
12426
+ pagination: {
12427
+ page: 1,
12428
+ per_page: 200
12429
+ }
12377
12430
  }),
12378
12431
  fetchedClientData = _useApiHook.data,
12379
12432
  staticDataLoading = _useApiHook.loading;
@@ -12393,19 +12446,20 @@ function ReturnMainTable() {
12393
12446
  // }
12394
12447
  }
12395
12448
  }, [staticDataLoading]);
12449
+ var getClient = localStorage.getItem('clientName');
12396
12450
  return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper$3, {
12397
12451
  className: " " + (isScrolled ? 'stickyTableHead' : '')
12398
12452
  }, React.createElement("div", {
12399
12453
  className: "Tableconatiner"
12400
- }, React.createElement(HeaderFilter, null), React.createElement(Container$1g, null, React.createElement(Row$7, null, React.createElement(Text$7, null, "Client Return"), selectedClient ? React.createElement(ReturnFilter, null) : React.createElement(Filters, null)), React.createElement(ReturnTable$1, null)))));
12454
+ }, React.createElement(HeaderFilter, null), React.createElement(Container$1g, null, React.createElement(Row$7, null, React.createElement(Text$7, null, "Client Return"), getClient ? React.createElement(ReturnFilter, null) : React.createElement(Filters, null)), React.createElement(ReturnTable$1, null)))));
12401
12455
  }
12402
12456
  var Row$7 = /*#__PURE__*/styled.div(_templateObject$2k || (_templateObject$2k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
12403
- var Container$1g = /*#__PURE__*/styled.div(_templateObject2$1I || (_templateObject2$1I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
12404
- var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject3$13 || (_templateObject3$13 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
12457
+ var Container$1g = /*#__PURE__*/styled.div(_templateObject2$1H || (_templateObject2$1H = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
12458
+ var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject3$11 || (_templateObject3$11 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
12405
12459
 
12406
- var _templateObject$2l, _templateObject2$1J;
12460
+ var _templateObject$2l, _templateObject2$1I;
12407
12461
  var HeaderWrapper = /*#__PURE__*/styled.div(_templateObject$2l || (_templateObject$2l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 20px;\n gap: 10px;\n border-radius: 0px 0px 30px 30px;\n background: #313130;\n height: 151px;\n background: url(./assets/bgBlack.png) no-repeat;\n background-size: cover;\n background-color: #000000d9;\n"])));
12408
- var StyledFlex = /*#__PURE__*/styled.div(_templateObject2$1J || (_templateObject2$1J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
12462
+ var StyledFlex = /*#__PURE__*/styled.div(_templateObject2$1I || (_templateObject2$1I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
12409
12463
 
12410
12464
  var _templateObject$2m;
12411
12465
  var HeaderTitle = function HeaderTitle(props) {
@@ -12413,12 +12467,12 @@ var HeaderTitle = function HeaderTitle(props) {
12413
12467
  };
12414
12468
  var Title$7 = /*#__PURE__*/styled.h2(_templateObject$2m || (_templateObject$2m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0px;\n padding: 0px;\n color: #fff;\n font-size: 26px;\n font-style: normal;\n font-weight: 700;\n line-height: 36px;\n text-transform: uppercase;\n margin-bottom: 8px;\n"])));
12415
12469
 
12416
- var _templateObject$2n, _templateObject2$1K;
12470
+ var _templateObject$2n, _templateObject2$1J;
12417
12471
  function Breadcrumb(props) {
12418
12472
  return React.createElement(BreadcrumbContainer, null, React.createElement(BreadcrumbList, null, props.title || ''), React.createElement(BreadcrumbList, null, props.subtitle || ''), props.subPart && React.createElement(React.Fragment, null, React.createElement(BreadcrumbList, null, props.subPart)));
12419
12473
  }
12420
12474
  var BreadcrumbContainer = /*#__PURE__*/styled.div(_templateObject$2n || (_templateObject$2n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n"])));
12421
- var BreadcrumbList = /*#__PURE__*/styled.span(_templateObject2$1K || (_templateObject2$1K = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #edebe8;\n font-family: 'Open Sans', sans-serif;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n"])));
12475
+ var BreadcrumbList = /*#__PURE__*/styled.span(_templateObject2$1J || (_templateObject2$1J = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #edebe8;\n font-family: 'Open Sans', sans-serif;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n"])));
12422
12476
 
12423
12477
  var RouterHeader = function RouterHeader(_ref) {
12424
12478
  var _ref$breadcrumbTitle = _ref.breadcrumbTitle,
@@ -12440,6 +12494,7 @@ var RouterHeader = function RouterHeader(_ref) {
12440
12494
  })))));
12441
12495
  };
12442
12496
 
12497
+ // import { filtersReducerAtom } from './components/order-daily-overview/header-filters/filterStore';
12443
12498
  function ReturnClient() {
12444
12499
  var _selectedClientString;
12445
12500
  notification.config({
@@ -12453,12 +12508,24 @@ function ReturnClient() {
12453
12508
  var navigate = useNavigate();
12454
12509
  var selectedClientString = selectedClient == null ? void 0 : selectedClient.replace(/\s+/g, '-');
12455
12510
  selectedClientString = (_selectedClientString = selectedClientString) == null ? void 0 : _selectedClientString.toLowerCase();
12511
+ var _useCustomerData = useCustomerData(),
12512
+ setCustomers = _useCustomerData[1];
12513
+ var _useActionType = useActionType(),
12514
+ setActionType = _useActionType[1];
12515
+ var _useLocationData = useLocationData(),
12516
+ setLocationData = _useLocationData[1];
12517
+ var _useStatusOrderData = useStatusOrderData(),
12518
+ setStatusOfOrders = _useStatusOrderData[1];
12519
+ // const [, dispatch] = useAtom(filtersReducerAtom);
12456
12520
  console.log(selectedClientString, 'selectedClient');
12457
12521
  console.log("../filter/:" + selectedClientString);
12458
12522
  useEffect(function () {
12459
- if (!location.pathname.includes('/filter')) {
12523
+ if (location.pathname.includes('/returnClient')) {
12460
12524
  localStorage.removeItem('clientName');
12461
12525
  localStorage.removeItem('clientId');
12526
+ localStorage.removeItem('uuid');
12527
+ localStorage.removeItem('customer_id');
12528
+ // dispatch({ type: 'CLEAR_CLIENT', payload: [] });
12462
12529
  }
12463
12530
  }, [location.pathname]);
12464
12531
  useEffect(function () {
@@ -12467,6 +12534,56 @@ function ReturnClient() {
12467
12534
  navigate("filter/" + _selectedClientString2);
12468
12535
  }
12469
12536
  }, [selectedClient]);
12537
+ //API for client data
12538
+ var _useApiHook = useApiHook({
12539
+ endpoint: "/customers/",
12540
+ method: 'GET',
12541
+ //@ts-ignore
12542
+ pagination: {
12543
+ is_pagination: false
12544
+ }
12545
+ }),
12546
+ fetchedCustomerData = _useApiHook.data,
12547
+ loading = _useApiHook.loading;
12548
+ //API for action type
12549
+ var _useApiHook2 = useApiHook({
12550
+ endpoint: "/orders/getStaticData/all/",
12551
+ method: 'GET'
12552
+ }),
12553
+ fetchedStaticData = _useApiHook2.data,
12554
+ actionLoading = _useApiHook2.loading;
12555
+ //API for return locations
12556
+ var _useApiHook3 = useApiHook({
12557
+ endpoint: "/return_locations/",
12558
+ method: 'GET',
12559
+ //@ts-ignore
12560
+ pagination: {
12561
+ is_pagination: false
12562
+ }
12563
+ }),
12564
+ fetchedLocationData = _useApiHook3.data,
12565
+ locationloading = _useApiHook3.loading;
12566
+ useEffect(function () {
12567
+ if (fetchedCustomerData && fetchedCustomerData != null && fetchedCustomerData.data) {
12568
+ setCustomers(fetchedCustomerData == null ? void 0 : fetchedCustomerData.data);
12569
+ }
12570
+ }, [loading]);
12571
+ useEffect(function () {
12572
+ if (fetchedStaticData && fetchedStaticData != null && fetchedStaticData.data) {
12573
+ var _fetchedStaticData$da, _fetchedStaticData$da2;
12574
+ setActionType(fetchedStaticData == null || (_fetchedStaticData$da = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da.flatMap(function (i) {
12575
+ return i == null ? void 0 : i.order_product_return_action;
12576
+ }));
12577
+ setStatusOfOrders(fetchedStaticData == null || (_fetchedStaticData$da2 = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da2.flatMap(function (i) {
12578
+ return i == null ? void 0 : i.order_stock_alias;
12579
+ }));
12580
+ }
12581
+ }, [actionLoading]);
12582
+ useEffect(function () {
12583
+ if (fetchedLocationData && fetchedLocationData != null && fetchedLocationData.data) {
12584
+ setLocationData(fetchedLocationData == null ? void 0 : fetchedLocationData.data);
12585
+ }
12586
+ }, [locationloading]);
12470
12587
  return React.createElement(React.Fragment, null, React.createElement(RouterHeader, null), React.createElement(Suspense, {
12471
12588
  fallback: React.createElement(LoadingMessage, null)
12472
12589
  }, React.createElement(Routes, null, React.createElement(Route, {