@bjsdistribution/dms-client-return 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/order-daily-overview/store/store.d.ts +1 -1
- package/dist/components/order-view/utils.d.ts +2 -0
- package/dist/dms-client-return.cjs.development.js +519 -402
- 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 +520 -403
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +58 -58
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +85 -46
- package/src/components/order-daily-overview/header-filters/Styledfilters.tsx +1 -0
- package/src/components/order-daily-overview/header-filters/filterStore.ts +17 -1
- package/src/components/order-daily-overview/index.tsx +9 -8
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +9 -5
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +5 -5
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +1 -0
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +22 -19
- package/src/components/order-daily-overview/return-after-table/table-filters/TableFilters.tsx +55 -55
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +73 -38
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/RightFilters.tsx +42 -43
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +1 -0
- package/src/components/order-daily-overview/store/store.ts +1 -1
- package/src/components/order-view/index.tsx +6 -6
- package/src/components/order-view/modalsPopup/ModalManager.tsx +69 -31
- package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +21 -2
- package/src/index.tsx +74 -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,69 @@ 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
|
+
// Reset to the first page
|
|
9544
|
+
dispatch({
|
|
9545
|
+
type: 'SET_PAGE',
|
|
9546
|
+
payload: 1
|
|
9547
|
+
});
|
|
9548
|
+
} else {
|
|
9549
|
+
dispatch({
|
|
9550
|
+
type: 'SET_CLIENT_FILTER',
|
|
9551
|
+
payload: []
|
|
9552
|
+
});
|
|
9522
9553
|
}
|
|
9554
|
+
//action value
|
|
9523
9555
|
if (selectedFilterValue) {
|
|
9524
9556
|
dispatch({
|
|
9525
9557
|
type: 'SET_ACTIONS_FILTER',
|
|
9526
9558
|
payload: selectedFilterValue
|
|
9527
9559
|
});
|
|
9560
|
+
// Reset to the first page
|
|
9561
|
+
dispatch({
|
|
9562
|
+
type: 'SET_PAGE',
|
|
9563
|
+
payload: 1
|
|
9564
|
+
});
|
|
9528
9565
|
}
|
|
9529
|
-
|
|
9566
|
+
//location value
|
|
9567
|
+
if (selectedLocationValue && selectedLocationValue.length > 0) {
|
|
9530
9568
|
dispatch({
|
|
9531
9569
|
type: 'SET_LOCATION_FILTER',
|
|
9532
9570
|
payload: selectedLocationValue
|
|
9533
9571
|
});
|
|
9572
|
+
// Reset to the first page
|
|
9573
|
+
dispatch({
|
|
9574
|
+
type: 'SET_PAGE',
|
|
9575
|
+
payload: 1
|
|
9576
|
+
});
|
|
9534
9577
|
}
|
|
9535
9578
|
};
|
|
9536
|
-
|
|
9537
|
-
|
|
9579
|
+
React.useEffect(function () {
|
|
9580
|
+
return function () {
|
|
9581
|
+
dispatch({
|
|
9582
|
+
type: 'CLEAR_CLIENT'
|
|
9583
|
+
});
|
|
9584
|
+
};
|
|
9585
|
+
}, []);
|
|
9538
9586
|
React.useEffect(function () {
|
|
9539
9587
|
if (storedClientId) {
|
|
9540
9588
|
dispatch({
|
|
@@ -9550,6 +9598,19 @@ function SelectionFilter() {
|
|
|
9550
9598
|
setIsButtonEnabled(false);
|
|
9551
9599
|
}
|
|
9552
9600
|
}, [storedName, selectedFilterValue, selectedLocationValue]);
|
|
9601
|
+
React.useEffect(function () {}, [location.pathname]);
|
|
9602
|
+
React.useEffect(function () {
|
|
9603
|
+
if (!selectedFilterValue || selectedFilterValue === null) {
|
|
9604
|
+
dispatch({
|
|
9605
|
+
type: 'CLEAR_ACTION'
|
|
9606
|
+
});
|
|
9607
|
+
}
|
|
9608
|
+
if (!selectedLocationValue || Array.isArray(selectedLocationValue) && selectedLocationValue.length === 0) {
|
|
9609
|
+
dispatch({
|
|
9610
|
+
type: 'CLEAR_LOC'
|
|
9611
|
+
});
|
|
9612
|
+
}
|
|
9613
|
+
}, [selectedFilterValue, selectedLocationValue]);
|
|
9553
9614
|
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
9615
|
options: clientOptions,
|
|
9555
9616
|
placeholder: "Select Client Name",
|
|
@@ -9558,7 +9619,7 @@ function SelectionFilter() {
|
|
|
9558
9619
|
minWidth: '14vw'
|
|
9559
9620
|
},
|
|
9560
9621
|
value: storedName
|
|
9561
|
-
})), React__default.createElement(FilterColumn, null, React__default.createElement(Label$g, null, "Action Type"), React__default.createElement(StyledAntSelect$4, {
|
|
9622
|
+
})), 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
9623
|
options: actionTypeOptions,
|
|
9563
9624
|
placeholder: "Select Action Type",
|
|
9564
9625
|
value: selectedFilterValue,
|
|
@@ -9577,76 +9638,72 @@ function SelectionFilter() {
|
|
|
9577
9638
|
},
|
|
9578
9639
|
allowClear: true,
|
|
9579
9640
|
mode: "multiple"
|
|
9580
|
-
}))), React__default.createElement(RightColumn$1, null, React__default.createElement(ApplyButton, {
|
|
9641
|
+
}))) : null), React__default.createElement(RightColumn$1, null, React__default.createElement(ApplyButton, {
|
|
9581
9642
|
onClick: applyFilters,
|
|
9582
9643
|
disabled: !isButtonEnabled
|
|
9583
9644
|
}, "Apply"))));
|
|
9584
9645
|
}
|
|
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"])));
|
|
9646
|
+
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
9647
|
|
|
9648
|
+
// import { ApiResponse } from '../../types';
|
|
9649
|
+
// import { useApiHook } from '@bjsdistribution/dms-component-library';
|
|
9650
|
+
// import {
|
|
9651
|
+
// useActionType,
|
|
9652
|
+
// useCustomerData,
|
|
9653
|
+
// useLocationData,
|
|
9654
|
+
// useStatusOrderData,
|
|
9655
|
+
// } from '../../store';
|
|
9587
9656
|
function HeaderFilter() {
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
var _useLocationData = useLocationData(),
|
|
9593
|
-
setLocationData = _useLocationData[1];
|
|
9594
|
-
var _useStatusOrderData = useStatusOrderData(),
|
|
9595
|
-
setStatusOfOrders = _useStatusOrderData[1];
|
|
9657
|
+
// const [, setCustomers] = useCustomerData();
|
|
9658
|
+
// const [, setActionType] = useActionType();
|
|
9659
|
+
// const [, setLocationData] = useLocationData();
|
|
9660
|
+
// const [, setStatusOfOrders] = useStatusOrderData();
|
|
9596
9661
|
//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]);
|
|
9662
|
+
// const { data: fetchedCustomerData, loading: loading } = useApiHook<
|
|
9663
|
+
// ApiResponse
|
|
9664
|
+
// >({
|
|
9665
|
+
// endpoint: `/customers/`,
|
|
9666
|
+
// method: 'GET',
|
|
9667
|
+
// // pagination: { page: 1, per_page: 50 },
|
|
9668
|
+
// });
|
|
9669
|
+
// //API for action type
|
|
9670
|
+
// const { data: fetchedStaticData, loading: actionLoading } = useApiHook<
|
|
9671
|
+
// ApiResponse
|
|
9672
|
+
// >({
|
|
9673
|
+
// endpoint: `/orders/getStaticData/all/`,
|
|
9674
|
+
// method: 'GET',
|
|
9675
|
+
// // pagination: { page: 1, per_page: 50 },
|
|
9676
|
+
// });
|
|
9677
|
+
// //API for return locations
|
|
9678
|
+
// const { data: fetchedLocationData, loading: locationloading } = useApiHook<
|
|
9679
|
+
// ApiResponse
|
|
9680
|
+
// >({
|
|
9681
|
+
// endpoint: `/return_locations/`,
|
|
9682
|
+
// method: 'GET',
|
|
9683
|
+
// pagination: { page: 1, per_page: 50 },
|
|
9684
|
+
// });
|
|
9685
|
+
// useEffect(() => {
|
|
9686
|
+
// if (fetchedCustomerData && fetchedCustomerData?.data) {
|
|
9687
|
+
// setCustomers(fetchedCustomerData?.data);
|
|
9688
|
+
// }
|
|
9689
|
+
// }, [loading]);
|
|
9690
|
+
// useEffect(() => {
|
|
9691
|
+
// if (fetchedStaticData && fetchedStaticData?.data) {
|
|
9692
|
+
// setActionType(
|
|
9693
|
+
// fetchedStaticData?.data?.flatMap(
|
|
9694
|
+
// (i: any) => i?.order_product_return_action
|
|
9695
|
+
// )
|
|
9696
|
+
// );
|
|
9697
|
+
// setStatusOfOrders(
|
|
9698
|
+
// fetchedStaticData?.data?.flatMap((i: any) => i?.order_stock_alias)
|
|
9699
|
+
// );
|
|
9700
|
+
// }
|
|
9701
|
+
// }, [actionLoading]);
|
|
9702
|
+
// useEffect(() => {
|
|
9703
|
+
// if (fetchedLocationData && fetchedLocationData?.data) {
|
|
9704
|
+
// setLocationData(fetchedLocationData?.data);
|
|
9705
|
+
// }
|
|
9706
|
+
// }, [locationloading]);
|
|
9650
9707
|
return React__default.createElement(CoverPage, null, React__default.createElement(SelectionFilter, null));
|
|
9651
9708
|
}
|
|
9652
9709
|
|
|
@@ -9660,46 +9717,10 @@ var Text$7 = /*#__PURE__*/styled__default.div(_templateObject7$e || (_templateOb
|
|
|
9660
9717
|
// Right side filter
|
|
9661
9718
|
var StyledTableFilter = /*#__PURE__*/styled__default.div(_templateObject8$9 || (_templateObject8$9 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
9662
9719
|
|
|
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;
|
|
9720
|
+
var _templateObject$1Z, _templateObject2$1n;
|
|
9721
|
+
// import { StyledBulkItem } from '../../filters/BulkFilterStyle';
|
|
9722
|
+
// import SearchType from '../../header/route-header/search/SearchType';
|
|
9723
|
+
// import DownloadIcon from '../../../../assets/icons/DownloadIcon';
|
|
9703
9724
|
var RightFilters = function RightFilters() {
|
|
9704
9725
|
var _useAtom = jotai.useAtom(countReducerAtom),
|
|
9705
9726
|
dispatch = _useAtom[1];
|
|
@@ -9712,13 +9733,18 @@ var RightFilters = function RightFilters() {
|
|
|
9712
9733
|
});
|
|
9713
9734
|
},
|
|
9714
9735
|
disabled: (selectedReturnOrder == null ? void 0 : selectedReturnOrder.length) === 0
|
|
9715
|
-
}, "Create Return")
|
|
9736
|
+
}, "Create Return"));
|
|
9716
9737
|
};
|
|
9717
|
-
var Container$13 = /*#__PURE__*/styled__default.div(_templateObject$
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9738
|
+
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"])));
|
|
9739
|
+
// const Mid = styled.div`
|
|
9740
|
+
// display: flex;
|
|
9741
|
+
// padding: 4px 10px;
|
|
9742
|
+
// align-items: center;
|
|
9743
|
+
// gap: 8px;
|
|
9744
|
+
// align-self: stretch;
|
|
9745
|
+
// border-radius: 15px 0px 0px 15px;
|
|
9746
|
+
// `;
|
|
9747
|
+
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
9748
|
|
|
9723
9749
|
var ReturnFilter = function ReturnFilter() {
|
|
9724
9750
|
var _useParams = reactRouterDom.useParams(),
|
|
@@ -9726,12 +9752,12 @@ var ReturnFilter = function ReturnFilter() {
|
|
|
9726
9752
|
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
9753
|
};
|
|
9728
9754
|
|
|
9729
|
-
var _templateObject$
|
|
9730
|
-
var ColumStyle = /*#__PURE__*/styled__default.div(_templateObject$
|
|
9731
|
-
var GreyBox = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
9755
|
+
var _templateObject$1_, _templateObject2$1o, _templateObject3$T, _templateObject4$w, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
|
|
9756
|
+
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"])));
|
|
9757
|
+
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
9758
|
// Styled components
|
|
9733
|
-
var StyledTableWrapper$2 = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
9734
|
-
var StyledTable$4 = /*#__PURE__*/styled__default.table(_templateObject4$
|
|
9759
|
+
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"])));
|
|
9760
|
+
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
9761
|
var EmptyDataContainer$1 = /*#__PURE__*/styled__default.div(_templateObject34 || (_templateObject34 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n"])));
|
|
9736
9762
|
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
9763
|
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 +9945,7 @@ var optionsForReturnPrint = [{
|
|
|
9919
9945
|
label: 'Print Return Labels'
|
|
9920
9946
|
}];
|
|
9921
9947
|
|
|
9922
|
-
var _templateObject$
|
|
9948
|
+
var _templateObject$1$, _templateObject2$1p;
|
|
9923
9949
|
var options$1 = optionsForReturnPrint;
|
|
9924
9950
|
var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
9925
9951
|
var legacyProductId = _ref.legacyProductId;
|
|
@@ -9936,8 +9962,8 @@ var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
|
9936
9962
|
}, IconComponent && React__default.createElement(IconComponent, null), " ", item.label);
|
|
9937
9963
|
}));
|
|
9938
9964
|
};
|
|
9939
|
-
var OptionsList = /*#__PURE__*/styled__default.ul(_templateObject$
|
|
9940
|
-
var OptionsListLi = /*#__PURE__*/styled__default.li(_templateObject2$
|
|
9965
|
+
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"])));
|
|
9966
|
+
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
9967
|
|
|
9942
9968
|
var _excluded$3 = ["count"];
|
|
9943
9969
|
var ReturnOrderTable = function ReturnOrderTable() {
|
|
@@ -9982,6 +10008,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
9982
10008
|
return prevIndex === index ? null : index;
|
|
9983
10009
|
});
|
|
9984
10010
|
};
|
|
10011
|
+
console.log(newpayload, 'newpayload');
|
|
9985
10012
|
// Close dropdown outside click
|
|
9986
10013
|
React.useEffect(function () {
|
|
9987
10014
|
document.addEventListener('mousedown', handleClickOutside);
|
|
@@ -10040,7 +10067,10 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10040
10067
|
var handleSelectAll = function handleSelectAll(e) {
|
|
10041
10068
|
setSelectAll(e.target.checked);
|
|
10042
10069
|
if (e.target.checked) {
|
|
10043
|
-
setSelectedReturnOrder(returnData == null ? void 0 : returnData.
|
|
10070
|
+
setSelectedReturnOrder(returnData == null ? void 0 : returnData.filter(function (loc) {
|
|
10071
|
+
var _loc$order_product_re;
|
|
10072
|
+
return (loc == null || (_loc$order_product_re = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re.type) === 'RTS';
|
|
10073
|
+
}).map(function (loc) {
|
|
10044
10074
|
return {
|
|
10045
10075
|
id: loc.id,
|
|
10046
10076
|
return_locations: loc == null ? void 0 : loc.return_locations,
|
|
@@ -10051,14 +10081,17 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10051
10081
|
new_location: loc == null ? void 0 : loc.new_location
|
|
10052
10082
|
};
|
|
10053
10083
|
}));
|
|
10054
|
-
setNewPayload(returnData == null ? void 0 : returnData.
|
|
10055
|
-
var _loc$
|
|
10084
|
+
setNewPayload(returnData == null ? void 0 : returnData.filter(function (loc) {
|
|
10085
|
+
var _loc$order_product_re2;
|
|
10086
|
+
return (loc == null || (_loc$order_product_re2 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re2.type) === 'RTS';
|
|
10087
|
+
}).map(function (loc) {
|
|
10088
|
+
var _loc$order_product_re3;
|
|
10056
10089
|
return {
|
|
10057
10090
|
id: loc.id,
|
|
10058
10091
|
account_number: createReturn == null ? void 0 : createReturn.account_number,
|
|
10059
10092
|
customer_id: +(createReturn == null ? void 0 : createReturn.customer_id),
|
|
10060
10093
|
products: [loc == null ? void 0 : loc.legacy_product_id],
|
|
10061
|
-
return_action:
|
|
10094
|
+
return_action: loc == null || (_loc$order_product_re3 = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re3.type,
|
|
10062
10095
|
return_location_token: (loc == null ? void 0 : loc.return_location) || null,
|
|
10063
10096
|
new_location: loc == null ? void 0 : loc.new_location
|
|
10064
10097
|
};
|
|
@@ -10069,6 +10102,8 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10069
10102
|
setGrouped([]);
|
|
10070
10103
|
}
|
|
10071
10104
|
};
|
|
10105
|
+
console.log(selectedReturnOrder, 'selectedReturnOrder');
|
|
10106
|
+
console.log(newpayload, 'newpayload');
|
|
10072
10107
|
var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action, new_location, legacy_product_id) {
|
|
10073
10108
|
setSelectedReturnOrder(function (prevSelectedLocations) {
|
|
10074
10109
|
var isSelected = prevSelectedLocations == null ? void 0 : prevSelectedLocations.some(function (loc) {
|
|
@@ -10143,12 +10178,15 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10143
10178
|
var mergedPayload = Object.values(groupedPayload);
|
|
10144
10179
|
setGrouped(mergedPayload);
|
|
10145
10180
|
}, [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,
|
|
10181
|
+
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) {
|
|
10182
|
+
var _item$order_product_r;
|
|
10183
|
+
return (item == null || (_item$order_product_r = item.order_product_return_action) == null ? void 0 : _item$order_product_r.type) === 'RTS';
|
|
10184
|
+
}) ? React__default.createElement("th", {
|
|
10147
10185
|
className: "emailInvoiceCheckbox"
|
|
10148
10186
|
}, React__default.createElement(dmsComponentLibrary.Checkbox, {
|
|
10149
10187
|
checked: selectAll,
|
|
10150
10188
|
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", {
|
|
10189
|
+
})) : 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, "Return Action Type"), 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
10190
|
className: "emailInvoiceShare"
|
|
10153
10191
|
}, "Labels"))), React__default.createElement("tbody", null, load ? React__default.createElement("tr", null, React__default.createElement("td", {
|
|
10154
10192
|
colSpan: 6
|
|
@@ -10159,10 +10197,10 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10159
10197
|
})) : (returnData == null ? void 0 : returnData.length) === 0 ? React__default.createElement("tr", null, React__default.createElement("td", {
|
|
10160
10198
|
colSpan: 14
|
|
10161
10199
|
}, 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$
|
|
10200
|
+
var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$order_product_r3, _item$return_reasons, _item$order_product_r4, _item$collection_reas;
|
|
10163
10201
|
return React__default.createElement("tr", {
|
|
10164
10202
|
key: item.id
|
|
10165
|
-
}, React__default.createElement("td", null, React__default.createElement(dmsComponentLibrary.Checkbox, {
|
|
10203
|
+
}, 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
10204
|
className: "custom-check",
|
|
10167
10205
|
checked: selectedReturnOrder == null ? void 0 : selectedReturnOrder.some(function (selectedInvoice) {
|
|
10168
10206
|
return (selectedInvoice == null ? void 0 : selectedInvoice.id) === item.id;
|
|
@@ -10170,7 +10208,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10170
10208
|
onChange: function onChange() {
|
|
10171
10209
|
return handleSelectOrderReturn(item.id, item.return_location, item.return_locations, item.order_product_return_action, item.new_location, item.legacy_product_id);
|
|
10172
10210
|
}
|
|
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", {
|
|
10211
|
+
})) : 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
10212
|
className: "awaiting"
|
|
10175
10213
|
}, "Awaiting")), React__default.createElement("td", null, " ", displayValueOrNA(item == null ? void 0 : item.new_location)), React__default.createElement("td", null, React__default.createElement("ul", {
|
|
10176
10214
|
style: {
|
|
@@ -10187,7 +10225,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10187
10225
|
style: {
|
|
10188
10226
|
color: '#888075'
|
|
10189
10227
|
}
|
|
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$
|
|
10228
|
+
}, 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 || (_item$order_product_r3 = item.order_product_return_action) == null ? void 0 : _item$order_product_r3.type)), 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_r4 = item.order_product_returns) == null ? void 0 : _item$order_product_r4.length) > 0 ? item.order_product_returns.map(function (ret) {
|
|
10191
10229
|
return ret != null && ret.collected_at ? dateFns.format(new Date(ret.collected_at), 'dd/MM/yyyy') : 'UNKNOWN';
|
|
10192
10230
|
}) : '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
10231
|
className: "actionbox"
|
|
@@ -10259,7 +10297,7 @@ var DefectConfirm = [{
|
|
|
10259
10297
|
value: 'no'
|
|
10260
10298
|
}];
|
|
10261
10299
|
|
|
10262
|
-
var _templateObject$
|
|
10300
|
+
var _templateObject$20, _templateObject2$1q, _templateObject3$U, _templateObject4$x;
|
|
10263
10301
|
var DefetcDetails = function DefetcDetails() {
|
|
10264
10302
|
var handleSelectChange = function handleSelectChange() {
|
|
10265
10303
|
console.log('Option selected');
|
|
@@ -10301,12 +10339,12 @@ var DefetcDetails = function DefetcDetails() {
|
|
|
10301
10339
|
selectWrapperClass: "rounded"
|
|
10302
10340
|
}))));
|
|
10303
10341
|
};
|
|
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$
|
|
10342
|
+
var StyledAntSelect$5 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10343
|
+
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"])));
|
|
10344
|
+
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"])));
|
|
10345
|
+
var LabelWrapper = /*#__PURE__*/styled__default.div(_templateObject4$x || (_templateObject4$x = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10308
10346
|
|
|
10309
|
-
var _templateObject$
|
|
10347
|
+
var _templateObject$21;
|
|
10310
10348
|
var RepackProduct = function RepackProduct() {
|
|
10311
10349
|
var options = [{
|
|
10312
10350
|
value: 'bjsCouriers',
|
|
@@ -10366,9 +10404,9 @@ var RepackProduct = function RepackProduct() {
|
|
|
10366
10404
|
}
|
|
10367
10405
|
})));
|
|
10368
10406
|
};
|
|
10369
|
-
var GLobalPopupContent$1 = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10407
|
+
var GLobalPopupContent$1 = /*#__PURE__*/styled__default.div(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10370
10408
|
|
|
10371
|
-
var _templateObject$
|
|
10409
|
+
var _templateObject$22, _templateObject2$1r, _templateObject3$V, _templateObject4$y, _templateObject5$l, _templateObject6$e;
|
|
10372
10410
|
var RepackDetails = function RepackDetails() {
|
|
10373
10411
|
var _useState = React.useState(false),
|
|
10374
10412
|
isAdditionalBoxChecked = _useState[0],
|
|
@@ -10415,14 +10453,14 @@ var RepackDetails = function RepackDetails() {
|
|
|
10415
10453
|
}
|
|
10416
10454
|
}, "Have any other boxes repacked into this one?"), isRepacked && React__default.createElement(RepackProduct, null)))));
|
|
10417
10455
|
};
|
|
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$
|
|
10456
|
+
var StyledAntSelect$6 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$22 || (_templateObject$22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10457
|
+
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"])));
|
|
10458
|
+
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"])));
|
|
10459
|
+
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"])));
|
|
10460
|
+
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
10461
|
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
10462
|
|
|
10425
|
-
var _templateObject$
|
|
10463
|
+
var _templateObject$23, _templateObject2$1s, _templateObject3$W, _templateObject4$z;
|
|
10426
10464
|
var OtherDamage = function OtherDamage() {
|
|
10427
10465
|
var handleSelectChange = function handleSelectChange() {
|
|
10428
10466
|
console.log('Option selected');
|
|
@@ -10478,12 +10516,12 @@ var OtherDamage = function OtherDamage() {
|
|
|
10478
10516
|
selectWrapperClass: "rounded"
|
|
10479
10517
|
}))));
|
|
10480
10518
|
};
|
|
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$
|
|
10519
|
+
var StyledAntSelect$7 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10520
|
+
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"])));
|
|
10521
|
+
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"])));
|
|
10522
|
+
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
10523
|
|
|
10486
|
-
var _templateObject$
|
|
10524
|
+
var _templateObject$24, _templateObject2$1t, _templateObject3$X, _templateObject4$A, _templateObject5$m;
|
|
10487
10525
|
var AddDefect = function AddDefect() {
|
|
10488
10526
|
var _useState = React.useState({
|
|
10489
10527
|
actionDuring: '',
|
|
@@ -10546,13 +10584,13 @@ var AddDefect = function AddDefect() {
|
|
|
10546
10584
|
selectWrapperClass: "rounded"
|
|
10547
10585
|
}))), state.productRepacked === 'yes' && React__default.createElement(RepackDetails, null)));
|
|
10548
10586
|
};
|
|
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$
|
|
10587
|
+
var StyledAntSelect$8 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10588
|
+
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"])));
|
|
10589
|
+
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"])));
|
|
10590
|
+
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"])));
|
|
10591
|
+
var AddButton = /*#__PURE__*/styled__default(dmsComponentLibrary.Button)(_templateObject5$m || (_templateObject5$m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 10px;\n border-radius: 30px;\n"])));
|
|
10554
10592
|
|
|
10555
|
-
var _templateObject$
|
|
10593
|
+
var _templateObject$25, _templateObject2$1u, _templateObject3$Y, _templateObject4$B;
|
|
10556
10594
|
var QCLogs = function QCLogs() {
|
|
10557
10595
|
var handleSelectChange = function handleSelectChange() {
|
|
10558
10596
|
console.log('Option selected');
|
|
@@ -10573,12 +10611,12 @@ var QCLogs = function QCLogs() {
|
|
|
10573
10611
|
selectWrapperClass: "rounded"
|
|
10574
10612
|
}))), React__default.createElement(AddDefect, null));
|
|
10575
10613
|
};
|
|
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$
|
|
10614
|
+
var StyledAntSelect$9 = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject$25 || (_templateObject$25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n width: 20vw;\n"])));
|
|
10615
|
+
var Container$18 = /*#__PURE__*/styled__default.div(_templateObject2$1u || (_templateObject2$1u = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n flex-direction: column;\n"])));
|
|
10616
|
+
var Flex$b = /*#__PURE__*/styled__default.div(_templateObject3$Y || (_templateObject3$Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n gap: 10px;\n"])));
|
|
10617
|
+
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
10618
|
|
|
10581
|
-
var _templateObject$
|
|
10619
|
+
var _templateObject$26, _templateObject2$1v, _templateObject3$Z, _templateObject4$C, _templateObject5$n;
|
|
10582
10620
|
function UpdateProduct() {
|
|
10583
10621
|
var _orderStaticData$coll, _orderStaticData$orde, _orderStaticData$retu, _orderStaticData$orde2;
|
|
10584
10622
|
var _useState = React.useState(),
|
|
@@ -10675,13 +10713,13 @@ function UpdateProduct() {
|
|
|
10675
10713
|
selectWrapperClass: "rounded"
|
|
10676
10714
|
}))));
|
|
10677
10715
|
}
|
|
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$
|
|
10716
|
+
var CollectionBox = /*#__PURE__*/styled__default.div(_templateObject$26 || (_templateObject$26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-top: 32px;\n"])));
|
|
10717
|
+
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"])));
|
|
10718
|
+
var Container$19 = /*#__PURE__*/styled__default.div(_templateObject3$Z || (_templateObject3$Z = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10719
|
+
var LabelWrapper$5 = /*#__PURE__*/styled__default.div(_templateObject4$C || (_templateObject4$C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10720
|
+
var StyledAntSelect$a = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject5$n || (_templateObject5$n = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10683
10721
|
|
|
10684
|
-
var _templateObject$
|
|
10722
|
+
var _templateObject$27, _templateObject2$1w, _templateObject3$_;
|
|
10685
10723
|
function UnReceiveProduct() {
|
|
10686
10724
|
var _orderStaticData$unre;
|
|
10687
10725
|
var _useRecieveOrderProdu = useRecieveOrderProducts(),
|
|
@@ -10729,11 +10767,11 @@ function UnReceiveProduct() {
|
|
|
10729
10767
|
onNotesChange: handleNotesChange
|
|
10730
10768
|
})));
|
|
10731
10769
|
}
|
|
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
|
|
10770
|
+
var Container$1a = /*#__PURE__*/styled__default.div(_templateObject$27 || (_templateObject$27 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10771
|
+
var LabelWrapper$6 = /*#__PURE__*/styled__default.div(_templateObject2$1w || (_templateObject2$1w = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n"])));
|
|
10772
|
+
var StyledAntSelect$b = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect)(_templateObject3$_ || (_templateObject3$_ = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10735
10773
|
|
|
10736
|
-
var _templateObject$
|
|
10774
|
+
var _templateObject$28, _templateObject2$1x;
|
|
10737
10775
|
var ProductAction = function ProductAction() {
|
|
10738
10776
|
var _useAtom = jotai.useAtom(selectedTabKeyAtom),
|
|
10739
10777
|
setSelectedTabKey = _useAtom[1];
|
|
@@ -10758,10 +10796,10 @@ var ProductAction = function ProductAction() {
|
|
|
10758
10796
|
}]
|
|
10759
10797
|
}))));
|
|
10760
10798
|
};
|
|
10761
|
-
var GLobalPopupContent$2 = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10762
|
-
var Container$1b = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10799
|
+
var GLobalPopupContent$2 = /*#__PURE__*/styled__default.div(_templateObject$28 || (_templateObject$28 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10800
|
+
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
10801
|
|
|
10764
|
-
var _templateObject$
|
|
10802
|
+
var _templateObject$29;
|
|
10765
10803
|
var LogsTable = function LogsTable() {
|
|
10766
10804
|
var options = [{
|
|
10767
10805
|
value: 'bjsCouriers',
|
|
@@ -10836,9 +10874,9 @@ var LogsTable = function LogsTable() {
|
|
|
10836
10874
|
}
|
|
10837
10875
|
})));
|
|
10838
10876
|
};
|
|
10839
|
-
var GlobalPopupContent = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10877
|
+
var GlobalPopupContent = /*#__PURE__*/styled__default.div(_templateObject$29 || (_templateObject$29 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10840
10878
|
|
|
10841
|
-
var _templateObject$
|
|
10879
|
+
var _templateObject$2a, _templateObject2$1y;
|
|
10842
10880
|
var DefectsModal = function DefectsModal() {
|
|
10843
10881
|
var options = [{
|
|
10844
10882
|
value: 'bjsCouriers',
|
|
@@ -10890,10 +10928,10 @@ var DefectsModal = function DefectsModal() {
|
|
|
10890
10928
|
}
|
|
10891
10929
|
}))));
|
|
10892
10930
|
};
|
|
10893
|
-
var StyledConatiner = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10894
|
-
var GLobalPopupContent$3 = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
10931
|
+
var StyledConatiner = /*#__PURE__*/styled__default.div(_templateObject$2a || (_templateObject$2a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* tex: nowrap; */\n"])));
|
|
10932
|
+
var GLobalPopupContent$3 = /*#__PURE__*/styled__default.div(_templateObject2$1y || (_templateObject2$1y = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
10895
10933
|
|
|
10896
|
-
var _templateObject$
|
|
10934
|
+
var _templateObject$2b;
|
|
10897
10935
|
var repackModal = function repackModal() {
|
|
10898
10936
|
var columns = [{
|
|
10899
10937
|
key: 'packaging_type',
|
|
@@ -10923,9 +10961,9 @@ var repackModal = function repackModal() {
|
|
|
10923
10961
|
}
|
|
10924
10962
|
}))));
|
|
10925
10963
|
};
|
|
10926
|
-
var StyledConatiner$1 = /*#__PURE__*/styled__default.div(_templateObject$
|
|
10964
|
+
var StyledConatiner$1 = /*#__PURE__*/styled__default.div(_templateObject$2b || (_templateObject$2b = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* text-wrap: nowrap; */\n"])));
|
|
10927
10965
|
|
|
10928
|
-
var _templateObject$
|
|
10966
|
+
var _templateObject$2c, _templateObject2$1z, _templateObject3$$;
|
|
10929
10967
|
var _excluded$4 = ["id"];
|
|
10930
10968
|
var CreateReturnModal = function CreateReturnModal() {
|
|
10931
10969
|
var _useSelectedConfirmLo = useSelectedConfirmLoc(),
|
|
@@ -11005,9 +11043,9 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
11005
11043
|
}, displayValueOrNA(returnLoc == null ? void 0 : returnLoc.new_location)));
|
|
11006
11044
|
})))));
|
|
11007
11045
|
};
|
|
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
|
|
11046
|
+
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"])));
|
|
11047
|
+
var Container$1c = /*#__PURE__*/styled__default.div(_templateObject2$1z || (_templateObject2$1z = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
|
|
11048
|
+
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
11049
|
|
|
11012
11050
|
var ModalManager = function ModalManager() {
|
|
11013
11051
|
var _useAtom = jotai.useAtom(countReducerAtom),
|
|
@@ -11043,11 +11081,13 @@ var ModalManager = function ModalManager() {
|
|
|
11043
11081
|
setCheck = _useSelectedConfirmLo[1];
|
|
11044
11082
|
var _useNewReturnPayload = useNewReturnPayload(),
|
|
11045
11083
|
setNewPayload = _useNewReturnPayload[1];
|
|
11046
|
-
|
|
11084
|
+
var _useGroupedPayload = useGroupedPayload(),
|
|
11085
|
+
setGrouped = _useGroupedPayload[1];
|
|
11047
11086
|
var _useSelectAll = useSelectAll(),
|
|
11048
11087
|
setSelectAll = _useSelectAll[1];
|
|
11049
11088
|
var _usefetchAgain = usefetchAgain(),
|
|
11050
11089
|
setCallForFetch = _usefetchAgain[1];
|
|
11090
|
+
var navigate = reactRouterDom.useNavigate();
|
|
11051
11091
|
console.log(orderProduct, 'abcabcabcabcabcabcabcabcabcabcabc');
|
|
11052
11092
|
var _closeModal = function closeModal() {
|
|
11053
11093
|
dispatch({
|
|
@@ -11126,14 +11166,13 @@ var ModalManager = function ModalManager() {
|
|
|
11126
11166
|
response = _useApiHook3.data,
|
|
11127
11167
|
setShouldPerformAction = _useApiHook3.setShouldPerformAction,
|
|
11128
11168
|
confirmLoading = _useApiHook3.loading,
|
|
11129
|
-
|
|
11169
|
+
apiError = _useApiHook3.error,
|
|
11130
11170
|
setError = _useApiHook3.setError;
|
|
11131
11171
|
console.log(response, 'data'), React.useEffect(function () {
|
|
11132
11172
|
SetPostLoading(confirmLoading);
|
|
11133
11173
|
}, [confirmLoading]);
|
|
11134
11174
|
var handleConfirmReturn = function handleConfirmReturn() {
|
|
11135
|
-
|
|
11136
|
-
if (newGrouped.length > 0) {
|
|
11175
|
+
if ((newGrouped == null ? void 0 : newGrouped.length) > 0) {
|
|
11137
11176
|
setShouldPerformAction(true);
|
|
11138
11177
|
setCallForFetch(true);
|
|
11139
11178
|
}
|
|
@@ -11141,35 +11180,72 @@ var ModalManager = function ModalManager() {
|
|
|
11141
11180
|
type: 'close'
|
|
11142
11181
|
});
|
|
11143
11182
|
};
|
|
11183
|
+
// useEffect(() => {
|
|
11184
|
+
// console.log(error, 'error');
|
|
11185
|
+
// //@ts-ignore
|
|
11186
|
+
// if (!confirmLoading) {
|
|
11187
|
+
// // if (error && error.errorStatus !== 200) {
|
|
11188
|
+
// // console.log(error, 'errorINsodeofIFFFFFF');
|
|
11189
|
+
// // notification.error({
|
|
11190
|
+
// // message: error.errorStatus || 'Error',
|
|
11191
|
+
// // description: error.errorMessage || 'Something went wrong',
|
|
11192
|
+
// // });
|
|
11193
|
+
// // setError(null);
|
|
11194
|
+
// // }
|
|
11195
|
+
// //@ts-ignore
|
|
11196
|
+
// if (error === null && response && response?.code === 200) {
|
|
11197
|
+
// notification.success({
|
|
11198
|
+
// message: 'Success',
|
|
11199
|
+
// // @ts-ignore
|
|
11200
|
+
// description: `${response?.message}`,
|
|
11201
|
+
// });
|
|
11202
|
+
// dispatch({ type: 'close' });
|
|
11203
|
+
// setSelectedReturnOrder([]);
|
|
11204
|
+
// setCheck([]);
|
|
11205
|
+
// setNewPayload([]);
|
|
11206
|
+
// setSelectAll(false);
|
|
11207
|
+
// }
|
|
11208
|
+
// }
|
|
11209
|
+
// }, [confirmLoading]); //forCheck
|
|
11144
11210
|
React.useEffect(function () {
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11211
|
+
// @ts-ignore
|
|
11212
|
+
if (apiError && (apiError == null ? void 0 : apiError.code) !== 200) {
|
|
11213
|
+
dispatch({
|
|
11214
|
+
type: 'close'
|
|
11215
|
+
});
|
|
11216
|
+
setSelectedReturnOrder([]);
|
|
11217
|
+
setCheck([]);
|
|
11218
|
+
setNewPayload([]);
|
|
11219
|
+
setGrouped([]);
|
|
11220
|
+
setSelectAll(false);
|
|
11221
|
+
setShouldPerformAction(false);
|
|
11222
|
+
antd.notification.error({
|
|
11223
|
+
message: 'Failure',
|
|
11224
|
+
// @ts-ignore
|
|
11225
|
+
description: "" + (apiError == null ? void 0 : apiError.message)
|
|
11226
|
+
});
|
|
11227
|
+
setError(null);
|
|
11228
|
+
// @ts-ignore
|
|
11229
|
+
} else if ((response == null ? void 0 : response.code) === 200) {
|
|
11230
|
+
antd.notification.success({
|
|
11231
|
+
message: 'Success',
|
|
11232
|
+
// @ts-ignore
|
|
11233
|
+
description: "" + (response == null ? void 0 : response.message)
|
|
11234
|
+
});
|
|
11235
|
+
dispatch({
|
|
11236
|
+
type: 'close'
|
|
11237
|
+
});
|
|
11238
|
+
setSelectedReturnOrder([]);
|
|
11239
|
+
setCheck([]);
|
|
11240
|
+
setNewPayload([]);
|
|
11241
|
+
setShouldPerformAction(false);
|
|
11242
|
+
setSelectAll(false);
|
|
11243
|
+
setError(null);
|
|
11244
|
+
navigate('/order-return');
|
|
11245
|
+
}
|
|
11246
|
+
}, [response, apiError]);
|
|
11247
|
+
console.log(apiError, 'apiError apiError');
|
|
11248
|
+
console.log(response, 'response response ');
|
|
11173
11249
|
return React__default.createElement(React__default.Fragment, null, (popupName == null ? void 0 : popupName.state) == 'create-return' && React__default.createElement(dmsComponentLibrary.AntModal, {
|
|
11174
11250
|
openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
|
|
11175
11251
|
closeModal: function closeModal() {
|
|
@@ -11264,11 +11340,11 @@ var ModalManager = function ModalManager() {
|
|
|
11264
11340
|
}));
|
|
11265
11341
|
};
|
|
11266
11342
|
|
|
11267
|
-
var _templateObject$
|
|
11268
|
-
var StyledContainer = /*#__PURE__*/styled__default.div(_templateObject$
|
|
11269
|
-
var StyledContentWrapper = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
11270
|
-
var StyledInfoBox = /*#__PURE__*/styled__default.div(_templateObject3$
|
|
11271
|
-
var StyledLabel$2 = /*#__PURE__*/styled__default.div(_templateObject4$
|
|
11343
|
+
var _templateObject$2d, _templateObject2$1A, _templateObject3$10, _templateObject4$D, _templateObject6$f, _templateObject7$f;
|
|
11344
|
+
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"])));
|
|
11345
|
+
var StyledContentWrapper = /*#__PURE__*/styled__default.div(_templateObject2$1A || (_templateObject2$1A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 12px;\n"])));
|
|
11346
|
+
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"])));
|
|
11347
|
+
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"])));
|
|
11272
11348
|
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"])));
|
|
11273
11349
|
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) {
|
|
11274
11350
|
var active = _ref.active;
|
|
@@ -11388,7 +11464,7 @@ var Pagination = function Pagination(_ref) {
|
|
|
11388
11464
|
}, React__default.createElement(NextIcon, null)))));
|
|
11389
11465
|
};
|
|
11390
11466
|
|
|
11391
|
-
var _templateObject$
|
|
11467
|
+
var _templateObject$2e, _templateObject2$1B;
|
|
11392
11468
|
var ReturnTable = function ReturnTable() {
|
|
11393
11469
|
var _UsePaginationData = UsePaginationData(),
|
|
11394
11470
|
paginationObj = _UsePaginationData[0];
|
|
@@ -11415,8 +11491,8 @@ var ReturnTable = function ReturnTable() {
|
|
|
11415
11491
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
11416
11492
|
})))), React__default.createElement(ModalManager, null));
|
|
11417
11493
|
};
|
|
11418
|
-
var Container$1d = /*#__PURE__*/styled__default.div(_templateObject$
|
|
11419
|
-
var DashBoardWrapper$1 = /*#__PURE__*/styled__default.section(_templateObject2$
|
|
11494
|
+
var Container$1d = /*#__PURE__*/styled__default.div(_templateObject$2e || (_templateObject$2e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
|
|
11495
|
+
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"])));
|
|
11420
11496
|
|
|
11421
11497
|
function LoadIcon() {
|
|
11422
11498
|
return React__default.createElement("svg", {
|
|
@@ -11434,7 +11510,7 @@ function LoadIcon() {
|
|
|
11434
11510
|
}));
|
|
11435
11511
|
}
|
|
11436
11512
|
|
|
11437
|
-
var _templateObject$
|
|
11513
|
+
var _templateObject$2f, _templateObject2$1C;
|
|
11438
11514
|
var PrintDropDown = function PrintDropDown(_ref) {
|
|
11439
11515
|
var legacyProductId = _ref.legacyProductId;
|
|
11440
11516
|
var downloadFiles = function downloadFiles(label) {
|
|
@@ -11461,8 +11537,8 @@ var PrintDropDown = function PrintDropDown(_ref) {
|
|
|
11461
11537
|
}, IconComponent && React__default.createElement(IconComponent, null), item.label);
|
|
11462
11538
|
}));
|
|
11463
11539
|
};
|
|
11464
|
-
var OptionsList$1 = /*#__PURE__*/styled__default.ul(_templateObject$
|
|
11465
|
-
var OptionsListLi$1 = /*#__PURE__*/styled__default.li(_templateObject2$
|
|
11540
|
+
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"])));
|
|
11541
|
+
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) {
|
|
11466
11542
|
var disabled = _ref2.disabled;
|
|
11467
11543
|
return disabled ? 'not-allowed' : 'pointer';
|
|
11468
11544
|
}, function (_ref3) {
|
|
@@ -11570,10 +11646,6 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11570
11646
|
setOrderId = _useOrderId[1];
|
|
11571
11647
|
// console.log(id, 'idid');
|
|
11572
11648
|
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", {
|
|
11573
|
-
className: "emailInvoiceCheckbox"
|
|
11574
|
-
}, React__default.createElement(dmsComponentLibrary.Checkbox, {
|
|
11575
|
-
checked: false
|
|
11576
|
-
})), React__default.createElement("th", {
|
|
11577
11649
|
className: "emailInvoiceNo"
|
|
11578
11650
|
}, "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", {
|
|
11579
11651
|
className: "emailInvoiceShare"
|
|
@@ -11599,9 +11671,7 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11599
11671
|
var statusClass = getStatusClass(status);
|
|
11600
11672
|
return React__default.createElement("tr", {
|
|
11601
11673
|
key: item.id
|
|
11602
|
-
}, React__default.createElement("td", null, React__default.createElement(
|
|
11603
|
-
checked: false
|
|
11604
|
-
})), 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", {
|
|
11674
|
+
}, 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", {
|
|
11605
11675
|
onClick: function onClick() {
|
|
11606
11676
|
return setOrderId(item.id);
|
|
11607
11677
|
}
|
|
@@ -11660,9 +11730,10 @@ var OrderTable = function OrderTable(_ref) {
|
|
|
11660
11730
|
})))));
|
|
11661
11731
|
};
|
|
11662
11732
|
|
|
11663
|
-
var _templateObject$
|
|
11733
|
+
var _templateObject$2g;
|
|
11734
|
+
// import DownloadIcon from '../../../../assets/icons/DownloadIcon';
|
|
11664
11735
|
var TableFilters = function TableFilters() {
|
|
11665
|
-
return React__default.createElement(Container$1e, null
|
|
11736
|
+
return React__default.createElement(Container$1e, null);
|
|
11666
11737
|
// return (
|
|
11667
11738
|
// // <StyledBulkFilterCover>
|
|
11668
11739
|
// <StyledBulkItem>
|
|
@@ -11676,27 +11747,7 @@ var TableFilters = function TableFilters() {
|
|
|
11676
11747
|
// // </StyledBulkFilterCover>
|
|
11677
11748
|
// );
|
|
11678
11749
|
};
|
|
11679
|
-
var Container$1e = /*#__PURE__*/styled__default.div(_templateObject$
|
|
11680
|
-
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"])));
|
|
11681
|
-
// const TextConatiner = styled.div`
|
|
11682
|
-
// display: flex;
|
|
11683
|
-
// padding: 7px 12px;
|
|
11684
|
-
// justify-content: center;
|
|
11685
|
-
// align-items: center;
|
|
11686
|
-
// gap: 2px;
|
|
11687
|
-
// border-radius: 15px;
|
|
11688
|
-
// background: rgba(136, 128, 117, 0.35);
|
|
11689
|
-
// `;
|
|
11690
|
-
// const Text = styled.div`
|
|
11691
|
-
// color: #888075;
|
|
11692
|
-
// font-family: "'Lato";
|
|
11693
|
-
// font-size: 14px;
|
|
11694
|
-
// font-style: normal;
|
|
11695
|
-
// font-weight: 600;
|
|
11696
|
-
// line-height: 20px;
|
|
11697
|
-
// `;
|
|
11698
|
-
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"])));
|
|
11699
|
-
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"])));
|
|
11750
|
+
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"])));
|
|
11700
11751
|
|
|
11701
11752
|
var FilterIcon = function FilterIcon() {
|
|
11702
11753
|
return React__default.createElement("svg", {
|
|
@@ -11757,6 +11808,50 @@ var ClientIcon = function ClientIcon() {
|
|
|
11757
11808
|
}));
|
|
11758
11809
|
};
|
|
11759
11810
|
|
|
11811
|
+
var StatusIcon = function StatusIcon() {
|
|
11812
|
+
return React__default.createElement("svg", {
|
|
11813
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11814
|
+
width: "13",
|
|
11815
|
+
height: "12",
|
|
11816
|
+
viewBox: "0 0 13 12",
|
|
11817
|
+
fill: "none"
|
|
11818
|
+
}, React__default.createElement("path", {
|
|
11819
|
+
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",
|
|
11820
|
+
stroke: "#6D6B68",
|
|
11821
|
+
"stroke-width": "2",
|
|
11822
|
+
"stroke-linecap": "round",
|
|
11823
|
+
"stroke-linejoin": "round"
|
|
11824
|
+
}), React__default.createElement("path", {
|
|
11825
|
+
d: "M7.8501 4.25L9.6001 6L11.3501 4.25",
|
|
11826
|
+
stroke: "#6D6B68",
|
|
11827
|
+
"stroke-width": "2",
|
|
11828
|
+
"stroke-linecap": "round",
|
|
11829
|
+
"stroke-linejoin": "round"
|
|
11830
|
+
}));
|
|
11831
|
+
};
|
|
11832
|
+
|
|
11833
|
+
var AssigneIcon = function AssigneIcon() {
|
|
11834
|
+
return React__default.createElement("svg", {
|
|
11835
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11836
|
+
width: "15",
|
|
11837
|
+
height: "14",
|
|
11838
|
+
viewBox: "0 0 15 14",
|
|
11839
|
+
fill: "none"
|
|
11840
|
+
}, React__default.createElement("g", {
|
|
11841
|
+
"clip-path": "url(#clip0_504_13636)"
|
|
11842
|
+
}, React__default.createElement("path", {
|
|
11843
|
+
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",
|
|
11844
|
+
fill: "#6D6B68"
|
|
11845
|
+
})), React__default.createElement("defs", null, React__default.createElement("clipPath", {
|
|
11846
|
+
id: "clip0_504_13636"
|
|
11847
|
+
}, React__default.createElement("rect", {
|
|
11848
|
+
width: "14",
|
|
11849
|
+
height: "14",
|
|
11850
|
+
fill: "white",
|
|
11851
|
+
transform: "translate(0.100098)"
|
|
11852
|
+
}))));
|
|
11853
|
+
};
|
|
11854
|
+
|
|
11760
11855
|
var initialState$2 = {
|
|
11761
11856
|
'x-filters': [],
|
|
11762
11857
|
'x-pagination': {
|
|
@@ -11765,6 +11860,7 @@ var initialState$2 = {
|
|
|
11765
11860
|
}
|
|
11766
11861
|
};
|
|
11767
11862
|
var filterReducer$1 = function filterReducer(state, action) {
|
|
11863
|
+
console.log(action, 'action');
|
|
11768
11864
|
switch (action.type) {
|
|
11769
11865
|
case 'SET_DATE_FILTER':
|
|
11770
11866
|
return _extends({}, state, {
|
|
@@ -11829,51 +11925,7 @@ var filtersReducerReturnAtom = /*#__PURE__*/jotai.atom(function (get) {
|
|
|
11829
11925
|
return set(filtersStateAtom$1, filterReducer$1(get(filtersStateAtom$1), action));
|
|
11830
11926
|
});
|
|
11831
11927
|
|
|
11832
|
-
var
|
|
11833
|
-
return React__default.createElement("svg", {
|
|
11834
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11835
|
-
width: "13",
|
|
11836
|
-
height: "12",
|
|
11837
|
-
viewBox: "0 0 13 12",
|
|
11838
|
-
fill: "none"
|
|
11839
|
-
}, React__default.createElement("path", {
|
|
11840
|
-
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",
|
|
11841
|
-
stroke: "#6D6B68",
|
|
11842
|
-
"stroke-width": "2",
|
|
11843
|
-
"stroke-linecap": "round",
|
|
11844
|
-
"stroke-linejoin": "round"
|
|
11845
|
-
}), React__default.createElement("path", {
|
|
11846
|
-
d: "M7.8501 4.25L9.6001 6L11.3501 4.25",
|
|
11847
|
-
stroke: "#6D6B68",
|
|
11848
|
-
"stroke-width": "2",
|
|
11849
|
-
"stroke-linecap": "round",
|
|
11850
|
-
"stroke-linejoin": "round"
|
|
11851
|
-
}));
|
|
11852
|
-
};
|
|
11853
|
-
|
|
11854
|
-
var AssigneIcon = function AssigneIcon() {
|
|
11855
|
-
return React__default.createElement("svg", {
|
|
11856
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
11857
|
-
width: "15",
|
|
11858
|
-
height: "14",
|
|
11859
|
-
viewBox: "0 0 15 14",
|
|
11860
|
-
fill: "none"
|
|
11861
|
-
}, React__default.createElement("g", {
|
|
11862
|
-
"clip-path": "url(#clip0_504_13636)"
|
|
11863
|
-
}, React__default.createElement("path", {
|
|
11864
|
-
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",
|
|
11865
|
-
fill: "#6D6B68"
|
|
11866
|
-
})), React__default.createElement("defs", null, React__default.createElement("clipPath", {
|
|
11867
|
-
id: "clip0_504_13636"
|
|
11868
|
-
}, React__default.createElement("rect", {
|
|
11869
|
-
width: "14",
|
|
11870
|
-
height: "14",
|
|
11871
|
-
fill: "white",
|
|
11872
|
-
transform: "translate(0.100098)"
|
|
11873
|
-
}))));
|
|
11874
|
-
};
|
|
11875
|
-
|
|
11876
|
-
var _templateObject$2i, _templateObject2$1G;
|
|
11928
|
+
var _templateObject$2h, _templateObject2$1D;
|
|
11877
11929
|
var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
11878
11930
|
var _useAtom = jotai.useAtom(filtersReducerReturnAtom),
|
|
11879
11931
|
dispatch = _useAtom[1];
|
|
@@ -11890,6 +11942,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11890
11942
|
var _useState3 = React.useState(),
|
|
11891
11943
|
statusOrder = _useState3[0],
|
|
11892
11944
|
setStatusOfOrder = _useState3[1];
|
|
11945
|
+
console.log(selectedClient, 'fffffselectedClient');
|
|
11893
11946
|
var zoneOptions = [{
|
|
11894
11947
|
label: 'Zone 1',
|
|
11895
11948
|
value: 'zone1'
|
|
@@ -11918,6 +11971,11 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11918
11971
|
type: 'SET_DATE_FILTER',
|
|
11919
11972
|
payload: selectedDate
|
|
11920
11973
|
});
|
|
11974
|
+
// Reset to the first page
|
|
11975
|
+
dispatch({
|
|
11976
|
+
type: 'SET_PAGE',
|
|
11977
|
+
payload: 1
|
|
11978
|
+
});
|
|
11921
11979
|
}
|
|
11922
11980
|
}, [selectedDate]);
|
|
11923
11981
|
//client options
|
|
@@ -11928,6 +11986,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11928
11986
|
value: option == null ? void 0 : option.id
|
|
11929
11987
|
};
|
|
11930
11988
|
});
|
|
11989
|
+
console.log(clientOptions, 'clientOptions');
|
|
11931
11990
|
//status of order
|
|
11932
11991
|
var orderOptions = statusOfOrder == null ? void 0 : statusOfOrder.map(function (option) {
|
|
11933
11992
|
var _option$status_type, _option$status_type2;
|
|
@@ -11937,20 +11996,32 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11937
11996
|
};
|
|
11938
11997
|
});
|
|
11939
11998
|
var handleClientChange = function handleClientChange(value) {
|
|
11999
|
+
if (value === selectedClient) return;
|
|
11940
12000
|
console.log(value, 'value');
|
|
11941
12001
|
setSelectedClient(value);
|
|
11942
12002
|
dispatch({
|
|
11943
12003
|
type: 'SET_CLIENT_FILTER',
|
|
11944
|
-
payload:
|
|
12004
|
+
payload: value
|
|
12005
|
+
});
|
|
12006
|
+
// Reset to the first page
|
|
12007
|
+
dispatch({
|
|
12008
|
+
type: 'SET_PAGE',
|
|
12009
|
+
payload: 1
|
|
11945
12010
|
});
|
|
11946
12011
|
};
|
|
11947
12012
|
var handleStatusOfOrder = function handleStatusOfOrder(value) {
|
|
12013
|
+
if (value === statusOfOrder) return;
|
|
11948
12014
|
console.log(value, 'value');
|
|
11949
12015
|
setStatusOfOrder(value);
|
|
11950
12016
|
dispatch({
|
|
11951
12017
|
type: 'SET_STATUS_ORDER_FILTER',
|
|
11952
12018
|
payload: value
|
|
11953
12019
|
});
|
|
12020
|
+
// Reset to the first page
|
|
12021
|
+
dispatch({
|
|
12022
|
+
type: 'SET_PAGE',
|
|
12023
|
+
payload: 1
|
|
12024
|
+
});
|
|
11954
12025
|
};
|
|
11955
12026
|
var handleClearAll = function handleClearAll() {
|
|
11956
12027
|
setSelectedDate(null);
|
|
@@ -11992,8 +12063,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
11992
12063
|
style: {
|
|
11993
12064
|
minWidth: '130px'
|
|
11994
12065
|
},
|
|
11995
|
-
value: statusOrder
|
|
11996
|
-
allowClear: true
|
|
12066
|
+
value: statusOrder
|
|
11997
12067
|
}))), React__default.createElement("div", {
|
|
11998
12068
|
className: "datefilter"
|
|
11999
12069
|
}, React__default.createElement("div", {
|
|
@@ -12007,8 +12077,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12007
12077
|
style: {
|
|
12008
12078
|
width: '125px',
|
|
12009
12079
|
border: 'none'
|
|
12010
|
-
}
|
|
12011
|
-
allowClear: true
|
|
12080
|
+
}
|
|
12012
12081
|
}))), React__default.createElement("div", {
|
|
12013
12082
|
className: "datefilter",
|
|
12014
12083
|
style: {
|
|
@@ -12026,15 +12095,15 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
|
|
|
12026
12095
|
minWidth: '100px'
|
|
12027
12096
|
},
|
|
12028
12097
|
disabled: true
|
|
12029
|
-
}))), selectedDate ? React__default.createElement(React__default.Fragment, null, React__default.createElement(ClearAll, {
|
|
12098
|
+
}))), selectedDate || statusOrder || selectedClient ? React__default.createElement(React__default.Fragment, null, React__default.createElement(ClearAll, {
|
|
12030
12099
|
onClick: handleClearAll
|
|
12031
12100
|
}, React__default.createElement(StyledFilterBtnIcon, null, React__default.createElement("i", {
|
|
12032
12101
|
className: "cross"
|
|
12033
12102
|
})), React__default.createElement(StyledFilterBtnLabel, null, "Clear all"))) : null)), React__default.createElement(TableFilters, null)));
|
|
12034
12103
|
};
|
|
12035
|
-
var StyledDatePicker = /*#__PURE__*/styled__default.div(_templateObject$
|
|
12104
|
+
var StyledDatePicker = /*#__PURE__*/styled__default.div(_templateObject$2h || (_templateObject$2h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
|
|
12036
12105
|
// const DropdownContainer = styled.div``;
|
|
12037
|
-
var StyledAntSelect$c = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
12106
|
+
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"])));
|
|
12038
12107
|
|
|
12039
12108
|
var PAGE_SIZE_OPTIONS$1 = [50, 100, 150];
|
|
12040
12109
|
var MAX_PAGES_TO_SHOW$1 = 5;
|
|
@@ -12120,7 +12189,7 @@ var ReturnPagination = function ReturnPagination(_ref) {
|
|
|
12120
12189
|
}, React__default.createElement(NextIcon, null)))));
|
|
12121
12190
|
};
|
|
12122
12191
|
|
|
12123
|
-
var _templateObject$
|
|
12192
|
+
var _templateObject$2i, _templateObject2$1E;
|
|
12124
12193
|
var _excluded$5 = ["count"];
|
|
12125
12194
|
var ReturnAfterTable = function ReturnAfterTable() {
|
|
12126
12195
|
var _useReturnAfterOrderD = useReturnAfterOrderData(),
|
|
@@ -12131,6 +12200,14 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12131
12200
|
state = _useAtom[0];
|
|
12132
12201
|
var filters = state['x-filters'],
|
|
12133
12202
|
pagination = state['x-pagination'];
|
|
12203
|
+
var splitPath = function splitPath(str) {
|
|
12204
|
+
var _str$split;
|
|
12205
|
+
var parts = str == null || (_str$split = str.split('/')) == null ? void 0 : _str$split.filter(function (part) {
|
|
12206
|
+
return part !== '';
|
|
12207
|
+
}); // Filter out empty parts
|
|
12208
|
+
return parts;
|
|
12209
|
+
};
|
|
12210
|
+
var paths = splitPath(location.pathname);
|
|
12134
12211
|
var _UsePaginationReturnD = UsePaginationReturnData(),
|
|
12135
12212
|
paginationObj = _UsePaginationReturnD[0];
|
|
12136
12213
|
var _useState = React.useState(1),
|
|
@@ -12140,6 +12217,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12140
12217
|
setItemsPerPage = _useItemsPerReturnPag[1];
|
|
12141
12218
|
var _UsePaginationData = UsePaginationData(),
|
|
12142
12219
|
setPaginationObject = _UsePaginationData[1];
|
|
12220
|
+
console.log(paths, 'paths');
|
|
12143
12221
|
var page = paginationObj.page,
|
|
12144
12222
|
total = paginationObj.total;
|
|
12145
12223
|
var handlePageChange = function handlePageChange(page) {
|
|
@@ -12175,7 +12253,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12175
12253
|
}, [fetchedReturnOrderData, staticDataLoading]);
|
|
12176
12254
|
return React__default.createElement("div", null, React__default.createElement(DashBoardWrapper$2, null, React__default.createElement("div", {
|
|
12177
12255
|
className: "Tableconatiner"
|
|
12178
|
-
}, React__default.createElement(
|
|
12256
|
+
}, React__default.createElement(Container$1f, null, React__default.createElement(ReturnOrderFilter, null), React__default.createElement(OrderTable, null), total > 0 && React__default.createElement(ReturnPagination, {
|
|
12179
12257
|
currentPage: page,
|
|
12180
12258
|
totalItems: total,
|
|
12181
12259
|
itemsPerPage: itemsPerPage,
|
|
@@ -12183,8 +12261,29 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
12183
12261
|
onItemsPerPageChange: handleItemsPerPageChange
|
|
12184
12262
|
})))));
|
|
12185
12263
|
};
|
|
12186
|
-
var Container$1f = /*#__PURE__*/styled__default.div(_templateObject$
|
|
12187
|
-
var DashBoardWrapper$2 = /*#__PURE__*/styled__default.section(_templateObject2$
|
|
12264
|
+
var Container$1f = /*#__PURE__*/styled__default.div(_templateObject$2i || (_templateObject$2i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n /* top: -30px; */\n"])));
|
|
12265
|
+
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"])));
|
|
12266
|
+
|
|
12267
|
+
var _templateObject2$1F;
|
|
12268
|
+
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"])));
|
|
12269
|
+
|
|
12270
|
+
var _templateObject$2j, _templateObject2$1G;
|
|
12271
|
+
var SearchType = function SearchType() {
|
|
12272
|
+
var _useState = React.useState(''),
|
|
12273
|
+
searchText = _useState[0],
|
|
12274
|
+
setSearchText = _useState[1];
|
|
12275
|
+
var handleInputChange = function handleInputChange(event) {
|
|
12276
|
+
setSearchText(event.target.value);
|
|
12277
|
+
};
|
|
12278
|
+
return React__default.createElement(Search, null, React__default.createElement(SearchIcon, null), React__default.createElement(SearchInput, {
|
|
12279
|
+
type: "text",
|
|
12280
|
+
placeholder: "Search",
|
|
12281
|
+
value: searchText,
|
|
12282
|
+
onChange: handleInputChange
|
|
12283
|
+
}));
|
|
12284
|
+
};
|
|
12285
|
+
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"])));
|
|
12286
|
+
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"])));
|
|
12188
12287
|
|
|
12189
12288
|
var BulkFilter = function BulkFilter() {
|
|
12190
12289
|
// const [printToogle, setPrintToggle] = useMenuDropDown();
|
|
@@ -12305,66 +12404,17 @@ var ReturnTable$1 = function ReturnTable(_ref) {
|
|
|
12305
12404
|
})))));
|
|
12306
12405
|
};
|
|
12307
12406
|
|
|
12308
|
-
|
|
12309
|
-
|
|
12310
|
-
|
|
12311
|
-
// {
|
|
12312
|
-
// field: 'action_date',
|
|
12313
|
-
// op: '>=',
|
|
12314
|
-
// value: `${format(new Date(todayDate), 'yyyy-MM-dd')}T00:00:00+00:00`,
|
|
12315
|
-
// },
|
|
12316
|
-
// {
|
|
12317
|
-
// field: 'action_date',
|
|
12318
|
-
// op: '<=',
|
|
12319
|
-
// value: `${format(new Date(todayDate), 'yyyy-MM-dd')}T23:59:59+00:00`,
|
|
12320
|
-
// },
|
|
12321
|
-
// { field: 'status', op: 'count', value: '' },
|
|
12322
|
-
],
|
|
12323
|
-
'x-pagination': {
|
|
12324
|
-
page: 1,
|
|
12325
|
-
per_page: 50
|
|
12326
|
-
}
|
|
12327
|
-
};
|
|
12328
|
-
var filterReducer$2 = function filterReducer(state, action) {
|
|
12329
|
-
switch (action.type) {
|
|
12330
|
-
case 'SET_PAGE':
|
|
12331
|
-
return _extends({}, state, {
|
|
12332
|
-
'x-pagination': _extends({}, state['x-pagination'], {
|
|
12333
|
-
page: action.payload
|
|
12334
|
-
})
|
|
12335
|
-
});
|
|
12336
|
-
case 'SET_PERPAGE':
|
|
12337
|
-
return _extends({}, state, {
|
|
12338
|
-
'x-pagination': _extends({}, state['x-pagination'], {
|
|
12339
|
-
per_page: action.payload
|
|
12340
|
-
})
|
|
12341
|
-
});
|
|
12342
|
-
case 'CLEAR_FILTERS':
|
|
12343
|
-
return _extends({}, state);
|
|
12344
|
-
case 'CLEAR_ALL_FILTER':
|
|
12345
|
-
return _extends({}, state);
|
|
12346
|
-
default:
|
|
12347
|
-
return state;
|
|
12348
|
-
}
|
|
12349
|
-
};
|
|
12350
|
-
var filtersStateAtom$2 = /*#__PURE__*/jotai.atom(initialState$3);
|
|
12351
|
-
var overviewfiltersReducerAtom = /*#__PURE__*/jotai.atom(function (get) {
|
|
12352
|
-
return get(filtersStateAtom$2);
|
|
12353
|
-
}, function (get, set, action) {
|
|
12354
|
-
return set(filtersStateAtom$2, filterReducer$2(get(filtersStateAtom$2), action));
|
|
12355
|
-
});
|
|
12356
|
-
|
|
12357
|
-
var _templateObject$2k, _templateObject2$1I, _templateObject3$13;
|
|
12407
|
+
var _templateObject$2k, _templateObject2$1H, _templateObject3$11;
|
|
12408
|
+
// import Pagination from './table-view/Pagination';
|
|
12409
|
+
// import { overviewfiltersReducerAtom } from './header-filters/overViewFilter';
|
|
12358
12410
|
function ReturnMainTable() {
|
|
12359
|
-
|
|
12360
|
-
state = _useAtom[0];
|
|
12411
|
+
// const [state] = useAtom(overviewfiltersReducerAtom);
|
|
12361
12412
|
// const [paginationObj] = UsePaginationData();
|
|
12362
12413
|
// const [, setCurrentPage] = useState(1);
|
|
12363
12414
|
// const [itemsPerPage, setItemsPerPage] = useItemsPerPage();
|
|
12364
|
-
|
|
12415
|
+
// const { 'x-pagination': pagination } = state;
|
|
12365
12416
|
// const { page, total } = paginationObj;
|
|
12366
|
-
|
|
12367
|
-
selectedClient = _useTableName[0];
|
|
12417
|
+
// const [selectedClient] = useTableName();
|
|
12368
12418
|
// const [, setPaginationObject] = UsePaginationData();
|
|
12369
12419
|
var _useStickyStatus = useStickyStatus(),
|
|
12370
12420
|
isScrolled = _useStickyStatus[0];
|
|
@@ -12381,7 +12431,10 @@ function ReturnMainTable() {
|
|
|
12381
12431
|
var _useApiHook = dmsComponentLibrary.useApiHook({
|
|
12382
12432
|
endpoint: "/return_orders/get/client-returns/",
|
|
12383
12433
|
method: 'GET',
|
|
12384
|
-
pagination:
|
|
12434
|
+
pagination: {
|
|
12435
|
+
page: 1,
|
|
12436
|
+
per_page: 200
|
|
12437
|
+
}
|
|
12385
12438
|
}),
|
|
12386
12439
|
fetchedClientData = _useApiHook.data,
|
|
12387
12440
|
staticDataLoading = _useApiHook.loading;
|
|
@@ -12401,19 +12454,20 @@ function ReturnMainTable() {
|
|
|
12401
12454
|
// }
|
|
12402
12455
|
}
|
|
12403
12456
|
}, [staticDataLoading]);
|
|
12457
|
+
var getClient = localStorage.getItem('clientName');
|
|
12404
12458
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(DashBoardWrapper$3, {
|
|
12405
12459
|
className: " " + (isScrolled ? 'stickyTableHead' : '')
|
|
12406
12460
|
}, React__default.createElement("div", {
|
|
12407
12461
|
className: "Tableconatiner"
|
|
12408
|
-
}, 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"),
|
|
12462
|
+
}, 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)))));
|
|
12409
12463
|
}
|
|
12410
12464
|
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"])));
|
|
12411
|
-
var Container$1g = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
12412
|
-
var DashBoardWrapper$3 = /*#__PURE__*/styled__default.section(_templateObject3$
|
|
12465
|
+
var Container$1g = /*#__PURE__*/styled__default.div(_templateObject2$1H || (_templateObject2$1H = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
|
|
12466
|
+
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"])));
|
|
12413
12467
|
|
|
12414
|
-
var _templateObject$2l, _templateObject2$
|
|
12468
|
+
var _templateObject$2l, _templateObject2$1I;
|
|
12415
12469
|
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"])));
|
|
12416
|
-
var StyledFlex = /*#__PURE__*/styled__default.div(_templateObject2$
|
|
12470
|
+
var StyledFlex = /*#__PURE__*/styled__default.div(_templateObject2$1I || (_templateObject2$1I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
12417
12471
|
|
|
12418
12472
|
var _templateObject$2m;
|
|
12419
12473
|
var HeaderTitle = function HeaderTitle(props) {
|
|
@@ -12421,12 +12475,12 @@ var HeaderTitle = function HeaderTitle(props) {
|
|
|
12421
12475
|
};
|
|
12422
12476
|
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"])));
|
|
12423
12477
|
|
|
12424
|
-
var _templateObject$2n, _templateObject2$
|
|
12478
|
+
var _templateObject$2n, _templateObject2$1J;
|
|
12425
12479
|
function Breadcrumb(props) {
|
|
12426
12480
|
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)));
|
|
12427
12481
|
}
|
|
12428
12482
|
var BreadcrumbContainer = /*#__PURE__*/styled__default.div(_templateObject$2n || (_templateObject$2n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n"])));
|
|
12429
|
-
var BreadcrumbList = /*#__PURE__*/styled__default.span(_templateObject2$
|
|
12483
|
+
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"])));
|
|
12430
12484
|
|
|
12431
12485
|
var RouterHeader = function RouterHeader(_ref) {
|
|
12432
12486
|
var _ref$breadcrumbTitle = _ref.breadcrumbTitle,
|
|
@@ -12448,6 +12502,7 @@ var RouterHeader = function RouterHeader(_ref) {
|
|
|
12448
12502
|
})))));
|
|
12449
12503
|
};
|
|
12450
12504
|
|
|
12505
|
+
// import { filtersReducerAtom } from './components/order-daily-overview/header-filters/filterStore';
|
|
12451
12506
|
function ReturnClient() {
|
|
12452
12507
|
var _selectedClientString;
|
|
12453
12508
|
antd.notification.config({
|
|
@@ -12461,12 +12516,24 @@ function ReturnClient() {
|
|
|
12461
12516
|
var navigate = reactRouterDom.useNavigate();
|
|
12462
12517
|
var selectedClientString = selectedClient == null ? void 0 : selectedClient.replace(/\s+/g, '-');
|
|
12463
12518
|
selectedClientString = (_selectedClientString = selectedClientString) == null ? void 0 : _selectedClientString.toLowerCase();
|
|
12519
|
+
var _useCustomerData = useCustomerData(),
|
|
12520
|
+
setCustomers = _useCustomerData[1];
|
|
12521
|
+
var _useActionType = useActionType(),
|
|
12522
|
+
setActionType = _useActionType[1];
|
|
12523
|
+
var _useLocationData = useLocationData(),
|
|
12524
|
+
setLocationData = _useLocationData[1];
|
|
12525
|
+
var _useStatusOrderData = useStatusOrderData(),
|
|
12526
|
+
setStatusOfOrders = _useStatusOrderData[1];
|
|
12527
|
+
// const [, dispatch] = useAtom(filtersReducerAtom);
|
|
12464
12528
|
console.log(selectedClientString, 'selectedClient');
|
|
12465
12529
|
console.log("../filter/:" + selectedClientString);
|
|
12466
12530
|
React.useEffect(function () {
|
|
12467
|
-
if (
|
|
12531
|
+
if (location.pathname.includes('/returnClient')) {
|
|
12468
12532
|
localStorage.removeItem('clientName');
|
|
12469
12533
|
localStorage.removeItem('clientId');
|
|
12534
|
+
localStorage.removeItem('uuid');
|
|
12535
|
+
localStorage.removeItem('customer_id');
|
|
12536
|
+
// dispatch({ type: 'CLEAR_CLIENT', payload: [] });
|
|
12470
12537
|
}
|
|
12471
12538
|
}, [location.pathname]);
|
|
12472
12539
|
React.useEffect(function () {
|
|
@@ -12475,6 +12542,56 @@ function ReturnClient() {
|
|
|
12475
12542
|
navigate("filter/" + _selectedClientString2);
|
|
12476
12543
|
}
|
|
12477
12544
|
}, [selectedClient]);
|
|
12545
|
+
//API for client data
|
|
12546
|
+
var _useApiHook = dmsComponentLibrary.useApiHook({
|
|
12547
|
+
endpoint: "/customers/",
|
|
12548
|
+
method: 'GET',
|
|
12549
|
+
//@ts-ignore
|
|
12550
|
+
pagination: {
|
|
12551
|
+
is_pagination: false
|
|
12552
|
+
}
|
|
12553
|
+
}),
|
|
12554
|
+
fetchedCustomerData = _useApiHook.data,
|
|
12555
|
+
loading = _useApiHook.loading;
|
|
12556
|
+
//API for action type
|
|
12557
|
+
var _useApiHook2 = dmsComponentLibrary.useApiHook({
|
|
12558
|
+
endpoint: "/orders/getStaticData/all/",
|
|
12559
|
+
method: 'GET'
|
|
12560
|
+
}),
|
|
12561
|
+
fetchedStaticData = _useApiHook2.data,
|
|
12562
|
+
actionLoading = _useApiHook2.loading;
|
|
12563
|
+
//API for return locations
|
|
12564
|
+
var _useApiHook3 = dmsComponentLibrary.useApiHook({
|
|
12565
|
+
endpoint: "/return_locations/",
|
|
12566
|
+
method: 'GET',
|
|
12567
|
+
//@ts-ignore
|
|
12568
|
+
pagination: {
|
|
12569
|
+
is_pagination: false
|
|
12570
|
+
}
|
|
12571
|
+
}),
|
|
12572
|
+
fetchedLocationData = _useApiHook3.data,
|
|
12573
|
+
locationloading = _useApiHook3.loading;
|
|
12574
|
+
React.useEffect(function () {
|
|
12575
|
+
if (fetchedCustomerData && fetchedCustomerData != null && fetchedCustomerData.data) {
|
|
12576
|
+
setCustomers(fetchedCustomerData == null ? void 0 : fetchedCustomerData.data);
|
|
12577
|
+
}
|
|
12578
|
+
}, [loading]);
|
|
12579
|
+
React.useEffect(function () {
|
|
12580
|
+
if (fetchedStaticData && fetchedStaticData != null && fetchedStaticData.data) {
|
|
12581
|
+
var _fetchedStaticData$da, _fetchedStaticData$da2;
|
|
12582
|
+
setActionType(fetchedStaticData == null || (_fetchedStaticData$da = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da.flatMap(function (i) {
|
|
12583
|
+
return i == null ? void 0 : i.order_product_return_action;
|
|
12584
|
+
}));
|
|
12585
|
+
setStatusOfOrders(fetchedStaticData == null || (_fetchedStaticData$da2 = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da2.flatMap(function (i) {
|
|
12586
|
+
return i == null ? void 0 : i.order_stock_alias;
|
|
12587
|
+
}));
|
|
12588
|
+
}
|
|
12589
|
+
}, [actionLoading]);
|
|
12590
|
+
React.useEffect(function () {
|
|
12591
|
+
if (fetchedLocationData && fetchedLocationData != null && fetchedLocationData.data) {
|
|
12592
|
+
setLocationData(fetchedLocationData == null ? void 0 : fetchedLocationData.data);
|
|
12593
|
+
}
|
|
12594
|
+
}, [locationloading]);
|
|
12478
12595
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(RouterHeader, null), React__default.createElement(React.Suspense, {
|
|
12479
12596
|
fallback: React__default.createElement(LoadingMessage, null)
|
|
12480
12597
|
}, React__default.createElement(reactRouterDom.Routes, null, React__default.createElement(reactRouterDom.Route, {
|