@bjsdistribution/dms-client-return 0.0.20 → 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.
- package/dist/components/order-daily-overview/store/store.d.ts +1 -1
- package/dist/components/order-view/utils.d.ts +2 -0
- package/dist/dms-client-return.cjs.development.js +464 -380
- 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 +465 -381
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +58 -58
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +85 -46
- package/src/components/order-daily-overview/header-filters/Styledfilters.tsx +1 -0
- package/src/components/order-daily-overview/header-filters/filterStore.ts +17 -1
- package/src/components/order-daily-overview/index.tsx +9 -8
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +9 -5
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +5 -5
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +1 -0
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +22 -19
- package/src/components/order-daily-overview/return-after-table/table-filters/TableFilters.tsx +55 -55
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +73 -38
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/RightFilters.tsx +42 -43
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +1 -0
- package/src/components/order-daily-overview/store/store.ts +1 -1
- package/src/components/order-view/index.tsx +6 -6
- package/src/components/order-view/modalsPopup/ModalManager.tsx +17 -11
- package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +21 -2
- 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,
|
|
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, '
|
|
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
|
-
|
|
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:
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
9529
|
-
|
|
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
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
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
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
//
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
//
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
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
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
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")
|
|
9728
|
+
}, "Create Return"));
|
|
9708
9729
|
};
|
|
9709
|
-
var Container$13 = /*#__PURE__*/styled.div(_templateObject$
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
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$
|
|
9722
|
-
var ColumStyle = /*#__PURE__*/styled.div(_templateObject$
|
|
9723
|
-
var GreyBox = /*#__PURE__*/styled.div(_templateObject2$
|
|
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$
|
|
9726
|
-
var StyledTable$4 = /*#__PURE__*/styled.table(_templateObject4$
|
|
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$
|
|
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$
|
|
9932
|
-
var OptionsListLi = /*#__PURE__*/styled.li(_templateObject2$
|
|
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.
|
|
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.
|
|
10047
|
-
var _loc$
|
|
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:
|
|
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,
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
10297
|
-
var Container$14 = /*#__PURE__*/styled.div(_templateObject2$
|
|
10298
|
-
var Flex$7 = /*#__PURE__*/styled.div(_templateObject3$
|
|
10299
|
-
var LabelWrapper = /*#__PURE__*/styled.div(_templateObject4$
|
|
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$
|
|
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$
|
|
10399
|
+
var GLobalPopupContent$1 = /*#__PURE__*/styled.div(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10362
10400
|
|
|
10363
|
-
var _templateObject$
|
|
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$
|
|
10411
|
-
var CheckboxContainer$1 = /*#__PURE__*/styled.div(_templateObject2$
|
|
10412
|
-
var InputWrapper = /*#__PURE__*/styled.div(_templateObject3$
|
|
10413
|
-
var Container$15 = /*#__PURE__*/styled.div(_templateObject4$
|
|
10414
|
-
var Flex$8 = /*#__PURE__*/styled.div(_templateObject5$
|
|
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$
|
|
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$
|
|
10474
|
-
var Container$16 = /*#__PURE__*/styled.div(_templateObject2$
|
|
10475
|
-
var Flex$9 = /*#__PURE__*/styled.div(_templateObject3$
|
|
10476
|
-
var LabelWrapper$2 = /*#__PURE__*/styled.div(_templateObject4$
|
|
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$
|
|
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$
|
|
10542
|
-
var Container$17 = /*#__PURE__*/styled.div(_templateObject2$
|
|
10543
|
-
var Flex$a = /*#__PURE__*/styled.div(_templateObject3$
|
|
10544
|
-
var LabelWrapper$3 = /*#__PURE__*/styled.div(_templateObject4$
|
|
10545
|
-
var AddButton = /*#__PURE__*/styled(Button$1)(_templateObject5$
|
|
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$
|
|
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$
|
|
10569
|
-
var Container$18 = /*#__PURE__*/styled.div(_templateObject2$
|
|
10570
|
-
var Flex$b = /*#__PURE__*/styled.div(_templateObject3$
|
|
10571
|
-
var LabelWrapper$4 = /*#__PURE__*/styled.div(_templateObject4$
|
|
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$
|
|
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$
|
|
10671
|
-
var ReturnBox = /*#__PURE__*/styled.div(_templateObject2$
|
|
10672
|
-
var Container$19 = /*#__PURE__*/styled.div(_templateObject3$
|
|
10673
|
-
var LabelWrapper$5 = /*#__PURE__*/styled.div(_templateObject4$
|
|
10674
|
-
var StyledAntSelect$a = /*#__PURE__*/styled(AntSelect)(_templateObject5$
|
|
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$
|
|
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$
|
|
10725
|
-
var LabelWrapper$6 = /*#__PURE__*/styled.div(_templateObject2$
|
|
10726
|
-
var StyledAntSelect$b = /*#__PURE__*/styled(AntSelect)(_templateObject3
|
|
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$
|
|
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$
|
|
10754
|
-
var Container$1b = /*#__PURE__*/styled.div(_templateObject2$
|
|
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$
|
|
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$
|
|
10869
|
+
var GlobalPopupContent = /*#__PURE__*/styled.div(_templateObject$29 || (_templateObject$29 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10832
10870
|
|
|
10833
|
-
var _templateObject$
|
|
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$
|
|
10886
|
-
var GLobalPopupContent$3 = /*#__PURE__*/styled.div(_templateObject2$
|
|
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$
|
|
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$
|
|
10956
|
+
var StyledConatiner$1 = /*#__PURE__*/styled.div(_templateObject$2b || (_templateObject$2b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* text-wrap: nowrap; */\n"])));
|
|
10919
10957
|
|
|
10920
|
-
var _templateObject$
|
|
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$
|
|
11001
|
-
var Container$1c = /*#__PURE__*/styled.div(_templateObject2$
|
|
11002
|
-
var Wrapper$l = /*#__PURE__*/styled.div(_templateObject3
|
|
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
|
-
|
|
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({
|
|
@@ -11124,8 +11164,7 @@ var ModalManager = function ModalManager() {
|
|
|
11124
11164
|
SetPostLoading(confirmLoading);
|
|
11125
11165
|
}, [confirmLoading]);
|
|
11126
11166
|
var handleConfirmReturn = function handleConfirmReturn() {
|
|
11127
|
-
|
|
11128
|
-
if (newGrouped.length > 0) {
|
|
11167
|
+
if ((newGrouped == null ? void 0 : newGrouped.length) > 0) {
|
|
11129
11168
|
setShouldPerformAction(true);
|
|
11130
11169
|
setCallForFetch(true);
|
|
11131
11170
|
}
|
|
@@ -11166,15 +11205,16 @@ var ModalManager = function ModalManager() {
|
|
|
11166
11205
|
dispatch({
|
|
11167
11206
|
type: 'close'
|
|
11168
11207
|
});
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11208
|
+
setSelectedReturnOrder([]);
|
|
11209
|
+
setCheck([]);
|
|
11210
|
+
setNewPayload([]);
|
|
11211
|
+
setGrouped([]);
|
|
11212
|
+
setSelectAll(false);
|
|
11213
|
+
setShouldPerformAction(false);
|
|
11174
11214
|
notification.error({
|
|
11175
11215
|
message: 'Failure',
|
|
11176
11216
|
// @ts-ignore
|
|
11177
|
-
description: "
|
|
11217
|
+
description: "" + (apiError == null ? void 0 : apiError.message)
|
|
11178
11218
|
});
|
|
11179
11219
|
setError(null);
|
|
11180
11220
|
// @ts-ignore
|
|
@@ -11193,8 +11233,11 @@ var ModalManager = function ModalManager() {
|
|
|
11193
11233
|
setShouldPerformAction(false);
|
|
11194
11234
|
setSelectAll(false);
|
|
11195
11235
|
setError(null);
|
|
11236
|
+
navigate('/order-return');
|
|
11196
11237
|
}
|
|
11197
|
-
}, [response]);
|
|
11238
|
+
}, [response, apiError]);
|
|
11239
|
+
console.log(apiError, 'apiError apiError');
|
|
11240
|
+
console.log(response, 'response response ');
|
|
11198
11241
|
return React.createElement(React.Fragment, null, (popupName == null ? void 0 : popupName.state) == 'create-return' && React.createElement(AntModal, {
|
|
11199
11242
|
openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
|
|
11200
11243
|
closeModal: function closeModal() {
|
|
@@ -11289,11 +11332,11 @@ var ModalManager = function ModalManager() {
|
|
|
11289
11332
|
}));
|
|
11290
11333
|
};
|
|
11291
11334
|
|
|
11292
|
-
var _templateObject$
|
|
11293
|
-
var StyledContainer = /*#__PURE__*/styled.div(_templateObject$
|
|
11294
|
-
var StyledContentWrapper = /*#__PURE__*/styled.div(_templateObject2$
|
|
11295
|
-
var StyledInfoBox = /*#__PURE__*/styled.div(_templateObject3$
|
|
11296
|
-
var StyledLabel$2 = /*#__PURE__*/styled.div(_templateObject4$
|
|
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"])));
|
|
11297
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"])));
|
|
11298
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) {
|
|
11299
11342
|
var active = _ref.active;
|
|
@@ -11413,7 +11456,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
11413
11456
|
}, React.createElement(NextIcon, null)))));
|
|
11414
11457
|
};
|
|
11415
11458
|
|
|
11416
|
-
var _templateObject$
|
|
11459
|
+
var _templateObject$2e, _templateObject2$1B;
|
|
11417
11460
|
var ReturnTable = function ReturnTable() {
|
|
11418
11461
|
var _UsePaginationData = UsePaginationData(),
|
|
11419
11462
|
paginationObj = _UsePaginationData[0];
|
|
@@ -11440,8 +11483,8 @@ var ReturnTable = function ReturnTable() {
|
|
|
11440
11483
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
11441
11484
|
})))), React.createElement(ModalManager, null));
|
|
11442
11485
|
};
|
|
11443
|
-
var Container$1d = /*#__PURE__*/styled.div(_templateObject$
|
|
11444
|
-
var DashBoardWrapper$1 = /*#__PURE__*/styled.section(_templateObject2$
|
|
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"])));
|
|
11445
11488
|
|
|
11446
11489
|
function LoadIcon() {
|
|
11447
11490
|
return React.createElement("svg", {
|
|
@@ -11459,7 +11502,7 @@ function LoadIcon() {
|
|
|
11459
11502
|
}));
|
|
11460
11503
|
}
|
|
11461
11504
|
|
|
11462
|
-
var _templateObject$
|
|
11505
|
+
var _templateObject$2f, _templateObject2$1C;
|
|
11463
11506
|
var PrintDropDown = function PrintDropDown(_ref) {
|
|
11464
11507
|
var legacyProductId = _ref.legacyProductId;
|
|
11465
11508
|
var downloadFiles = function downloadFiles(label) {
|
|
@@ -11486,8 +11529,8 @@ var PrintDropDown = function PrintDropDown(_ref) {
|
|
|
11486
11529
|
}, IconComponent && React.createElement(IconComponent, null), item.label);
|
|
11487
11530
|
}));
|
|
11488
11531
|
};
|
|
11489
|
-
var OptionsList$1 = /*#__PURE__*/styled.ul(_templateObject$
|
|
11490
|
-
var OptionsListLi$1 = /*#__PURE__*/styled.li(_templateObject2$
|
|
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) {
|
|
11491
11534
|
var disabled = _ref2.disabled;
|
|
11492
11535
|
return disabled ? 'not-allowed' : 'pointer';
|
|
11493
11536
|
}, function (_ref3) {
|
|
@@ -11595,10 +11638,6 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11595
11638
|
setOrderId = _useOrderId[1];
|
|
11596
11639
|
// console.log(id, 'idid');
|
|
11597
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", {
|
|
11598
|
-
className: "emailInvoiceCheckbox"
|
|
11599
|
-
}, React.createElement(Checkbox$1, {
|
|
11600
|
-
checked: false
|
|
11601
|
-
})), React.createElement("th", {
|
|
11602
11641
|
className: "emailInvoiceNo"
|
|
11603
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", {
|
|
11604
11643
|
className: "emailInvoiceShare"
|
|
@@ -11624,9 +11663,7 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11624
11663
|
var statusClass = getStatusClass(status);
|
|
11625
11664
|
return React.createElement("tr", {
|
|
11626
11665
|
key: item.id
|
|
11627
|
-
}, React.createElement("td", null, React.createElement(
|
|
11628
|
-
checked: false
|
|
11629
|
-
})), 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", {
|
|
11630
11667
|
onClick: function onClick() {
|
|
11631
11668
|
return setOrderId(item.id);
|
|
11632
11669
|
}
|
|
@@ -11685,9 +11722,10 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11685
11722
|
})))));
|
|
11686
11723
|
};
|
|
11687
11724
|
|
|
11688
|
-
var _templateObject$
|
|
11725
|
+
var _templateObject$2g;
|
|
11726
|
+
// import DownloadIcon from '../../../../assets/icons/DownloadIcon';
|
|
11689
11727
|
var TableFilters = function TableFilters() {
|
|
11690
|
-
return React.createElement(Container$1e, null
|
|
11728
|
+
return React.createElement(Container$1e, null);
|
|
11691
11729
|
// return (
|
|
11692
11730
|
// // <StyledBulkFilterCover>
|
|
11693
11731
|
// <StyledBulkItem>
|
|
@@ -11701,27 +11739,7 @@ var TableFilters = function TableFilters() {
|
|
|
11701
11739
|
// // </StyledBulkFilterCover>
|
|
11702
11740
|
// );
|
|
11703
11741
|
};
|
|
11704
|
-
var Container$1e = /*#__PURE__*/styled.div(_templateObject$
|
|
11705
|
-
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"])));
|
|
11706
|
-
// const TextConatiner = styled.div`
|
|
11707
|
-
// display: flex;
|
|
11708
|
-
// padding: 7px 12px;
|
|
11709
|
-
// justify-content: center;
|
|
11710
|
-
// align-items: center;
|
|
11711
|
-
// gap: 2px;
|
|
11712
|
-
// border-radius: 15px;
|
|
11713
|
-
// background: rgba(136, 128, 117, 0.35);
|
|
11714
|
-
// `;
|
|
11715
|
-
// const Text = styled.div`
|
|
11716
|
-
// color: #888075;
|
|
11717
|
-
// font-family: "'Lato";
|
|
11718
|
-
// font-size: 14px;
|
|
11719
|
-
// font-style: normal;
|
|
11720
|
-
// font-weight: 600;
|
|
11721
|
-
// line-height: 20px;
|
|
11722
|
-
// `;
|
|
11723
|
-
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"])));
|
|
11724
|
-
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"])));
|
|
11725
11743
|
|
|
11726
11744
|
var FilterIcon = function FilterIcon() {
|
|
11727
11745
|
return React.createElement("svg", {
|
|
@@ -11782,6 +11800,50 @@ var ClientIcon = function ClientIcon() {
|
|
|
11782
11800
|
}));
|
|
11783
11801
|
};
|
|
11784
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
|
+
|
|
11785
11847
|
var initialState$2 = {
|
|
11786
11848
|
'x-filters': [],
|
|
11787
11849
|
'x-pagination': {
|
|
@@ -11790,6 +11852,7 @@ var initialState$2 = {
|
|
|
11790
11852
|
}
|
|
11791
11853
|
};
|
|
11792
11854
|
var filterReducer$1 = function filterReducer(state, action) {
|
|
11855
|
+
console.log(action, 'action');
|
|
11793
11856
|
switch (action.type) {
|
|
11794
11857
|
case 'SET_DATE_FILTER':
|
|
11795
11858
|
return _extends({}, state, {
|
|
@@ -11854,51 +11917,7 @@ var filtersReducerReturnAtom = /*#__PURE__*/atom(function (get) {
|
|
|
11854
11917
|
return set(filtersStateAtom$1, filterReducer$1(get(filtersStateAtom$1), action));
|
|
11855
11918
|
});
|
|
11856
11919
|
|
|
11857
|
-
var
|
|
11858
|
-
return React.createElement("svg", {
|
|
11859
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11860
|
-
width: "13",
|
|
11861
|
-
height: "12",
|
|
11862
|
-
viewBox: "0 0 13 12",
|
|
11863
|
-
fill: "none"
|
|
11864
|
-
}, React.createElement("path", {
|
|
11865
|
-
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",
|
|
11866
|
-
stroke: "#6D6B68",
|
|
11867
|
-
"stroke-width": "2",
|
|
11868
|
-
"stroke-linecap": "round",
|
|
11869
|
-
"stroke-linejoin": "round"
|
|
11870
|
-
}), React.createElement("path", {
|
|
11871
|
-
d: "M7.8501 4.25L9.6001 6L11.3501 4.25",
|
|
11872
|
-
stroke: "#6D6B68",
|
|
11873
|
-
"stroke-width": "2",
|
|
11874
|
-
"stroke-linecap": "round",
|
|
11875
|
-
"stroke-linejoin": "round"
|
|
11876
|
-
}));
|
|
11877
|
-
};
|
|
11878
|
-
|
|
11879
|
-
var AssigneIcon = function AssigneIcon() {
|
|
11880
|
-
return React.createElement("svg", {
|
|
11881
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11882
|
-
width: "15",
|
|
11883
|
-
height: "14",
|
|
11884
|
-
viewBox: "0 0 15 14",
|
|
11885
|
-
fill: "none"
|
|
11886
|
-
}, React.createElement("g", {
|
|
11887
|
-
"clip-path": "url(#clip0_504_13636)"
|
|
11888
|
-
}, React.createElement("path", {
|
|
11889
|
-
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",
|
|
11890
|
-
fill: "#6D6B68"
|
|
11891
|
-
})), React.createElement("defs", null, React.createElement("clipPath", {
|
|
11892
|
-
id: "clip0_504_13636"
|
|
11893
|
-
}, React.createElement("rect", {
|
|
11894
|
-
width: "14",
|
|
11895
|
-
height: "14",
|
|
11896
|
-
fill: "white",
|
|
11897
|
-
transform: "translate(0.100098)"
|
|
11898
|
-
}))));
|
|
11899
|
-
};
|
|
11900
|
-
|
|
11901
|
-
var _templateObject$2i, _templateObject2$1G;
|
|
11920
|
+
var _templateObject$2h, _templateObject2$1D;
|
|
11902
11921
|
var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
11903
11922
|
var _useAtom = useAtom(filtersReducerReturnAtom),
|
|
11904
11923
|
dispatch = _useAtom[1];
|
|
@@ -11915,6 +11934,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11915
11934
|
var _useState3 = useState(),
|
|
11916
11935
|
statusOrder = _useState3[0],
|
|
11917
11936
|
setStatusOfOrder = _useState3[1];
|
|
11937
|
+
console.log(selectedClient, 'fffffselectedClient');
|
|
11918
11938
|
var zoneOptions = [{
|
|
11919
11939
|
label: 'Zone 1',
|
|
11920
11940
|
value: 'zone1'
|
|
@@ -11943,6 +11963,11 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11943
11963
|
type: 'SET_DATE_FILTER',
|
|
11944
11964
|
payload: selectedDate
|
|
11945
11965
|
});
|
|
11966
|
+
// Reset to the first page
|
|
11967
|
+
dispatch({
|
|
11968
|
+
type: 'SET_PAGE',
|
|
11969
|
+
payload: 1
|
|
11970
|
+
});
|
|
11946
11971
|
}
|
|
11947
11972
|
}, [selectedDate]);
|
|
11948
11973
|
//client options
|
|
@@ -11953,6 +11978,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11953
11978
|
value: option == null ? void 0 : option.id
|
|
11954
11979
|
};
|
|
11955
11980
|
});
|
|
11981
|
+
console.log(clientOptions, 'clientOptions');
|
|
11956
11982
|
//status of order
|
|
11957
11983
|
var orderOptions = statusOfOrder == null ? void 0 : statusOfOrder.map(function (option) {
|
|
11958
11984
|
var _option$status_type, _option$status_type2;
|
|
@@ -11962,20 +11988,32 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11962
11988
|
};
|
|
11963
11989
|
});
|
|
11964
11990
|
var handleClientChange = function handleClientChange(value) {
|
|
11991
|
+
if (value === selectedClient) return;
|
|
11965
11992
|
console.log(value, 'value');
|
|
11966
11993
|
setSelectedClient(value);
|
|
11967
11994
|
dispatch({
|
|
11968
11995
|
type: 'SET_CLIENT_FILTER',
|
|
11969
|
-
payload:
|
|
11996
|
+
payload: value
|
|
11997
|
+
});
|
|
11998
|
+
// Reset to the first page
|
|
11999
|
+
dispatch({
|
|
12000
|
+
type: 'SET_PAGE',
|
|
12001
|
+
payload: 1
|
|
11970
12002
|
});
|
|
11971
12003
|
};
|
|
11972
12004
|
var handleStatusOfOrder = function handleStatusOfOrder(value) {
|
|
12005
|
+
if (value === statusOfOrder) return;
|
|
11973
12006
|
console.log(value, 'value');
|
|
11974
12007
|
setStatusOfOrder(value);
|
|
11975
12008
|
dispatch({
|
|
11976
12009
|
type: 'SET_STATUS_ORDER_FILTER',
|
|
11977
12010
|
payload: value
|
|
11978
12011
|
});
|
|
12012
|
+
// Reset to the first page
|
|
12013
|
+
dispatch({
|
|
12014
|
+
type: 'SET_PAGE',
|
|
12015
|
+
payload: 1
|
|
12016
|
+
});
|
|
11979
12017
|
};
|
|
11980
12018
|
var handleClearAll = function handleClearAll() {
|
|
11981
12019
|
setSelectedDate(null);
|
|
@@ -12017,8 +12055,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12017
12055
|
style: {
|
|
12018
12056
|
minWidth: '130px'
|
|
12019
12057
|
},
|
|
12020
|
-
value: statusOrder
|
|
12021
|
-
allowClear: true
|
|
12058
|
+
value: statusOrder
|
|
12022
12059
|
}))), React.createElement("div", {
|
|
12023
12060
|
className: "datefilter"
|
|
12024
12061
|
}, React.createElement("div", {
|
|
@@ -12032,8 +12069,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12032
12069
|
style: {
|
|
12033
12070
|
width: '125px',
|
|
12034
12071
|
border: 'none'
|
|
12035
|
-
}
|
|
12036
|
-
allowClear: true
|
|
12072
|
+
}
|
|
12037
12073
|
}))), React.createElement("div", {
|
|
12038
12074
|
className: "datefilter",
|
|
12039
12075
|
style: {
|
|
@@ -12051,15 +12087,15 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12051
12087
|
minWidth: '100px'
|
|
12052
12088
|
},
|
|
12053
12089
|
disabled: true
|
|
12054
|
-
}))), selectedDate ? React.createElement(React.Fragment, null, React.createElement(ClearAll, {
|
|
12090
|
+
}))), selectedDate || statusOrder || selectedClient ? React.createElement(React.Fragment, null, React.createElement(ClearAll, {
|
|
12055
12091
|
onClick: handleClearAll
|
|
12056
12092
|
}, React.createElement(StyledFilterBtnIcon, null, React.createElement("i", {
|
|
12057
12093
|
className: "cross"
|
|
12058
12094
|
})), React.createElement(StyledFilterBtnLabel, null, "Clear all"))) : null)), React.createElement(TableFilters, null)));
|
|
12059
12095
|
};
|
|
12060
|
-
var StyledDatePicker = /*#__PURE__*/styled.div(_templateObject$
|
|
12096
|
+
var StyledDatePicker = /*#__PURE__*/styled.div(_templateObject$2h || (_templateObject$2h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
|
|
12061
12097
|
// const DropdownContainer = styled.div``;
|
|
12062
|
-
var StyledAntSelect$c = /*#__PURE__*/styled.div(_templateObject2$
|
|
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"])));
|
|
12063
12099
|
|
|
12064
12100
|
var PAGE_SIZE_OPTIONS$1 = [50, 100, 150];
|
|
12065
12101
|
var MAX_PAGES_TO_SHOW$1 = 5;
|
|
@@ -12145,7 +12181,7 @@ var ReturnPagination = function ReturnPagination(_ref) {
|
|
|
12145
12181
|
}, React.createElement(NextIcon, null)))));
|
|
12146
12182
|
};
|
|
12147
12183
|
|
|
12148
|
-
var _templateObject$
|
|
12184
|
+
var _templateObject$2i, _templateObject2$1E;
|
|
12149
12185
|
var _excluded$5 = ["count"];
|
|
12150
12186
|
var ReturnAfterTable = function ReturnAfterTable() {
|
|
12151
12187
|
var _useReturnAfterOrderD = useReturnAfterOrderData(),
|
|
@@ -12156,6 +12192,14 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12156
12192
|
state = _useAtom[0];
|
|
12157
12193
|
var filters = state['x-filters'],
|
|
12158
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);
|
|
12159
12203
|
var _UsePaginationReturnD = UsePaginationReturnData(),
|
|
12160
12204
|
paginationObj = _UsePaginationReturnD[0];
|
|
12161
12205
|
var _useState = useState(1),
|
|
@@ -12165,6 +12209,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12165
12209
|
setItemsPerPage = _useItemsPerReturnPag[1];
|
|
12166
12210
|
var _UsePaginationData = UsePaginationData(),
|
|
12167
12211
|
setPaginationObject = _UsePaginationData[1];
|
|
12212
|
+
console.log(paths, 'paths');
|
|
12168
12213
|
var page = paginationObj.page,
|
|
12169
12214
|
total = paginationObj.total;
|
|
12170
12215
|
var handlePageChange = function handlePageChange(page) {
|
|
@@ -12200,7 +12245,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12200
12245
|
}, [fetchedReturnOrderData, staticDataLoading]);
|
|
12201
12246
|
return React.createElement("div", null, React.createElement(DashBoardWrapper$2, null, React.createElement("div", {
|
|
12202
12247
|
className: "Tableconatiner"
|
|
12203
|
-
}, React.createElement(
|
|
12248
|
+
}, React.createElement(Container$1f, null, React.createElement(ReturnOrderFilter, null), React.createElement(OrderTable, null), total > 0 && React.createElement(ReturnPagination, {
|
|
12204
12249
|
currentPage: page,
|
|
12205
12250
|
totalItems: total,
|
|
12206
12251
|
itemsPerPage: itemsPerPage,
|
|
@@ -12208,8 +12253,29 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12208
12253
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
12209
12254
|
})))));
|
|
12210
12255
|
};
|
|
12211
|
-
var Container$1f = /*#__PURE__*/styled.div(_templateObject$
|
|
12212
|
-
var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject2$
|
|
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"])));
|
|
12213
12279
|
|
|
12214
12280
|
var BulkFilter = function BulkFilter() {
|
|
12215
12281
|
// const [printToogle, setPrintToggle] = useMenuDropDown();
|
|
@@ -12330,66 +12396,17 @@ var ReturnTable$1 = function ReturnTable(_ref) {
|
|
|
12330
12396
|
})))));
|
|
12331
12397
|
};
|
|
12332
12398
|
|
|
12333
|
-
|
|
12334
|
-
|
|
12335
|
-
|
|
12336
|
-
// {
|
|
12337
|
-
// field: 'action_date',
|
|
12338
|
-
// op: '>=',
|
|
12339
|
-
// value: `${format(new Date(todayDate), 'yyyy-MM-dd')}T00:00:00+00:00`,
|
|
12340
|
-
// },
|
|
12341
|
-
// {
|
|
12342
|
-
// field: 'action_date',
|
|
12343
|
-
// op: '<=',
|
|
12344
|
-
// value: `${format(new Date(todayDate), 'yyyy-MM-dd')}T23:59:59+00:00`,
|
|
12345
|
-
// },
|
|
12346
|
-
// { field: 'status', op: 'count', value: '' },
|
|
12347
|
-
],
|
|
12348
|
-
'x-pagination': {
|
|
12349
|
-
page: 1,
|
|
12350
|
-
per_page: 50
|
|
12351
|
-
}
|
|
12352
|
-
};
|
|
12353
|
-
var filterReducer$2 = function filterReducer(state, action) {
|
|
12354
|
-
switch (action.type) {
|
|
12355
|
-
case 'SET_PAGE':
|
|
12356
|
-
return _extends({}, state, {
|
|
12357
|
-
'x-pagination': _extends({}, state['x-pagination'], {
|
|
12358
|
-
page: action.payload
|
|
12359
|
-
})
|
|
12360
|
-
});
|
|
12361
|
-
case 'SET_PERPAGE':
|
|
12362
|
-
return _extends({}, state, {
|
|
12363
|
-
'x-pagination': _extends({}, state['x-pagination'], {
|
|
12364
|
-
per_page: action.payload
|
|
12365
|
-
})
|
|
12366
|
-
});
|
|
12367
|
-
case 'CLEAR_FILTERS':
|
|
12368
|
-
return _extends({}, state);
|
|
12369
|
-
case 'CLEAR_ALL_FILTER':
|
|
12370
|
-
return _extends({}, state);
|
|
12371
|
-
default:
|
|
12372
|
-
return state;
|
|
12373
|
-
}
|
|
12374
|
-
};
|
|
12375
|
-
var filtersStateAtom$2 = /*#__PURE__*/atom(initialState$3);
|
|
12376
|
-
var overviewfiltersReducerAtom = /*#__PURE__*/atom(function (get) {
|
|
12377
|
-
return get(filtersStateAtom$2);
|
|
12378
|
-
}, function (get, set, action) {
|
|
12379
|
-
return set(filtersStateAtom$2, filterReducer$2(get(filtersStateAtom$2), action));
|
|
12380
|
-
});
|
|
12381
|
-
|
|
12382
|
-
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';
|
|
12383
12402
|
function ReturnMainTable() {
|
|
12384
|
-
|
|
12385
|
-
state = _useAtom[0];
|
|
12403
|
+
// const [state] = useAtom(overviewfiltersReducerAtom);
|
|
12386
12404
|
// const [paginationObj] = UsePaginationData();
|
|
12387
12405
|
// const [, setCurrentPage] = useState(1);
|
|
12388
12406
|
// const [itemsPerPage, setItemsPerPage] = useItemsPerPage();
|
|
12389
|
-
|
|
12407
|
+
// const { 'x-pagination': pagination } = state;
|
|
12390
12408
|
// const { page, total } = paginationObj;
|
|
12391
|
-
|
|
12392
|
-
selectedClient = _useTableName[0];
|
|
12409
|
+
// const [selectedClient] = useTableName();
|
|
12393
12410
|
// const [, setPaginationObject] = UsePaginationData();
|
|
12394
12411
|
var _useStickyStatus = useStickyStatus(),
|
|
12395
12412
|
isScrolled = _useStickyStatus[0];
|
|
@@ -12406,7 +12423,10 @@ function ReturnMainTable() {
|
|
|
12406
12423
|
var _useApiHook = useApiHook({
|
|
12407
12424
|
endpoint: "/return_orders/get/client-returns/",
|
|
12408
12425
|
method: 'GET',
|
|
12409
|
-
pagination:
|
|
12426
|
+
pagination: {
|
|
12427
|
+
page: 1,
|
|
12428
|
+
per_page: 200
|
|
12429
|
+
}
|
|
12410
12430
|
}),
|
|
12411
12431
|
fetchedClientData = _useApiHook.data,
|
|
12412
12432
|
staticDataLoading = _useApiHook.loading;
|
|
@@ -12426,19 +12446,20 @@ function ReturnMainTable() {
|
|
|
12426
12446
|
// }
|
|
12427
12447
|
}
|
|
12428
12448
|
}, [staticDataLoading]);
|
|
12449
|
+
var getClient = localStorage.getItem('clientName');
|
|
12429
12450
|
return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper$3, {
|
|
12430
12451
|
className: " " + (isScrolled ? 'stickyTableHead' : '')
|
|
12431
12452
|
}, React.createElement("div", {
|
|
12432
12453
|
className: "Tableconatiner"
|
|
12433
|
-
}, React.createElement(HeaderFilter, null), React.createElement(Container$1g, null, React.createElement(Row$7, null, React.createElement(Text$7, null, "Client Return"),
|
|
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)))));
|
|
12434
12455
|
}
|
|
12435
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"])));
|
|
12436
|
-
var Container$1g = /*#__PURE__*/styled.div(_templateObject2$
|
|
12437
|
-
var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject3$
|
|
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"])));
|
|
12438
12459
|
|
|
12439
|
-
var _templateObject$2l, _templateObject2$
|
|
12460
|
+
var _templateObject$2l, _templateObject2$1I;
|
|
12440
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"])));
|
|
12441
|
-
var StyledFlex = /*#__PURE__*/styled.div(_templateObject2$
|
|
12462
|
+
var StyledFlex = /*#__PURE__*/styled.div(_templateObject2$1I || (_templateObject2$1I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
12442
12463
|
|
|
12443
12464
|
var _templateObject$2m;
|
|
12444
12465
|
var HeaderTitle = function HeaderTitle(props) {
|
|
@@ -12446,12 +12467,12 @@ var HeaderTitle = function HeaderTitle(props) {
|
|
|
12446
12467
|
};
|
|
12447
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"])));
|
|
12448
12469
|
|
|
12449
|
-
var _templateObject$2n, _templateObject2$
|
|
12470
|
+
var _templateObject$2n, _templateObject2$1J;
|
|
12450
12471
|
function Breadcrumb(props) {
|
|
12451
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)));
|
|
12452
12473
|
}
|
|
12453
12474
|
var BreadcrumbContainer = /*#__PURE__*/styled.div(_templateObject$2n || (_templateObject$2n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n"])));
|
|
12454
|
-
var BreadcrumbList = /*#__PURE__*/styled.span(_templateObject2$
|
|
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"])));
|
|
12455
12476
|
|
|
12456
12477
|
var RouterHeader = function RouterHeader(_ref) {
|
|
12457
12478
|
var _ref$breadcrumbTitle = _ref.breadcrumbTitle,
|
|
@@ -12473,6 +12494,7 @@ var RouterHeader = function RouterHeader(_ref) {
|
|
|
12473
12494
|
})))));
|
|
12474
12495
|
};
|
|
12475
12496
|
|
|
12497
|
+
// import { filtersReducerAtom } from './components/order-daily-overview/header-filters/filterStore';
|
|
12476
12498
|
function ReturnClient() {
|
|
12477
12499
|
var _selectedClientString;
|
|
12478
12500
|
notification.config({
|
|
@@ -12486,12 +12508,24 @@ function ReturnClient() {
|
|
|
12486
12508
|
var navigate = useNavigate();
|
|
12487
12509
|
var selectedClientString = selectedClient == null ? void 0 : selectedClient.replace(/\s+/g, '-');
|
|
12488
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);
|
|
12489
12520
|
console.log(selectedClientString, 'selectedClient');
|
|
12490
12521
|
console.log("../filter/:" + selectedClientString);
|
|
12491
12522
|
useEffect(function () {
|
|
12492
|
-
if (
|
|
12523
|
+
if (location.pathname.includes('/returnClient')) {
|
|
12493
12524
|
localStorage.removeItem('clientName');
|
|
12494
12525
|
localStorage.removeItem('clientId');
|
|
12526
|
+
localStorage.removeItem('uuid');
|
|
12527
|
+
localStorage.removeItem('customer_id');
|
|
12528
|
+
// dispatch({ type: 'CLEAR_CLIENT', payload: [] });
|
|
12495
12529
|
}
|
|
12496
12530
|
}, [location.pathname]);
|
|
12497
12531
|
useEffect(function () {
|
|
@@ -12500,6 +12534,56 @@ function ReturnClient() {
|
|
|
12500
12534
|
navigate("filter/" + _selectedClientString2);
|
|
12501
12535
|
}
|
|
12502
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]);
|
|
12503
12587
|
return React.createElement(React.Fragment, null, React.createElement(RouterHeader, null), React.createElement(Suspense, {
|
|
12504
12588
|
fallback: React.createElement(LoadingMessage, null)
|
|
12505
12589
|
}, React.createElement(Routes, null, React.createElement(Route, {
|