@bjsdistribution/dms-client-return 0.0.20 → 0.0.22
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 +457 -381
- 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 +458 -382
- 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 +82 -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 +8 -6
- 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 +69 -39
- 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 +78 -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,66 @@ 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
|
+
dispatch({
|
|
9536
|
+
type: 'SET_PAGE',
|
|
9537
|
+
payload: 1
|
|
9538
|
+
});
|
|
9539
|
+
} else {
|
|
9540
|
+
dispatch({
|
|
9541
|
+
type: 'SET_CLIENT_FILTER',
|
|
9542
|
+
payload: []
|
|
9543
|
+
});
|
|
9514
9544
|
}
|
|
9545
|
+
//action value
|
|
9515
9546
|
if (selectedFilterValue) {
|
|
9516
9547
|
dispatch({
|
|
9517
9548
|
type: 'SET_ACTIONS_FILTER',
|
|
9518
9549
|
payload: selectedFilterValue
|
|
9519
9550
|
});
|
|
9551
|
+
dispatch({
|
|
9552
|
+
type: 'SET_PAGE',
|
|
9553
|
+
payload: 1
|
|
9554
|
+
});
|
|
9520
9555
|
}
|
|
9521
|
-
|
|
9556
|
+
//location value
|
|
9557
|
+
if (selectedLocationValue && selectedLocationValue.length > 0) {
|
|
9522
9558
|
dispatch({
|
|
9523
9559
|
type: 'SET_LOCATION_FILTER',
|
|
9524
9560
|
payload: selectedLocationValue
|
|
9525
9561
|
});
|
|
9562
|
+
dispatch({
|
|
9563
|
+
type: 'SET_PAGE',
|
|
9564
|
+
payload: 1
|
|
9565
|
+
});
|
|
9526
9566
|
}
|
|
9527
9567
|
};
|
|
9528
|
-
|
|
9529
|
-
|
|
9568
|
+
useEffect(function () {
|
|
9569
|
+
return function () {
|
|
9570
|
+
dispatch({
|
|
9571
|
+
type: 'CLEAR_CLIENT'
|
|
9572
|
+
});
|
|
9573
|
+
};
|
|
9574
|
+
}, []);
|
|
9530
9575
|
useEffect(function () {
|
|
9531
9576
|
if (storedClientId) {
|
|
9532
9577
|
dispatch({
|
|
@@ -9542,6 +9587,19 @@ function SelectionFilter() {
|
|
|
9542
9587
|
setIsButtonEnabled(false);
|
|
9543
9588
|
}
|
|
9544
9589
|
}, [storedName, selectedFilterValue, selectedLocationValue]);
|
|
9590
|
+
useEffect(function () {}, [location.pathname]);
|
|
9591
|
+
useEffect(function () {
|
|
9592
|
+
if (!selectedFilterValue || selectedFilterValue === null) {
|
|
9593
|
+
dispatch({
|
|
9594
|
+
type: 'CLEAR_ACTION'
|
|
9595
|
+
});
|
|
9596
|
+
}
|
|
9597
|
+
if (!selectedLocationValue || Array.isArray(selectedLocationValue) && selectedLocationValue.length === 0) {
|
|
9598
|
+
dispatch({
|
|
9599
|
+
type: 'CLEAR_LOC'
|
|
9600
|
+
});
|
|
9601
|
+
}
|
|
9602
|
+
}, [selectedFilterValue, selectedLocationValue]);
|
|
9545
9603
|
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
9604
|
options: clientOptions,
|
|
9547
9605
|
placeholder: "Select Client Name",
|
|
@@ -9550,7 +9608,7 @@ function SelectionFilter() {
|
|
|
9550
9608
|
minWidth: '14vw'
|
|
9551
9609
|
},
|
|
9552
9610
|
value: storedName
|
|
9553
|
-
})), React.createElement(FilterColumn, null, React.createElement(Label$g, null, "Action Type"), React.createElement(StyledAntSelect$4, {
|
|
9611
|
+
})), 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
9612
|
options: actionTypeOptions,
|
|
9555
9613
|
placeholder: "Select Action Type",
|
|
9556
9614
|
value: selectedFilterValue,
|
|
@@ -9569,76 +9627,72 @@ function SelectionFilter() {
|
|
|
9569
9627
|
},
|
|
9570
9628
|
allowClear: true,
|
|
9571
9629
|
mode: "multiple"
|
|
9572
|
-
}))), React.createElement(RightColumn$1, null, React.createElement(ApplyButton, {
|
|
9630
|
+
}))) : null), React.createElement(RightColumn$1, null, React.createElement(ApplyButton, {
|
|
9573
9631
|
onClick: applyFilters,
|
|
9574
9632
|
disabled: !isButtonEnabled
|
|
9575
9633
|
}, "Apply"))));
|
|
9576
9634
|
}
|
|
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"])));
|
|
9635
|
+
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
9636
|
|
|
9637
|
+
// import { ApiResponse } from '../../types';
|
|
9638
|
+
// import { useApiHook } from '@bjsdistribution/dms-component-library';
|
|
9639
|
+
// import {
|
|
9640
|
+
// useActionType,
|
|
9641
|
+
// useCustomerData,
|
|
9642
|
+
// useLocationData,
|
|
9643
|
+
// useStatusOrderData,
|
|
9644
|
+
// } from '../../store';
|
|
9579
9645
|
function HeaderFilter() {
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
var _useLocationData = useLocationData(),
|
|
9585
|
-
setLocationData = _useLocationData[1];
|
|
9586
|
-
var _useStatusOrderData = useStatusOrderData(),
|
|
9587
|
-
setStatusOfOrders = _useStatusOrderData[1];
|
|
9646
|
+
// const [, setCustomers] = useCustomerData();
|
|
9647
|
+
// const [, setActionType] = useActionType();
|
|
9648
|
+
// const [, setLocationData] = useLocationData();
|
|
9649
|
+
// const [, setStatusOfOrders] = useStatusOrderData();
|
|
9588
9650
|
//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]);
|
|
9651
|
+
// const { data: fetchedCustomerData, loading: loading } = useApiHook<
|
|
9652
|
+
// ApiResponse
|
|
9653
|
+
// >({
|
|
9654
|
+
// endpoint: `/customers/`,
|
|
9655
|
+
// method: 'GET',
|
|
9656
|
+
// // pagination: { page: 1, per_page: 50 },
|
|
9657
|
+
// });
|
|
9658
|
+
// //API for action type
|
|
9659
|
+
// const { data: fetchedStaticData, loading: actionLoading } = useApiHook<
|
|
9660
|
+
// ApiResponse
|
|
9661
|
+
// >({
|
|
9662
|
+
// endpoint: `/orders/getStaticData/all/`,
|
|
9663
|
+
// method: 'GET',
|
|
9664
|
+
// // pagination: { page: 1, per_page: 50 },
|
|
9665
|
+
// });
|
|
9666
|
+
// //API for return locations
|
|
9667
|
+
// const { data: fetchedLocationData, loading: locationloading } = useApiHook<
|
|
9668
|
+
// ApiResponse
|
|
9669
|
+
// >({
|
|
9670
|
+
// endpoint: `/return_locations/`,
|
|
9671
|
+
// method: 'GET',
|
|
9672
|
+
// pagination: { page: 1, per_page: 50 },
|
|
9673
|
+
// });
|
|
9674
|
+
// useEffect(() => {
|
|
9675
|
+
// if (fetchedCustomerData && fetchedCustomerData?.data) {
|
|
9676
|
+
// setCustomers(fetchedCustomerData?.data);
|
|
9677
|
+
// }
|
|
9678
|
+
// }, [loading]);
|
|
9679
|
+
// useEffect(() => {
|
|
9680
|
+
// if (fetchedStaticData && fetchedStaticData?.data) {
|
|
9681
|
+
// setActionType(
|
|
9682
|
+
// fetchedStaticData?.data?.flatMap(
|
|
9683
|
+
// (i: any) => i?.order_product_return_action
|
|
9684
|
+
// )
|
|
9685
|
+
// );
|
|
9686
|
+
// setStatusOfOrders(
|
|
9687
|
+
// fetchedStaticData?.data?.flatMap((i: any) => i?.order_stock_alias)
|
|
9688
|
+
// );
|
|
9689
|
+
// }
|
|
9690
|
+
// }, [actionLoading]);
|
|
9691
|
+
// useEffect(() => {
|
|
9692
|
+
// if (fetchedLocationData && fetchedLocationData?.data) {
|
|
9693
|
+
// setLocationData(fetchedLocationData?.data);
|
|
9694
|
+
// }
|
|
9695
|
+
// }, [locationloading]);
|
|
9642
9696
|
return React.createElement(CoverPage, null, React.createElement(SelectionFilter, null));
|
|
9643
9697
|
}
|
|
9644
9698
|
|
|
@@ -9652,46 +9706,10 @@ var Text$7 = /*#__PURE__*/styled.div(_templateObject7$e || (_templateObject7$e =
|
|
|
9652
9706
|
// Right side filter
|
|
9653
9707
|
var StyledTableFilter = /*#__PURE__*/styled.div(_templateObject8$9 || (_templateObject8$9 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
9654
9708
|
|
|
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;
|
|
9709
|
+
var _templateObject$1Z, _templateObject2$1n;
|
|
9710
|
+
// import { StyledBulkItem } from '../../filters/BulkFilterStyle';
|
|
9711
|
+
// import SearchType from '../../header/route-header/search/SearchType';
|
|
9712
|
+
// import DownloadIcon from '../../../../assets/icons/DownloadIcon';
|
|
9695
9713
|
var RightFilters = function RightFilters() {
|
|
9696
9714
|
var _useAtom = useAtom(countReducerAtom),
|
|
9697
9715
|
dispatch = _useAtom[1];
|
|
@@ -9704,13 +9722,18 @@ var RightFilters = function RightFilters() {
|
|
|
9704
9722
|
});
|
|
9705
9723
|
},
|
|
9706
9724
|
disabled: (selectedReturnOrder == null ? void 0 : selectedReturnOrder.length) === 0
|
|
9707
|
-
}, "Create Return")
|
|
9725
|
+
}, "Create Return"));
|
|
9708
9726
|
};
|
|
9709
|
-
var Container$13 = /*#__PURE__*/styled.div(_templateObject$
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9727
|
+
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"])));
|
|
9728
|
+
// const Mid = styled.div`
|
|
9729
|
+
// display: flex;
|
|
9730
|
+
// padding: 4px 10px;
|
|
9731
|
+
// align-items: center;
|
|
9732
|
+
// gap: 8px;
|
|
9733
|
+
// align-self: stretch;
|
|
9734
|
+
// border-radius: 15px 0px 0px 15px;
|
|
9735
|
+
// `;
|
|
9736
|
+
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
9737
|
|
|
9715
9738
|
var ReturnFilter = function ReturnFilter() {
|
|
9716
9739
|
var _useParams = useParams(),
|
|
@@ -9718,12 +9741,12 @@ var ReturnFilter = function ReturnFilter() {
|
|
|
9718
9741
|
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
9742
|
};
|
|
9720
9743
|
|
|
9721
|
-
var _templateObject$
|
|
9722
|
-
var ColumStyle = /*#__PURE__*/styled.div(_templateObject$
|
|
9723
|
-
var GreyBox = /*#__PURE__*/styled.div(_templateObject2$
|
|
9744
|
+
var _templateObject$1_, _templateObject2$1o, _templateObject3$T, _templateObject4$w, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
|
|
9745
|
+
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"])));
|
|
9746
|
+
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
9747
|
// Styled components
|
|
9725
|
-
var StyledTableWrapper$2 = /*#__PURE__*/styled.div(_templateObject3$
|
|
9726
|
-
var StyledTable$4 = /*#__PURE__*/styled.table(_templateObject4$
|
|
9748
|
+
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"])));
|
|
9749
|
+
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
9750
|
var EmptyDataContainer$1 = /*#__PURE__*/styled.div(_templateObject34 || (_templateObject34 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
|
|
9728
9751
|
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
9752
|
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 +9934,7 @@ var optionsForReturnPrint = [{
|
|
|
9911
9934
|
label: 'Print Return Labels'
|
|
9912
9935
|
}];
|
|
9913
9936
|
|
|
9914
|
-
var _templateObject$
|
|
9937
|
+
var _templateObject$1$, _templateObject2$1p;
|
|
9915
9938
|
var options$1 = optionsForReturnPrint;
|
|
9916
9939
|
var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
9917
9940
|
var legacyProductId = _ref.legacyProductId;
|
|
@@ -9928,8 +9951,8 @@ var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
|
9928
9951
|
}, IconComponent && React.createElement(IconComponent, null), " ", item.label);
|
|
9929
9952
|
}));
|
|
9930
9953
|
};
|
|
9931
|
-
var OptionsList = /*#__PURE__*/styled.ul(_templateObject$
|
|
9932
|
-
var OptionsListLi = /*#__PURE__*/styled.li(_templateObject2$
|
|
9954
|
+
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"])));
|
|
9955
|
+
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
9956
|
|
|
9934
9957
|
var _excluded$3 = ["count"];
|
|
9935
9958
|
var ReturnOrderTable = function ReturnOrderTable() {
|
|
@@ -9968,7 +9991,6 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
9968
9991
|
setPaginationObject = _UsePaginationData[1];
|
|
9969
9992
|
var _usefetchAgain = usefetchAgain(),
|
|
9970
9993
|
callForFetch = _usefetchAgain[0];
|
|
9971
|
-
// console.log(callForFetch, 'callForFetchcallForFetchcallForFetchcallForFetch');
|
|
9972
9994
|
var OpenDropDown = function OpenDropDown(index) {
|
|
9973
9995
|
setPrintToggle(function (prevIndex) {
|
|
9974
9996
|
return prevIndex === index ? null : index;
|
|
@@ -10032,7 +10054,10 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10032
10054
|
var handleSelectAll = function handleSelectAll(e) {
|
|
10033
10055
|
setSelectAll(e.target.checked);
|
|
10034
10056
|
if (e.target.checked) {
|
|
10035
|
-
setSelectedReturnOrder(returnData == null ? void 0 : returnData.
|
|
10057
|
+
setSelectedReturnOrder(returnData == null ? void 0 : returnData.filter(function (loc) {
|
|
10058
|
+
var _loc$order_product_re;
|
|
10059
|
+
return (loc == null || (_loc$order_product_re = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re.type) === 'RTS';
|
|
10060
|
+
}).map(function (loc) {
|
|
10036
10061
|
return {
|
|
10037
10062
|
id: loc.id,
|
|
10038
10063
|
return_locations: loc == null ? void 0 : loc.return_locations,
|
|
@@ -10043,14 +10068,17 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10043
10068
|
new_location: loc == null ? void 0 : loc.new_location
|
|
10044
10069
|
};
|
|
10045
10070
|
}));
|
|
10046
|
-
setNewPayload(returnData == null ? void 0 : returnData.
|
|
10047
|
-
var _loc$
|
|
10071
|
+
setNewPayload(returnData == null ? void 0 : returnData.filter(function (loc) {
|
|
10072
|
+
var _loc$order_product_re2;
|
|
10073
|
+
return (loc == null || (_loc$order_product_re2 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re2.type) === 'RTS';
|
|
10074
|
+
}).map(function (loc) {
|
|
10075
|
+
var _loc$order_product_re3;
|
|
10048
10076
|
return {
|
|
10049
10077
|
id: loc.id,
|
|
10050
10078
|
account_number: createReturn == null ? void 0 : createReturn.account_number,
|
|
10051
10079
|
customer_id: +(createReturn == null ? void 0 : createReturn.customer_id),
|
|
10052
10080
|
products: [loc == null ? void 0 : loc.legacy_product_id],
|
|
10053
|
-
return_action:
|
|
10081
|
+
return_action: loc == null || (_loc$order_product_re3 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re3.type,
|
|
10054
10082
|
return_location_token: (loc == null ? void 0 : loc.return_location) || null,
|
|
10055
10083
|
new_location: loc == null ? void 0 : loc.new_location
|
|
10056
10084
|
};
|
|
@@ -10135,12 +10163,15 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10135
10163
|
var mergedPayload = Object.values(groupedPayload);
|
|
10136
10164
|
setGrouped(mergedPayload);
|
|
10137
10165
|
}, [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,
|
|
10166
|
+
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) {
|
|
10167
|
+
var _item$order_product_r;
|
|
10168
|
+
return (item == null || (_item$order_product_r = item.order_product_return_action) == null ? void 0 : _item$order_product_r.type) === 'RTS';
|
|
10169
|
+
}) ? React.createElement("th", {
|
|
10139
10170
|
className: "emailInvoiceCheckbox"
|
|
10140
10171
|
}, React.createElement(Checkbox$1, {
|
|
10141
10172
|
checked: selectAll,
|
|
10142
10173
|
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", {
|
|
10174
|
+
})) : 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, "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
10175
|
className: "emailInvoiceShare"
|
|
10145
10176
|
}, "Labels"))), React.createElement("tbody", null, load ? React.createElement("tr", null, React.createElement("td", {
|
|
10146
10177
|
colSpan: 6
|
|
@@ -10151,10 +10182,10 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10151
10182
|
})) : (returnData == null ? void 0 : returnData.length) === 0 ? React.createElement("tr", null, React.createElement("td", {
|
|
10152
10183
|
colSpan: 14
|
|
10153
10184
|
}, 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$
|
|
10185
|
+
var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$return_reasons, _item$order_product_r3, _item$collection_reas;
|
|
10155
10186
|
return React.createElement("tr", {
|
|
10156
10187
|
key: item.id
|
|
10157
|
-
}, React.createElement("td", null, React.createElement(Checkbox$1, {
|
|
10188
|
+
}, 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
10189
|
className: "custom-check",
|
|
10159
10190
|
checked: selectedReturnOrder == null ? void 0 : selectedReturnOrder.some(function (selectedInvoice) {
|
|
10160
10191
|
return (selectedInvoice == null ? void 0 : selectedInvoice.id) === item.id;
|
|
@@ -10162,7 +10193,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10162
10193
|
onChange: function onChange() {
|
|
10163
10194
|
return handleSelectOrderReturn(item.id, item.return_location, item.return_locations, item.order_product_return_action, item.new_location, item.legacy_product_id);
|
|
10164
10195
|
}
|
|
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", {
|
|
10196
|
+
})) : 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
10197
|
className: "awaiting"
|
|
10167
10198
|
}, "Awaiting")), React.createElement("td", null, " ", displayValueOrNA(item == null ? void 0 : item.new_location)), React.createElement("td", null, React.createElement("ul", {
|
|
10168
10199
|
style: {
|
|
@@ -10179,7 +10210,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10179
10210
|
style: {
|
|
10180
10211
|
color: '#888075'
|
|
10181
10212
|
}
|
|
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$
|
|
10213
|
+
}, displayValueOrNA(item == null || (_item$order_data2 = item.order_data) == null || (_item$order_data2 = _item$order_data2.order_recipient) == null ? void 0 : _item$order_data2.postcode)))), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.code)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.description)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.parts_count)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), ' ', item != null && item.weight && (item == null ? void 0 : item.weight) !== null ? 'KG' : ''), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React.createElement("td", null, displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React.createElement("td", null, (item == null || (_item$order_product_r3 = item.order_product_returns) == null ? void 0 : _item$order_product_r3.length) > 0 ? item.order_product_returns.map(function (ret) {
|
|
10183
10214
|
return ret != null && ret.collected_at ? format(new Date(ret.collected_at), 'dd/MM/yyyy') : 'UNKNOWN';
|
|
10184
10215
|
}) : '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
10216
|
className: "actionbox"
|
|
@@ -10251,7 +10282,7 @@ var DefectConfirm = [{
|
|
|
10251
10282
|
value: 'no'
|
|
10252
10283
|
}];
|
|
10253
10284
|
|
|
10254
|
-
var _templateObject$
|
|
10285
|
+
var _templateObject$20, _templateObject2$1q, _templateObject3$U, _templateObject4$x;
|
|
10255
10286
|
var DefetcDetails = function DefetcDetails() {
|
|
10256
10287
|
var handleSelectChange = function handleSelectChange() {
|
|
10257
10288
|
console.log('Option selected');
|
|
@@ -10293,12 +10324,12 @@ var DefetcDetails = function DefetcDetails() {
|
|
|
10293
10324
|
selectWrapperClass: "rounded"
|
|
10294
10325
|
}))));
|
|
10295
10326
|
};
|
|
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$
|
|
10327
|
+
var StyledAntSelect$5 = /*#__PURE__*/styled(AntSelect)(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10328
|
+
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"])));
|
|
10329
|
+
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"])));
|
|
10330
|
+
var LabelWrapper = /*#__PURE__*/styled.div(_templateObject4$x || (_templateObject4$x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10300
10331
|
|
|
10301
|
-
var _templateObject$
|
|
10332
|
+
var _templateObject$21;
|
|
10302
10333
|
var RepackProduct = function RepackProduct() {
|
|
10303
10334
|
var options = [{
|
|
10304
10335
|
value: 'bjsCouriers',
|
|
@@ -10358,9 +10389,9 @@ var RepackProduct = function RepackProduct() {
|
|
|
10358
10389
|
}
|
|
10359
10390
|
})));
|
|
10360
10391
|
};
|
|
10361
|
-
var GLobalPopupContent$1 = /*#__PURE__*/styled.div(_templateObject$
|
|
10392
|
+
var GLobalPopupContent$1 = /*#__PURE__*/styled.div(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10362
10393
|
|
|
10363
|
-
var _templateObject$
|
|
10394
|
+
var _templateObject$22, _templateObject2$1r, _templateObject3$V, _templateObject4$y, _templateObject5$l, _templateObject6$e;
|
|
10364
10395
|
var RepackDetails = function RepackDetails() {
|
|
10365
10396
|
var _useState = useState(false),
|
|
10366
10397
|
isAdditionalBoxChecked = _useState[0],
|
|
@@ -10407,14 +10438,14 @@ var RepackDetails = function RepackDetails() {
|
|
|
10407
10438
|
}
|
|
10408
10439
|
}, "Have any other boxes repacked into this one?"), isRepacked && React.createElement(RepackProduct, null)))));
|
|
10409
10440
|
};
|
|
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$
|
|
10441
|
+
var StyledAntSelect$6 = /*#__PURE__*/styled(AntSelect)(_templateObject$22 || (_templateObject$22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10442
|
+
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"])));
|
|
10443
|
+
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"])));
|
|
10444
|
+
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"])));
|
|
10445
|
+
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
10446
|
var LabelWrapper$1 = /*#__PURE__*/styled.div(_templateObject6$e || (_templateObject6$e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10416
10447
|
|
|
10417
|
-
var _templateObject$
|
|
10448
|
+
var _templateObject$23, _templateObject2$1s, _templateObject3$W, _templateObject4$z;
|
|
10418
10449
|
var OtherDamage = function OtherDamage() {
|
|
10419
10450
|
var handleSelectChange = function handleSelectChange() {
|
|
10420
10451
|
console.log('Option selected');
|
|
@@ -10470,12 +10501,12 @@ var OtherDamage = function OtherDamage() {
|
|
|
10470
10501
|
selectWrapperClass: "rounded"
|
|
10471
10502
|
}))));
|
|
10472
10503
|
};
|
|
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$
|
|
10504
|
+
var StyledAntSelect$7 = /*#__PURE__*/styled(AntSelect)(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10505
|
+
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"])));
|
|
10506
|
+
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"])));
|
|
10507
|
+
var LabelWrapper$2 = /*#__PURE__*/styled.div(_templateObject4$z || (_templateObject4$z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10477
10508
|
|
|
10478
|
-
var _templateObject$
|
|
10509
|
+
var _templateObject$24, _templateObject2$1t, _templateObject3$X, _templateObject4$A, _templateObject5$m;
|
|
10479
10510
|
var AddDefect = function AddDefect() {
|
|
10480
10511
|
var _useState = useState({
|
|
10481
10512
|
actionDuring: '',
|
|
@@ -10538,13 +10569,13 @@ var AddDefect = function AddDefect() {
|
|
|
10538
10569
|
selectWrapperClass: "rounded"
|
|
10539
10570
|
}))), state.productRepacked === 'yes' && React.createElement(RepackDetails, null)));
|
|
10540
10571
|
};
|
|
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$
|
|
10572
|
+
var StyledAntSelect$8 = /*#__PURE__*/styled(AntSelect)(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10573
|
+
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"])));
|
|
10574
|
+
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"])));
|
|
10575
|
+
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"])));
|
|
10576
|
+
var AddButton = /*#__PURE__*/styled(Button$1)(_templateObject5$m || (_templateObject5$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 10px;\n border-radius: 30px;\n"])));
|
|
10546
10577
|
|
|
10547
|
-
var _templateObject$
|
|
10578
|
+
var _templateObject$25, _templateObject2$1u, _templateObject3$Y, _templateObject4$B;
|
|
10548
10579
|
var QCLogs = function QCLogs() {
|
|
10549
10580
|
var handleSelectChange = function handleSelectChange() {
|
|
10550
10581
|
console.log('Option selected');
|
|
@@ -10565,12 +10596,12 @@ var QCLogs = function QCLogs() {
|
|
|
10565
10596
|
selectWrapperClass: "rounded"
|
|
10566
10597
|
}))), React.createElement(AddDefect, null));
|
|
10567
10598
|
};
|
|
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$
|
|
10599
|
+
var StyledAntSelect$9 = /*#__PURE__*/styled(AntSelect)(_templateObject$25 || (_templateObject$25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10600
|
+
var Container$18 = /*#__PURE__*/styled.div(_templateObject2$1u || (_templateObject2$1u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n flex-direction: column;\n"])));
|
|
10601
|
+
var Flex$b = /*#__PURE__*/styled.div(_templateObject3$Y || (_templateObject3$Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n"])));
|
|
10602
|
+
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
10603
|
|
|
10573
|
-
var _templateObject$
|
|
10604
|
+
var _templateObject$26, _templateObject2$1v, _templateObject3$Z, _templateObject4$C, _templateObject5$n;
|
|
10574
10605
|
function UpdateProduct() {
|
|
10575
10606
|
var _orderStaticData$coll, _orderStaticData$orde, _orderStaticData$retu, _orderStaticData$orde2;
|
|
10576
10607
|
var _useState = useState(),
|
|
@@ -10667,13 +10698,13 @@ function UpdateProduct() {
|
|
|
10667
10698
|
selectWrapperClass: "rounded"
|
|
10668
10699
|
}))));
|
|
10669
10700
|
}
|
|
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$
|
|
10701
|
+
var CollectionBox = /*#__PURE__*/styled.div(_templateObject$26 || (_templateObject$26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 32px;\n"])));
|
|
10702
|
+
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"])));
|
|
10703
|
+
var Container$19 = /*#__PURE__*/styled.div(_templateObject3$Z || (_templateObject3$Z = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10704
|
+
var LabelWrapper$5 = /*#__PURE__*/styled.div(_templateObject4$C || (_templateObject4$C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10705
|
+
var StyledAntSelect$a = /*#__PURE__*/styled(AntSelect)(_templateObject5$n || (_templateObject5$n = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10675
10706
|
|
|
10676
|
-
var _templateObject$
|
|
10707
|
+
var _templateObject$27, _templateObject2$1w, _templateObject3$_;
|
|
10677
10708
|
function UnReceiveProduct() {
|
|
10678
10709
|
var _orderStaticData$unre;
|
|
10679
10710
|
var _useRecieveOrderProdu = useRecieveOrderProducts(),
|
|
@@ -10721,11 +10752,11 @@ function UnReceiveProduct() {
|
|
|
10721
10752
|
onNotesChange: handleNotesChange
|
|
10722
10753
|
})));
|
|
10723
10754
|
}
|
|
10724
|
-
var Container$1a = /*#__PURE__*/styled.div(_templateObject$
|
|
10725
|
-
var LabelWrapper$6 = /*#__PURE__*/styled.div(_templateObject2$
|
|
10726
|
-
var StyledAntSelect$b = /*#__PURE__*/styled(AntSelect)(_templateObject3
|
|
10755
|
+
var Container$1a = /*#__PURE__*/styled.div(_templateObject$27 || (_templateObject$27 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10756
|
+
var LabelWrapper$6 = /*#__PURE__*/styled.div(_templateObject2$1w || (_templateObject2$1w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10757
|
+
var StyledAntSelect$b = /*#__PURE__*/styled(AntSelect)(_templateObject3$_ || (_templateObject3$_ = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10727
10758
|
|
|
10728
|
-
var _templateObject$
|
|
10759
|
+
var _templateObject$28, _templateObject2$1x;
|
|
10729
10760
|
var ProductAction = function ProductAction() {
|
|
10730
10761
|
var _useAtom = useAtom(selectedTabKeyAtom),
|
|
10731
10762
|
setSelectedTabKey = _useAtom[1];
|
|
@@ -10750,10 +10781,10 @@ var ProductAction = function ProductAction() {
|
|
|
10750
10781
|
}]
|
|
10751
10782
|
}))));
|
|
10752
10783
|
};
|
|
10753
|
-
var GLobalPopupContent$2 = /*#__PURE__*/styled.div(_templateObject$
|
|
10754
|
-
var Container$1b = /*#__PURE__*/styled.div(_templateObject2$
|
|
10784
|
+
var GLobalPopupContent$2 = /*#__PURE__*/styled.div(_templateObject$28 || (_templateObject$28 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10785
|
+
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
10786
|
|
|
10756
|
-
var _templateObject$
|
|
10787
|
+
var _templateObject$29;
|
|
10757
10788
|
var LogsTable = function LogsTable() {
|
|
10758
10789
|
var options = [{
|
|
10759
10790
|
value: 'bjsCouriers',
|
|
@@ -10828,9 +10859,9 @@ var LogsTable = function LogsTable() {
|
|
|
10828
10859
|
}
|
|
10829
10860
|
})));
|
|
10830
10861
|
};
|
|
10831
|
-
var GlobalPopupContent = /*#__PURE__*/styled.div(_templateObject$
|
|
10862
|
+
var GlobalPopupContent = /*#__PURE__*/styled.div(_templateObject$29 || (_templateObject$29 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10832
10863
|
|
|
10833
|
-
var _templateObject$
|
|
10864
|
+
var _templateObject$2a, _templateObject2$1y;
|
|
10834
10865
|
var DefectsModal = function DefectsModal() {
|
|
10835
10866
|
var options = [{
|
|
10836
10867
|
value: 'bjsCouriers',
|
|
@@ -10882,10 +10913,10 @@ var DefectsModal = function DefectsModal() {
|
|
|
10882
10913
|
}
|
|
10883
10914
|
}))));
|
|
10884
10915
|
};
|
|
10885
|
-
var StyledConatiner = /*#__PURE__*/styled.div(_templateObject$
|
|
10886
|
-
var GLobalPopupContent$3 = /*#__PURE__*/styled.div(_templateObject2$
|
|
10916
|
+
var StyledConatiner = /*#__PURE__*/styled.div(_templateObject$2a || (_templateObject$2a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* tex: nowrap; */\n"])));
|
|
10917
|
+
var GLobalPopupContent$3 = /*#__PURE__*/styled.div(_templateObject2$1y || (_templateObject2$1y = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10887
10918
|
|
|
10888
|
-
var _templateObject$
|
|
10919
|
+
var _templateObject$2b;
|
|
10889
10920
|
var repackModal = function repackModal() {
|
|
10890
10921
|
var columns = [{
|
|
10891
10922
|
key: 'packaging_type',
|
|
@@ -10915,9 +10946,9 @@ var repackModal = function repackModal() {
|
|
|
10915
10946
|
}
|
|
10916
10947
|
}))));
|
|
10917
10948
|
};
|
|
10918
|
-
var StyledConatiner$1 = /*#__PURE__*/styled.div(_templateObject$
|
|
10949
|
+
var StyledConatiner$1 = /*#__PURE__*/styled.div(_templateObject$2b || (_templateObject$2b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* text-wrap: nowrap; */\n"])));
|
|
10919
10950
|
|
|
10920
|
-
var _templateObject$
|
|
10951
|
+
var _templateObject$2c, _templateObject2$1z, _templateObject3$$;
|
|
10921
10952
|
var _excluded$4 = ["id"];
|
|
10922
10953
|
var CreateReturnModal = function CreateReturnModal() {
|
|
10923
10954
|
var _useSelectedConfirmLo = useSelectedConfirmLoc(),
|
|
@@ -10997,9 +11028,9 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
10997
11028
|
}, displayValueOrNA(returnLoc == null ? void 0 : returnLoc.new_location)));
|
|
10998
11029
|
})))));
|
|
10999
11030
|
};
|
|
11000
|
-
var StyledText$1 = /*#__PURE__*/styled.div(_templateObject$
|
|
11001
|
-
var Container$1c = /*#__PURE__*/styled.div(_templateObject2$
|
|
11002
|
-
var Wrapper$l = /*#__PURE__*/styled.div(_templateObject3
|
|
11031
|
+
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"])));
|
|
11032
|
+
var Container$1c = /*#__PURE__*/styled.div(_templateObject2$1z || (_templateObject2$1z = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11033
|
+
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
11034
|
|
|
11004
11035
|
var ModalManager = function ModalManager() {
|
|
11005
11036
|
var _useAtom = useAtom(countReducerAtom),
|
|
@@ -11035,11 +11066,13 @@ var ModalManager = function ModalManager() {
|
|
|
11035
11066
|
setCheck = _useSelectedConfirmLo[1];
|
|
11036
11067
|
var _useNewReturnPayload = useNewReturnPayload(),
|
|
11037
11068
|
setNewPayload = _useNewReturnPayload[1];
|
|
11038
|
-
|
|
11069
|
+
var _useGroupedPayload = useGroupedPayload(),
|
|
11070
|
+
setGrouped = _useGroupedPayload[1];
|
|
11039
11071
|
var _useSelectAll = useSelectAll(),
|
|
11040
11072
|
setSelectAll = _useSelectAll[1];
|
|
11041
11073
|
var _usefetchAgain = usefetchAgain(),
|
|
11042
11074
|
setCallForFetch = _usefetchAgain[1];
|
|
11075
|
+
var navigate = useNavigate();
|
|
11043
11076
|
console.log(orderProduct, 'abcabcabcabcabcabcabcabcabcabcabc');
|
|
11044
11077
|
var _closeModal = function closeModal() {
|
|
11045
11078
|
dispatch({
|
|
@@ -11124,8 +11157,7 @@ var ModalManager = function ModalManager() {
|
|
|
11124
11157
|
SetPostLoading(confirmLoading);
|
|
11125
11158
|
}, [confirmLoading]);
|
|
11126
11159
|
var handleConfirmReturn = function handleConfirmReturn() {
|
|
11127
|
-
|
|
11128
|
-
if (newGrouped.length > 0) {
|
|
11160
|
+
if ((newGrouped == null ? void 0 : newGrouped.length) > 0) {
|
|
11129
11161
|
setShouldPerformAction(true);
|
|
11130
11162
|
setCallForFetch(true);
|
|
11131
11163
|
}
|
|
@@ -11166,15 +11198,16 @@ var ModalManager = function ModalManager() {
|
|
|
11166
11198
|
dispatch({
|
|
11167
11199
|
type: 'close'
|
|
11168
11200
|
});
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11201
|
+
setSelectedReturnOrder([]);
|
|
11202
|
+
setCheck([]);
|
|
11203
|
+
setNewPayload([]);
|
|
11204
|
+
setGrouped([]);
|
|
11205
|
+
setSelectAll(false);
|
|
11206
|
+
setShouldPerformAction(false);
|
|
11174
11207
|
notification.error({
|
|
11175
11208
|
message: 'Failure',
|
|
11176
11209
|
// @ts-ignore
|
|
11177
|
-
description: "
|
|
11210
|
+
description: "" + (apiError == null ? void 0 : apiError.message)
|
|
11178
11211
|
});
|
|
11179
11212
|
setError(null);
|
|
11180
11213
|
// @ts-ignore
|
|
@@ -11193,8 +11226,11 @@ var ModalManager = function ModalManager() {
|
|
|
11193
11226
|
setShouldPerformAction(false);
|
|
11194
11227
|
setSelectAll(false);
|
|
11195
11228
|
setError(null);
|
|
11229
|
+
navigate('/order-return');
|
|
11196
11230
|
}
|
|
11197
|
-
}, [response]);
|
|
11231
|
+
}, [response, apiError]);
|
|
11232
|
+
console.log(apiError, 'apiError apiError');
|
|
11233
|
+
console.log(response, 'response response ');
|
|
11198
11234
|
return React.createElement(React.Fragment, null, (popupName == null ? void 0 : popupName.state) == 'create-return' && React.createElement(AntModal, {
|
|
11199
11235
|
openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
|
|
11200
11236
|
closeModal: function closeModal() {
|
|
@@ -11289,11 +11325,11 @@ var ModalManager = function ModalManager() {
|
|
|
11289
11325
|
}));
|
|
11290
11326
|
};
|
|
11291
11327
|
|
|
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$
|
|
11328
|
+
var _templateObject$2d, _templateObject2$1A, _templateObject3$10, _templateObject4$D, _templateObject6$f, _templateObject7$f;
|
|
11329
|
+
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"])));
|
|
11330
|
+
var StyledContentWrapper = /*#__PURE__*/styled.div(_templateObject2$1A || (_templateObject2$1A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 12px;\n"])));
|
|
11331
|
+
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"])));
|
|
11332
|
+
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
11333
|
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
11334
|
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
11335
|
var active = _ref.active;
|
|
@@ -11413,7 +11449,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
11413
11449
|
}, React.createElement(NextIcon, null)))));
|
|
11414
11450
|
};
|
|
11415
11451
|
|
|
11416
|
-
var _templateObject$
|
|
11452
|
+
var _templateObject$2e, _templateObject2$1B;
|
|
11417
11453
|
var ReturnTable = function ReturnTable() {
|
|
11418
11454
|
var _UsePaginationData = UsePaginationData(),
|
|
11419
11455
|
paginationObj = _UsePaginationData[0];
|
|
@@ -11440,8 +11476,8 @@ var ReturnTable = function ReturnTable() {
|
|
|
11440
11476
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
11441
11477
|
})))), React.createElement(ModalManager, null));
|
|
11442
11478
|
};
|
|
11443
|
-
var Container$1d = /*#__PURE__*/styled.div(_templateObject$
|
|
11444
|
-
var DashBoardWrapper$1 = /*#__PURE__*/styled.section(_templateObject2$
|
|
11479
|
+
var Container$1d = /*#__PURE__*/styled.div(_templateObject$2e || (_templateObject$2e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
|
|
11480
|
+
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
11481
|
|
|
11446
11482
|
function LoadIcon() {
|
|
11447
11483
|
return React.createElement("svg", {
|
|
@@ -11459,7 +11495,7 @@ function LoadIcon() {
|
|
|
11459
11495
|
}));
|
|
11460
11496
|
}
|
|
11461
11497
|
|
|
11462
|
-
var _templateObject$
|
|
11498
|
+
var _templateObject$2f, _templateObject2$1C;
|
|
11463
11499
|
var PrintDropDown = function PrintDropDown(_ref) {
|
|
11464
11500
|
var legacyProductId = _ref.legacyProductId;
|
|
11465
11501
|
var downloadFiles = function downloadFiles(label) {
|
|
@@ -11486,8 +11522,8 @@ var PrintDropDown = function PrintDropDown(_ref) {
|
|
|
11486
11522
|
}, IconComponent && React.createElement(IconComponent, null), item.label);
|
|
11487
11523
|
}));
|
|
11488
11524
|
};
|
|
11489
|
-
var OptionsList$1 = /*#__PURE__*/styled.ul(_templateObject$
|
|
11490
|
-
var OptionsListLi$1 = /*#__PURE__*/styled.li(_templateObject2$
|
|
11525
|
+
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"])));
|
|
11526
|
+
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
11527
|
var disabled = _ref2.disabled;
|
|
11492
11528
|
return disabled ? 'not-allowed' : 'pointer';
|
|
11493
11529
|
}, function (_ref3) {
|
|
@@ -11595,10 +11631,6 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11595
11631
|
setOrderId = _useOrderId[1];
|
|
11596
11632
|
// console.log(id, 'idid');
|
|
11597
11633
|
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
11634
|
className: "emailInvoiceNo"
|
|
11603
11635
|
}, "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
11636
|
className: "emailInvoiceShare"
|
|
@@ -11624,9 +11656,7 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11624
11656
|
var statusClass = getStatusClass(status);
|
|
11625
11657
|
return React.createElement("tr", {
|
|
11626
11658
|
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", {
|
|
11659
|
+
}, 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
11660
|
onClick: function onClick() {
|
|
11631
11661
|
return setOrderId(item.id);
|
|
11632
11662
|
}
|
|
@@ -11685,9 +11715,10 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11685
11715
|
})))));
|
|
11686
11716
|
};
|
|
11687
11717
|
|
|
11688
|
-
var _templateObject$
|
|
11718
|
+
var _templateObject$2g;
|
|
11719
|
+
// import DownloadIcon from '../../../../assets/icons/DownloadIcon';
|
|
11689
11720
|
var TableFilters = function TableFilters() {
|
|
11690
|
-
return React.createElement(Container$1e, null
|
|
11721
|
+
return React.createElement(Container$1e, null);
|
|
11691
11722
|
// return (
|
|
11692
11723
|
// // <StyledBulkFilterCover>
|
|
11693
11724
|
// <StyledBulkItem>
|
|
@@ -11701,27 +11732,7 @@ var TableFilters = function TableFilters() {
|
|
|
11701
11732
|
// // </StyledBulkFilterCover>
|
|
11702
11733
|
// );
|
|
11703
11734
|
};
|
|
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"])));
|
|
11735
|
+
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
11736
|
|
|
11726
11737
|
var FilterIcon = function FilterIcon() {
|
|
11727
11738
|
return React.createElement("svg", {
|
|
@@ -11782,6 +11793,50 @@ var ClientIcon = function ClientIcon() {
|
|
|
11782
11793
|
}));
|
|
11783
11794
|
};
|
|
11784
11795
|
|
|
11796
|
+
var StatusIcon = function StatusIcon() {
|
|
11797
|
+
return React.createElement("svg", {
|
|
11798
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11799
|
+
width: "13",
|
|
11800
|
+
height: "12",
|
|
11801
|
+
viewBox: "0 0 13 12",
|
|
11802
|
+
fill: "none"
|
|
11803
|
+
}, React.createElement("path", {
|
|
11804
|
+
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",
|
|
11805
|
+
stroke: "#6D6B68",
|
|
11806
|
+
"stroke-width": "2",
|
|
11807
|
+
"stroke-linecap": "round",
|
|
11808
|
+
"stroke-linejoin": "round"
|
|
11809
|
+
}), React.createElement("path", {
|
|
11810
|
+
d: "M7.8501 4.25L9.6001 6L11.3501 4.25",
|
|
11811
|
+
stroke: "#6D6B68",
|
|
11812
|
+
"stroke-width": "2",
|
|
11813
|
+
"stroke-linecap": "round",
|
|
11814
|
+
"stroke-linejoin": "round"
|
|
11815
|
+
}));
|
|
11816
|
+
};
|
|
11817
|
+
|
|
11818
|
+
var AssigneIcon = function AssigneIcon() {
|
|
11819
|
+
return React.createElement("svg", {
|
|
11820
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11821
|
+
width: "15",
|
|
11822
|
+
height: "14",
|
|
11823
|
+
viewBox: "0 0 15 14",
|
|
11824
|
+
fill: "none"
|
|
11825
|
+
}, React.createElement("g", {
|
|
11826
|
+
"clip-path": "url(#clip0_504_13636)"
|
|
11827
|
+
}, React.createElement("path", {
|
|
11828
|
+
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",
|
|
11829
|
+
fill: "#6D6B68"
|
|
11830
|
+
})), React.createElement("defs", null, React.createElement("clipPath", {
|
|
11831
|
+
id: "clip0_504_13636"
|
|
11832
|
+
}, React.createElement("rect", {
|
|
11833
|
+
width: "14",
|
|
11834
|
+
height: "14",
|
|
11835
|
+
fill: "white",
|
|
11836
|
+
transform: "translate(0.100098)"
|
|
11837
|
+
}))));
|
|
11838
|
+
};
|
|
11839
|
+
|
|
11785
11840
|
var initialState$2 = {
|
|
11786
11841
|
'x-filters': [],
|
|
11787
11842
|
'x-pagination': {
|
|
@@ -11790,6 +11845,7 @@ var initialState$2 = {
|
|
|
11790
11845
|
}
|
|
11791
11846
|
};
|
|
11792
11847
|
var filterReducer$1 = function filterReducer(state, action) {
|
|
11848
|
+
console.log(action, 'action');
|
|
11793
11849
|
switch (action.type) {
|
|
11794
11850
|
case 'SET_DATE_FILTER':
|
|
11795
11851
|
return _extends({}, state, {
|
|
@@ -11854,51 +11910,7 @@ var filtersReducerReturnAtom = /*#__PURE__*/atom(function (get) {
|
|
|
11854
11910
|
return set(filtersStateAtom$1, filterReducer$1(get(filtersStateAtom$1), action));
|
|
11855
11911
|
});
|
|
11856
11912
|
|
|
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;
|
|
11913
|
+
var _templateObject$2h, _templateObject2$1D;
|
|
11902
11914
|
var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
11903
11915
|
var _useAtom = useAtom(filtersReducerReturnAtom),
|
|
11904
11916
|
dispatch = _useAtom[1];
|
|
@@ -11915,6 +11927,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11915
11927
|
var _useState3 = useState(),
|
|
11916
11928
|
statusOrder = _useState3[0],
|
|
11917
11929
|
setStatusOfOrder = _useState3[1];
|
|
11930
|
+
console.log(selectedClient, 'fffffselectedClient');
|
|
11918
11931
|
var zoneOptions = [{
|
|
11919
11932
|
label: 'Zone 1',
|
|
11920
11933
|
value: 'zone1'
|
|
@@ -11943,6 +11956,11 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11943
11956
|
type: 'SET_DATE_FILTER',
|
|
11944
11957
|
payload: selectedDate
|
|
11945
11958
|
});
|
|
11959
|
+
// Reset to the first page
|
|
11960
|
+
dispatch({
|
|
11961
|
+
type: 'SET_PAGE',
|
|
11962
|
+
payload: 1
|
|
11963
|
+
});
|
|
11946
11964
|
}
|
|
11947
11965
|
}, [selectedDate]);
|
|
11948
11966
|
//client options
|
|
@@ -11953,6 +11971,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11953
11971
|
value: option == null ? void 0 : option.id
|
|
11954
11972
|
};
|
|
11955
11973
|
});
|
|
11974
|
+
console.log(clientOptions, 'clientOptions');
|
|
11956
11975
|
//status of order
|
|
11957
11976
|
var orderOptions = statusOfOrder == null ? void 0 : statusOfOrder.map(function (option) {
|
|
11958
11977
|
var _option$status_type, _option$status_type2;
|
|
@@ -11962,20 +11981,32 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11962
11981
|
};
|
|
11963
11982
|
});
|
|
11964
11983
|
var handleClientChange = function handleClientChange(value) {
|
|
11984
|
+
if (value === selectedClient) return;
|
|
11965
11985
|
console.log(value, 'value');
|
|
11966
11986
|
setSelectedClient(value);
|
|
11967
11987
|
dispatch({
|
|
11968
11988
|
type: 'SET_CLIENT_FILTER',
|
|
11969
|
-
payload:
|
|
11989
|
+
payload: value
|
|
11990
|
+
});
|
|
11991
|
+
// Reset to the first page
|
|
11992
|
+
dispatch({
|
|
11993
|
+
type: 'SET_PAGE',
|
|
11994
|
+
payload: 1
|
|
11970
11995
|
});
|
|
11971
11996
|
};
|
|
11972
11997
|
var handleStatusOfOrder = function handleStatusOfOrder(value) {
|
|
11998
|
+
if (value === statusOfOrder) return;
|
|
11973
11999
|
console.log(value, 'value');
|
|
11974
12000
|
setStatusOfOrder(value);
|
|
11975
12001
|
dispatch({
|
|
11976
12002
|
type: 'SET_STATUS_ORDER_FILTER',
|
|
11977
12003
|
payload: value
|
|
11978
12004
|
});
|
|
12005
|
+
// Reset to the first page
|
|
12006
|
+
dispatch({
|
|
12007
|
+
type: 'SET_PAGE',
|
|
12008
|
+
payload: 1
|
|
12009
|
+
});
|
|
11979
12010
|
};
|
|
11980
12011
|
var handleClearAll = function handleClearAll() {
|
|
11981
12012
|
setSelectedDate(null);
|
|
@@ -12017,8 +12048,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12017
12048
|
style: {
|
|
12018
12049
|
minWidth: '130px'
|
|
12019
12050
|
},
|
|
12020
|
-
value: statusOrder
|
|
12021
|
-
allowClear: true
|
|
12051
|
+
value: statusOrder
|
|
12022
12052
|
}))), React.createElement("div", {
|
|
12023
12053
|
className: "datefilter"
|
|
12024
12054
|
}, React.createElement("div", {
|
|
@@ -12032,8 +12062,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12032
12062
|
style: {
|
|
12033
12063
|
width: '125px',
|
|
12034
12064
|
border: 'none'
|
|
12035
|
-
}
|
|
12036
|
-
allowClear: true
|
|
12065
|
+
}
|
|
12037
12066
|
}))), React.createElement("div", {
|
|
12038
12067
|
className: "datefilter",
|
|
12039
12068
|
style: {
|
|
@@ -12051,15 +12080,15 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12051
12080
|
minWidth: '100px'
|
|
12052
12081
|
},
|
|
12053
12082
|
disabled: true
|
|
12054
|
-
}))), selectedDate ? React.createElement(React.Fragment, null, React.createElement(ClearAll, {
|
|
12083
|
+
}))), selectedDate || statusOrder || selectedClient ? React.createElement(React.Fragment, null, React.createElement(ClearAll, {
|
|
12055
12084
|
onClick: handleClearAll
|
|
12056
12085
|
}, React.createElement(StyledFilterBtnIcon, null, React.createElement("i", {
|
|
12057
12086
|
className: "cross"
|
|
12058
12087
|
})), React.createElement(StyledFilterBtnLabel, null, "Clear all"))) : null)), React.createElement(TableFilters, null)));
|
|
12059
12088
|
};
|
|
12060
|
-
var StyledDatePicker = /*#__PURE__*/styled.div(_templateObject$
|
|
12089
|
+
var StyledDatePicker = /*#__PURE__*/styled.div(_templateObject$2h || (_templateObject$2h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
|
|
12061
12090
|
// const DropdownContainer = styled.div``;
|
|
12062
|
-
var StyledAntSelect$c = /*#__PURE__*/styled.div(_templateObject2$
|
|
12091
|
+
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
12092
|
|
|
12064
12093
|
var PAGE_SIZE_OPTIONS$1 = [50, 100, 150];
|
|
12065
12094
|
var MAX_PAGES_TO_SHOW$1 = 5;
|
|
@@ -12145,7 +12174,7 @@ var ReturnPagination = function ReturnPagination(_ref) {
|
|
|
12145
12174
|
}, React.createElement(NextIcon, null)))));
|
|
12146
12175
|
};
|
|
12147
12176
|
|
|
12148
|
-
var _templateObject$
|
|
12177
|
+
var _templateObject$2i, _templateObject2$1E;
|
|
12149
12178
|
var _excluded$5 = ["count"];
|
|
12150
12179
|
var ReturnAfterTable = function ReturnAfterTable() {
|
|
12151
12180
|
var _useReturnAfterOrderD = useReturnAfterOrderData(),
|
|
@@ -12156,6 +12185,14 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12156
12185
|
state = _useAtom[0];
|
|
12157
12186
|
var filters = state['x-filters'],
|
|
12158
12187
|
pagination = state['x-pagination'];
|
|
12188
|
+
var splitPath = function splitPath(str) {
|
|
12189
|
+
var _str$split;
|
|
12190
|
+
var parts = str == null || (_str$split = str.split('/')) == null ? void 0 : _str$split.filter(function (part) {
|
|
12191
|
+
return part !== '';
|
|
12192
|
+
}); // Filter out empty parts
|
|
12193
|
+
return parts;
|
|
12194
|
+
};
|
|
12195
|
+
var paths = splitPath(location.pathname);
|
|
12159
12196
|
var _UsePaginationReturnD = UsePaginationReturnData(),
|
|
12160
12197
|
paginationObj = _UsePaginationReturnD[0];
|
|
12161
12198
|
var _useState = useState(1),
|
|
@@ -12165,6 +12202,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12165
12202
|
setItemsPerPage = _useItemsPerReturnPag[1];
|
|
12166
12203
|
var _UsePaginationData = UsePaginationData(),
|
|
12167
12204
|
setPaginationObject = _UsePaginationData[1];
|
|
12205
|
+
console.log(paths, 'paths');
|
|
12168
12206
|
var page = paginationObj.page,
|
|
12169
12207
|
total = paginationObj.total;
|
|
12170
12208
|
var handlePageChange = function handlePageChange(page) {
|
|
@@ -12200,7 +12238,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12200
12238
|
}, [fetchedReturnOrderData, staticDataLoading]);
|
|
12201
12239
|
return React.createElement("div", null, React.createElement(DashBoardWrapper$2, null, React.createElement("div", {
|
|
12202
12240
|
className: "Tableconatiner"
|
|
12203
|
-
}, React.createElement(
|
|
12241
|
+
}, React.createElement(Container$1f, null, React.createElement(ReturnOrderFilter, null), React.createElement(OrderTable, null), total > 0 && React.createElement(ReturnPagination, {
|
|
12204
12242
|
currentPage: page,
|
|
12205
12243
|
totalItems: total,
|
|
12206
12244
|
itemsPerPage: itemsPerPage,
|
|
@@ -12208,8 +12246,29 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12208
12246
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
12209
12247
|
})))));
|
|
12210
12248
|
};
|
|
12211
|
-
var Container$1f = /*#__PURE__*/styled.div(_templateObject$
|
|
12212
|
-
var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject2$
|
|
12249
|
+
var Container$1f = /*#__PURE__*/styled.div(_templateObject$2i || (_templateObject$2i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n /* top: -30px; */\n"])));
|
|
12250
|
+
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"])));
|
|
12251
|
+
|
|
12252
|
+
var _templateObject2$1F;
|
|
12253
|
+
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"])));
|
|
12254
|
+
|
|
12255
|
+
var _templateObject$2j, _templateObject2$1G;
|
|
12256
|
+
var SearchType = function SearchType() {
|
|
12257
|
+
var _useState = useState(''),
|
|
12258
|
+
searchText = _useState[0],
|
|
12259
|
+
setSearchText = _useState[1];
|
|
12260
|
+
var handleInputChange = function handleInputChange(event) {
|
|
12261
|
+
setSearchText(event.target.value);
|
|
12262
|
+
};
|
|
12263
|
+
return React.createElement(Search, null, React.createElement(SearchIcon, null), React.createElement(SearchInput, {
|
|
12264
|
+
type: "text",
|
|
12265
|
+
placeholder: "Search",
|
|
12266
|
+
value: searchText,
|
|
12267
|
+
onChange: handleInputChange
|
|
12268
|
+
}));
|
|
12269
|
+
};
|
|
12270
|
+
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"])));
|
|
12271
|
+
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
12272
|
|
|
12214
12273
|
var BulkFilter = function BulkFilter() {
|
|
12215
12274
|
// const [printToogle, setPrintToggle] = useMenuDropDown();
|
|
@@ -12330,66 +12389,17 @@ var ReturnTable$1 = function ReturnTable(_ref) {
|
|
|
12330
12389
|
})))));
|
|
12331
12390
|
};
|
|
12332
12391
|
|
|
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;
|
|
12392
|
+
var _templateObject$2k, _templateObject2$1H, _templateObject3$11;
|
|
12393
|
+
// import Pagination from './table-view/Pagination';
|
|
12394
|
+
// import { overviewfiltersReducerAtom } from './header-filters/overViewFilter';
|
|
12383
12395
|
function ReturnMainTable() {
|
|
12384
|
-
|
|
12385
|
-
state = _useAtom[0];
|
|
12396
|
+
// const [state] = useAtom(overviewfiltersReducerAtom);
|
|
12386
12397
|
// const [paginationObj] = UsePaginationData();
|
|
12387
12398
|
// const [, setCurrentPage] = useState(1);
|
|
12388
12399
|
// const [itemsPerPage, setItemsPerPage] = useItemsPerPage();
|
|
12389
|
-
|
|
12400
|
+
// const { 'x-pagination': pagination } = state;
|
|
12390
12401
|
// const { page, total } = paginationObj;
|
|
12391
|
-
|
|
12392
|
-
selectedClient = _useTableName[0];
|
|
12402
|
+
// const [selectedClient] = useTableName();
|
|
12393
12403
|
// const [, setPaginationObject] = UsePaginationData();
|
|
12394
12404
|
var _useStickyStatus = useStickyStatus(),
|
|
12395
12405
|
isScrolled = _useStickyStatus[0];
|
|
@@ -12406,7 +12416,10 @@ function ReturnMainTable() {
|
|
|
12406
12416
|
var _useApiHook = useApiHook({
|
|
12407
12417
|
endpoint: "/return_orders/get/client-returns/",
|
|
12408
12418
|
method: 'GET',
|
|
12409
|
-
pagination:
|
|
12419
|
+
pagination: {
|
|
12420
|
+
page: 1,
|
|
12421
|
+
per_page: 200
|
|
12422
|
+
}
|
|
12410
12423
|
}),
|
|
12411
12424
|
fetchedClientData = _useApiHook.data,
|
|
12412
12425
|
staticDataLoading = _useApiHook.loading;
|
|
@@ -12426,19 +12439,20 @@ function ReturnMainTable() {
|
|
|
12426
12439
|
// }
|
|
12427
12440
|
}
|
|
12428
12441
|
}, [staticDataLoading]);
|
|
12442
|
+
var getClient = localStorage.getItem('clientName');
|
|
12429
12443
|
return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper$3, {
|
|
12430
12444
|
className: " " + (isScrolled ? 'stickyTableHead' : '')
|
|
12431
12445
|
}, React.createElement("div", {
|
|
12432
12446
|
className: "Tableconatiner"
|
|
12433
|
-
}, React.createElement(HeaderFilter, null), React.createElement(Container$1g, null, React.createElement(Row$7, null, React.createElement(Text$7, null, "Client Return"),
|
|
12447
|
+
}, 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
12448
|
}
|
|
12435
12449
|
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$
|
|
12450
|
+
var Container$1g = /*#__PURE__*/styled.div(_templateObject2$1H || (_templateObject2$1H = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
|
|
12451
|
+
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
12452
|
|
|
12439
|
-
var _templateObject$2l, _templateObject2$
|
|
12453
|
+
var _templateObject$2l, _templateObject2$1I;
|
|
12440
12454
|
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$
|
|
12455
|
+
var StyledFlex = /*#__PURE__*/styled.div(_templateObject2$1I || (_templateObject2$1I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
12442
12456
|
|
|
12443
12457
|
var _templateObject$2m;
|
|
12444
12458
|
var HeaderTitle = function HeaderTitle(props) {
|
|
@@ -12446,12 +12460,12 @@ var HeaderTitle = function HeaderTitle(props) {
|
|
|
12446
12460
|
};
|
|
12447
12461
|
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
12462
|
|
|
12449
|
-
var _templateObject$2n, _templateObject2$
|
|
12463
|
+
var _templateObject$2n, _templateObject2$1J;
|
|
12450
12464
|
function Breadcrumb(props) {
|
|
12451
12465
|
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
12466
|
}
|
|
12453
12467
|
var BreadcrumbContainer = /*#__PURE__*/styled.div(_templateObject$2n || (_templateObject$2n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n"])));
|
|
12454
|
-
var BreadcrumbList = /*#__PURE__*/styled.span(_templateObject2$
|
|
12468
|
+
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
12469
|
|
|
12456
12470
|
var RouterHeader = function RouterHeader(_ref) {
|
|
12457
12471
|
var _ref$breadcrumbTitle = _ref.breadcrumbTitle,
|
|
@@ -12473,6 +12487,7 @@ var RouterHeader = function RouterHeader(_ref) {
|
|
|
12473
12487
|
})))));
|
|
12474
12488
|
};
|
|
12475
12489
|
|
|
12490
|
+
// import { filtersReducerAtom } from './components/order-daily-overview/header-filters/filterStore';
|
|
12476
12491
|
function ReturnClient() {
|
|
12477
12492
|
var _selectedClientString;
|
|
12478
12493
|
notification.config({
|
|
@@ -12486,12 +12501,23 @@ function ReturnClient() {
|
|
|
12486
12501
|
var navigate = useNavigate();
|
|
12487
12502
|
var selectedClientString = selectedClient == null ? void 0 : selectedClient.replace(/\s+/g, '-');
|
|
12488
12503
|
selectedClientString = (_selectedClientString = selectedClientString) == null ? void 0 : _selectedClientString.toLowerCase();
|
|
12504
|
+
var _useCustomerData = useCustomerData(),
|
|
12505
|
+
setCustomers = _useCustomerData[1];
|
|
12506
|
+
var _useActionType = useActionType(),
|
|
12507
|
+
setActionType = _useActionType[1];
|
|
12508
|
+
var _useLocationData = useLocationData(),
|
|
12509
|
+
setLocationData = _useLocationData[1];
|
|
12510
|
+
var _useStatusOrderData = useStatusOrderData(),
|
|
12511
|
+
setStatusOfOrders = _useStatusOrderData[1];
|
|
12512
|
+
// const [, dispatch] = useAtom(filtersReducerAtom);
|
|
12489
12513
|
console.log(selectedClientString, 'selectedClient');
|
|
12490
12514
|
console.log("../filter/:" + selectedClientString);
|
|
12491
12515
|
useEffect(function () {
|
|
12492
|
-
if (
|
|
12516
|
+
if (location.pathname.includes('/returnclient')) {
|
|
12493
12517
|
localStorage.removeItem('clientName');
|
|
12494
12518
|
localStorage.removeItem('clientId');
|
|
12519
|
+
localStorage.removeItem('uuid');
|
|
12520
|
+
// dispatch({ type: 'CLEAR_CLIENT', payload: [] });
|
|
12495
12521
|
}
|
|
12496
12522
|
}, [location.pathname]);
|
|
12497
12523
|
useEffect(function () {
|
|
@@ -12500,6 +12526,56 @@ function ReturnClient() {
|
|
|
12500
12526
|
navigate("filter/" + _selectedClientString2);
|
|
12501
12527
|
}
|
|
12502
12528
|
}, [selectedClient]);
|
|
12529
|
+
//API for client data
|
|
12530
|
+
var _useApiHook = useApiHook({
|
|
12531
|
+
endpoint: "/customers/",
|
|
12532
|
+
method: 'GET',
|
|
12533
|
+
//@ts-ignore
|
|
12534
|
+
pagination: {
|
|
12535
|
+
is_pagination: false
|
|
12536
|
+
}
|
|
12537
|
+
}),
|
|
12538
|
+
fetchedCustomerData = _useApiHook.data,
|
|
12539
|
+
loading = _useApiHook.loading;
|
|
12540
|
+
//API for action type
|
|
12541
|
+
var _useApiHook2 = useApiHook({
|
|
12542
|
+
endpoint: "/orders/getStaticData/all/",
|
|
12543
|
+
method: 'GET'
|
|
12544
|
+
}),
|
|
12545
|
+
fetchedStaticData = _useApiHook2.data,
|
|
12546
|
+
actionLoading = _useApiHook2.loading;
|
|
12547
|
+
//API for return locations
|
|
12548
|
+
var _useApiHook3 = useApiHook({
|
|
12549
|
+
endpoint: "/return_locations/",
|
|
12550
|
+
method: 'GET',
|
|
12551
|
+
//@ts-ignore
|
|
12552
|
+
pagination: {
|
|
12553
|
+
is_pagination: false
|
|
12554
|
+
}
|
|
12555
|
+
}),
|
|
12556
|
+
fetchedLocationData = _useApiHook3.data,
|
|
12557
|
+
locationloading = _useApiHook3.loading;
|
|
12558
|
+
useEffect(function () {
|
|
12559
|
+
if (fetchedCustomerData && fetchedCustomerData != null && fetchedCustomerData.data) {
|
|
12560
|
+
setCustomers(fetchedCustomerData == null ? void 0 : fetchedCustomerData.data);
|
|
12561
|
+
}
|
|
12562
|
+
}, [loading]);
|
|
12563
|
+
useEffect(function () {
|
|
12564
|
+
if (fetchedStaticData && fetchedStaticData != null && fetchedStaticData.data) {
|
|
12565
|
+
var _fetchedStaticData$da, _fetchedStaticData$da2;
|
|
12566
|
+
setActionType(fetchedStaticData == null || (_fetchedStaticData$da = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da.flatMap(function (i) {
|
|
12567
|
+
return i == null ? void 0 : i.order_product_return_action;
|
|
12568
|
+
}));
|
|
12569
|
+
setStatusOfOrders(fetchedStaticData == null || (_fetchedStaticData$da2 = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da2.flatMap(function (i) {
|
|
12570
|
+
return i == null ? void 0 : i.order_stock_alias;
|
|
12571
|
+
}));
|
|
12572
|
+
}
|
|
12573
|
+
}, [actionLoading]);
|
|
12574
|
+
useEffect(function () {
|
|
12575
|
+
if (fetchedLocationData && fetchedLocationData != null && fetchedLocationData.data) {
|
|
12576
|
+
setLocationData(fetchedLocationData == null ? void 0 : fetchedLocationData.data);
|
|
12577
|
+
}
|
|
12578
|
+
}, [locationloading]);
|
|
12503
12579
|
return React.createElement(React.Fragment, null, React.createElement(RouterHeader, null), React.createElement(Suspense, {
|
|
12504
12580
|
fallback: React.createElement(LoadingMessage, null)
|
|
12505
12581
|
}, React.createElement(Routes, null, React.createElement(Route, {
|