@bjsdistribution/dms-client-return 0.0.91 → 0.0.93

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.
@@ -1321,22 +1321,21 @@ var ReturnFilter = function ReturnFilter() {
1321
1321
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledFiter, null, React__default.createElement(Text, null, customerName), React__default.createElement(StyledFIlterELements, null, React__default.createElement(StyledTableFilter, null)), React__default.createElement(RightFilters, null)));
1322
1322
  };
1323
1323
 
1324
- var _templateObject$3, _templateObject2$1, _templateObject3$1, _templateObject4$1, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
1325
- var ColumStyle = /*#__PURE__*/styled__default.div(_templateObject$3 || (_templateObject$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 67px;\n align-items: center;\n gap: 7px;\n"])));
1326
- var GreyBox = /*#__PURE__*/styled__default.div(_templateObject2$1 || (_templateObject2$1 = /*#__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"])));
1327
- // Styled components
1328
- var StyledTableWrapper = /*#__PURE__*/styled__default.div(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\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"])));
1329
- var StyledTable = /*#__PURE__*/styled__default.table(_templateObject4$1 || (_templateObject4$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n position: sticky;\n top: 10px;\n z-index: 1;\n background: #fff;\n box-shadow: 0px 0px 1px #ffffff, 0px -10px 1px #ffffff;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n font-family: 'lato', sans-serif;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .emailInvoiceNo {\n padding-left: 12px;\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 max-height: 400px;\n overflow-y: auto;\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"])));
1330
- var EmptyDataContainer = /*#__PURE__*/styled__default.div(_templateObject34 || (_templateObject34 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
1331
- var ClearAll = /*#__PURE__*/styled__default.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"])));
1332
- var StyledFilterBtnIcon = /*#__PURE__*/styled__default.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: #b2b3b3;\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"])));
1333
- var StyledFilterBtnLabel = /*#__PURE__*/styled__default.div(_templateObject37 || (_templateObject37 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n white-space: nowrap;\n"])));
1334
-
1335
- var _templateObject19, _templateObject20, _templateObject21;
1336
- var StyledTable$1 = /*#__PURE__*/styled__default.table(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n white-space: nowrap;\n position: sticky;\n top: 10px;\n z-index: 1;\n background: #fff;\n box-shadow: 0px 0px 1px #ffffff, 0px -10px 1px #ffffff;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n position: relative;\n font-family: 'lato', sans-serif;\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 .sortIconClass {\n cursor: pointer;\n display: flex;\n }\n }\n }\n }\n tbody {\n max-height: 400px;\n overflow-y: auto;\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"])));
1337
- // Styled components
1338
- var StyledTableWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-height: 60vh;\n overflow-x: auto;\n // min-height: 50vh;\n\n .fortables {\n max-height: 60vh;\n overflow-x: auto;\n min-height: 50vh;\n }\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"])));
1339
- var CustomDrop = /*#__PURE__*/styled__default.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"])));
1324
+ function DownIcon() {
1325
+ return React__default.createElement("svg", {
1326
+ xmlns: "http://www.w3.org/2000/svg",
1327
+ width: "18",
1328
+ height: "18",
1329
+ viewBox: "0 0 18 18",
1330
+ fill: "none"
1331
+ }, React__default.createElement("path", {
1332
+ opacity: "0.4",
1333
+ fillRule: "evenodd",
1334
+ clipRule: "evenodd",
1335
+ d: "M5.0184 7.41839C5.11965 7.31727 5.2569 7.26047 5.4 7.26047C5.5431 7.26047 5.68035 7.31727 5.7816 7.41839L9 10.6368L12.2184 7.41839C12.3208 7.32301 12.4562 7.27108 12.5961 7.27355C12.736 7.27601 12.8694 7.33269 12.9684 7.43162C13.0673 7.53056 13.124 7.66404 13.1264 7.80394C13.1289 7.94383 13.077 8.07923 12.9816 8.18159L9.3816 11.7816C9.28035 11.8827 9.1431 11.9395 9 11.9395C8.8569 11.9395 8.71965 11.8827 8.6184 11.7816L5.0184 8.18159C4.91727 8.08034 4.86047 7.94309 4.86047 7.79999C4.86047 7.65689 4.91727 7.51964 5.0184 7.41839Z",
1336
+ fill: "#3A3630"
1337
+ }));
1338
+ }
1340
1339
 
1341
1340
  var PrinterIcon = function PrinterIcon() {
1342
1341
  return React__default.createElement("svg", {
@@ -1351,22 +1350,43 @@ var PrinterIcon = function PrinterIcon() {
1351
1350
  }));
1352
1351
  };
1353
1352
 
1354
- function DownIcon() {
1355
- return React__default.createElement("svg", {
1356
- xmlns: "http://www.w3.org/2000/svg",
1357
- width: "18",
1358
- height: "18",
1353
+ function CaretDownFilledIcon(props) {
1354
+ return React__default.createElement("svg", Object.assign({
1355
+ width: "16",
1356
+ height: "16",
1359
1357
  viewBox: "0 0 18 18",
1360
- fill: "none"
1358
+ fill: "none",
1359
+ xmlns: "http://www.w3.org/2000/svg"
1360
+ }, props), React__default.createElement("g", {
1361
+ "clip-path": "url(#clip0_2034_435)"
1361
1362
  }, React__default.createElement("path", {
1362
- opacity: "0.4",
1363
- fillRule: "evenodd",
1364
- clipRule: "evenodd",
1365
- d: "M5.0184 7.41839C5.11965 7.31727 5.2569 7.26047 5.4 7.26047C5.5431 7.26047 5.68035 7.31727 5.7816 7.41839L9 10.6368L12.2184 7.41839C12.3208 7.32301 12.4562 7.27108 12.5961 7.27355C12.736 7.27601 12.8694 7.33269 12.9684 7.43162C13.0673 7.53056 13.124 7.66404 13.1264 7.80394C13.1289 7.94383 13.077 8.07923 12.9816 8.18159L9.3816 11.7816C9.28035 11.8827 9.1431 11.9395 9 11.9395C8.8569 11.9395 8.71965 11.8827 8.6184 11.7816L5.0184 8.18159C4.91727 8.08034 4.86047 7.94309 4.86047 7.79999C4.86047 7.65689 4.91727 7.51964 5.0184 7.41839Z",
1366
- fill: "#3A3630"
1367
- }));
1363
+ d: "M13.5 6.75C14.139 6.75 14.4727 7.4895 14.0872 7.96725L14.0302 8.03025L9.53021 12.5303C9.40107 12.6594 9.22924 12.737 9.04698 12.7484C8.86471 12.7599 8.68452 12.7044 8.54021 12.5925L8.46971 12.5303L3.96972 8.03025L3.90746 7.95975L3.86697 7.902L3.82647 7.83L3.81371 7.803L3.79347 7.75275L3.76946 7.67175L3.76196 7.632L3.75446 7.587L3.75146 7.54425V7.45575L3.75521 7.41225L3.76196 7.36725L3.76946 7.32825L3.79347 7.24725L3.81371 7.197L3.86622 7.098L3.91496 7.0305L3.96972 6.96975L4.04021 6.9075L4.09797 6.867L4.16996 6.8265L4.19697 6.81375L4.24721 6.7935L4.32821 6.7695L4.36796 6.762L4.41296 6.7545L4.45571 6.7515L13.5 6.75Z",
1364
+ fill: "#9E9E9E"
1365
+ })), React__default.createElement("defs", null, React__default.createElement("clipPath", {
1366
+ id: "clip0_2034_435"
1367
+ }, React__default.createElement("rect", {
1368
+ width: "16",
1369
+ height: "16",
1370
+ fill: "white"
1371
+ }))));
1368
1372
  }
1369
1373
 
1374
+ var SortIcon = function SortIcon() {
1375
+ return React__default.createElement("svg", {
1376
+ width: "16",
1377
+ height: "17",
1378
+ viewBox: "0 0 16 17",
1379
+ fill: "none",
1380
+ xmlns: "http://www.w3.org/2000/svg"
1381
+ }, React__default.createElement("g", {
1382
+ id: "bxs:sort-alt"
1383
+ }, React__default.createElement("path", {
1384
+ id: "Vector",
1385
+ d: "M4.15138 7.83335H11.8494C12.424 7.83335 12.7294 7.15335 12.3474 6.72335L8.49871 2.39335C8.43628 2.32288 8.35961 2.26647 8.27377 2.22783C8.18792 2.1892 8.09485 2.16922 8.00071 2.16922C7.90657 2.16922 7.8135 2.1892 7.72766 2.22783C7.64181 2.26647 7.56514 2.32288 7.50271 2.39335L3.65271 6.72335C3.27071 7.15335 3.57604 7.83335 4.15138 7.83335ZM7.50204 14.606C7.56447 14.6765 7.64114 14.7329 7.72699 14.7715C7.81284 14.8102 7.9059 14.8301 8.00004 14.8301C8.09418 14.8301 8.18725 14.8102 8.2731 14.7715C8.35895 14.7329 8.43562 14.6765 8.49804 14.606L12.3467 10.276C12.7294 9.84668 12.424 9.16668 11.8487 9.16668H4.15138C3.57671 9.16668 3.27138 9.84668 3.65338 10.2767L7.50204 14.606Z",
1386
+ fill: "#9E9E9E"
1387
+ })));
1388
+ };
1389
+
1370
1390
  var CollectionLabelIcon = function CollectionLabelIcon() {
1371
1391
  return React__default.createElement("svg", {
1372
1392
  xmlns: "http://www.w3.org/2000/svg",
@@ -1525,7 +1545,7 @@ var optionsForReturnPrint = [{
1525
1545
  label: 'Print Return Labels'
1526
1546
  }];
1527
1547
 
1528
- var _templateObject$4, _templateObject2$2;
1548
+ var _templateObject$3, _templateObject2$1;
1529
1549
  var options = optionsForReturnPrint;
1530
1550
  var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
1531
1551
  var legacyURL = _ref.legacyURL,
@@ -1546,8 +1566,8 @@ var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
1546
1566
  }, IconComponent && React__default.createElement(IconComponent, null), " ", item.label);
1547
1567
  }));
1548
1568
  };
1549
- var OptionsList = /*#__PURE__*/styled__default.ul(_templateObject$4 || (_templateObject$4 = /*#__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"])));
1550
- var OptionsListLi = /*#__PURE__*/styled__default.li(_templateObject2$2 || (_templateObject2$2 = /*#__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 pointer-events: ", ";\n background-color: ", ";\n\n &:last-child {\n border: none;\n }\n"])), function (_ref2) {
1569
+ var OptionsList = /*#__PURE__*/styled__default.ul(_templateObject$3 || (_templateObject$3 = /*#__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"])));
1570
+ var OptionsListLi = /*#__PURE__*/styled__default.li(_templateObject2$1 || (_templateObject2$1 = /*#__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 pointer-events: ", ";\n background-color: ", ";\n\n &:last-child {\n border: none;\n }\n"])), function (_ref2) {
1551
1571
  var disabled = _ref2.disabled;
1552
1572
  return disabled ? 'not-allowed' : 'pointer';
1553
1573
  }, function (_ref3) {
@@ -1561,42 +1581,22 @@ var OptionsListLi = /*#__PURE__*/styled__default.li(_templateObject2$2 || (_temp
1561
1581
  return disabled ? '#f5f5f5' : 'transparent';
1562
1582
  });
1563
1583
 
1564
- function CaretDownFilledIcon(props) {
1565
- return React__default.createElement("svg", Object.assign({
1566
- width: "16",
1567
- height: "16",
1568
- viewBox: "0 0 18 18",
1569
- fill: "none",
1570
- xmlns: "http://www.w3.org/2000/svg"
1571
- }, props), React__default.createElement("g", {
1572
- "clip-path": "url(#clip0_2034_435)"
1573
- }, React__default.createElement("path", {
1574
- d: "M13.5 6.75C14.139 6.75 14.4727 7.4895 14.0872 7.96725L14.0302 8.03025L9.53021 12.5303C9.40107 12.6594 9.22924 12.737 9.04698 12.7484C8.86471 12.7599 8.68452 12.7044 8.54021 12.5925L8.46971 12.5303L3.96972 8.03025L3.90746 7.95975L3.86697 7.902L3.82647 7.83L3.81371 7.803L3.79347 7.75275L3.76946 7.67175L3.76196 7.632L3.75446 7.587L3.75146 7.54425V7.45575L3.75521 7.41225L3.76196 7.36725L3.76946 7.32825L3.79347 7.24725L3.81371 7.197L3.86622 7.098L3.91496 7.0305L3.96972 6.96975L4.04021 6.9075L4.09797 6.867L4.16996 6.8265L4.19697 6.81375L4.24721 6.7935L4.32821 6.7695L4.36796 6.762L4.41296 6.7545L4.45571 6.7515L13.5 6.75Z",
1575
- fill: "#9E9E9E"
1576
- })), React__default.createElement("defs", null, React__default.createElement("clipPath", {
1577
- id: "clip0_2034_435"
1578
- }, React__default.createElement("rect", {
1579
- width: "16",
1580
- height: "16",
1581
- fill: "white"
1582
- }))));
1583
- }
1584
+ var _templateObject$4, _templateObject2$2, _templateObject3$1, _templateObject4$1, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
1585
+ var ColumStyle = /*#__PURE__*/styled__default.div(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 67px;\n align-items: center;\n gap: 7px;\n"])));
1586
+ var GreyBox = /*#__PURE__*/styled__default.div(_templateObject2$2 || (_templateObject2$2 = /*#__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"])));
1587
+ // Styled components
1588
+ var StyledTableWrapper = /*#__PURE__*/styled__default.div(_templateObject3$1 || (_templateObject3$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\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"])));
1589
+ var StyledTable = /*#__PURE__*/styled__default.table(_templateObject4$1 || (_templateObject4$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n position: sticky;\n top: 10px;\n z-index: 1;\n background: #fff;\n box-shadow: 0px 0px 1px #ffffff, 0px -10px 1px #ffffff;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n font-family: 'lato', sans-serif;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .emailInvoiceNo {\n padding-left: 12px;\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 max-height: 400px;\n overflow-y: auto;\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"])));
1590
+ var EmptyDataContainer = /*#__PURE__*/styled__default.div(_templateObject34 || (_templateObject34 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
1591
+ var ClearAll = /*#__PURE__*/styled__default.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"])));
1592
+ var StyledFilterBtnIcon = /*#__PURE__*/styled__default.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: #b2b3b3;\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"])));
1593
+ var StyledFilterBtnLabel = /*#__PURE__*/styled__default.div(_templateObject37 || (_templateObject37 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #6a7378;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n white-space: nowrap;\n"])));
1584
1594
 
1585
- var SortIcon = function SortIcon() {
1586
- return React__default.createElement("svg", {
1587
- width: "16",
1588
- height: "17",
1589
- viewBox: "0 0 16 17",
1590
- fill: "none",
1591
- xmlns: "http://www.w3.org/2000/svg"
1592
- }, React__default.createElement("g", {
1593
- id: "bxs:sort-alt"
1594
- }, React__default.createElement("path", {
1595
- id: "Vector",
1596
- d: "M4.15138 7.83335H11.8494C12.424 7.83335 12.7294 7.15335 12.3474 6.72335L8.49871 2.39335C8.43628 2.32288 8.35961 2.26647 8.27377 2.22783C8.18792 2.1892 8.09485 2.16922 8.00071 2.16922C7.90657 2.16922 7.8135 2.1892 7.72766 2.22783C7.64181 2.26647 7.56514 2.32288 7.50271 2.39335L3.65271 6.72335C3.27071 7.15335 3.57604 7.83335 4.15138 7.83335ZM7.50204 14.606C7.56447 14.6765 7.64114 14.7329 7.72699 14.7715C7.81284 14.8102 7.9059 14.8301 8.00004 14.8301C8.09418 14.8301 8.18725 14.8102 8.2731 14.7715C8.35895 14.7329 8.43562 14.6765 8.49804 14.606L12.3467 10.276C12.7294 9.84668 12.424 9.16668 11.8487 9.16668H4.15138C3.57671 9.16668 3.27138 9.84668 3.65338 10.2767L7.50204 14.606Z",
1597
- fill: "#9E9E9E"
1598
- })));
1599
- };
1595
+ var _templateObject19, _templateObject20, _templateObject21;
1596
+ var StyledTable$1 = /*#__PURE__*/styled__default.table(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n white-space: nowrap;\n position: sticky;\n top: 10px;\n z-index: 1;\n background: #fff;\n box-shadow: 0px 0px 1px #ffffff, 0px -10px 1px #ffffff;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n position: relative;\n font-family: 'lato', sans-serif;\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 .sortIconClass {\n cursor: pointer;\n display: flex;\n }\n }\n }\n }\n tbody {\n max-height: 400px;\n overflow-y: auto;\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"])));
1597
+ // Styled components
1598
+ var StyledTableWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n max-height: 60vh;\n overflow-x: auto;\n // min-height: 50vh;\n\n .fortables {\n max-height: 60vh;\n overflow-x: auto;\n min-height: 50vh;\n }\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"])));
1599
+ var CustomDrop = /*#__PURE__*/styled__default.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"])));
1600
1600
 
1601
1601
  var _excluded = ["count"];
1602
1602
  var ReturnOrderTable = function ReturnOrderTable() {
@@ -1616,7 +1616,6 @@ var ReturnOrderTable = function ReturnOrderTable() {
1616
1616
  var _useLoading = useLoading(),
1617
1617
  load = _useLoading[0],
1618
1618
  setLoading = _useLoading[1];
1619
- // const [postLoading] = usePostLoading();
1620
1619
  var dropdownRefParent = React.useRef(null);
1621
1620
  var dropdownRef = React.useRef(null);
1622
1621
  var _usePrintOptionTOggle = usePrintOptionTOggle(),
@@ -1746,12 +1745,14 @@ var ReturnOrderTable = function ReturnOrderTable() {
1746
1745
  // setShouldPerformAction(false);
1747
1746
  }, [fetchedOrderData, returnDataLoad, locationData, state, callForFetch]);
1748
1747
  var handleSelectAll = function handleSelectAll(e) {
1749
- setSelectAll(e.target.checked);
1750
- if (e.target.checked) {
1751
- setSelectedReturnOrder(returnData == null ? void 0 : returnData.filter(function (loc) {
1748
+ var isChecked = e.target.checked;
1749
+ setSelectAll(isChecked);
1750
+ if (isChecked) {
1751
+ var filteredData = returnData == null ? void 0 : returnData.filter(function (loc) {
1752
1752
  var _loc$order_product_re;
1753
1753
  return (loc == null || (_loc$order_product_re = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re.type) === 'RTS';
1754
- }).map(function (loc) {
1754
+ });
1755
+ var selectedOrders = filteredData.map(function (loc) {
1755
1756
  return {
1756
1757
  id: loc.id,
1757
1758
  return_locations: loc == null ? void 0 : loc.return_locations,
@@ -1760,30 +1761,27 @@ var ReturnOrderTable = function ReturnOrderTable() {
1760
1761
  order_product_return_action: loc == null ? void 0 : loc.order_product_return_action,
1761
1762
  return_location_token: loc == null ? void 0 : loc.return_location
1762
1763
  };
1763
- }));
1764
- setNewPayload(returnData == null ? void 0 : returnData.filter(function (loc) {
1764
+ });
1765
+ var newPayload = filteredData.map(function (loc) {
1765
1766
  var _loc$order_product_re2;
1766
- return (loc == null || (_loc$order_product_re2 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re2.type) === 'RTS';
1767
- }).map(function (loc) {
1768
- var _loc$order_product_re3;
1769
1767
  return {
1770
1768
  id: loc.id,
1771
1769
  account_number: createReturn == null ? void 0 : createReturn.account_number,
1772
1770
  customer_id: +(createReturn == null ? void 0 : createReturn.customer_id),
1773
1771
  products: [loc == null ? void 0 : loc.legacy_product_id],
1774
- return_action: loc == null || (_loc$order_product_re3 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re3.type,
1772
+ return_action: loc == null || (_loc$order_product_re2 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re2.type,
1775
1773
  return_location_token: (loc == null ? void 0 : loc.return_location) || null
1776
1774
  };
1777
- }));
1775
+ });
1776
+ setSelectedReturnOrder(selectedOrders);
1777
+ setNewPayload(newPayload);
1778
1778
  } else {
1779
1779
  setSelectedReturnOrder([]);
1780
1780
  setNewPayload([]);
1781
1781
  setGrouped([]);
1782
1782
  }
1783
1783
  };
1784
- var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action,
1785
- // new_location: any,
1786
- legacy_product_id) {
1784
+ var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action, legacy_product_id) {
1787
1785
  setSelectedReturnOrder(function (prevSelectedLocations) {
1788
1786
  var isSelected = prevSelectedLocations == null ? void 0 : prevSelectedLocations.some(function (loc) {
1789
1787
  return loc.id === id;
@@ -1804,32 +1802,32 @@ var ReturnOrderTable = function ReturnOrderTable() {
1804
1802
  return item.id !== id;
1805
1803
  });
1806
1804
  });
1805
+ setSelectAll(false); // Ensure "select all" is false if one is deselected
1807
1806
  return updatedSelectedLocations;
1808
1807
  } else {
1808
+ var _returnData$filter;
1809
1809
  var newReturnPayload = {
1810
1810
  id: id,
1811
1811
  account_number: createReturn == null ? void 0 : createReturn.account_number,
1812
1812
  customer_id: +(createReturn == null ? void 0 : createReturn.customer_id),
1813
1813
  products: [legacy_product_id],
1814
- return_action: order_product_return_action != null && order_product_return_action.type ? [order_product_return_action.type] : null,
1814
+ return_action: (order_product_return_action == null ? void 0 : order_product_return_action.type) || null,
1815
1815
  return_location_token: return_location || null
1816
1816
  };
1817
1817
  setNewPayload(function (prevPayload) {
1818
1818
  return [].concat(prevPayload, [newReturnPayload]);
1819
1819
  });
1820
- setReturnPayload(function (prevState) {
1821
- return _extends({}, prevState, {
1822
- products: legacy_product_id,
1823
- return_action: (order_product_return_action == null ? void 0 : order_product_return_action.type) || null,
1824
- return_location_token: return_location || null
1825
- });
1826
- });
1827
- return [].concat(prevSelectedLocations, [{
1820
+ var _updatedSelectedLocations = [].concat(prevSelectedLocations, [{
1828
1821
  id: id,
1829
1822
  return_location: return_location,
1830
1823
  return_locations: return_locations,
1831
1824
  order_product_return_action: order_product_return_action
1832
1825
  }]);
1826
+ setSelectAll((_updatedSelectedLocations == null ? void 0 : _updatedSelectedLocations.length) === (returnData == null || (_returnData$filter = returnData.filter(function (loc) {
1827
+ var _loc$order_product_re3;
1828
+ return (loc == null || (_loc$order_product_re3 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re3.type) === 'RTS';
1829
+ })) == null ? void 0 : _returnData$filter.length));
1830
+ return _updatedSelectedLocations;
1833
1831
  }
1834
1832
  });
1835
1833
  };
@@ -1912,17 +1910,15 @@ var ReturnOrderTable = function ReturnOrderTable() {
1912
1910
  var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$return_location, _item$order_data, _item$order_data2, _item$order_product_r3, _item$return_reasons, _item$order_product_r4, _item$order_product_r5, _item$collection_reas;
1913
1911
  return React__default.createElement("tr", {
1914
1912
  key: item.id
1915
- }, React__default.createElement("td", null, (item == null || (_item$order_product_r2 = item.order_product_return_action) == null ? void 0 : _item$order_product_r2.type) == 'RTS' ? React__default.createElement(React__default.Fragment, null, React__default.createElement(dmsComponentLibrary.Checkbox, {
1913
+ }, React__default.createElement("td", null, (item == null || (_item$order_product_r2 = item.order_product_return_action) == null ? void 0 : _item$order_product_r2.type) === 'RTS' ? React__default.createElement(dmsComponentLibrary.Checkbox, {
1916
1914
  className: "custom-check",
1917
- checked: selectedReturnOrder == null ? void 0 : selectedReturnOrder.some(function (selectedInvoice) {
1918
- return (selectedInvoice == null ? void 0 : selectedInvoice.id) === item.id;
1915
+ checked: selectedReturnOrder.some(function (selectedInvoice) {
1916
+ return (selectedInvoice == null ? void 0 : selectedInvoice.id) === (item == null ? void 0 : item.id);
1919
1917
  }),
1920
1918
  onChange: function onChange() {
1921
- return handleSelectOrderReturn(item.id, item.return_location, item.return_locations, item.order_product_return_action,
1922
- // item.new_location,
1923
- item.legacy_product_id);
1919
+ return handleSelectOrderReturn(item == null ? void 0 : item.id, item == null ? void 0 : item.return_location, item == null ? void 0 : item.return_locations, item == null ? void 0 : item.order_product_return_action, item == null ? void 0 : item.legacy_product_id);
1924
1920
  }
1925
- })) : null), React__default.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__default.createElement("div", {
1921
+ }) : null), React__default.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__default.createElement("div", {
1926
1922
  className: "awaiting"
1927
1923
  }, "Awaiting")), React__default.createElement("td", null, ' ', displayValueOrNA(item == null || (_item$return_location = item.return_locations) == null ? void 0 : _item$return_location.location_name)), React__default.createElement("td", null, React__default.createElement("ul", {
1928
1924
  style: {