@bjsdistribution/dms-client-return 0.0.66 → 0.0.68
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 +49 -22
- 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 +49 -22
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-daily-overview/index.tsx +12 -4
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +12 -4
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +3 -0
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +12 -4
- package/src/components/order-view/index.tsx +0 -1
- package/src/index.tsx +10 -17
|
@@ -1754,14 +1754,23 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
1754
1754
|
setLoading(returnDataLoad);
|
|
1755
1755
|
if (fetchedOrderData && fetchedOrderData != null && fetchedOrderData.data) {
|
|
1756
1756
|
setReturnData(fetchedOrderData == null ? void 0 : fetchedOrderData.data);
|
|
1757
|
-
if (paginationData
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1757
|
+
if (paginationData) {
|
|
1758
|
+
try {
|
|
1759
|
+
var _JSON$parse = JSON.parse(paginationData),
|
|
1760
|
+
count = _JSON$parse.count,
|
|
1761
|
+
rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded);
|
|
1762
|
+
setPaginationObject(rest);
|
|
1763
|
+
} catch (error) {
|
|
1764
|
+
console.error('Error parsing paginationData:', error);
|
|
1765
|
+
antd.notification.error({
|
|
1766
|
+
message: 'Error',
|
|
1767
|
+
description: 'Failed to parse pagination data'
|
|
1768
|
+
});
|
|
1769
|
+
}
|
|
1761
1770
|
} else {
|
|
1762
1771
|
antd.notification.error({
|
|
1763
1772
|
message: 'Error',
|
|
1764
|
-
description: 'Pagination data is null'
|
|
1773
|
+
description: 'Pagination data is null or undefined'
|
|
1765
1774
|
});
|
|
1766
1775
|
}
|
|
1767
1776
|
}
|
|
@@ -2829,6 +2838,11 @@ var OrderTable = function OrderTable() {
|
|
|
2829
2838
|
color: '#845ADF',
|
|
2830
2839
|
background: 'rgba(132, 90, 223, 0.15)'
|
|
2831
2840
|
};
|
|
2841
|
+
case 'Awaiting':
|
|
2842
|
+
return {
|
|
2843
|
+
color: '#845ADF',
|
|
2844
|
+
background: 'rgba(132, 90, 223, 0.15)'
|
|
2845
|
+
};
|
|
2832
2846
|
case 'Completed':
|
|
2833
2847
|
return {
|
|
2834
2848
|
color: '#1F9254',
|
|
@@ -2947,6 +2961,7 @@ var OrderTable = function OrderTable() {
|
|
|
2947
2961
|
OO: 'On Hold',
|
|
2948
2962
|
SC: 'Sub-Contracted',
|
|
2949
2963
|
'awaiting route': 'Awaiting route',
|
|
2964
|
+
'awaiting confirmation': 'Awaiting',
|
|
2950
2965
|
completed: 'completed',
|
|
2951
2966
|
outstanding: 'Outstanding',
|
|
2952
2967
|
routed: 'Routed'
|
|
@@ -3623,14 +3638,23 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
3623
3638
|
setLoading(loading);
|
|
3624
3639
|
if (fetchedReturnOrderData && fetchedReturnOrderData != null && fetchedReturnOrderData.data) {
|
|
3625
3640
|
setReturnOrderData(fetchedReturnOrderData == null ? void 0 : fetchedReturnOrderData.data);
|
|
3626
|
-
if (paginationData
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3641
|
+
if (paginationData) {
|
|
3642
|
+
try {
|
|
3643
|
+
var _JSON$parse = JSON.parse(paginationData),
|
|
3644
|
+
count = _JSON$parse.count,
|
|
3645
|
+
rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded$3);
|
|
3646
|
+
setPaginationObject(rest);
|
|
3647
|
+
} catch (error) {
|
|
3648
|
+
console.error('Error parsing paginationData:', error);
|
|
3649
|
+
antd.notification.error({
|
|
3650
|
+
message: 'Error',
|
|
3651
|
+
description: 'Failed to parse pagination data'
|
|
3652
|
+
});
|
|
3653
|
+
}
|
|
3630
3654
|
} else {
|
|
3631
3655
|
antd.notification.error({
|
|
3632
3656
|
message: 'Error',
|
|
3633
|
-
description: 'Pagination data is null'
|
|
3657
|
+
description: 'Pagination data is null or undefined'
|
|
3634
3658
|
});
|
|
3635
3659
|
}
|
|
3636
3660
|
}
|
|
@@ -11265,7 +11289,6 @@ function OrderView() {
|
|
|
11265
11289
|
React.useEffect(function () {
|
|
11266
11290
|
setLoading(depotDataLoading);
|
|
11267
11291
|
if (fetchedDepotData && fetchedDepotData.data) {
|
|
11268
|
-
console.log(fetchedDepotData, 'fetchedDepotData');
|
|
11269
11292
|
var requiredData = fetchedDepotData == null ? void 0 : fetchedDepotData.data;
|
|
11270
11293
|
if (requiredData.length > 0) {
|
|
11271
11294
|
var options = requiredData == null ? void 0 : requiredData.map(function (x) {
|
|
@@ -11808,14 +11831,23 @@ function ReturnMainTable() {
|
|
|
11808
11831
|
if (fetchedClientData && fetchedClientData.data) {
|
|
11809
11832
|
var result = fetchedClientData == null ? void 0 : fetchedClientData.data;
|
|
11810
11833
|
setClientData(result);
|
|
11811
|
-
if (paginationData
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11834
|
+
if (paginationData) {
|
|
11835
|
+
try {
|
|
11836
|
+
var _JSON$parse = JSON.parse(paginationData),
|
|
11837
|
+
count = _JSON$parse.count,
|
|
11838
|
+
rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded$7);
|
|
11839
|
+
setPaginationObject(rest);
|
|
11840
|
+
} catch (error) {
|
|
11841
|
+
console.error('Error parsing paginationData:', error);
|
|
11842
|
+
antd.notification.error({
|
|
11843
|
+
message: 'Error',
|
|
11844
|
+
description: 'Failed to parse pagination data'
|
|
11845
|
+
});
|
|
11846
|
+
}
|
|
11815
11847
|
} else {
|
|
11816
11848
|
antd.notification.error({
|
|
11817
11849
|
message: 'Error',
|
|
11818
|
-
description: 'Pagination data is null'
|
|
11850
|
+
description: 'Pagination data is null or undefined'
|
|
11819
11851
|
});
|
|
11820
11852
|
}
|
|
11821
11853
|
}
|
|
@@ -11882,7 +11914,7 @@ function ReturnClient() {
|
|
|
11882
11914
|
};
|
|
11883
11915
|
var paths = splitPath(location.pathname);
|
|
11884
11916
|
React.useEffect(function () {
|
|
11885
|
-
if (paths
|
|
11917
|
+
if (paths.join('/') === 'orders/view/return') {
|
|
11886
11918
|
setActionTypeOptions([]);
|
|
11887
11919
|
setLocationOptions([]);
|
|
11888
11920
|
setSelectedClient(null);
|
|
@@ -11890,11 +11922,6 @@ function ReturnClient() {
|
|
|
11890
11922
|
setSelectedLocationValue(null);
|
|
11891
11923
|
}
|
|
11892
11924
|
}, [location.pathname, searchParams]);
|
|
11893
|
-
// useEffect(() => {
|
|
11894
|
-
// if (selectedClientId) {
|
|
11895
|
-
// navigate(`filter/${selectedClientId}`);
|
|
11896
|
-
// }
|
|
11897
|
-
// }, [selectedClientId]);
|
|
11898
11925
|
//API for client data
|
|
11899
11926
|
var _useApiHook = dmsComponentLibrary.useApiHook({
|
|
11900
11927
|
endpoint: "/return_orders/customers/",
|