@bjsdistribution/dms-client-return 0.0.67 → 0.0.69
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/common/date-picker/header/ClearDate.d.ts +1 -1
- package/dist/components/order-daily-overview/table/table-data/styles.d.ts +3 -3
- package/dist/components/order-daily-overview/table-view/TableStyle.d.ts +4 -4
- package/dist/components/order-view/view-reminder/reminder-styles.d.ts +2 -2
- package/dist/dms-client-return.cjs.development.js +74 -48
- 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 +74 -48
- 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 +11 -18
|
@@ -62,7 +62,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
62
62
|
if (null == r) return {};
|
|
63
63
|
var t = {};
|
|
64
64
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
65
|
-
if (e.
|
|
65
|
+
if (e.includes(n)) continue;
|
|
66
66
|
t[n] = r[n];
|
|
67
67
|
}
|
|
68
68
|
return t;
|
|
@@ -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
|
}
|
|
@@ -3819,7 +3843,7 @@ function SpokePhoneIcon() {
|
|
|
3819
3843
|
|
|
3820
3844
|
function useCopyToClipboard() {
|
|
3821
3845
|
var copy = /*#__PURE__*/function () {
|
|
3822
|
-
var _ref = _asyncToGenerator(
|
|
3846
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
|
|
3823
3847
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3824
3848
|
while (1) switch (_context.prev = _context.next) {
|
|
3825
3849
|
case 0:
|
|
@@ -5212,7 +5236,7 @@ function useUpdateOrder() {
|
|
|
5212
5236
|
var _useUpdateApiCall = useUpdateApiCall(),
|
|
5213
5237
|
setCallApi = _useUpdateApiCall[1]; //single detail
|
|
5214
5238
|
var update = /*#__PURE__*/function () {
|
|
5215
|
-
var _ref = _asyncToGenerator(
|
|
5239
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
5216
5240
|
var endpoint, signal, requestOptions, response, json;
|
|
5217
5241
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5218
5242
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -5320,7 +5344,7 @@ function OrderDetailsFooter() {
|
|
|
5320
5344
|
return !isSame;
|
|
5321
5345
|
};
|
|
5322
5346
|
var onSave = /*#__PURE__*/function () {
|
|
5323
|
-
var _ref = _asyncToGenerator(
|
|
5347
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5324
5348
|
var _response$data;
|
|
5325
5349
|
var payload, response, _response$data$, _response$data$2;
|
|
5326
5350
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -5438,7 +5462,7 @@ function AddNote() {
|
|
|
5438
5462
|
notificationData = _useState2[0],
|
|
5439
5463
|
setNotificationData = _useState2[1];
|
|
5440
5464
|
var saveNote = /*#__PURE__*/function () {
|
|
5441
|
-
var _ref = _asyncToGenerator(
|
|
5465
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5442
5466
|
var endpoint, payload, response;
|
|
5443
5467
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5444
5468
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -5941,7 +5965,7 @@ var tableColumns = [{
|
|
|
5941
5965
|
function useGetEventNotes() {
|
|
5942
5966
|
var ssoToken = getCookie('id_token');
|
|
5943
5967
|
var perform = /*#__PURE__*/function () {
|
|
5944
|
-
var _ref = _asyncToGenerator(
|
|
5968
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5945
5969
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
5946
5970
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5947
5971
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6026,7 +6050,7 @@ function SystemLogs() {
|
|
|
6026
6050
|
setNotesData = _useEventNotesData[1];
|
|
6027
6051
|
// const gsitId = orderDetails?.gsit_order_id;
|
|
6028
6052
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
6029
|
-
var _ref = _asyncToGenerator(
|
|
6053
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6030
6054
|
var result;
|
|
6031
6055
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6032
6056
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -8230,7 +8254,7 @@ function ConfirmOrder() {
|
|
|
8230
8254
|
return Object.keys(obj).length === 1 && obj.hasOwnProperty('id');
|
|
8231
8255
|
}
|
|
8232
8256
|
var ConfirmOrder = /*#__PURE__*/function () {
|
|
8233
|
-
var _ref = _asyncToGenerator(
|
|
8257
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8234
8258
|
var keysToRemovefromOrders, filteredOrderDetails, filteredPrevOrderDetails, payload, notUpdateOrder, _response$data, _response, formattedDate;
|
|
8235
8259
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8236
8260
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9077,7 +9101,7 @@ function useFetchSingleReminderData() {
|
|
|
9077
9101
|
setLoading = _useFlagsLoading[1];
|
|
9078
9102
|
var ssoToken = getCookie('id_token');
|
|
9079
9103
|
var res = /*#__PURE__*/function () {
|
|
9080
|
-
var _ref = _asyncToGenerator(
|
|
9104
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9081
9105
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
9082
9106
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9083
9107
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9176,7 +9200,7 @@ function useUpdateReminder() {
|
|
|
9176
9200
|
var _useFlagsLoading = useFlagsLoading(),
|
|
9177
9201
|
setLoading = _useFlagsLoading[1];
|
|
9178
9202
|
var update = /*#__PURE__*/function () {
|
|
9179
|
-
var _ref = _asyncToGenerator(
|
|
9203
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
9180
9204
|
var endpoint, requestOptions, response, json;
|
|
9181
9205
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9182
9206
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9246,7 +9270,7 @@ function useFetchReminders() {
|
|
|
9246
9270
|
var _useOrderDetails = useOrderDetails(),
|
|
9247
9271
|
OrderData = _useOrderDetails[0];
|
|
9248
9272
|
var perform = /*#__PURE__*/function () {
|
|
9249
|
-
var _ref = _asyncToGenerator(
|
|
9273
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9250
9274
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
9251
9275
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9252
9276
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9354,7 +9378,7 @@ var ViewReminderModal = function ViewReminderModal() {
|
|
|
9354
9378
|
setCurrentAction(undefined);
|
|
9355
9379
|
};
|
|
9356
9380
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
9357
|
-
var _ref = _asyncToGenerator(
|
|
9381
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9358
9382
|
var result;
|
|
9359
9383
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9360
9384
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9427,7 +9451,7 @@ var ViewReminderModal = function ViewReminderModal() {
|
|
|
9427
9451
|
}));
|
|
9428
9452
|
};
|
|
9429
9453
|
var handleEditReminder = /*#__PURE__*/function () {
|
|
9430
|
-
var _ref2 = _asyncToGenerator(
|
|
9454
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
9431
9455
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9432
9456
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9433
9457
|
case 0:
|
|
@@ -9748,7 +9772,7 @@ function useCreateReminder() {
|
|
|
9748
9772
|
var _useFlagsLoading = useFlagsLoading(),
|
|
9749
9773
|
setLoading = _useFlagsLoading[1];
|
|
9750
9774
|
var create = /*#__PURE__*/function () {
|
|
9751
|
-
var _ref = _asyncToGenerator(
|
|
9775
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
9752
9776
|
var endpoint, requestOptions, response, json;
|
|
9753
9777
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9754
9778
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9826,7 +9850,7 @@ function useFetchUnresolvedTasks() {
|
|
|
9826
9850
|
var _useOrderDetails = useOrderDetails(),
|
|
9827
9851
|
OrderData = _useOrderDetails[0];
|
|
9828
9852
|
var perform = /*#__PURE__*/function () {
|
|
9829
|
-
var _ref = _asyncToGenerator(
|
|
9853
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9830
9854
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
9831
9855
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9832
9856
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9976,7 +10000,7 @@ function TaskReminderModal() {
|
|
|
9976
10000
|
setReminderPayload(initialValue);
|
|
9977
10001
|
};
|
|
9978
10002
|
var handleReminderSubmit = /*#__PURE__*/function () {
|
|
9979
|
-
var _ref = _asyncToGenerator(
|
|
10003
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9980
10004
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9981
10005
|
while (1) switch (_context.prev = _context.next) {
|
|
9982
10006
|
case 0:
|
|
@@ -10026,7 +10050,7 @@ function OrderLock() {
|
|
|
10026
10050
|
setCurrentAction(undefined);
|
|
10027
10051
|
};
|
|
10028
10052
|
var onComplete = /*#__PURE__*/function () {
|
|
10029
|
-
var _ref = _asyncToGenerator(
|
|
10053
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10030
10054
|
var isLocked, payload, response;
|
|
10031
10055
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10032
10056
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -10073,7 +10097,7 @@ function useUpdateFlag() {
|
|
|
10073
10097
|
var _useFlagsLoading = useFlagsLoading(),
|
|
10074
10098
|
setLoading = _useFlagsLoading[1];
|
|
10075
10099
|
var create = /*#__PURE__*/function () {
|
|
10076
|
-
var _ref = _asyncToGenerator(
|
|
10100
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
10077
10101
|
var endpoint, requestOptions, response, json;
|
|
10078
10102
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10079
10103
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -10165,7 +10189,7 @@ function HeaderSection() {
|
|
|
10165
10189
|
setIsModalOpen(false);
|
|
10166
10190
|
};
|
|
10167
10191
|
var saveButton = /*#__PURE__*/function () {
|
|
10168
|
-
var _ref = _asyncToGenerator(
|
|
10192
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10169
10193
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10170
10194
|
while (1) switch (_context.prev = _context.next) {
|
|
10171
10195
|
case 0:
|
|
@@ -10341,7 +10365,7 @@ function ActionSection() {
|
|
|
10341
10365
|
setLoading = _useFlagsLoading[1];
|
|
10342
10366
|
var updateFlag = useUpdateFlag();
|
|
10343
10367
|
var onSubmit = /*#__PURE__*/function () {
|
|
10344
|
-
var _ref = _asyncToGenerator(
|
|
10368
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10345
10369
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10346
10370
|
while (1) switch (_context.prev = _context.next) {
|
|
10347
10371
|
case 0:
|
|
@@ -10448,7 +10472,7 @@ function useFetchSingleFlagsData() {
|
|
|
10448
10472
|
var ssoToken = getCookie('id_token');
|
|
10449
10473
|
console.log(loading, 'loading loading');
|
|
10450
10474
|
var res = /*#__PURE__*/function () {
|
|
10451
|
-
var _ref = _asyncToGenerator(
|
|
10475
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10452
10476
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
10453
10477
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10454
10478
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -10579,7 +10603,7 @@ function ViewFlag() {
|
|
|
10579
10603
|
}
|
|
10580
10604
|
}, [staticData]);
|
|
10581
10605
|
var fetchAndSetSingleFlagData = /*#__PURE__*/function () {
|
|
10582
|
-
var _ref = _asyncToGenerator(
|
|
10606
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10583
10607
|
var result;
|
|
10584
10608
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10585
10609
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -10763,7 +10787,7 @@ function useSystemLogs() {
|
|
|
10763
10787
|
var _useOrderProductSyste = useOrderProductSystemLogs(),
|
|
10764
10788
|
setSystemLogsEvents = _useOrderProductSyste[1];
|
|
10765
10789
|
var perform = /*#__PURE__*/function () {
|
|
10766
|
-
var _ref = _asyncToGenerator(
|
|
10790
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10767
10791
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
10768
10792
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10769
10793
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -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) {
|
|
@@ -11369,7 +11392,7 @@ function OrderView() {
|
|
|
11369
11392
|
var _useOrderProductSyste = useOrderProductSystemLogs(),
|
|
11370
11393
|
setSystemLogsEvents = _useOrderProductSyste[1];
|
|
11371
11394
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
11372
|
-
var _ref = _asyncToGenerator(
|
|
11395
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11373
11396
|
var result;
|
|
11374
11397
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11375
11398
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -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,19 +11922,13 @@ 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/",
|
|
11901
11928
|
method: 'GET',
|
|
11902
11929
|
//@ts-ignore
|
|
11903
11930
|
pagination: {
|
|
11904
|
-
|
|
11905
|
-
per_page: 50
|
|
11931
|
+
is_pagination: false
|
|
11906
11932
|
}
|
|
11907
11933
|
}),
|
|
11908
11934
|
fetchedCustomerData = _useApiHook.data,
|