@bjsdistribution/dms-client-return 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dms-client-return.cjs.development.js +4 -12
- 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 +4 -12
- 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 +0 -3
- 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 +6 -2
|
@@ -9532,7 +9532,6 @@ function SelectionFilter() {
|
|
|
9532
9532
|
type: 'SET_CLIENT_FILTER',
|
|
9533
9533
|
payload: storedClientId
|
|
9534
9534
|
});
|
|
9535
|
-
// Reset to the first page
|
|
9536
9535
|
dispatch({
|
|
9537
9536
|
type: 'SET_PAGE',
|
|
9538
9537
|
payload: 1
|
|
@@ -9549,7 +9548,6 @@ function SelectionFilter() {
|
|
|
9549
9548
|
type: 'SET_ACTIONS_FILTER',
|
|
9550
9549
|
payload: selectedFilterValue
|
|
9551
9550
|
});
|
|
9552
|
-
// Reset to the first page
|
|
9553
9551
|
dispatch({
|
|
9554
9552
|
type: 'SET_PAGE',
|
|
9555
9553
|
payload: 1
|
|
@@ -9561,7 +9559,6 @@ function SelectionFilter() {
|
|
|
9561
9559
|
type: 'SET_LOCATION_FILTER',
|
|
9562
9560
|
payload: selectedLocationValue
|
|
9563
9561
|
});
|
|
9564
|
-
// Reset to the first page
|
|
9565
9562
|
dispatch({
|
|
9566
9563
|
type: 'SET_PAGE',
|
|
9567
9564
|
payload: 1
|
|
@@ -9994,13 +9991,11 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
9994
9991
|
setPaginationObject = _UsePaginationData[1];
|
|
9995
9992
|
var _usefetchAgain = usefetchAgain(),
|
|
9996
9993
|
callForFetch = _usefetchAgain[0];
|
|
9997
|
-
// console.log(callForFetch, 'callForFetchcallForFetchcallForFetchcallForFetch');
|
|
9998
9994
|
var OpenDropDown = function OpenDropDown(index) {
|
|
9999
9995
|
setPrintToggle(function (prevIndex) {
|
|
10000
9996
|
return prevIndex === index ? null : index;
|
|
10001
9997
|
});
|
|
10002
9998
|
};
|
|
10003
|
-
console.log(newpayload, 'newpayload');
|
|
10004
9999
|
// Close dropdown outside click
|
|
10005
10000
|
useEffect(function () {
|
|
10006
10001
|
document.addEventListener('mousedown', handleClickOutside);
|
|
@@ -10094,8 +10089,6 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10094
10089
|
setGrouped([]);
|
|
10095
10090
|
}
|
|
10096
10091
|
};
|
|
10097
|
-
console.log(selectedReturnOrder, 'selectedReturnOrder');
|
|
10098
|
-
console.log(newpayload, 'newpayload');
|
|
10099
10092
|
var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action, new_location, legacy_product_id) {
|
|
10100
10093
|
setSelectedReturnOrder(function (prevSelectedLocations) {
|
|
10101
10094
|
var isSelected = prevSelectedLocations == null ? void 0 : prevSelectedLocations.some(function (loc) {
|
|
@@ -10178,7 +10171,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10178
10171
|
}, React.createElement(Checkbox$1, {
|
|
10179
10172
|
checked: selectAll,
|
|
10180
10173
|
onChange: handleSelectAll
|
|
10181
|
-
})) : React.createElement("th", null), React.createElement("th", null, "Product Location"), React.createElement("th", null, "Return Location"), React.createElement("th", null, "Recipient"), React.createElement("th", null, "
|
|
10174
|
+
})) : React.createElement("th", null), React.createElement("th", null, "Product Location"), React.createElement("th", null, "Return Location"), React.createElement("th", null, "Recipient"), React.createElement("th", null, "Code"), React.createElement("th", null, "Description"), React.createElement("th", null, "Part"), React.createElement("th", null, "Weight"), React.createElement("th", null, "CBM"), React.createElement("th", null, "Return Reason"), React.createElement("th", null, "Collected"), React.createElement("th", null, "Collection Reason"), React.createElement("th", {
|
|
10182
10175
|
className: "emailInvoiceShare"
|
|
10183
10176
|
}, "Labels"))), React.createElement("tbody", null, load ? React.createElement("tr", null, React.createElement("td", {
|
|
10184
10177
|
colSpan: 6
|
|
@@ -10189,7 +10182,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10189
10182
|
})) : (returnData == null ? void 0 : returnData.length) === 0 ? React.createElement("tr", null, React.createElement("td", {
|
|
10190
10183
|
colSpan: 14
|
|
10191
10184
|
}, React.createElement(EmptyDataContainer$1, null, React.createElement(Empty, null)))) : returnData == null ? void 0 : returnData.map(function (item, index) {
|
|
10192
|
-
var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$
|
|
10185
|
+
var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$return_reasons, _item$order_product_r3, _item$collection_reas;
|
|
10193
10186
|
return React.createElement("tr", {
|
|
10194
10187
|
key: item.id
|
|
10195
10188
|
}, React.createElement("td", null, (item == null || (_item$order_product_r2 = item.order_product_return_action) == null ? void 0 : _item$order_product_r2.type) == 'RTS' ? React.createElement(React.Fragment, null, React.createElement(Checkbox$1, {
|
|
@@ -10217,7 +10210,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
10217
10210
|
style: {
|
|
10218
10211
|
color: '#888075'
|
|
10219
10212
|
}
|
|
10220
|
-
}, displayValueOrNA(item == null || (_item$order_data2 = item.order_data) == null || (_item$order_data2 = _item$order_data2.order_recipient) == null ? void 0 : _item$order_data2.postcode)))), React.createElement("td", null, displayValueOrNA(item == null
|
|
10213
|
+
}, displayValueOrNA(item == null || (_item$order_data2 = item.order_data) == null || (_item$order_data2 = _item$order_data2.order_recipient) == null ? void 0 : _item$order_data2.postcode)))), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.code)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.description)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.parts_count)), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), ' ', item != null && item.weight && (item == null ? void 0 : item.weight) !== null ? 'KG' : ''), React.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React.createElement("td", null, displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React.createElement("td", null, (item == null || (_item$order_product_r3 = item.order_product_returns) == null ? void 0 : _item$order_product_r3.length) > 0 ? item.order_product_returns.map(function (ret) {
|
|
10221
10214
|
return ret != null && ret.collected_at ? format(new Date(ret.collected_at), 'dd/MM/yyyy') : 'UNKNOWN';
|
|
10222
10215
|
}) : 'UNKNOWN'), React.createElement("td", null, displayValueOrNA(item == null || (_item$collection_reas = item.collection_reasons) == null ? void 0 : _item$collection_reas.reason)), React.createElement("td", null, React.createElement("ul", {
|
|
10223
10216
|
className: "actionbox"
|
|
@@ -12520,11 +12513,10 @@ function ReturnClient() {
|
|
|
12520
12513
|
console.log(selectedClientString, 'selectedClient');
|
|
12521
12514
|
console.log("../filter/:" + selectedClientString);
|
|
12522
12515
|
useEffect(function () {
|
|
12523
|
-
if (location.pathname.includes('/
|
|
12516
|
+
if (location.pathname.includes('/returnclient')) {
|
|
12524
12517
|
localStorage.removeItem('clientName');
|
|
12525
12518
|
localStorage.removeItem('clientId');
|
|
12526
12519
|
localStorage.removeItem('uuid');
|
|
12527
|
-
localStorage.removeItem('customer_id');
|
|
12528
12520
|
// dispatch({ type: 'CLEAR_CLIENT', payload: [] });
|
|
12529
12521
|
}
|
|
12530
12522
|
}, [location.pathname]);
|