@bjsdistribution/dms-client-return 0.0.91 → 0.0.92
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.
- package/dist/dms-client-return.cjs.development.js +93 -97
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +93 -97
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +3 -1
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +65 -86
|
@@ -1313,22 +1313,21 @@ var ReturnFilter = function ReturnFilter() {
|
|
|
1313
1313
|
return React.createElement(React.Fragment, null, React.createElement(StyledFiter, null, React.createElement(Text, null, customerName), React.createElement(StyledFIlterELements, null, React.createElement(StyledTableFilter, null)), React.createElement(RightFilters, null)));
|
|
1314
1314
|
};
|
|
1315
1315
|
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
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"])));
|
|
1316
|
+
function DownIcon() {
|
|
1317
|
+
return React.createElement("svg", {
|
|
1318
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1319
|
+
width: "18",
|
|
1320
|
+
height: "18",
|
|
1321
|
+
viewBox: "0 0 18 18",
|
|
1322
|
+
fill: "none"
|
|
1323
|
+
}, React.createElement("path", {
|
|
1324
|
+
opacity: "0.4",
|
|
1325
|
+
fillRule: "evenodd",
|
|
1326
|
+
clipRule: "evenodd",
|
|
1327
|
+
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",
|
|
1328
|
+
fill: "#3A3630"
|
|
1329
|
+
}));
|
|
1330
|
+
}
|
|
1332
1331
|
|
|
1333
1332
|
var PrinterIcon = function PrinterIcon() {
|
|
1334
1333
|
return React.createElement("svg", {
|
|
@@ -1343,22 +1342,43 @@ var PrinterIcon = function PrinterIcon() {
|
|
|
1343
1342
|
}));
|
|
1344
1343
|
};
|
|
1345
1344
|
|
|
1346
|
-
function
|
|
1347
|
-
return React.createElement("svg", {
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
height: "18",
|
|
1345
|
+
function CaretDownFilledIcon(props) {
|
|
1346
|
+
return React.createElement("svg", Object.assign({
|
|
1347
|
+
width: "16",
|
|
1348
|
+
height: "16",
|
|
1351
1349
|
viewBox: "0 0 18 18",
|
|
1352
|
-
fill: "none"
|
|
1350
|
+
fill: "none",
|
|
1351
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1352
|
+
}, props), React.createElement("g", {
|
|
1353
|
+
"clip-path": "url(#clip0_2034_435)"
|
|
1353
1354
|
}, React.createElement("path", {
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1355
|
+
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",
|
|
1356
|
+
fill: "#9E9E9E"
|
|
1357
|
+
})), React.createElement("defs", null, React.createElement("clipPath", {
|
|
1358
|
+
id: "clip0_2034_435"
|
|
1359
|
+
}, React.createElement("rect", {
|
|
1360
|
+
width: "16",
|
|
1361
|
+
height: "16",
|
|
1362
|
+
fill: "white"
|
|
1363
|
+
}))));
|
|
1360
1364
|
}
|
|
1361
1365
|
|
|
1366
|
+
var SortIcon = function SortIcon() {
|
|
1367
|
+
return React.createElement("svg", {
|
|
1368
|
+
width: "16",
|
|
1369
|
+
height: "17",
|
|
1370
|
+
viewBox: "0 0 16 17",
|
|
1371
|
+
fill: "none",
|
|
1372
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1373
|
+
}, React.createElement("g", {
|
|
1374
|
+
id: "bxs:sort-alt"
|
|
1375
|
+
}, React.createElement("path", {
|
|
1376
|
+
id: "Vector",
|
|
1377
|
+
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",
|
|
1378
|
+
fill: "#9E9E9E"
|
|
1379
|
+
})));
|
|
1380
|
+
};
|
|
1381
|
+
|
|
1362
1382
|
var CollectionLabelIcon = function CollectionLabelIcon() {
|
|
1363
1383
|
return React.createElement("svg", {
|
|
1364
1384
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1517,7 +1537,7 @@ var optionsForReturnPrint = [{
|
|
|
1517
1537
|
label: 'Print Return Labels'
|
|
1518
1538
|
}];
|
|
1519
1539
|
|
|
1520
|
-
var _templateObject$
|
|
1540
|
+
var _templateObject$3, _templateObject2$1;
|
|
1521
1541
|
var options = optionsForReturnPrint;
|
|
1522
1542
|
var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
1523
1543
|
var legacyURL = _ref.legacyURL,
|
|
@@ -1538,8 +1558,8 @@ var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
|
1538
1558
|
}, IconComponent && React.createElement(IconComponent, null), " ", item.label);
|
|
1539
1559
|
}));
|
|
1540
1560
|
};
|
|
1541
|
-
var OptionsList = /*#__PURE__*/styled.ul(_templateObject$
|
|
1542
|
-
var OptionsListLi = /*#__PURE__*/styled.li(_templateObject2$
|
|
1561
|
+
var OptionsList = /*#__PURE__*/styled.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"])));
|
|
1562
|
+
var OptionsListLi = /*#__PURE__*/styled.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) {
|
|
1543
1563
|
var disabled = _ref2.disabled;
|
|
1544
1564
|
return disabled ? 'not-allowed' : 'pointer';
|
|
1545
1565
|
}, function (_ref3) {
|
|
@@ -1553,42 +1573,22 @@ var OptionsListLi = /*#__PURE__*/styled.li(_templateObject2$2 || (_templateObjec
|
|
|
1553
1573
|
return disabled ? '#f5f5f5' : 'transparent';
|
|
1554
1574
|
});
|
|
1555
1575
|
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
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",
|
|
1567
|
-
fill: "#9E9E9E"
|
|
1568
|
-
})), React.createElement("defs", null, React.createElement("clipPath", {
|
|
1569
|
-
id: "clip0_2034_435"
|
|
1570
|
-
}, React.createElement("rect", {
|
|
1571
|
-
width: "16",
|
|
1572
|
-
height: "16",
|
|
1573
|
-
fill: "white"
|
|
1574
|
-
}))));
|
|
1575
|
-
}
|
|
1576
|
+
var _templateObject$4, _templateObject2$2, _templateObject3$1, _templateObject4$1, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
|
|
1577
|
+
var ColumStyle = /*#__PURE__*/styled.div(_templateObject$4 || (_templateObject$4 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 67px;\n align-items: center;\n gap: 7px;\n"])));
|
|
1578
|
+
var GreyBox = /*#__PURE__*/styled.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"])));
|
|
1579
|
+
// Styled components
|
|
1580
|
+
var StyledTableWrapper = /*#__PURE__*/styled.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"])));
|
|
1581
|
+
var StyledTable = /*#__PURE__*/styled.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"])));
|
|
1582
|
+
var EmptyDataContainer = /*#__PURE__*/styled.div(_templateObject34 || (_templateObject34 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
|
|
1583
|
+
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"])));
|
|
1584
|
+
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: #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"])));
|
|
1585
|
+
var StyledFilterBtnLabel = /*#__PURE__*/styled.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"])));
|
|
1576
1586
|
|
|
1577
|
-
var
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
height: "
|
|
1581
|
-
|
|
1582
|
-
fill: "none",
|
|
1583
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
1584
|
-
}, React.createElement("g", {
|
|
1585
|
-
id: "bxs:sort-alt"
|
|
1586
|
-
}, React.createElement("path", {
|
|
1587
|
-
id: "Vector",
|
|
1588
|
-
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",
|
|
1589
|
-
fill: "#9E9E9E"
|
|
1590
|
-
})));
|
|
1591
|
-
};
|
|
1587
|
+
var _templateObject19, _templateObject20, _templateObject21;
|
|
1588
|
+
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 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"])));
|
|
1589
|
+
// Styled components
|
|
1590
|
+
var StyledTableWrapper$1 = /*#__PURE__*/styled.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"])));
|
|
1591
|
+
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"])));
|
|
1592
1592
|
|
|
1593
1593
|
var _excluded = ["count"];
|
|
1594
1594
|
var ReturnOrderTable = function ReturnOrderTable() {
|
|
@@ -1608,7 +1608,6 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
1608
1608
|
var _useLoading = useLoading(),
|
|
1609
1609
|
load = _useLoading[0],
|
|
1610
1610
|
setLoading = _useLoading[1];
|
|
1611
|
-
// const [postLoading] = usePostLoading();
|
|
1612
1611
|
var dropdownRefParent = useRef(null);
|
|
1613
1612
|
var dropdownRef = useRef(null);
|
|
1614
1613
|
var _usePrintOptionTOggle = usePrintOptionTOggle(),
|
|
@@ -1738,12 +1737,14 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
1738
1737
|
// setShouldPerformAction(false);
|
|
1739
1738
|
}, [fetchedOrderData, returnDataLoad, locationData, state, callForFetch]);
|
|
1740
1739
|
var handleSelectAll = function handleSelectAll(e) {
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1740
|
+
var isChecked = e.target.checked;
|
|
1741
|
+
setSelectAll(isChecked);
|
|
1742
|
+
if (isChecked) {
|
|
1743
|
+
var filteredData = returnData == null ? void 0 : returnData.filter(function (loc) {
|
|
1744
1744
|
var _loc$order_product_re;
|
|
1745
1745
|
return (loc == null || (_loc$order_product_re = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re.type) === 'RTS';
|
|
1746
|
-
})
|
|
1746
|
+
});
|
|
1747
|
+
var selectedOrders = filteredData.map(function (loc) {
|
|
1747
1748
|
return {
|
|
1748
1749
|
id: loc.id,
|
|
1749
1750
|
return_locations: loc == null ? void 0 : loc.return_locations,
|
|
@@ -1752,30 +1753,27 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
1752
1753
|
order_product_return_action: loc == null ? void 0 : loc.order_product_return_action,
|
|
1753
1754
|
return_location_token: loc == null ? void 0 : loc.return_location
|
|
1754
1755
|
};
|
|
1755
|
-
})
|
|
1756
|
-
|
|
1756
|
+
});
|
|
1757
|
+
var newPayload = filteredData.map(function (loc) {
|
|
1757
1758
|
var _loc$order_product_re2;
|
|
1758
|
-
return (loc == null || (_loc$order_product_re2 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re2.type) === 'RTS';
|
|
1759
|
-
}).map(function (loc) {
|
|
1760
|
-
var _loc$order_product_re3;
|
|
1761
1759
|
return {
|
|
1762
1760
|
id: loc.id,
|
|
1763
1761
|
account_number: createReturn == null ? void 0 : createReturn.account_number,
|
|
1764
1762
|
customer_id: +(createReturn == null ? void 0 : createReturn.customer_id),
|
|
1765
1763
|
products: [loc == null ? void 0 : loc.legacy_product_id],
|
|
1766
|
-
return_action: loc == null || (_loc$
|
|
1764
|
+
return_action: loc == null || (_loc$order_product_re2 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re2.type,
|
|
1767
1765
|
return_location_token: (loc == null ? void 0 : loc.return_location) || null
|
|
1768
1766
|
};
|
|
1769
|
-
})
|
|
1767
|
+
});
|
|
1768
|
+
setSelectedReturnOrder(selectedOrders);
|
|
1769
|
+
setNewPayload(newPayload);
|
|
1770
1770
|
} else {
|
|
1771
1771
|
setSelectedReturnOrder([]);
|
|
1772
1772
|
setNewPayload([]);
|
|
1773
1773
|
setGrouped([]);
|
|
1774
1774
|
}
|
|
1775
1775
|
};
|
|
1776
|
-
var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action,
|
|
1777
|
-
// new_location: any,
|
|
1778
|
-
legacy_product_id) {
|
|
1776
|
+
var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action, legacy_product_id) {
|
|
1779
1777
|
setSelectedReturnOrder(function (prevSelectedLocations) {
|
|
1780
1778
|
var isSelected = prevSelectedLocations == null ? void 0 : prevSelectedLocations.some(function (loc) {
|
|
1781
1779
|
return loc.id === id;
|
|
@@ -1796,32 +1794,32 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
1796
1794
|
return item.id !== id;
|
|
1797
1795
|
});
|
|
1798
1796
|
});
|
|
1797
|
+
setSelectAll(false); // Ensure "select all" is false if one is deselected
|
|
1799
1798
|
return updatedSelectedLocations;
|
|
1800
1799
|
} else {
|
|
1800
|
+
var _returnData$filter;
|
|
1801
1801
|
var newReturnPayload = {
|
|
1802
1802
|
id: id,
|
|
1803
1803
|
account_number: createReturn == null ? void 0 : createReturn.account_number,
|
|
1804
1804
|
customer_id: +(createReturn == null ? void 0 : createReturn.customer_id),
|
|
1805
1805
|
products: [legacy_product_id],
|
|
1806
|
-
return_action: order_product_return_action
|
|
1806
|
+
return_action: (order_product_return_action == null ? void 0 : order_product_return_action.type) || null,
|
|
1807
1807
|
return_location_token: return_location || null
|
|
1808
1808
|
};
|
|
1809
1809
|
setNewPayload(function (prevPayload) {
|
|
1810
1810
|
return [].concat(prevPayload, [newReturnPayload]);
|
|
1811
1811
|
});
|
|
1812
|
-
|
|
1813
|
-
return _extends({}, prevState, {
|
|
1814
|
-
products: legacy_product_id,
|
|
1815
|
-
return_action: (order_product_return_action == null ? void 0 : order_product_return_action.type) || null,
|
|
1816
|
-
return_location_token: return_location || null
|
|
1817
|
-
});
|
|
1818
|
-
});
|
|
1819
|
-
return [].concat(prevSelectedLocations, [{
|
|
1812
|
+
var _updatedSelectedLocations = [].concat(prevSelectedLocations, [{
|
|
1820
1813
|
id: id,
|
|
1821
1814
|
return_location: return_location,
|
|
1822
1815
|
return_locations: return_locations,
|
|
1823
1816
|
order_product_return_action: order_product_return_action
|
|
1824
1817
|
}]);
|
|
1818
|
+
setSelectAll((_updatedSelectedLocations == null ? void 0 : _updatedSelectedLocations.length) === (returnData == null || (_returnData$filter = returnData.filter(function (loc) {
|
|
1819
|
+
var _loc$order_product_re3;
|
|
1820
|
+
return (loc == null || (_loc$order_product_re3 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re3.type) === 'RTS';
|
|
1821
|
+
})) == null ? void 0 : _returnData$filter.length));
|
|
1822
|
+
return _updatedSelectedLocations;
|
|
1825
1823
|
}
|
|
1826
1824
|
});
|
|
1827
1825
|
};
|
|
@@ -1904,17 +1902,15 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
1904
1902
|
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;
|
|
1905
1903
|
return React.createElement("tr", {
|
|
1906
1904
|
key: item.id
|
|
1907
|
-
}, React.createElement("td", null, (item == null || (_item$order_product_r2 = item.order_product_return_action) == null ? void 0 : _item$order_product_r2.type)
|
|
1905
|
+
}, 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(Checkbox$1, {
|
|
1908
1906
|
className: "custom-check",
|
|
1909
|
-
checked: selectedReturnOrder
|
|
1910
|
-
return (selectedInvoice == null ? void 0 : selectedInvoice.id) === item.id;
|
|
1907
|
+
checked: selectedReturnOrder.some(function (selectedInvoice) {
|
|
1908
|
+
return (selectedInvoice == null ? void 0 : selectedInvoice.id) === (item == null ? void 0 : item.id);
|
|
1911
1909
|
}),
|
|
1912
1910
|
onChange: function onChange() {
|
|
1913
|
-
return handleSelectOrderReturn(item.id, item.return_location, item.return_locations, item.order_product_return_action,
|
|
1914
|
-
// item.new_location,
|
|
1915
|
-
item.legacy_product_id);
|
|
1911
|
+
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);
|
|
1916
1912
|
}
|
|
1917
|
-
})
|
|
1913
|
+
}) : 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", {
|
|
1918
1914
|
className: "awaiting"
|
|
1919
1915
|
}, "Awaiting")), React.createElement("td", null, ' ', displayValueOrNA(item == null || (_item$return_location = item.return_locations) == null ? void 0 : _item$return_location.location_name)), React.createElement("td", null, React.createElement("ul", {
|
|
1920
1916
|
style: {
|