@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
|
@@ -3483,7 +3483,7 @@ var Section = /*#__PURE__*/styled__default.div(_templateObject$T || (_templateOb
|
|
|
3483
3483
|
var _templateObject19, _templateObject20, _templateObject21;
|
|
3484
3484
|
var StyledTable$1 = /*#__PURE__*/styled__default.table(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n white-space: nowrap;\n 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"])));
|
|
3485
3485
|
// Styled components
|
|
3486
|
-
var StyledTableWrapper = /*#__PURE__*/styled__default.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"])));
|
|
3486
|
+
var StyledTableWrapper = /*#__PURE__*/styled__default.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"])));
|
|
3487
3487
|
var CustomDrop = /*#__PURE__*/styled__default.div(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #fff;\n display: flex;\n padding: 4px 8px;\n gap: 8px;\n align-items: center; */\n cursor: pointer;\n &.active .drop {\n transform: rotate(180deg);\n }\n"])));
|
|
3488
3488
|
|
|
3489
3489
|
var ActionIcon = function ActionIcon() {
|
|
@@ -3565,6 +3565,7 @@ function useFinalPayload() {
|
|
|
3565
3565
|
}
|
|
3566
3566
|
|
|
3567
3567
|
var ReturnProductTable = function ReturnProductTable() {
|
|
3568
|
+
var _orderStaticData$retu;
|
|
3568
3569
|
var _useSelectedOrders = useSelectedOrders(),
|
|
3569
3570
|
selectedInvoices = _useSelectedOrders[0];
|
|
3570
3571
|
var _useState = React.useState(false),
|
|
@@ -3615,6 +3616,21 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
3615
3616
|
return !prevSelectAll;
|
|
3616
3617
|
});
|
|
3617
3618
|
}, []);
|
|
3619
|
+
// const returnreason =
|
|
3620
|
+
var _useOrderStaticData = useOrderStaticData(),
|
|
3621
|
+
orderStaticData = _useOrderStaticData[0];
|
|
3622
|
+
var returnReasonsOptions = orderStaticData == null || (_orderStaticData$retu = orderStaticData.return_reasons) == null ? void 0 : _orderStaticData$retu.map(function (option) {
|
|
3623
|
+
return {
|
|
3624
|
+
label: option.reason,
|
|
3625
|
+
value: option.id
|
|
3626
|
+
};
|
|
3627
|
+
});
|
|
3628
|
+
var getReturnReasonLabel = function getReturnReasonLabel(returnReasonId) {
|
|
3629
|
+
var matchedReason = returnReasonsOptions == null ? void 0 : returnReasonsOptions.find(function (option) {
|
|
3630
|
+
return option.value === returnReasonId;
|
|
3631
|
+
});
|
|
3632
|
+
return matchedReason ? matchedReason.label : 'N/A'; // Return label or 'N/A' if no match found
|
|
3633
|
+
};
|
|
3618
3634
|
return React__default.createElement("div", null, React__default.createElement(StyledTableWrapper, {
|
|
3619
3635
|
id: "tableScrolling"
|
|
3620
3636
|
}, React__default.createElement(StyledTable$1, null, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", {
|
|
@@ -3629,7 +3645,7 @@ var ReturnProductTable = function ReturnProductTable() {
|
|
|
3629
3645
|
checked: selectedInvoices.some(function (selectedInvoice) {
|
|
3630
3646
|
return selectedInvoice.id === invoice.id;
|
|
3631
3647
|
})
|
|
3632
|
-
})), React__default.createElement("td", null, 'N/A'), React__default.createElement("td", null, 'N/A'), React__default.createElement("td", null, invoice.code), React__default.createElement("td", null, invoice.description), React__default.createElement("td", null, '
|
|
3648
|
+
})), React__default.createElement("td", null, 'N/A'), React__default.createElement("td", null, 'N/A'), React__default.createElement("td", null, invoice.code), React__default.createElement("td", null, invoice.description), React__default.createElement("td", null, getReturnReasonLabel(invoice == null ? void 0 : invoice.return_reason_id)), ' ', React__default.createElement("td", null, "1 of 1"), React__default.createElement("td", null, React__default.createElement("div", {
|
|
3633
3649
|
onClick: function onClick() {
|
|
3634
3650
|
handleActionClick(invoice.id);
|
|
3635
3651
|
onDeleteProducts();
|
|
@@ -9058,13 +9074,13 @@ function OrderView() {
|
|
|
9058
9074
|
}
|
|
9059
9075
|
}, [apiCalling]);
|
|
9060
9076
|
React.useEffect(function () {
|
|
9061
|
-
if (paths.length > 1) {
|
|
9062
|
-
|
|
9063
|
-
}
|
|
9064
|
-
// for local
|
|
9065
|
-
// if (paths.length >= 0) {
|
|
9066
|
-
// setOrderId(paths[1]);
|
|
9077
|
+
// if (paths.length > 1) {
|
|
9078
|
+
// setOrderId(paths[2]);
|
|
9067
9079
|
// }
|
|
9080
|
+
// for local
|
|
9081
|
+
if (paths.length >= 0) {
|
|
9082
|
+
setOrderId(paths[1]);
|
|
9083
|
+
}
|
|
9068
9084
|
}, [paths]);
|
|
9069
9085
|
React.useEffect(function () {
|
|
9070
9086
|
setLoading(staticDataLoading);
|
|
@@ -9249,7 +9265,7 @@ var Wrapper$k = /*#__PURE__*/styled__default.div(_templateObject5$j || (_templat
|
|
|
9249
9265
|
var Label$g = /*#__PURE__*/styled__default.div(_templateObject7$d || (_templateObject7$d = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8e8a85;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n"])));
|
|
9250
9266
|
var FilterRow = /*#__PURE__*/styled__default.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"])));
|
|
9251
9267
|
var FilterColumn = /*#__PURE__*/styled__default.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"])));
|
|
9252
|
-
var RightColumn$1 = /*#__PURE__*/styled__default.div(_templateObject10$3 || (_templateObject10$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex-direction: row;\n display: flex;\n"])));
|
|
9268
|
+
var RightColumn$1 = /*#__PURE__*/styled__default.div(_templateObject10$3 || (_templateObject10$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex-direction: row;\n display: flex;\n gap: 15px;\n"])));
|
|
9253
9269
|
var LeftColumn = /*#__PURE__*/styled__default.div(_templateObject11$2 || (_templateObject11$2 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex-direction: row;\n display: flex;\n"])));
|
|
9254
9270
|
var ApplyButton = /*#__PURE__*/styled__default.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"])));
|
|
9255
9271
|
|
|
@@ -9258,7 +9274,7 @@ var initialState$1 = {
|
|
|
9258
9274
|
'x-filters': [],
|
|
9259
9275
|
'x-pagination': {
|
|
9260
9276
|
page: 1,
|
|
9261
|
-
per_page:
|
|
9277
|
+
per_page: 50
|
|
9262
9278
|
}
|
|
9263
9279
|
};
|
|
9264
9280
|
var filterReducer = function filterReducer(state, action) {
|
|
@@ -9311,6 +9327,18 @@ var filterReducer = function filterReducer(state, action) {
|
|
|
9311
9327
|
value: action.payload
|
|
9312
9328
|
}])
|
|
9313
9329
|
});
|
|
9330
|
+
case 'CLEAR_CLIENT':
|
|
9331
|
+
return _extends({}, state, {
|
|
9332
|
+
'x-filters': state['x-filters'].filter(function (f) {
|
|
9333
|
+
return f.field !== 'order.customer_id';
|
|
9334
|
+
})
|
|
9335
|
+
});
|
|
9336
|
+
case 'CLEAR_ACTION':
|
|
9337
|
+
return _extends({}, state, {
|
|
9338
|
+
'x-filters': state['x-filters'].filter(function (f) {
|
|
9339
|
+
return f.field !== 'product_return_action_id';
|
|
9340
|
+
})
|
|
9341
|
+
});
|
|
9314
9342
|
case 'CLEAR_LOC':
|
|
9315
9343
|
return _extends({}, state, {
|
|
9316
9344
|
'x-filters': state['x-filters'].filter(function (f) {
|
|
@@ -9390,6 +9418,8 @@ function SelectionFilter() {
|
|
|
9390
9418
|
setSelectedReturnOrder = _useSelectedOrders[1];
|
|
9391
9419
|
var _useSelectAll = useSelectAll(),
|
|
9392
9420
|
setSelectAll = _useSelectAll[1];
|
|
9421
|
+
var _useSelectedConfirmLo = useSelectedConfirmLoc(),
|
|
9422
|
+
setCheck = _useSelectedConfirmLo[1];
|
|
9393
9423
|
//client options
|
|
9394
9424
|
var clientOptions = customers == null ? void 0 : customers.map(function (option) {
|
|
9395
9425
|
var _option$customer_name, _option$customer_name2;
|
|
@@ -9455,6 +9485,7 @@ function SelectionFilter() {
|
|
|
9455
9485
|
setNewPayload([]);
|
|
9456
9486
|
setGrouped([]);
|
|
9457
9487
|
setSelectAll(false);
|
|
9488
|
+
setCheck([]);
|
|
9458
9489
|
};
|
|
9459
9490
|
React.useEffect(function () {
|
|
9460
9491
|
var accountNumberFromStorage = localStorage.getItem('account_number');
|
|
@@ -9489,52 +9520,66 @@ function SelectionFilter() {
|
|
|
9489
9520
|
}
|
|
9490
9521
|
}, [storedUuid, locationData]);
|
|
9491
9522
|
//location change
|
|
9492
|
-
var handleLocationChange = function handleLocationChange(value
|
|
9493
|
-
var selectedLabel = option == null ? void 0 : option.label;
|
|
9523
|
+
var handleLocationChange = function handleLocationChange(value) {
|
|
9494
9524
|
setSelectedLocationValue(value);
|
|
9495
|
-
if (selectedLocationValue === selectedLabel) {
|
|
9496
|
-
dispatch({
|
|
9497
|
-
type: 'CLEAR_ALL_FILTERS',
|
|
9498
|
-
payload: null
|
|
9499
|
-
});
|
|
9500
|
-
}
|
|
9501
9525
|
};
|
|
9502
9526
|
//action type
|
|
9503
9527
|
var handleActionClick = function handleActionClick(value) {
|
|
9504
9528
|
setSelectedFilterValue(value);
|
|
9505
|
-
if (selectedFilterValue === value) {
|
|
9506
|
-
dispatch({
|
|
9507
|
-
type: 'CLEAR_ALL_FILTERS',
|
|
9508
|
-
payload: null
|
|
9509
|
-
});
|
|
9510
|
-
}
|
|
9511
9529
|
};
|
|
9530
|
+
var storedName = localStorage.getItem('clientName');
|
|
9531
|
+
var storedClientId = localStorage.getItem('clientId');
|
|
9512
9532
|
//Apply filters
|
|
9513
9533
|
var applyFilters = function applyFilters() {
|
|
9514
9534
|
if (storedName) {
|
|
9515
9535
|
setClientLabel(storedName);
|
|
9516
9536
|
}
|
|
9537
|
+
//client value
|
|
9517
9538
|
if (storedClientId) {
|
|
9518
9539
|
dispatch({
|
|
9519
9540
|
type: 'SET_CLIENT_FILTER',
|
|
9520
9541
|
payload: storedClientId
|
|
9521
9542
|
});
|
|
9543
|
+
dispatch({
|
|
9544
|
+
type: 'SET_PAGE',
|
|
9545
|
+
payload: 1
|
|
9546
|
+
});
|
|
9547
|
+
} else {
|
|
9548
|
+
dispatch({
|
|
9549
|
+
type: 'SET_CLIENT_FILTER',
|
|
9550
|
+
payload: []
|
|
9551
|
+
});
|
|
9522
9552
|
}
|
|
9553
|
+
//action value
|
|
9523
9554
|
if (selectedFilterValue) {
|
|
9524
9555
|
dispatch({
|
|
9525
9556
|
type: 'SET_ACTIONS_FILTER',
|
|
9526
9557
|
payload: selectedFilterValue
|
|
9527
9558
|
});
|
|
9559
|
+
dispatch({
|
|
9560
|
+
type: 'SET_PAGE',
|
|
9561
|
+
payload: 1
|
|
9562
|
+
});
|
|
9528
9563
|
}
|
|
9529
|
-
|
|
9564
|
+
//location value
|
|
9565
|
+
if (selectedLocationValue && selectedLocationValue.length > 0) {
|
|
9530
9566
|
dispatch({
|
|
9531
9567
|
type: 'SET_LOCATION_FILTER',
|
|
9532
9568
|
payload: selectedLocationValue
|
|
9533
9569
|
});
|
|
9570
|
+
dispatch({
|
|
9571
|
+
type: 'SET_PAGE',
|
|
9572
|
+
payload: 1
|
|
9573
|
+
});
|
|
9534
9574
|
}
|
|
9535
9575
|
};
|
|
9536
|
-
|
|
9537
|
-
|
|
9576
|
+
React.useEffect(function () {
|
|
9577
|
+
return function () {
|
|
9578
|
+
dispatch({
|
|
9579
|
+
type: 'CLEAR_CLIENT'
|
|
9580
|
+
});
|
|
9581
|
+
};
|
|
9582
|
+
}, []);
|
|
9538
9583
|
React.useEffect(function () {
|
|
9539
9584
|
if (storedClientId) {
|
|
9540
9585
|
dispatch({
|
|
@@ -9550,6 +9595,19 @@ function SelectionFilter() {
|
|
|
9550
9595
|
setIsButtonEnabled(false);
|
|
9551
9596
|
}
|
|
9552
9597
|
}, [storedName, selectedFilterValue, selectedLocationValue]);
|
|
9598
|
+
React.useEffect(function () {}, [location.pathname]);
|
|
9599
|
+
React.useEffect(function () {
|
|
9600
|
+
if (!selectedFilterValue || selectedFilterValue === null) {
|
|
9601
|
+
dispatch({
|
|
9602
|
+
type: 'CLEAR_ACTION'
|
|
9603
|
+
});
|
|
9604
|
+
}
|
|
9605
|
+
if (!selectedLocationValue || Array.isArray(selectedLocationValue) && selectedLocationValue.length === 0) {
|
|
9606
|
+
dispatch({
|
|
9607
|
+
type: 'CLEAR_LOC'
|
|
9608
|
+
});
|
|
9609
|
+
}
|
|
9610
|
+
}, [selectedFilterValue, selectedLocationValue]);
|
|
9553
9611
|
return React__default.createElement(Wrapper$k, null, React__default.createElement(FilterRow, null, React__default.createElement(LeftColumn, null, React__default.createElement(FilterColumn, null, React__default.createElement(Label$g, null, "Clients"), React__default.createElement(StyledAntSelect$4, {
|
|
9554
9612
|
options: clientOptions,
|
|
9555
9613
|
placeholder: "Select Client Name",
|
|
@@ -9558,7 +9616,7 @@ function SelectionFilter() {
|
|
|
9558
9616
|
minWidth: '14vw'
|
|
9559
9617
|
},
|
|
9560
9618
|
value: storedName
|
|
9561
|
-
})), React__default.createElement(FilterColumn, null, React__default.createElement(Label$g, null, "Action Type"), React__default.createElement(StyledAntSelect$4, {
|
|
9619
|
+
})), storedName && location.pathname.includes("/filter/") ? React__default.createElement(React__default.Fragment, null, React__default.createElement(FilterColumn, null, React__default.createElement(Label$g, null, "Action Type"), React__default.createElement(StyledAntSelect$4, {
|
|
9562
9620
|
options: actionTypeOptions,
|
|
9563
9621
|
placeholder: "Select Action Type",
|
|
9564
9622
|
value: selectedFilterValue,
|
|
@@ -9577,76 +9635,72 @@ function SelectionFilter() {
|
|
|
9577
9635
|
},
|
|
9578
9636
|
allowClear: true,
|
|
9579
9637
|
mode: "multiple"
|
|
9580
|
-
}))), React__default.createElement(RightColumn$1, null, React__default.createElement(ApplyButton, {
|
|
9638
|
+
}))) : null), React__default.createElement(RightColumn$1, null, React__default.createElement(ApplyButton, {
|
|
9581
9639
|
onClick: applyFilters,
|
|
9582
9640
|
disabled: !isButtonEnabled
|
|
9583
9641
|
}, "Apply"))));
|
|
9584
9642
|
}
|
|
9585
|
-
var StyledAntSelect$4 = /*#__PURE__*/styled__default(antd.Select)(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n"])));
|
|
9643
|
+
var StyledAntSelect$4 = /*#__PURE__*/styled__default(antd.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"])));
|
|
9586
9644
|
|
|
9645
|
+
// import { ApiResponse } from '../../types';
|
|
9646
|
+
// import { useApiHook } from '@bjsdistribution/dms-component-library';
|
|
9647
|
+
// import {
|
|
9648
|
+
// useActionType,
|
|
9649
|
+
// useCustomerData,
|
|
9650
|
+
// useLocationData,
|
|
9651
|
+
// useStatusOrderData,
|
|
9652
|
+
// } from '../../store';
|
|
9587
9653
|
function HeaderFilter() {
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
var _useLocationData = useLocationData(),
|
|
9593
|
-
setLocationData = _useLocationData[1];
|
|
9594
|
-
var _useStatusOrderData = useStatusOrderData(),
|
|
9595
|
-
setStatusOfOrders = _useStatusOrderData[1];
|
|
9654
|
+
// const [, setCustomers] = useCustomerData();
|
|
9655
|
+
// const [, setActionType] = useActionType();
|
|
9656
|
+
// const [, setLocationData] = useLocationData();
|
|
9657
|
+
// const [, setStatusOfOrders] = useStatusOrderData();
|
|
9596
9658
|
//API for client data
|
|
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
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
}));
|
|
9643
|
-
}
|
|
9644
|
-
}, [actionLoading, fetchedStaticData]);
|
|
9645
|
-
React.useEffect(function () {
|
|
9646
|
-
if (fetchedLocationData && fetchedLocationData != null && fetchedLocationData.data) {
|
|
9647
|
-
setLocationData(fetchedLocationData == null ? void 0 : fetchedLocationData.data);
|
|
9648
|
-
}
|
|
9649
|
-
}, [locationloading, fetchedLocationData]);
|
|
9659
|
+
// const { data: fetchedCustomerData, loading: loading } = useApiHook<
|
|
9660
|
+
// ApiResponse
|
|
9661
|
+
// >({
|
|
9662
|
+
// endpoint: `/customers/`,
|
|
9663
|
+
// method: 'GET',
|
|
9664
|
+
// // pagination: { page: 1, per_page: 50 },
|
|
9665
|
+
// });
|
|
9666
|
+
// //API for action type
|
|
9667
|
+
// const { data: fetchedStaticData, loading: actionLoading } = useApiHook<
|
|
9668
|
+
// ApiResponse
|
|
9669
|
+
// >({
|
|
9670
|
+
// endpoint: `/orders/getStaticData/all/`,
|
|
9671
|
+
// method: 'GET',
|
|
9672
|
+
// // pagination: { page: 1, per_page: 50 },
|
|
9673
|
+
// });
|
|
9674
|
+
// //API for return locations
|
|
9675
|
+
// const { data: fetchedLocationData, loading: locationloading } = useApiHook<
|
|
9676
|
+
// ApiResponse
|
|
9677
|
+
// >({
|
|
9678
|
+
// endpoint: `/return_locations/`,
|
|
9679
|
+
// method: 'GET',
|
|
9680
|
+
// pagination: { page: 1, per_page: 50 },
|
|
9681
|
+
// });
|
|
9682
|
+
// useEffect(() => {
|
|
9683
|
+
// if (fetchedCustomerData && fetchedCustomerData?.data) {
|
|
9684
|
+
// setCustomers(fetchedCustomerData?.data);
|
|
9685
|
+
// }
|
|
9686
|
+
// }, [loading]);
|
|
9687
|
+
// useEffect(() => {
|
|
9688
|
+
// if (fetchedStaticData && fetchedStaticData?.data) {
|
|
9689
|
+
// setActionType(
|
|
9690
|
+
// fetchedStaticData?.data?.flatMap(
|
|
9691
|
+
// (i: any) => i?.order_product_return_action
|
|
9692
|
+
// )
|
|
9693
|
+
// );
|
|
9694
|
+
// setStatusOfOrders(
|
|
9695
|
+
// fetchedStaticData?.data?.flatMap((i: any) => i?.order_stock_alias)
|
|
9696
|
+
// );
|
|
9697
|
+
// }
|
|
9698
|
+
// }, [actionLoading]);
|
|
9699
|
+
// useEffect(() => {
|
|
9700
|
+
// if (fetchedLocationData && fetchedLocationData?.data) {
|
|
9701
|
+
// setLocationData(fetchedLocationData?.data);
|
|
9702
|
+
// }
|
|
9703
|
+
// }, [locationloading]);
|
|
9650
9704
|
return React__default.createElement(CoverPage, null, React__default.createElement(SelectionFilter, null));
|
|
9651
9705
|
}
|
|
9652
9706
|
|
|
@@ -9660,46 +9714,10 @@ var Text$7 = /*#__PURE__*/styled__default.div(_templateObject7$e || (_templateOb
|
|
|
9660
9714
|
// Right side filter
|
|
9661
9715
|
var StyledTableFilter = /*#__PURE__*/styled__default.div(_templateObject8$9 || (_templateObject8$9 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
9662
9716
|
|
|
9663
|
-
var _templateObject2$1n;
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
var SearchType = function SearchType() {
|
|
9668
|
-
var _useState = React.useState(''),
|
|
9669
|
-
searchText = _useState[0],
|
|
9670
|
-
setSearchText = _useState[1];
|
|
9671
|
-
var handleInputChange = function handleInputChange(event) {
|
|
9672
|
-
setSearchText(event.target.value);
|
|
9673
|
-
};
|
|
9674
|
-
return React__default.createElement(Search, null, React__default.createElement(SearchIcon, null), React__default.createElement(SearchInput, {
|
|
9675
|
-
type: "text",
|
|
9676
|
-
placeholder: "Search",
|
|
9677
|
-
value: searchText,
|
|
9678
|
-
onChange: handleInputChange
|
|
9679
|
-
}));
|
|
9680
|
-
};
|
|
9681
|
-
var Search = /*#__PURE__*/styled__default.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"])));
|
|
9682
|
-
var SearchInput = /*#__PURE__*/styled__default.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"])));
|
|
9683
|
-
|
|
9684
|
-
function DownloadIcon() {
|
|
9685
|
-
return React__default.createElement("svg", {
|
|
9686
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
9687
|
-
width: "24",
|
|
9688
|
-
height: "24",
|
|
9689
|
-
viewBox: "0 0 24 24",
|
|
9690
|
-
fill: "none"
|
|
9691
|
-
}, React__default.createElement("path", {
|
|
9692
|
-
opacity: "0.4",
|
|
9693
|
-
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",
|
|
9694
|
-
fill: "#3A3630"
|
|
9695
|
-
}), React__default.createElement("path", {
|
|
9696
|
-
opacity: "0.4",
|
|
9697
|
-
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",
|
|
9698
|
-
fill: "#3A3630"
|
|
9699
|
-
}));
|
|
9700
|
-
}
|
|
9701
|
-
|
|
9702
|
-
var _templateObject$1_, _templateObject2$1p, _templateObject3$T, _templateObject4$w, _templateObject5$l;
|
|
9717
|
+
var _templateObject$1Z, _templateObject2$1n;
|
|
9718
|
+
// import { StyledBulkItem } from '../../filters/BulkFilterStyle';
|
|
9719
|
+
// import SearchType from '../../header/route-header/search/SearchType';
|
|
9720
|
+
// import DownloadIcon from '../../../../assets/icons/DownloadIcon';
|
|
9703
9721
|
var RightFilters = function RightFilters() {
|
|
9704
9722
|
var _useAtom = jotai.useAtom(countReducerAtom),
|
|
9705
9723
|
dispatch = _useAtom[1];
|
|
@@ -9712,13 +9730,18 @@ var RightFilters = function RightFilters() {
|
|
|
9712
9730
|
});
|
|
9713
9731
|
},
|
|
9714
9732
|
disabled: (selectedReturnOrder == null ? void 0 : selectedReturnOrder.length) === 0
|
|
9715
|
-
}, "Create Return")
|
|
9733
|
+
}, "Create Return"));
|
|
9716
9734
|
};
|
|
9717
|
-
var Container$13 = /*#__PURE__*/styled__default.div(_templateObject$
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9735
|
+
var Container$13 = /*#__PURE__*/styled__default.div(_templateObject$1Z || (_templateObject$1Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
|
|
9736
|
+
// const Mid = styled.div`
|
|
9737
|
+
// display: flex;
|
|
9738
|
+
// padding: 4px 10px;
|
|
9739
|
+
// align-items: center;
|
|
9740
|
+
// gap: 8px;
|
|
9741
|
+
// align-self: stretch;
|
|
9742
|
+
// border-radius: 15px 0px 0px 15px;
|
|
9743
|
+
// `;
|
|
9744
|
+
var ButtonText = /*#__PURE__*/styled__default.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"])));
|
|
9722
9745
|
|
|
9723
9746
|
var ReturnFilter = function ReturnFilter() {
|
|
9724
9747
|
var _useParams = reactRouterDom.useParams(),
|
|
@@ -9726,12 +9749,12 @@ var ReturnFilter = function ReturnFilter() {
|
|
|
9726
9749
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledFiter, null, React__default.createElement(Text$7, null, " ", clientName), React__default.createElement(StyledFIlterELements, null, React__default.createElement(StyledTableFilter, null)), React__default.createElement(RightFilters, null)));
|
|
9727
9750
|
};
|
|
9728
9751
|
|
|
9729
|
-
var _templateObject$
|
|
9730
|
-
var ColumStyle = /*#__PURE__*/styled__default.div(_templateObject$
|
|
9731
|
-
var GreyBox = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
9752
|
+
var _templateObject$1_, _templateObject2$1o, _templateObject3$T, _templateObject4$w, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
|
|
9753
|
+
var ColumStyle = /*#__PURE__*/styled__default.div(_templateObject$1_ || (_templateObject$1_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 67px;\n align-items: center;\n gap: 7px;\n"])));
|
|
9754
|
+
var GreyBox = /*#__PURE__*/styled__default.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"])));
|
|
9732
9755
|
// Styled components
|
|
9733
|
-
var StyledTableWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
9734
|
-
var StyledTable$4 = /*#__PURE__*/styled__default.table(_templateObject4$
|
|
9756
|
+
var StyledTableWrapper$2 = /*#__PURE__*/styled__default.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"])));
|
|
9757
|
+
var StyledTable$4 = /*#__PURE__*/styled__default.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"])));
|
|
9735
9758
|
var EmptyDataContainer$1 = /*#__PURE__*/styled__default.div(_templateObject34 || (_templateObject34 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
|
|
9736
9759
|
var ClearAll = /*#__PURE__*/styled__default.div(_templateObject35 || (_templateObject35 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #edebe8;\n background: #fff;\n display: flex;\n padding: 6px 6px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n\n &.active {\n background: #313130;\n & > div {\n color: #fff;\n }\n }\n"])));
|
|
9737
9760
|
var StyledFilterBtnIcon = /*#__PURE__*/styled__default.div(_templateObject36 || (_templateObject36 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 24px;\n height: 24px;\n justify-content: center;\n align-items: center;\n border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #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"])));
|
|
@@ -9919,7 +9942,7 @@ var optionsForReturnPrint = [{
|
|
|
9919
9942
|
label: 'Print Return Labels'
|
|
9920
9943
|
}];
|
|
9921
9944
|
|
|
9922
|
-
var _templateObject$
|
|
9945
|
+
var _templateObject$1$, _templateObject2$1p;
|
|
9923
9946
|
var options$1 = optionsForReturnPrint;
|
|
9924
9947
|
var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
9925
9948
|
var legacyProductId = _ref.legacyProductId;
|
|
@@ -9936,8 +9959,8 @@ var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
|
9936
9959
|
}, IconComponent && React__default.createElement(IconComponent, null), " ", item.label);
|
|
9937
9960
|
}));
|
|
9938
9961
|
};
|
|
9939
|
-
var OptionsList = /*#__PURE__*/styled__default.ul(_templateObject$
|
|
9940
|
-
var OptionsListLi = /*#__PURE__*/styled__default.li(_templateObject2$
|
|
9962
|
+
var OptionsList = /*#__PURE__*/styled__default.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"])));
|
|
9963
|
+
var OptionsListLi = /*#__PURE__*/styled__default.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"])));
|
|
9941
9964
|
|
|
9942
9965
|
var _excluded$3 = ["count"];
|
|
9943
9966
|
var ReturnOrderTable = function ReturnOrderTable() {
|
|
@@ -9976,7 +9999,6 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
9976
9999
|
setPaginationObject = _UsePaginationData[1];
|
|
9977
10000
|
var _usefetchAgain = usefetchAgain(),
|
|
9978
10001
|
callForFetch = _usefetchAgain[0];
|
|
9979
|
-
// console.log(callForFetch, 'callForFetchcallForFetchcallForFetchcallForFetch');
|
|
9980
10002
|
var OpenDropDown = function OpenDropDown(index) {
|
|
9981
10003
|
setPrintToggle(function (prevIndex) {
|
|
9982
10004
|
return prevIndex === index ? null : index;
|
|
@@ -10040,7 +10062,10 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10040
10062
|
var handleSelectAll = function handleSelectAll(e) {
|
|
10041
10063
|
setSelectAll(e.target.checked);
|
|
10042
10064
|
if (e.target.checked) {
|
|
10043
|
-
setSelectedReturnOrder(returnData == null ? void 0 : returnData.
|
|
10065
|
+
setSelectedReturnOrder(returnData == null ? void 0 : returnData.filter(function (loc) {
|
|
10066
|
+
var _loc$order_product_re;
|
|
10067
|
+
return (loc == null || (_loc$order_product_re = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re.type) === 'RTS';
|
|
10068
|
+
}).map(function (loc) {
|
|
10044
10069
|
return {
|
|
10045
10070
|
id: loc.id,
|
|
10046
10071
|
return_locations: loc == null ? void 0 : loc.return_locations,
|
|
@@ -10051,14 +10076,17 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10051
10076
|
new_location: loc == null ? void 0 : loc.new_location
|
|
10052
10077
|
};
|
|
10053
10078
|
}));
|
|
10054
|
-
setNewPayload(returnData == null ? void 0 : returnData.
|
|
10055
|
-
var _loc$
|
|
10079
|
+
setNewPayload(returnData == null ? void 0 : returnData.filter(function (loc) {
|
|
10080
|
+
var _loc$order_product_re2;
|
|
10081
|
+
return (loc == null || (_loc$order_product_re2 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re2.type) === 'RTS';
|
|
10082
|
+
}).map(function (loc) {
|
|
10083
|
+
var _loc$order_product_re3;
|
|
10056
10084
|
return {
|
|
10057
10085
|
id: loc.id,
|
|
10058
10086
|
account_number: createReturn == null ? void 0 : createReturn.account_number,
|
|
10059
10087
|
customer_id: +(createReturn == null ? void 0 : createReturn.customer_id),
|
|
10060
10088
|
products: [loc == null ? void 0 : loc.legacy_product_id],
|
|
10061
|
-
return_action:
|
|
10089
|
+
return_action: loc == null || (_loc$order_product_re3 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re3.type,
|
|
10062
10090
|
return_location_token: (loc == null ? void 0 : loc.return_location) || null,
|
|
10063
10091
|
new_location: loc == null ? void 0 : loc.new_location
|
|
10064
10092
|
};
|
|
@@ -10143,12 +10171,15 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10143
10171
|
var mergedPayload = Object.values(groupedPayload);
|
|
10144
10172
|
setGrouped(mergedPayload);
|
|
10145
10173
|
}, [newpayload]);
|
|
10146
|
-
return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledTableWrapper, null, React__default.createElement(StyledTable$1, null, React__default.createElement("thead", null, React__default.createElement("tr", null,
|
|
10174
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledTableWrapper, null, React__default.createElement(StyledTable$1, null, React__default.createElement("thead", null, React__default.createElement("tr", null, returnData != null && returnData.some(function (item) {
|
|
10175
|
+
var _item$order_product_r;
|
|
10176
|
+
return (item == null || (_item$order_product_r = item.order_product_return_action) == null ? void 0 : _item$order_product_r.type) === 'RTS';
|
|
10177
|
+
}) ? React__default.createElement("th", {
|
|
10147
10178
|
className: "emailInvoiceCheckbox"
|
|
10148
10179
|
}, React__default.createElement(dmsComponentLibrary.Checkbox, {
|
|
10149
10180
|
checked: selectAll,
|
|
10150
10181
|
onChange: handleSelectAll
|
|
10151
|
-
})), React__default.createElement("th", null, "Product Location"), React__default.createElement("th", null, "Return Location"), React__default.createElement("th", null, "Recipient"), React__default.createElement("th", null, "Code"), React__default.createElement("th", null, "Description"), React__default.createElement("th", null, "Part"), React__default.createElement("th", null, "Weight"), React__default.createElement("th", null, "CBM"), React__default.createElement("th", null, "Return Reason"), React__default.createElement("th", null, "Collected"), React__default.createElement("th", null, "Collection Reason"), React__default.createElement("th", {
|
|
10182
|
+
})) : React__default.createElement("th", null), React__default.createElement("th", null, "Product Location"), React__default.createElement("th", null, "Return Location"), React__default.createElement("th", null, "Recipient"), React__default.createElement("th", null, "Code"), React__default.createElement("th", null, "Description"), React__default.createElement("th", null, "Part"), React__default.createElement("th", null, "Weight"), React__default.createElement("th", null, "CBM"), React__default.createElement("th", null, "Return Reason"), React__default.createElement("th", null, "Collected"), React__default.createElement("th", null, "Collection Reason"), React__default.createElement("th", {
|
|
10152
10183
|
className: "emailInvoiceShare"
|
|
10153
10184
|
}, "Labels"))), React__default.createElement("tbody", null, load ? React__default.createElement("tr", null, React__default.createElement("td", {
|
|
10154
10185
|
colSpan: 6
|
|
@@ -10159,10 +10190,10 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10159
10190
|
})) : (returnData == null ? void 0 : returnData.length) === 0 ? React__default.createElement("tr", null, React__default.createElement("td", {
|
|
10160
10191
|
colSpan: 14
|
|
10161
10192
|
}, React__default.createElement(EmptyDataContainer$1, null, React__default.createElement(antd.Empty, null)))) : returnData == null ? void 0 : returnData.map(function (item, index) {
|
|
10162
|
-
var _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$return_reasons, _item$
|
|
10193
|
+
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;
|
|
10163
10194
|
return React__default.createElement("tr", {
|
|
10164
10195
|
key: item.id
|
|
10165
|
-
}, React__default.createElement("td", null, React__default.createElement(dmsComponentLibrary.Checkbox, {
|
|
10196
|
+
}, React__default.createElement("td", null, (item == null || (_item$order_product_r2 = item.order_product_return_action) == null ? void 0 : _item$order_product_r2.type) == 'RTS' ? React__default.createElement(React__default.Fragment, null, React__default.createElement(dmsComponentLibrary.Checkbox, {
|
|
10166
10197
|
className: "custom-check",
|
|
10167
10198
|
checked: selectedReturnOrder == null ? void 0 : selectedReturnOrder.some(function (selectedInvoice) {
|
|
10168
10199
|
return (selectedInvoice == null ? void 0 : selectedInvoice.id) === item.id;
|
|
@@ -10170,7 +10201,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10170
10201
|
onChange: function onChange() {
|
|
10171
10202
|
return handleSelectOrderReturn(item.id, item.return_location, item.return_locations, item.order_product_return_action, item.new_location, item.legacy_product_id);
|
|
10172
10203
|
}
|
|
10173
|
-
})), React__default.createElement("td", null, (item == null || (_item$orders_products = item.orders_products_stock) == null ? void 0 : _item$orders_products.location) !== null && (item == null || (_item$orders_products2 = item.orders_products_stock) == null ? void 0 : _item$orders_products2.location) !== undefined ? item.orders_products_stock.location : React__default.createElement("div", {
|
|
10204
|
+
})) : null), React__default.createElement("td", null, (item == null || (_item$orders_products = item.orders_products_stock) == null ? void 0 : _item$orders_products.location) !== null && (item == null || (_item$orders_products2 = item.orders_products_stock) == null ? void 0 : _item$orders_products2.location) !== undefined ? item.orders_products_stock.location : React__default.createElement("div", {
|
|
10174
10205
|
className: "awaiting"
|
|
10175
10206
|
}, "Awaiting")), React__default.createElement("td", null, " ", displayValueOrNA(item == null ? void 0 : item.new_location)), React__default.createElement("td", null, React__default.createElement("ul", {
|
|
10176
10207
|
style: {
|
|
@@ -10187,7 +10218,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10187
10218
|
style: {
|
|
10188
10219
|
color: '#888075'
|
|
10189
10220
|
}
|
|
10190
|
-
}, 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__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.code)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.description)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.parts_count)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), ' ', item != null && item.weight && (item == null ? void 0 : item.weight) !== null ? 'KG' : ''), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React__default.createElement("td", null, (item == null || (_item$
|
|
10221
|
+
}, 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__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.code)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.description)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.parts_count)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), ' ', item != null && item.weight && (item == null ? void 0 : item.weight) !== null ? 'KG' : ''), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React__default.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) {
|
|
10191
10222
|
return ret != null && ret.collected_at ? dateFns.format(new Date(ret.collected_at), 'dd/MM/yyyy') : 'UNKNOWN';
|
|
10192
10223
|
}) : 'UNKNOWN'), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$collection_reas = item.collection_reasons) == null ? void 0 : _item$collection_reas.reason)), React__default.createElement("td", null, React__default.createElement("ul", {
|
|
10193
10224
|
className: "actionbox"
|
|
@@ -10259,7 +10290,7 @@ var DefectConfirm = [{
|
|
|
10259
10290
|
value: 'no'
|
|
10260
10291
|
}];
|
|
10261
10292
|
|
|
10262
|
-
var _templateObject$
|
|
10293
|
+
var _templateObject$20, _templateObject2$1q, _templateObject3$U, _templateObject4$x;
|
|
10263
10294
|
var DefetcDetails = function DefetcDetails() {
|
|
10264
10295
|
var handleSelectChange = function handleSelectChange() {
|
|
10265
10296
|
console.log('Option selected');
|
|
@@ -10301,12 +10332,12 @@ var DefetcDetails = function DefetcDetails() {
|
|
|
10301
10332
|
selectWrapperClass: "rounded"
|
|
10302
10333
|
}))));
|
|
10303
10334
|
};
|
|
10304
|
-
var StyledAntSelect$5 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$
|
|
10305
|
-
var Container$14 = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10306
|
-
var Flex$7 = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
10307
|
-
var LabelWrapper = /*#__PURE__*/styled__default.div(_templateObject4$
|
|
10335
|
+
var StyledAntSelect$5 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10336
|
+
var Container$14 = /*#__PURE__*/styled__default.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"])));
|
|
10337
|
+
var Flex$7 = /*#__PURE__*/styled__default.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"])));
|
|
10338
|
+
var LabelWrapper = /*#__PURE__*/styled__default.div(_templateObject4$x || (_templateObject4$x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10308
10339
|
|
|
10309
|
-
var _templateObject$
|
|
10340
|
+
var _templateObject$21;
|
|
10310
10341
|
var RepackProduct = function RepackProduct() {
|
|
10311
10342
|
var options = [{
|
|
10312
10343
|
value: 'bjsCouriers',
|
|
@@ -10366,9 +10397,9 @@ var RepackProduct = function RepackProduct() {
|
|
|
10366
10397
|
}
|
|
10367
10398
|
})));
|
|
10368
10399
|
};
|
|
10369
|
-
var GLobalPopupContent$1 = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10400
|
+
var GLobalPopupContent$1 = /*#__PURE__*/styled__default.div(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10370
10401
|
|
|
10371
|
-
var _templateObject$
|
|
10402
|
+
var _templateObject$22, _templateObject2$1r, _templateObject3$V, _templateObject4$y, _templateObject5$l, _templateObject6$e;
|
|
10372
10403
|
var RepackDetails = function RepackDetails() {
|
|
10373
10404
|
var _useState = React.useState(false),
|
|
10374
10405
|
isAdditionalBoxChecked = _useState[0],
|
|
@@ -10415,14 +10446,14 @@ var RepackDetails = function RepackDetails() {
|
|
|
10415
10446
|
}
|
|
10416
10447
|
}, "Have any other boxes repacked into this one?"), isRepacked && React__default.createElement(RepackProduct, null)))));
|
|
10417
10448
|
};
|
|
10418
|
-
var StyledAntSelect$6 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$
|
|
10419
|
-
var CheckboxContainer$1 = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10420
|
-
var InputWrapper = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
10421
|
-
var Container$15 = /*#__PURE__*/styled__default.div(_templateObject4$
|
|
10422
|
-
var Flex$8 = /*#__PURE__*/styled__default.div(_templateObject5$
|
|
10449
|
+
var StyledAntSelect$6 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$22 || (_templateObject$22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10450
|
+
var CheckboxContainer$1 = /*#__PURE__*/styled__default.div(_templateObject2$1r || (_templateObject2$1r = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n margin-top: 10px;\n"])));
|
|
10451
|
+
var InputWrapper = /*#__PURE__*/styled__default.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"])));
|
|
10452
|
+
var Container$15 = /*#__PURE__*/styled__default.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"])));
|
|
10453
|
+
var Flex$8 = /*#__PURE__*/styled__default.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"])));
|
|
10423
10454
|
var LabelWrapper$1 = /*#__PURE__*/styled__default.div(_templateObject6$e || (_templateObject6$e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10424
10455
|
|
|
10425
|
-
var _templateObject$
|
|
10456
|
+
var _templateObject$23, _templateObject2$1s, _templateObject3$W, _templateObject4$z;
|
|
10426
10457
|
var OtherDamage = function OtherDamage() {
|
|
10427
10458
|
var handleSelectChange = function handleSelectChange() {
|
|
10428
10459
|
console.log('Option selected');
|
|
@@ -10478,12 +10509,12 @@ var OtherDamage = function OtherDamage() {
|
|
|
10478
10509
|
selectWrapperClass: "rounded"
|
|
10479
10510
|
}))));
|
|
10480
10511
|
};
|
|
10481
|
-
var StyledAntSelect$7 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$
|
|
10482
|
-
var Container$16 = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10483
|
-
var Flex$9 = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
10484
|
-
var LabelWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject4$
|
|
10512
|
+
var StyledAntSelect$7 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10513
|
+
var Container$16 = /*#__PURE__*/styled__default.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"])));
|
|
10514
|
+
var Flex$9 = /*#__PURE__*/styled__default.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"])));
|
|
10515
|
+
var LabelWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject4$z || (_templateObject4$z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10485
10516
|
|
|
10486
|
-
var _templateObject$
|
|
10517
|
+
var _templateObject$24, _templateObject2$1t, _templateObject3$X, _templateObject4$A, _templateObject5$m;
|
|
10487
10518
|
var AddDefect = function AddDefect() {
|
|
10488
10519
|
var _useState = React.useState({
|
|
10489
10520
|
actionDuring: '',
|
|
@@ -10546,13 +10577,13 @@ var AddDefect = function AddDefect() {
|
|
|
10546
10577
|
selectWrapperClass: "rounded"
|
|
10547
10578
|
}))), state.productRepacked === 'yes' && React__default.createElement(RepackDetails, null)));
|
|
10548
10579
|
};
|
|
10549
|
-
var StyledAntSelect$8 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$
|
|
10550
|
-
var Container$17 = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10551
|
-
var Flex$a = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
10552
|
-
var LabelWrapper$3 = /*#__PURE__*/styled__default.div(_templateObject4$
|
|
10553
|
-
var AddButton = /*#__PURE__*/styled__default(dmsComponentLibrary.Button)(_templateObject5$
|
|
10580
|
+
var StyledAntSelect$8 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10581
|
+
var Container$17 = /*#__PURE__*/styled__default.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"])));
|
|
10582
|
+
var Flex$a = /*#__PURE__*/styled__default.div(_templateObject3$X || (_templateObject3$X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n /* justify-content: space-between; */\n"])));
|
|
10583
|
+
var LabelWrapper$3 = /*#__PURE__*/styled__default.div(_templateObject4$A || (_templateObject4$A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 20vw;\n"])));
|
|
10584
|
+
var AddButton = /*#__PURE__*/styled__default(dmsComponentLibrary.Button)(_templateObject5$m || (_templateObject5$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 10px;\n border-radius: 30px;\n"])));
|
|
10554
10585
|
|
|
10555
|
-
var _templateObject$
|
|
10586
|
+
var _templateObject$25, _templateObject2$1u, _templateObject3$Y, _templateObject4$B;
|
|
10556
10587
|
var QCLogs = function QCLogs() {
|
|
10557
10588
|
var handleSelectChange = function handleSelectChange() {
|
|
10558
10589
|
console.log('Option selected');
|
|
@@ -10573,12 +10604,12 @@ var QCLogs = function QCLogs() {
|
|
|
10573
10604
|
selectWrapperClass: "rounded"
|
|
10574
10605
|
}))), React__default.createElement(AddDefect, null));
|
|
10575
10606
|
};
|
|
10576
|
-
var StyledAntSelect$9 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$
|
|
10577
|
-
var Container$18 = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10578
|
-
var Flex$b = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
10579
|
-
var LabelWrapper$4 = /*#__PURE__*/styled__default.div(_templateObject4$
|
|
10607
|
+
var StyledAntSelect$9 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$25 || (_templateObject$25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10608
|
+
var Container$18 = /*#__PURE__*/styled__default.div(_templateObject2$1u || (_templateObject2$1u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n flex-direction: column;\n"])));
|
|
10609
|
+
var Flex$b = /*#__PURE__*/styled__default.div(_templateObject3$Y || (_templateObject3$Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n"])));
|
|
10610
|
+
var LabelWrapper$4 = /*#__PURE__*/styled__default.div(_templateObject4$B || (_templateObject4$B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 20vw;\n"])));
|
|
10580
10611
|
|
|
10581
|
-
var _templateObject$
|
|
10612
|
+
var _templateObject$26, _templateObject2$1v, _templateObject3$Z, _templateObject4$C, _templateObject5$n;
|
|
10582
10613
|
function UpdateProduct() {
|
|
10583
10614
|
var _orderStaticData$coll, _orderStaticData$orde, _orderStaticData$retu, _orderStaticData$orde2;
|
|
10584
10615
|
var _useState = React.useState(),
|
|
@@ -10675,13 +10706,13 @@ function UpdateProduct() {
|
|
|
10675
10706
|
selectWrapperClass: "rounded"
|
|
10676
10707
|
}))));
|
|
10677
10708
|
}
|
|
10678
|
-
var CollectionBox = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10679
|
-
var ReturnBox = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10680
|
-
var Container$19 = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
10681
|
-
var LabelWrapper$5 = /*#__PURE__*/styled__default.div(_templateObject4$
|
|
10682
|
-
var StyledAntSelect$a = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject5$
|
|
10709
|
+
var CollectionBox = /*#__PURE__*/styled__default.div(_templateObject$26 || (_templateObject$26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 32px;\n"])));
|
|
10710
|
+
var ReturnBox = /*#__PURE__*/styled__default.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"])));
|
|
10711
|
+
var Container$19 = /*#__PURE__*/styled__default.div(_templateObject3$Z || (_templateObject3$Z = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10712
|
+
var LabelWrapper$5 = /*#__PURE__*/styled__default.div(_templateObject4$C || (_templateObject4$C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10713
|
+
var StyledAntSelect$a = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject5$n || (_templateObject5$n = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10683
10714
|
|
|
10684
|
-
var _templateObject$
|
|
10715
|
+
var _templateObject$27, _templateObject2$1w, _templateObject3$_;
|
|
10685
10716
|
function UnReceiveProduct() {
|
|
10686
10717
|
var _orderStaticData$unre;
|
|
10687
10718
|
var _useRecieveOrderProdu = useRecieveOrderProducts(),
|
|
@@ -10729,11 +10760,11 @@ function UnReceiveProduct() {
|
|
|
10729
10760
|
onNotesChange: handleNotesChange
|
|
10730
10761
|
})));
|
|
10731
10762
|
}
|
|
10732
|
-
var Container$1a = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10733
|
-
var LabelWrapper$6 = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10734
|
-
var StyledAntSelect$b = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject3
|
|
10763
|
+
var Container$1a = /*#__PURE__*/styled__default.div(_templateObject$27 || (_templateObject$27 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10764
|
+
var LabelWrapper$6 = /*#__PURE__*/styled__default.div(_templateObject2$1w || (_templateObject2$1w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10765
|
+
var StyledAntSelect$b = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject3$_ || (_templateObject3$_ = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10735
10766
|
|
|
10736
|
-
var _templateObject$
|
|
10767
|
+
var _templateObject$28, _templateObject2$1x;
|
|
10737
10768
|
var ProductAction = function ProductAction() {
|
|
10738
10769
|
var _useAtom = jotai.useAtom(selectedTabKeyAtom),
|
|
10739
10770
|
setSelectedTabKey = _useAtom[1];
|
|
@@ -10758,10 +10789,10 @@ var ProductAction = function ProductAction() {
|
|
|
10758
10789
|
}]
|
|
10759
10790
|
}))));
|
|
10760
10791
|
};
|
|
10761
|
-
var GLobalPopupContent$2 = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10762
|
-
var Container$1b = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10792
|
+
var GLobalPopupContent$2 = /*#__PURE__*/styled__default.div(_templateObject$28 || (_templateObject$28 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10793
|
+
var Container$1b = /*#__PURE__*/styled__default.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"])));
|
|
10763
10794
|
|
|
10764
|
-
var _templateObject$
|
|
10795
|
+
var _templateObject$29;
|
|
10765
10796
|
var LogsTable = function LogsTable() {
|
|
10766
10797
|
var options = [{
|
|
10767
10798
|
value: 'bjsCouriers',
|
|
@@ -10836,9 +10867,9 @@ var LogsTable = function LogsTable() {
|
|
|
10836
10867
|
}
|
|
10837
10868
|
})));
|
|
10838
10869
|
};
|
|
10839
|
-
var GlobalPopupContent = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10870
|
+
var GlobalPopupContent = /*#__PURE__*/styled__default.div(_templateObject$29 || (_templateObject$29 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10840
10871
|
|
|
10841
|
-
var _templateObject$
|
|
10872
|
+
var _templateObject$2a, _templateObject2$1y;
|
|
10842
10873
|
var DefectsModal = function DefectsModal() {
|
|
10843
10874
|
var options = [{
|
|
10844
10875
|
value: 'bjsCouriers',
|
|
@@ -10890,10 +10921,10 @@ var DefectsModal = function DefectsModal() {
|
|
|
10890
10921
|
}
|
|
10891
10922
|
}))));
|
|
10892
10923
|
};
|
|
10893
|
-
var StyledConatiner = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10894
|
-
var GLobalPopupContent$3 = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10924
|
+
var StyledConatiner = /*#__PURE__*/styled__default.div(_templateObject$2a || (_templateObject$2a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* tex: nowrap; */\n"])));
|
|
10925
|
+
var GLobalPopupContent$3 = /*#__PURE__*/styled__default.div(_templateObject2$1y || (_templateObject2$1y = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10895
10926
|
|
|
10896
|
-
var _templateObject$
|
|
10927
|
+
var _templateObject$2b;
|
|
10897
10928
|
var repackModal = function repackModal() {
|
|
10898
10929
|
var columns = [{
|
|
10899
10930
|
key: 'packaging_type',
|
|
@@ -10923,9 +10954,9 @@ var repackModal = function repackModal() {
|
|
|
10923
10954
|
}
|
|
10924
10955
|
}))));
|
|
10925
10956
|
};
|
|
10926
|
-
var StyledConatiner$1 = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10957
|
+
var StyledConatiner$1 = /*#__PURE__*/styled__default.div(_templateObject$2b || (_templateObject$2b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* text-wrap: nowrap; */\n"])));
|
|
10927
10958
|
|
|
10928
|
-
var _templateObject$
|
|
10959
|
+
var _templateObject$2c, _templateObject2$1z, _templateObject3$$;
|
|
10929
10960
|
var _excluded$4 = ["id"];
|
|
10930
10961
|
var CreateReturnModal = function CreateReturnModal() {
|
|
10931
10962
|
var _useSelectedConfirmLo = useSelectedConfirmLoc(),
|
|
@@ -11005,9 +11036,9 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
11005
11036
|
}, displayValueOrNA(returnLoc == null ? void 0 : returnLoc.new_location)));
|
|
11006
11037
|
})))));
|
|
11007
11038
|
};
|
|
11008
|
-
var StyledText$1 = /*#__PURE__*/styled__default.div(_templateObject$
|
|
11009
|
-
var Container$1c = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
11010
|
-
var Wrapper$l = /*#__PURE__*/styled__default.div(_templateObject3
|
|
11039
|
+
var StyledText$1 = /*#__PURE__*/styled__default.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"])));
|
|
11040
|
+
var Container$1c = /*#__PURE__*/styled__default.div(_templateObject2$1z || (_templateObject2$1z = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11041
|
+
var Wrapper$l = /*#__PURE__*/styled__default.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"])));
|
|
11011
11042
|
|
|
11012
11043
|
var ModalManager = function ModalManager() {
|
|
11013
11044
|
var _useAtom = jotai.useAtom(countReducerAtom),
|
|
@@ -11043,11 +11074,13 @@ var ModalManager = function ModalManager() {
|
|
|
11043
11074
|
setCheck = _useSelectedConfirmLo[1];
|
|
11044
11075
|
var _useNewReturnPayload = useNewReturnPayload(),
|
|
11045
11076
|
setNewPayload = _useNewReturnPayload[1];
|
|
11046
|
-
|
|
11077
|
+
var _useGroupedPayload = useGroupedPayload(),
|
|
11078
|
+
setGrouped = _useGroupedPayload[1];
|
|
11047
11079
|
var _useSelectAll = useSelectAll(),
|
|
11048
11080
|
setSelectAll = _useSelectAll[1];
|
|
11049
11081
|
var _usefetchAgain = usefetchAgain(),
|
|
11050
11082
|
setCallForFetch = _usefetchAgain[1];
|
|
11083
|
+
var navigate = reactRouterDom.useNavigate();
|
|
11051
11084
|
console.log(orderProduct, 'abcabcabcabcabcabcabcabcabcabcabc');
|
|
11052
11085
|
var _closeModal = function closeModal() {
|
|
11053
11086
|
dispatch({
|
|
@@ -11132,8 +11165,7 @@ var ModalManager = function ModalManager() {
|
|
|
11132
11165
|
SetPostLoading(confirmLoading);
|
|
11133
11166
|
}, [confirmLoading]);
|
|
11134
11167
|
var handleConfirmReturn = function handleConfirmReturn() {
|
|
11135
|
-
|
|
11136
|
-
if (newGrouped.length > 0) {
|
|
11168
|
+
if ((newGrouped == null ? void 0 : newGrouped.length) > 0) {
|
|
11137
11169
|
setShouldPerformAction(true);
|
|
11138
11170
|
setCallForFetch(true);
|
|
11139
11171
|
}
|
|
@@ -11174,15 +11206,16 @@ var ModalManager = function ModalManager() {
|
|
|
11174
11206
|
dispatch({
|
|
11175
11207
|
type: 'close'
|
|
11176
11208
|
});
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11209
|
+
setSelectedReturnOrder([]);
|
|
11210
|
+
setCheck([]);
|
|
11211
|
+
setNewPayload([]);
|
|
11212
|
+
setGrouped([]);
|
|
11213
|
+
setSelectAll(false);
|
|
11214
|
+
setShouldPerformAction(false);
|
|
11182
11215
|
antd.notification.error({
|
|
11183
11216
|
message: 'Failure',
|
|
11184
11217
|
// @ts-ignore
|
|
11185
|
-
description: "
|
|
11218
|
+
description: "" + (apiError == null ? void 0 : apiError.message)
|
|
11186
11219
|
});
|
|
11187
11220
|
setError(null);
|
|
11188
11221
|
// @ts-ignore
|
|
@@ -11201,8 +11234,11 @@ var ModalManager = function ModalManager() {
|
|
|
11201
11234
|
setShouldPerformAction(false);
|
|
11202
11235
|
setSelectAll(false);
|
|
11203
11236
|
setError(null);
|
|
11237
|
+
navigate('/order-return');
|
|
11204
11238
|
}
|
|
11205
|
-
}, [response]);
|
|
11239
|
+
}, [response, apiError]);
|
|
11240
|
+
console.log(apiError, 'apiError apiError');
|
|
11241
|
+
console.log(response, 'response response ');
|
|
11206
11242
|
return React__default.createElement(React__default.Fragment, null, (popupName == null ? void 0 : popupName.state) == 'create-return' && React__default.createElement(dmsComponentLibrary.AntModal, {
|
|
11207
11243
|
openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
|
|
11208
11244
|
closeModal: function closeModal() {
|
|
@@ -11297,11 +11333,11 @@ var ModalManager = function ModalManager() {
|
|
|
11297
11333
|
}));
|
|
11298
11334
|
};
|
|
11299
11335
|
|
|
11300
|
-
var _templateObject$
|
|
11301
|
-
var StyledContainer = /*#__PURE__*/styled__default.div(_templateObject$
|
|
11302
|
-
var StyledContentWrapper = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
11303
|
-
var StyledInfoBox = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
11304
|
-
var StyledLabel$2 = /*#__PURE__*/styled__default.div(_templateObject4$
|
|
11336
|
+
var _templateObject$2d, _templateObject2$1A, _templateObject3$10, _templateObject4$D, _templateObject6$f, _templateObject7$f;
|
|
11337
|
+
var StyledContainer = /*#__PURE__*/styled__default.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"])));
|
|
11338
|
+
var StyledContentWrapper = /*#__PURE__*/styled__default.div(_templateObject2$1A || (_templateObject2$1A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 12px;\n"])));
|
|
11339
|
+
var StyledInfoBox = /*#__PURE__*/styled__default.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"])));
|
|
11340
|
+
var StyledLabel$2 = /*#__PURE__*/styled__default.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"])));
|
|
11305
11341
|
var StyledPaginationWrapper = /*#__PURE__*/styled__default.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"])));
|
|
11306
11342
|
var StyledPaginationItem = /*#__PURE__*/styled__default.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) {
|
|
11307
11343
|
var active = _ref.active;
|
|
@@ -11421,7 +11457,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
11421
11457
|
}, React__default.createElement(NextIcon, null)))));
|
|
11422
11458
|
};
|
|
11423
11459
|
|
|
11424
|
-
var _templateObject$
|
|
11460
|
+
var _templateObject$2e, _templateObject2$1B;
|
|
11425
11461
|
var ReturnTable = function ReturnTable() {
|
|
11426
11462
|
var _UsePaginationData = UsePaginationData(),
|
|
11427
11463
|
paginationObj = _UsePaginationData[0];
|
|
@@ -11448,8 +11484,8 @@ var ReturnTable = function ReturnTable() {
|
|
|
11448
11484
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
11449
11485
|
})))), React__default.createElement(ModalManager, null));
|
|
11450
11486
|
};
|
|
11451
|
-
var Container$1d = /*#__PURE__*/styled__default.div(_templateObject$
|
|
11452
|
-
var DashBoardWrapper$1 = /*#__PURE__*/styled__default.section(_templateObject2$
|
|
11487
|
+
var Container$1d = /*#__PURE__*/styled__default.div(_templateObject$2e || (_templateObject$2e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
|
|
11488
|
+
var DashBoardWrapper$1 = /*#__PURE__*/styled__default.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"])));
|
|
11453
11489
|
|
|
11454
11490
|
function LoadIcon() {
|
|
11455
11491
|
return React__default.createElement("svg", {
|
|
@@ -11467,7 +11503,7 @@ function LoadIcon() {
|
|
|
11467
11503
|
}));
|
|
11468
11504
|
}
|
|
11469
11505
|
|
|
11470
|
-
var _templateObject$
|
|
11506
|
+
var _templateObject$2f, _templateObject2$1C;
|
|
11471
11507
|
var PrintDropDown = function PrintDropDown(_ref) {
|
|
11472
11508
|
var legacyProductId = _ref.legacyProductId;
|
|
11473
11509
|
var downloadFiles = function downloadFiles(label) {
|
|
@@ -11494,8 +11530,8 @@ var PrintDropDown = function PrintDropDown(_ref) {
|
|
|
11494
11530
|
}, IconComponent && React__default.createElement(IconComponent, null), item.label);
|
|
11495
11531
|
}));
|
|
11496
11532
|
};
|
|
11497
|
-
var OptionsList$1 = /*#__PURE__*/styled__default.ul(_templateObject$
|
|
11498
|
-
var OptionsListLi$1 = /*#__PURE__*/styled__default.li(_templateObject2$
|
|
11533
|
+
var OptionsList$1 = /*#__PURE__*/styled__default.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"])));
|
|
11534
|
+
var OptionsListLi$1 = /*#__PURE__*/styled__default.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) {
|
|
11499
11535
|
var disabled = _ref2.disabled;
|
|
11500
11536
|
return disabled ? 'not-allowed' : 'pointer';
|
|
11501
11537
|
}, function (_ref3) {
|
|
@@ -11603,10 +11639,6 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11603
11639
|
setOrderId = _useOrderId[1];
|
|
11604
11640
|
// console.log(id, 'idid');
|
|
11605
11641
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledTableWrapper, null, React__default.createElement(StyledTable$1, null, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", {
|
|
11606
|
-
className: "emailInvoiceCheckbox"
|
|
11607
|
-
}, React__default.createElement(dmsComponentLibrary.Checkbox, {
|
|
11608
|
-
checked: false
|
|
11609
|
-
})), React__default.createElement("th", {
|
|
11610
11642
|
className: "emailInvoiceNo"
|
|
11611
11643
|
}, "Created"), React__default.createElement("th", null, "Return Location"), React__default.createElement("th", null, "Pick Up Location"), React__default.createElement("th", null, "Recipient"), React__default.createElement("th", null, " Client"), React__default.createElement("th", null, "Consignment"), React__default.createElement("th", null, "Return Order No"), React__default.createElement("th", null, " Total Parts"), React__default.createElement("th", null, "Total Weight"), React__default.createElement("th", null, "Total CBM"), React__default.createElement("th", null, "Assign"), React__default.createElement("th", null, "Status"), React__default.createElement("th", {
|
|
11612
11644
|
className: "emailInvoiceShare"
|
|
@@ -11632,9 +11664,7 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11632
11664
|
var statusClass = getStatusClass(status);
|
|
11633
11665
|
return React__default.createElement("tr", {
|
|
11634
11666
|
key: item.id
|
|
11635
|
-
}, React__default.createElement("td", null, React__default.createElement(
|
|
11636
|
-
checked: false
|
|
11637
|
-
})), React__default.createElement("td", null, formatDate$1(new Date(item == null ? void 0 : item.created_at))), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$return_location = item.return_locations) == null ? void 0 : _item$return_location.location_name)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.pick_up_location)), React__default.createElement("td", {
|
|
11667
|
+
}, React__default.createElement("td", null, formatDate$1(new Date(item == null ? void 0 : item.created_at))), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$return_location = item.return_locations) == null ? void 0 : _item$return_location.location_name)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.pick_up_location)), React__default.createElement("td", {
|
|
11638
11668
|
onClick: function onClick() {
|
|
11639
11669
|
return setOrderId(item.id);
|
|
11640
11670
|
}
|
|
@@ -11693,9 +11723,10 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11693
11723
|
})))));
|
|
11694
11724
|
};
|
|
11695
11725
|
|
|
11696
|
-
var _templateObject$
|
|
11726
|
+
var _templateObject$2g;
|
|
11727
|
+
// import DownloadIcon from '../../../../assets/icons/DownloadIcon';
|
|
11697
11728
|
var TableFilters = function TableFilters() {
|
|
11698
|
-
return React__default.createElement(Container$1e, null
|
|
11729
|
+
return React__default.createElement(Container$1e, null);
|
|
11699
11730
|
// return (
|
|
11700
11731
|
// // <StyledBulkFilterCover>
|
|
11701
11732
|
// <StyledBulkItem>
|
|
@@ -11709,27 +11740,7 @@ var TableFilters = function TableFilters() {
|
|
|
11709
11740
|
// // </StyledBulkFilterCover>
|
|
11710
11741
|
// );
|
|
11711
11742
|
};
|
|
11712
|
-
var Container$1e = /*#__PURE__*/styled__default.div(_templateObject$
|
|
11713
|
-
var Mid$1 = /*#__PURE__*/styled__default.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"])));
|
|
11714
|
-
// const TextConatiner = styled.div`
|
|
11715
|
-
// display: flex;
|
|
11716
|
-
// padding: 7px 12px;
|
|
11717
|
-
// justify-content: center;
|
|
11718
|
-
// align-items: center;
|
|
11719
|
-
// gap: 2px;
|
|
11720
|
-
// border-radius: 15px;
|
|
11721
|
-
// background: rgba(136, 128, 117, 0.35);
|
|
11722
|
-
// `;
|
|
11723
|
-
// const Text = styled.div`
|
|
11724
|
-
// color: #888075;
|
|
11725
|
-
// font-family: "'Lato";
|
|
11726
|
-
// font-size: 14px;
|
|
11727
|
-
// font-style: normal;
|
|
11728
|
-
// font-weight: 600;
|
|
11729
|
-
// line-height: 20px;
|
|
11730
|
-
// `;
|
|
11731
|
-
var IconConatiner$1 = /*#__PURE__*/styled__default.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"])));
|
|
11732
|
-
var IconText$1 = /*#__PURE__*/styled__default.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"])));
|
|
11743
|
+
var Container$1e = /*#__PURE__*/styled__default.div(_templateObject$2g || (_templateObject$2g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
|
|
11733
11744
|
|
|
11734
11745
|
var FilterIcon = function FilterIcon() {
|
|
11735
11746
|
return React__default.createElement("svg", {
|
|
@@ -11790,6 +11801,50 @@ var ClientIcon = function ClientIcon() {
|
|
|
11790
11801
|
}));
|
|
11791
11802
|
};
|
|
11792
11803
|
|
|
11804
|
+
var StatusIcon = function StatusIcon() {
|
|
11805
|
+
return React__default.createElement("svg", {
|
|
11806
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11807
|
+
width: "13",
|
|
11808
|
+
height: "12",
|
|
11809
|
+
viewBox: "0 0 13 12",
|
|
11810
|
+
fill: "none"
|
|
11811
|
+
}, React__default.createElement("path", {
|
|
11812
|
+
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",
|
|
11813
|
+
stroke: "#6D6B68",
|
|
11814
|
+
"stroke-width": "2",
|
|
11815
|
+
"stroke-linecap": "round",
|
|
11816
|
+
"stroke-linejoin": "round"
|
|
11817
|
+
}), React__default.createElement("path", {
|
|
11818
|
+
d: "M7.8501 4.25L9.6001 6L11.3501 4.25",
|
|
11819
|
+
stroke: "#6D6B68",
|
|
11820
|
+
"stroke-width": "2",
|
|
11821
|
+
"stroke-linecap": "round",
|
|
11822
|
+
"stroke-linejoin": "round"
|
|
11823
|
+
}));
|
|
11824
|
+
};
|
|
11825
|
+
|
|
11826
|
+
var AssigneIcon = function AssigneIcon() {
|
|
11827
|
+
return React__default.createElement("svg", {
|
|
11828
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11829
|
+
width: "15",
|
|
11830
|
+
height: "14",
|
|
11831
|
+
viewBox: "0 0 15 14",
|
|
11832
|
+
fill: "none"
|
|
11833
|
+
}, React__default.createElement("g", {
|
|
11834
|
+
"clip-path": "url(#clip0_504_13636)"
|
|
11835
|
+
}, React__default.createElement("path", {
|
|
11836
|
+
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",
|
|
11837
|
+
fill: "#6D6B68"
|
|
11838
|
+
})), React__default.createElement("defs", null, React__default.createElement("clipPath", {
|
|
11839
|
+
id: "clip0_504_13636"
|
|
11840
|
+
}, React__default.createElement("rect", {
|
|
11841
|
+
width: "14",
|
|
11842
|
+
height: "14",
|
|
11843
|
+
fill: "white",
|
|
11844
|
+
transform: "translate(0.100098)"
|
|
11845
|
+
}))));
|
|
11846
|
+
};
|
|
11847
|
+
|
|
11793
11848
|
var initialState$2 = {
|
|
11794
11849
|
'x-filters': [],
|
|
11795
11850
|
'x-pagination': {
|
|
@@ -11798,6 +11853,7 @@ var initialState$2 = {
|
|
|
11798
11853
|
}
|
|
11799
11854
|
};
|
|
11800
11855
|
var filterReducer$1 = function filterReducer(state, action) {
|
|
11856
|
+
console.log(action, 'action');
|
|
11801
11857
|
switch (action.type) {
|
|
11802
11858
|
case 'SET_DATE_FILTER':
|
|
11803
11859
|
return _extends({}, state, {
|
|
@@ -11862,51 +11918,7 @@ var filtersReducerReturnAtom = /*#__PURE__*/jotai.atom(function (get) {
|
|
|
11862
11918
|
return set(filtersStateAtom$1, filterReducer$1(get(filtersStateAtom$1), action));
|
|
11863
11919
|
});
|
|
11864
11920
|
|
|
11865
|
-
var
|
|
11866
|
-
return React__default.createElement("svg", {
|
|
11867
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11868
|
-
width: "13",
|
|
11869
|
-
height: "12",
|
|
11870
|
-
viewBox: "0 0 13 12",
|
|
11871
|
-
fill: "none"
|
|
11872
|
-
}, React__default.createElement("path", {
|
|
11873
|
-
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",
|
|
11874
|
-
stroke: "#6D6B68",
|
|
11875
|
-
"stroke-width": "2",
|
|
11876
|
-
"stroke-linecap": "round",
|
|
11877
|
-
"stroke-linejoin": "round"
|
|
11878
|
-
}), React__default.createElement("path", {
|
|
11879
|
-
d: "M7.8501 4.25L9.6001 6L11.3501 4.25",
|
|
11880
|
-
stroke: "#6D6B68",
|
|
11881
|
-
"stroke-width": "2",
|
|
11882
|
-
"stroke-linecap": "round",
|
|
11883
|
-
"stroke-linejoin": "round"
|
|
11884
|
-
}));
|
|
11885
|
-
};
|
|
11886
|
-
|
|
11887
|
-
var AssigneIcon = function AssigneIcon() {
|
|
11888
|
-
return React__default.createElement("svg", {
|
|
11889
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11890
|
-
width: "15",
|
|
11891
|
-
height: "14",
|
|
11892
|
-
viewBox: "0 0 15 14",
|
|
11893
|
-
fill: "none"
|
|
11894
|
-
}, React__default.createElement("g", {
|
|
11895
|
-
"clip-path": "url(#clip0_504_13636)"
|
|
11896
|
-
}, React__default.createElement("path", {
|
|
11897
|
-
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",
|
|
11898
|
-
fill: "#6D6B68"
|
|
11899
|
-
})), React__default.createElement("defs", null, React__default.createElement("clipPath", {
|
|
11900
|
-
id: "clip0_504_13636"
|
|
11901
|
-
}, React__default.createElement("rect", {
|
|
11902
|
-
width: "14",
|
|
11903
|
-
height: "14",
|
|
11904
|
-
fill: "white",
|
|
11905
|
-
transform: "translate(0.100098)"
|
|
11906
|
-
}))));
|
|
11907
|
-
};
|
|
11908
|
-
|
|
11909
|
-
var _templateObject$2i, _templateObject2$1G;
|
|
11921
|
+
var _templateObject$2h, _templateObject2$1D;
|
|
11910
11922
|
var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
11911
11923
|
var _useAtom = jotai.useAtom(filtersReducerReturnAtom),
|
|
11912
11924
|
dispatch = _useAtom[1];
|
|
@@ -11923,6 +11935,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11923
11935
|
var _useState3 = React.useState(),
|
|
11924
11936
|
statusOrder = _useState3[0],
|
|
11925
11937
|
setStatusOfOrder = _useState3[1];
|
|
11938
|
+
console.log(selectedClient, 'fffffselectedClient');
|
|
11926
11939
|
var zoneOptions = [{
|
|
11927
11940
|
label: 'Zone 1',
|
|
11928
11941
|
value: 'zone1'
|
|
@@ -11951,6 +11964,11 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11951
11964
|
type: 'SET_DATE_FILTER',
|
|
11952
11965
|
payload: selectedDate
|
|
11953
11966
|
});
|
|
11967
|
+
// Reset to the first page
|
|
11968
|
+
dispatch({
|
|
11969
|
+
type: 'SET_PAGE',
|
|
11970
|
+
payload: 1
|
|
11971
|
+
});
|
|
11954
11972
|
}
|
|
11955
11973
|
}, [selectedDate]);
|
|
11956
11974
|
//client options
|
|
@@ -11961,6 +11979,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11961
11979
|
value: option == null ? void 0 : option.id
|
|
11962
11980
|
};
|
|
11963
11981
|
});
|
|
11982
|
+
console.log(clientOptions, 'clientOptions');
|
|
11964
11983
|
//status of order
|
|
11965
11984
|
var orderOptions = statusOfOrder == null ? void 0 : statusOfOrder.map(function (option) {
|
|
11966
11985
|
var _option$status_type, _option$status_type2;
|
|
@@ -11970,20 +11989,32 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11970
11989
|
};
|
|
11971
11990
|
});
|
|
11972
11991
|
var handleClientChange = function handleClientChange(value) {
|
|
11992
|
+
if (value === selectedClient) return;
|
|
11973
11993
|
console.log(value, 'value');
|
|
11974
11994
|
setSelectedClient(value);
|
|
11975
11995
|
dispatch({
|
|
11976
11996
|
type: 'SET_CLIENT_FILTER',
|
|
11977
|
-
payload:
|
|
11997
|
+
payload: value
|
|
11998
|
+
});
|
|
11999
|
+
// Reset to the first page
|
|
12000
|
+
dispatch({
|
|
12001
|
+
type: 'SET_PAGE',
|
|
12002
|
+
payload: 1
|
|
11978
12003
|
});
|
|
11979
12004
|
};
|
|
11980
12005
|
var handleStatusOfOrder = function handleStatusOfOrder(value) {
|
|
12006
|
+
if (value === statusOfOrder) return;
|
|
11981
12007
|
console.log(value, 'value');
|
|
11982
12008
|
setStatusOfOrder(value);
|
|
11983
12009
|
dispatch({
|
|
11984
12010
|
type: 'SET_STATUS_ORDER_FILTER',
|
|
11985
12011
|
payload: value
|
|
11986
12012
|
});
|
|
12013
|
+
// Reset to the first page
|
|
12014
|
+
dispatch({
|
|
12015
|
+
type: 'SET_PAGE',
|
|
12016
|
+
payload: 1
|
|
12017
|
+
});
|
|
11987
12018
|
};
|
|
11988
12019
|
var handleClearAll = function handleClearAll() {
|
|
11989
12020
|
setSelectedDate(null);
|
|
@@ -12025,8 +12056,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12025
12056
|
style: {
|
|
12026
12057
|
minWidth: '130px'
|
|
12027
12058
|
},
|
|
12028
|
-
value: statusOrder
|
|
12029
|
-
allowClear: true
|
|
12059
|
+
value: statusOrder
|
|
12030
12060
|
}))), React__default.createElement("div", {
|
|
12031
12061
|
className: "datefilter"
|
|
12032
12062
|
}, React__default.createElement("div", {
|
|
@@ -12040,8 +12070,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12040
12070
|
style: {
|
|
12041
12071
|
width: '125px',
|
|
12042
12072
|
border: 'none'
|
|
12043
|
-
}
|
|
12044
|
-
allowClear: true
|
|
12073
|
+
}
|
|
12045
12074
|
}))), React__default.createElement("div", {
|
|
12046
12075
|
className: "datefilter",
|
|
12047
12076
|
style: {
|
|
@@ -12059,15 +12088,15 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12059
12088
|
minWidth: '100px'
|
|
12060
12089
|
},
|
|
12061
12090
|
disabled: true
|
|
12062
|
-
}))), selectedDate ? React__default.createElement(React__default.Fragment, null, React__default.createElement(ClearAll, {
|
|
12091
|
+
}))), selectedDate || statusOrder || selectedClient ? React__default.createElement(React__default.Fragment, null, React__default.createElement(ClearAll, {
|
|
12063
12092
|
onClick: handleClearAll
|
|
12064
12093
|
}, React__default.createElement(StyledFilterBtnIcon, null, React__default.createElement("i", {
|
|
12065
12094
|
className: "cross"
|
|
12066
12095
|
})), React__default.createElement(StyledFilterBtnLabel, null, "Clear all"))) : null)), React__default.createElement(TableFilters, null)));
|
|
12067
12096
|
};
|
|
12068
|
-
var StyledDatePicker = /*#__PURE__*/styled__default.div(_templateObject$
|
|
12097
|
+
var StyledDatePicker = /*#__PURE__*/styled__default.div(_templateObject$2h || (_templateObject$2h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
|
|
12069
12098
|
// const DropdownContainer = styled.div``;
|
|
12070
|
-
var StyledAntSelect$c = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
12099
|
+
var StyledAntSelect$c = /*#__PURE__*/styled__default.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"])));
|
|
12071
12100
|
|
|
12072
12101
|
var PAGE_SIZE_OPTIONS$1 = [50, 100, 150];
|
|
12073
12102
|
var MAX_PAGES_TO_SHOW$1 = 5;
|
|
@@ -12153,7 +12182,7 @@ var ReturnPagination = function ReturnPagination(_ref) {
|
|
|
12153
12182
|
}, React__default.createElement(NextIcon, null)))));
|
|
12154
12183
|
};
|
|
12155
12184
|
|
|
12156
|
-
var _templateObject$
|
|
12185
|
+
var _templateObject$2i, _templateObject2$1E;
|
|
12157
12186
|
var _excluded$5 = ["count"];
|
|
12158
12187
|
var ReturnAfterTable = function ReturnAfterTable() {
|
|
12159
12188
|
var _useReturnAfterOrderD = useReturnAfterOrderData(),
|
|
@@ -12164,6 +12193,14 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12164
12193
|
state = _useAtom[0];
|
|
12165
12194
|
var filters = state['x-filters'],
|
|
12166
12195
|
pagination = state['x-pagination'];
|
|
12196
|
+
var splitPath = function splitPath(str) {
|
|
12197
|
+
var _str$split;
|
|
12198
|
+
var parts = str == null || (_str$split = str.split('/')) == null ? void 0 : _str$split.filter(function (part) {
|
|
12199
|
+
return part !== '';
|
|
12200
|
+
}); // Filter out empty parts
|
|
12201
|
+
return parts;
|
|
12202
|
+
};
|
|
12203
|
+
var paths = splitPath(location.pathname);
|
|
12167
12204
|
var _UsePaginationReturnD = UsePaginationReturnData(),
|
|
12168
12205
|
paginationObj = _UsePaginationReturnD[0];
|
|
12169
12206
|
var _useState = React.useState(1),
|
|
@@ -12173,6 +12210,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12173
12210
|
setItemsPerPage = _useItemsPerReturnPag[1];
|
|
12174
12211
|
var _UsePaginationData = UsePaginationData(),
|
|
12175
12212
|
setPaginationObject = _UsePaginationData[1];
|
|
12213
|
+
console.log(paths, 'paths');
|
|
12176
12214
|
var page = paginationObj.page,
|
|
12177
12215
|
total = paginationObj.total;
|
|
12178
12216
|
var handlePageChange = function handlePageChange(page) {
|
|
@@ -12208,7 +12246,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12208
12246
|
}, [fetchedReturnOrderData, staticDataLoading]);
|
|
12209
12247
|
return React__default.createElement("div", null, React__default.createElement(DashBoardWrapper$2, null, React__default.createElement("div", {
|
|
12210
12248
|
className: "Tableconatiner"
|
|
12211
|
-
}, React__default.createElement(
|
|
12249
|
+
}, React__default.createElement(Container$1f, null, React__default.createElement(ReturnOrderFilter, null), React__default.createElement(OrderTable, null), total > 0 && React__default.createElement(ReturnPagination, {
|
|
12212
12250
|
currentPage: page,
|
|
12213
12251
|
totalItems: total,
|
|
12214
12252
|
itemsPerPage: itemsPerPage,
|
|
@@ -12216,8 +12254,29 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12216
12254
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
12217
12255
|
})))));
|
|
12218
12256
|
};
|
|
12219
|
-
var Container$1f = /*#__PURE__*/styled__default.div(_templateObject$
|
|
12220
|
-
var DashBoardWrapper$2 = /*#__PURE__*/styled__default.section(_templateObject2$
|
|
12257
|
+
var Container$1f = /*#__PURE__*/styled__default.div(_templateObject$2i || (_templateObject$2i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n /* top: -30px; */\n"])));
|
|
12258
|
+
var DashBoardWrapper$2 = /*#__PURE__*/styled__default.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"])));
|
|
12259
|
+
|
|
12260
|
+
var _templateObject2$1F;
|
|
12261
|
+
var StyledBulkItem = /*#__PURE__*/styled__default.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"])));
|
|
12262
|
+
|
|
12263
|
+
var _templateObject$2j, _templateObject2$1G;
|
|
12264
|
+
var SearchType = function SearchType() {
|
|
12265
|
+
var _useState = React.useState(''),
|
|
12266
|
+
searchText = _useState[0],
|
|
12267
|
+
setSearchText = _useState[1];
|
|
12268
|
+
var handleInputChange = function handleInputChange(event) {
|
|
12269
|
+
setSearchText(event.target.value);
|
|
12270
|
+
};
|
|
12271
|
+
return React__default.createElement(Search, null, React__default.createElement(SearchIcon, null), React__default.createElement(SearchInput, {
|
|
12272
|
+
type: "text",
|
|
12273
|
+
placeholder: "Search",
|
|
12274
|
+
value: searchText,
|
|
12275
|
+
onChange: handleInputChange
|
|
12276
|
+
}));
|
|
12277
|
+
};
|
|
12278
|
+
var Search = /*#__PURE__*/styled__default.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"])));
|
|
12279
|
+
var SearchInput = /*#__PURE__*/styled__default.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"])));
|
|
12221
12280
|
|
|
12222
12281
|
var BulkFilter = function BulkFilter() {
|
|
12223
12282
|
// const [printToogle, setPrintToggle] = useMenuDropDown();
|
|
@@ -12338,66 +12397,17 @@ var ReturnTable$1 = function ReturnTable(_ref) {
|
|
|
12338
12397
|
})))));
|
|
12339
12398
|
};
|
|
12340
12399
|
|
|
12341
|
-
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
// {
|
|
12345
|
-
// field: 'action_date',
|
|
12346
|
-
// op: '>=',
|
|
12347
|
-
// value: `${format(new Date(todayDate), 'yyyy-MM-dd')}T00:00:00+00:00`,
|
|
12348
|
-
// },
|
|
12349
|
-
// {
|
|
12350
|
-
// field: 'action_date',
|
|
12351
|
-
// op: '<=',
|
|
12352
|
-
// value: `${format(new Date(todayDate), 'yyyy-MM-dd')}T23:59:59+00:00`,
|
|
12353
|
-
// },
|
|
12354
|
-
// { field: 'status', op: 'count', value: '' },
|
|
12355
|
-
],
|
|
12356
|
-
'x-pagination': {
|
|
12357
|
-
page: 1,
|
|
12358
|
-
per_page: 50
|
|
12359
|
-
}
|
|
12360
|
-
};
|
|
12361
|
-
var filterReducer$2 = function filterReducer(state, action) {
|
|
12362
|
-
switch (action.type) {
|
|
12363
|
-
case 'SET_PAGE':
|
|
12364
|
-
return _extends({}, state, {
|
|
12365
|
-
'x-pagination': _extends({}, state['x-pagination'], {
|
|
12366
|
-
page: action.payload
|
|
12367
|
-
})
|
|
12368
|
-
});
|
|
12369
|
-
case 'SET_PERPAGE':
|
|
12370
|
-
return _extends({}, state, {
|
|
12371
|
-
'x-pagination': _extends({}, state['x-pagination'], {
|
|
12372
|
-
per_page: action.payload
|
|
12373
|
-
})
|
|
12374
|
-
});
|
|
12375
|
-
case 'CLEAR_FILTERS':
|
|
12376
|
-
return _extends({}, state);
|
|
12377
|
-
case 'CLEAR_ALL_FILTER':
|
|
12378
|
-
return _extends({}, state);
|
|
12379
|
-
default:
|
|
12380
|
-
return state;
|
|
12381
|
-
}
|
|
12382
|
-
};
|
|
12383
|
-
var filtersStateAtom$2 = /*#__PURE__*/jotai.atom(initialState$3);
|
|
12384
|
-
var overviewfiltersReducerAtom = /*#__PURE__*/jotai.atom(function (get) {
|
|
12385
|
-
return get(filtersStateAtom$2);
|
|
12386
|
-
}, function (get, set, action) {
|
|
12387
|
-
return set(filtersStateAtom$2, filterReducer$2(get(filtersStateAtom$2), action));
|
|
12388
|
-
});
|
|
12389
|
-
|
|
12390
|
-
var _templateObject$2k, _templateObject2$1I, _templateObject3$13;
|
|
12400
|
+
var _templateObject$2k, _templateObject2$1H, _templateObject3$11;
|
|
12401
|
+
// import Pagination from './table-view/Pagination';
|
|
12402
|
+
// import { overviewfiltersReducerAtom } from './header-filters/overViewFilter';
|
|
12391
12403
|
function ReturnMainTable() {
|
|
12392
|
-
|
|
12393
|
-
state = _useAtom[0];
|
|
12404
|
+
// const [state] = useAtom(overviewfiltersReducerAtom);
|
|
12394
12405
|
// const [paginationObj] = UsePaginationData();
|
|
12395
12406
|
// const [, setCurrentPage] = useState(1);
|
|
12396
12407
|
// const [itemsPerPage, setItemsPerPage] = useItemsPerPage();
|
|
12397
|
-
|
|
12408
|
+
// const { 'x-pagination': pagination } = state;
|
|
12398
12409
|
// const { page, total } = paginationObj;
|
|
12399
|
-
|
|
12400
|
-
selectedClient = _useTableName[0];
|
|
12410
|
+
// const [selectedClient] = useTableName();
|
|
12401
12411
|
// const [, setPaginationObject] = UsePaginationData();
|
|
12402
12412
|
var _useStickyStatus = useStickyStatus(),
|
|
12403
12413
|
isScrolled = _useStickyStatus[0];
|
|
@@ -12414,7 +12424,10 @@ function ReturnMainTable() {
|
|
|
12414
12424
|
var _useApiHook = dmsComponentLibrary.useApiHook({
|
|
12415
12425
|
endpoint: "/return_orders/get/client-returns/",
|
|
12416
12426
|
method: 'GET',
|
|
12417
|
-
pagination:
|
|
12427
|
+
pagination: {
|
|
12428
|
+
page: 1,
|
|
12429
|
+
per_page: 200
|
|
12430
|
+
}
|
|
12418
12431
|
}),
|
|
12419
12432
|
fetchedClientData = _useApiHook.data,
|
|
12420
12433
|
staticDataLoading = _useApiHook.loading;
|
|
@@ -12434,19 +12447,20 @@ function ReturnMainTable() {
|
|
|
12434
12447
|
// }
|
|
12435
12448
|
}
|
|
12436
12449
|
}, [staticDataLoading]);
|
|
12450
|
+
var getClient = localStorage.getItem('clientName');
|
|
12437
12451
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(DashBoardWrapper$3, {
|
|
12438
12452
|
className: " " + (isScrolled ? 'stickyTableHead' : '')
|
|
12439
12453
|
}, React__default.createElement("div", {
|
|
12440
12454
|
className: "Tableconatiner"
|
|
12441
|
-
}, React__default.createElement(HeaderFilter, null), React__default.createElement(Container$1g, null, React__default.createElement(Row$7, null, React__default.createElement(Text$7, null, "Client Return"),
|
|
12455
|
+
}, React__default.createElement(HeaderFilter, null), React__default.createElement(Container$1g, null, React__default.createElement(Row$7, null, React__default.createElement(Text$7, null, "Client Return"), getClient ? React__default.createElement(ReturnFilter, null) : React__default.createElement(Filters, null)), React__default.createElement(ReturnTable$1, null)))));
|
|
12442
12456
|
}
|
|
12443
12457
|
var Row$7 = /*#__PURE__*/styled__default.div(_templateObject$2k || (_templateObject$2k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
|
|
12444
|
-
var Container$1g = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
12445
|
-
var DashBoardWrapper$3 = /*#__PURE__*/styled__default.section(_templateObject3$
|
|
12458
|
+
var Container$1g = /*#__PURE__*/styled__default.div(_templateObject2$1H || (_templateObject2$1H = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
|
|
12459
|
+
var DashBoardWrapper$3 = /*#__PURE__*/styled__default.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"])));
|
|
12446
12460
|
|
|
12447
|
-
var _templateObject$2l, _templateObject2$
|
|
12461
|
+
var _templateObject$2l, _templateObject2$1I;
|
|
12448
12462
|
var HeaderWrapper = /*#__PURE__*/styled__default.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"])));
|
|
12449
|
-
var StyledFlex = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
12463
|
+
var StyledFlex = /*#__PURE__*/styled__default.div(_templateObject2$1I || (_templateObject2$1I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
12450
12464
|
|
|
12451
12465
|
var _templateObject$2m;
|
|
12452
12466
|
var HeaderTitle = function HeaderTitle(props) {
|
|
@@ -12454,12 +12468,12 @@ var HeaderTitle = function HeaderTitle(props) {
|
|
|
12454
12468
|
};
|
|
12455
12469
|
var Title$7 = /*#__PURE__*/styled__default.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"])));
|
|
12456
12470
|
|
|
12457
|
-
var _templateObject$2n, _templateObject2$
|
|
12471
|
+
var _templateObject$2n, _templateObject2$1J;
|
|
12458
12472
|
function Breadcrumb(props) {
|
|
12459
12473
|
return React__default.createElement(BreadcrumbContainer, null, React__default.createElement(BreadcrumbList, null, props.title || ''), React__default.createElement(BreadcrumbList, null, props.subtitle || ''), props.subPart && React__default.createElement(React__default.Fragment, null, React__default.createElement(BreadcrumbList, null, props.subPart)));
|
|
12460
12474
|
}
|
|
12461
12475
|
var BreadcrumbContainer = /*#__PURE__*/styled__default.div(_templateObject$2n || (_templateObject$2n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n"])));
|
|
12462
|
-
var BreadcrumbList = /*#__PURE__*/styled__default.span(_templateObject2$
|
|
12476
|
+
var BreadcrumbList = /*#__PURE__*/styled__default.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"])));
|
|
12463
12477
|
|
|
12464
12478
|
var RouterHeader = function RouterHeader(_ref) {
|
|
12465
12479
|
var _ref$breadcrumbTitle = _ref.breadcrumbTitle,
|
|
@@ -12481,6 +12495,7 @@ var RouterHeader = function RouterHeader(_ref) {
|
|
|
12481
12495
|
})))));
|
|
12482
12496
|
};
|
|
12483
12497
|
|
|
12498
|
+
// import { filtersReducerAtom } from './components/order-daily-overview/header-filters/filterStore';
|
|
12484
12499
|
function ReturnClient() {
|
|
12485
12500
|
var _selectedClientString;
|
|
12486
12501
|
antd.notification.config({
|
|
@@ -12494,12 +12509,23 @@ function ReturnClient() {
|
|
|
12494
12509
|
var navigate = reactRouterDom.useNavigate();
|
|
12495
12510
|
var selectedClientString = selectedClient == null ? void 0 : selectedClient.replace(/\s+/g, '-');
|
|
12496
12511
|
selectedClientString = (_selectedClientString = selectedClientString) == null ? void 0 : _selectedClientString.toLowerCase();
|
|
12512
|
+
var _useCustomerData = useCustomerData(),
|
|
12513
|
+
setCustomers = _useCustomerData[1];
|
|
12514
|
+
var _useActionType = useActionType(),
|
|
12515
|
+
setActionType = _useActionType[1];
|
|
12516
|
+
var _useLocationData = useLocationData(),
|
|
12517
|
+
setLocationData = _useLocationData[1];
|
|
12518
|
+
var _useStatusOrderData = useStatusOrderData(),
|
|
12519
|
+
setStatusOfOrders = _useStatusOrderData[1];
|
|
12520
|
+
// const [, dispatch] = useAtom(filtersReducerAtom);
|
|
12497
12521
|
console.log(selectedClientString, 'selectedClient');
|
|
12498
12522
|
console.log("../filter/:" + selectedClientString);
|
|
12499
12523
|
React.useEffect(function () {
|
|
12500
|
-
if (
|
|
12524
|
+
if (location.pathname.includes('/returnclient')) {
|
|
12501
12525
|
localStorage.removeItem('clientName');
|
|
12502
12526
|
localStorage.removeItem('clientId');
|
|
12527
|
+
localStorage.removeItem('uuid');
|
|
12528
|
+
// dispatch({ type: 'CLEAR_CLIENT', payload: [] });
|
|
12503
12529
|
}
|
|
12504
12530
|
}, [location.pathname]);
|
|
12505
12531
|
React.useEffect(function () {
|
|
@@ -12508,6 +12534,56 @@ function ReturnClient() {
|
|
|
12508
12534
|
navigate("filter/" + _selectedClientString2);
|
|
12509
12535
|
}
|
|
12510
12536
|
}, [selectedClient]);
|
|
12537
|
+
//API for client data
|
|
12538
|
+
var _useApiHook = dmsComponentLibrary.useApiHook({
|
|
12539
|
+
endpoint: "/customers/",
|
|
12540
|
+
method: 'GET',
|
|
12541
|
+
//@ts-ignore
|
|
12542
|
+
pagination: {
|
|
12543
|
+
is_pagination: false
|
|
12544
|
+
}
|
|
12545
|
+
}),
|
|
12546
|
+
fetchedCustomerData = _useApiHook.data,
|
|
12547
|
+
loading = _useApiHook.loading;
|
|
12548
|
+
//API for action type
|
|
12549
|
+
var _useApiHook2 = dmsComponentLibrary.useApiHook({
|
|
12550
|
+
endpoint: "/orders/getStaticData/all/",
|
|
12551
|
+
method: 'GET'
|
|
12552
|
+
}),
|
|
12553
|
+
fetchedStaticData = _useApiHook2.data,
|
|
12554
|
+
actionLoading = _useApiHook2.loading;
|
|
12555
|
+
//API for return locations
|
|
12556
|
+
var _useApiHook3 = dmsComponentLibrary.useApiHook({
|
|
12557
|
+
endpoint: "/return_locations/",
|
|
12558
|
+
method: 'GET',
|
|
12559
|
+
//@ts-ignore
|
|
12560
|
+
pagination: {
|
|
12561
|
+
is_pagination: false
|
|
12562
|
+
}
|
|
12563
|
+
}),
|
|
12564
|
+
fetchedLocationData = _useApiHook3.data,
|
|
12565
|
+
locationloading = _useApiHook3.loading;
|
|
12566
|
+
React.useEffect(function () {
|
|
12567
|
+
if (fetchedCustomerData && fetchedCustomerData != null && fetchedCustomerData.data) {
|
|
12568
|
+
setCustomers(fetchedCustomerData == null ? void 0 : fetchedCustomerData.data);
|
|
12569
|
+
}
|
|
12570
|
+
}, [loading]);
|
|
12571
|
+
React.useEffect(function () {
|
|
12572
|
+
if (fetchedStaticData && fetchedStaticData != null && fetchedStaticData.data) {
|
|
12573
|
+
var _fetchedStaticData$da, _fetchedStaticData$da2;
|
|
12574
|
+
setActionType(fetchedStaticData == null || (_fetchedStaticData$da = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da.flatMap(function (i) {
|
|
12575
|
+
return i == null ? void 0 : i.order_product_return_action;
|
|
12576
|
+
}));
|
|
12577
|
+
setStatusOfOrders(fetchedStaticData == null || (_fetchedStaticData$da2 = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da2.flatMap(function (i) {
|
|
12578
|
+
return i == null ? void 0 : i.order_stock_alias;
|
|
12579
|
+
}));
|
|
12580
|
+
}
|
|
12581
|
+
}, [actionLoading]);
|
|
12582
|
+
React.useEffect(function () {
|
|
12583
|
+
if (fetchedLocationData && fetchedLocationData != null && fetchedLocationData.data) {
|
|
12584
|
+
setLocationData(fetchedLocationData == null ? void 0 : fetchedLocationData.data);
|
|
12585
|
+
}
|
|
12586
|
+
}, [locationloading]);
|
|
12511
12587
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(RouterHeader, null), React__default.createElement(React.Suspense, {
|
|
12512
12588
|
fallback: React__default.createElement(LoadingMessage, null)
|
|
12513
12589
|
}, React__default.createElement(reactRouterDom.Routes, null, React__default.createElement(reactRouterDom.Route, {
|