@bjsdistribution/dms-client-return 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dms-client-return.cjs.development.js +16 -20
- 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 +16 -20
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +3 -10
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +0 -2
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +3 -8
- package/src/index.tsx +17 -2
|
@@ -9540,7 +9540,6 @@ function SelectionFilter() {
|
|
|
9540
9540
|
type: 'SET_CLIENT_FILTER',
|
|
9541
9541
|
payload: storedClientId
|
|
9542
9542
|
});
|
|
9543
|
-
// Reset to the first page
|
|
9544
9543
|
dispatch({
|
|
9545
9544
|
type: 'SET_PAGE',
|
|
9546
9545
|
payload: 1
|
|
@@ -9557,7 +9556,6 @@ function SelectionFilter() {
|
|
|
9557
9556
|
type: 'SET_ACTIONS_FILTER',
|
|
9558
9557
|
payload: selectedFilterValue
|
|
9559
9558
|
});
|
|
9560
|
-
// Reset to the first page
|
|
9561
9559
|
dispatch({
|
|
9562
9560
|
type: 'SET_PAGE',
|
|
9563
9561
|
payload: 1
|
|
@@ -9569,20 +9567,12 @@ function SelectionFilter() {
|
|
|
9569
9567
|
type: 'SET_LOCATION_FILTER',
|
|
9570
9568
|
payload: selectedLocationValue
|
|
9571
9569
|
});
|
|
9572
|
-
// Reset to the first page
|
|
9573
9570
|
dispatch({
|
|
9574
9571
|
type: 'SET_PAGE',
|
|
9575
9572
|
payload: 1
|
|
9576
9573
|
});
|
|
9577
9574
|
}
|
|
9578
9575
|
};
|
|
9579
|
-
React.useEffect(function () {
|
|
9580
|
-
return function () {
|
|
9581
|
-
dispatch({
|
|
9582
|
-
type: 'CLEAR_CLIENT'
|
|
9583
|
-
});
|
|
9584
|
-
};
|
|
9585
|
-
}, []);
|
|
9586
9576
|
React.useEffect(function () {
|
|
9587
9577
|
if (storedClientId) {
|
|
9588
9578
|
dispatch({
|
|
@@ -9611,6 +9601,7 @@ function SelectionFilter() {
|
|
|
9611
9601
|
});
|
|
9612
9602
|
}
|
|
9613
9603
|
}, [selectedFilterValue, selectedLocationValue]);
|
|
9604
|
+
console.log(storedName, 'storedName');
|
|
9614
9605
|
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, {
|
|
9615
9606
|
options: clientOptions,
|
|
9616
9607
|
placeholder: "Select Client Name",
|
|
@@ -9619,7 +9610,7 @@ function SelectionFilter() {
|
|
|
9619
9610
|
minWidth: '14vw'
|
|
9620
9611
|
},
|
|
9621
9612
|
value: storedName
|
|
9622
|
-
})), storedName && location.pathname.includes("
|
|
9613
|
+
})), 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, {
|
|
9623
9614
|
options: actionTypeOptions,
|
|
9624
9615
|
placeholder: "Select Action Type",
|
|
9625
9616
|
value: selectedFilterValue,
|
|
@@ -10002,13 +9993,11 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10002
9993
|
setPaginationObject = _UsePaginationData[1];
|
|
10003
9994
|
var _usefetchAgain = usefetchAgain(),
|
|
10004
9995
|
callForFetch = _usefetchAgain[0];
|
|
10005
|
-
// console.log(callForFetch, 'callForFetchcallForFetchcallForFetchcallForFetch');
|
|
10006
9996
|
var OpenDropDown = function OpenDropDown(index) {
|
|
10007
9997
|
setPrintToggle(function (prevIndex) {
|
|
10008
9998
|
return prevIndex === index ? null : index;
|
|
10009
9999
|
});
|
|
10010
10000
|
};
|
|
10011
|
-
console.log(newpayload, 'newpayload');
|
|
10012
10001
|
// Close dropdown outside click
|
|
10013
10002
|
React.useEffect(function () {
|
|
10014
10003
|
document.addEventListener('mousedown', handleClickOutside);
|
|
@@ -10102,8 +10091,6 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10102
10091
|
setGrouped([]);
|
|
10103
10092
|
}
|
|
10104
10093
|
};
|
|
10105
|
-
console.log(selectedReturnOrder, 'selectedReturnOrder');
|
|
10106
|
-
console.log(newpayload, 'newpayload');
|
|
10107
10094
|
var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action, new_location, legacy_product_id) {
|
|
10108
10095
|
setSelectedReturnOrder(function (prevSelectedLocations) {
|
|
10109
10096
|
var isSelected = prevSelectedLocations == null ? void 0 : prevSelectedLocations.some(function (loc) {
|
|
@@ -10186,7 +10173,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10186
10173
|
}, React__default.createElement(dmsComponentLibrary.Checkbox, {
|
|
10187
10174
|
checked: selectAll,
|
|
10188
10175
|
onChange: handleSelectAll
|
|
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, "
|
|
10176
|
+
})) : React__default.createElement("th", null), React__default.createElement("th", null, "Product Location"), React__default.createElement("th", null, "Return Location"), React__default.createElement("th", null, "Recipient"), React__default.createElement("th", null, "Code"), React__default.createElement("th", null, "Description"), React__default.createElement("th", null, "Part"), React__default.createElement("th", null, "Weight"), React__default.createElement("th", null, "CBM"), React__default.createElement("th", null, "Return Reason"), React__default.createElement("th", null, "Collected"), React__default.createElement("th", null, "Collection Reason"), React__default.createElement("th", {
|
|
10190
10177
|
className: "emailInvoiceShare"
|
|
10191
10178
|
}, "Labels"))), React__default.createElement("tbody", null, load ? React__default.createElement("tr", null, React__default.createElement("td", {
|
|
10192
10179
|
colSpan: 6
|
|
@@ -10197,7 +10184,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10197
10184
|
})) : (returnData == null ? void 0 : returnData.length) === 0 ? React__default.createElement("tr", null, React__default.createElement("td", {
|
|
10198
10185
|
colSpan: 14
|
|
10199
10186
|
}, React__default.createElement(EmptyDataContainer$1, null, React__default.createElement(antd.Empty, null)))) : returnData == null ? void 0 : returnData.map(function (item, index) {
|
|
10200
|
-
var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$
|
|
10187
|
+
var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$return_reasons, _item$order_product_r3, _item$collection_reas;
|
|
10201
10188
|
return React__default.createElement("tr", {
|
|
10202
10189
|
key: item.id
|
|
10203
10190
|
}, 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, {
|
|
@@ -10225,7 +10212,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10225
10212
|
style: {
|
|
10226
10213
|
color: '#888075'
|
|
10227
10214
|
}
|
|
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
|
|
10215
|
+
}, displayValueOrNA(item == null || (_item$order_data2 = item.order_data) == null || (_item$order_data2 = _item$order_data2.order_recipient) == null ? void 0 : _item$order_data2.postcode)))), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.code)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.description)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.parts_count)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), ' ', item != null && item.weight && (item == null ? void 0 : item.weight) !== null ? 'KG' : ''), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React__default.createElement("td", null, (item == null || (_item$order_product_r3 = item.order_product_returns) == null ? void 0 : _item$order_product_r3.length) > 0 ? item.order_product_returns.map(function (ret) {
|
|
10229
10216
|
return ret != null && ret.collected_at ? dateFns.format(new Date(ret.collected_at), 'dd/MM/yyyy') : 'UNKNOWN';
|
|
10230
10217
|
}) : '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", {
|
|
10231
10218
|
className: "actionbox"
|
|
@@ -12527,12 +12514,21 @@ function ReturnClient() {
|
|
|
12527
12514
|
// const [, dispatch] = useAtom(filtersReducerAtom);
|
|
12528
12515
|
console.log(selectedClientString, 'selectedClient');
|
|
12529
12516
|
console.log("../filter/:" + selectedClientString);
|
|
12517
|
+
var splitPath = function splitPath(str) {
|
|
12518
|
+
var _str$split;
|
|
12519
|
+
var parts = str == null || (_str$split = str.split('/')) == null ? void 0 : _str$split.filter(function (part) {
|
|
12520
|
+
return part !== '';
|
|
12521
|
+
}); // Filter out empty parts
|
|
12522
|
+
return parts;
|
|
12523
|
+
};
|
|
12524
|
+
var paths = splitPath(location.pathname);
|
|
12525
|
+
console.log(paths, 'pathssssssssssssssssssssssssssss');
|
|
12530
12526
|
React.useEffect(function () {
|
|
12531
|
-
|
|
12527
|
+
console.log(paths[paths.length - 1], 'paths[paths.length] paths[paths.length]');
|
|
12528
|
+
if (paths[paths.length - 1] === 'returnclient') {
|
|
12532
12529
|
localStorage.removeItem('clientName');
|
|
12533
12530
|
localStorage.removeItem('clientId');
|
|
12534
12531
|
localStorage.removeItem('uuid');
|
|
12535
|
-
localStorage.removeItem('customer_id');
|
|
12536
12532
|
// dispatch({ type: 'CLEAR_CLIENT', payload: [] });
|
|
12537
12533
|
}
|
|
12538
12534
|
}, [location.pathname]);
|