@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
|
@@ -54,7 +54,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
54
54
|
if (null == r) return {};
|
|
55
55
|
var t = {};
|
|
56
56
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
57
|
-
if (e.
|
|
57
|
+
if (e.includes(n)) continue;
|
|
58
58
|
t[n] = r[n];
|
|
59
59
|
}
|
|
60
60
|
return t;
|
|
@@ -1746,14 +1746,23 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
1746
1746
|
setLoading(returnDataLoad);
|
|
1747
1747
|
if (fetchedOrderData && fetchedOrderData != null && fetchedOrderData.data) {
|
|
1748
1748
|
setReturnData(fetchedOrderData == null ? void 0 : fetchedOrderData.data);
|
|
1749
|
-
if (paginationData
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1749
|
+
if (paginationData) {
|
|
1750
|
+
try {
|
|
1751
|
+
var _JSON$parse = JSON.parse(paginationData),
|
|
1752
|
+
count = _JSON$parse.count,
|
|
1753
|
+
rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded);
|
|
1754
|
+
setPaginationObject(rest);
|
|
1755
|
+
} catch (error) {
|
|
1756
|
+
console.error('Error parsing paginationData:', error);
|
|
1757
|
+
notification.error({
|
|
1758
|
+
message: 'Error',
|
|
1759
|
+
description: 'Failed to parse pagination data'
|
|
1760
|
+
});
|
|
1761
|
+
}
|
|
1753
1762
|
} else {
|
|
1754
1763
|
notification.error({
|
|
1755
1764
|
message: 'Error',
|
|
1756
|
-
description: 'Pagination data is null'
|
|
1765
|
+
description: 'Pagination data is null or undefined'
|
|
1757
1766
|
});
|
|
1758
1767
|
}
|
|
1759
1768
|
}
|
|
@@ -2821,6 +2830,11 @@ var OrderTable = function OrderTable() {
|
|
|
2821
2830
|
color: '#845ADF',
|
|
2822
2831
|
background: 'rgba(132, 90, 223, 0.15)'
|
|
2823
2832
|
};
|
|
2833
|
+
case 'Awaiting':
|
|
2834
|
+
return {
|
|
2835
|
+
color: '#845ADF',
|
|
2836
|
+
background: 'rgba(132, 90, 223, 0.15)'
|
|
2837
|
+
};
|
|
2824
2838
|
case 'Completed':
|
|
2825
2839
|
return {
|
|
2826
2840
|
color: '#1F9254',
|
|
@@ -2939,6 +2953,7 @@ var OrderTable = function OrderTable() {
|
|
|
2939
2953
|
OO: 'On Hold',
|
|
2940
2954
|
SC: 'Sub-Contracted',
|
|
2941
2955
|
'awaiting route': 'Awaiting route',
|
|
2956
|
+
'awaiting confirmation': 'Awaiting',
|
|
2942
2957
|
completed: 'completed',
|
|
2943
2958
|
outstanding: 'Outstanding',
|
|
2944
2959
|
routed: 'Routed'
|
|
@@ -3615,14 +3630,23 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
3615
3630
|
setLoading(loading);
|
|
3616
3631
|
if (fetchedReturnOrderData && fetchedReturnOrderData != null && fetchedReturnOrderData.data) {
|
|
3617
3632
|
setReturnOrderData(fetchedReturnOrderData == null ? void 0 : fetchedReturnOrderData.data);
|
|
3618
|
-
if (paginationData
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3633
|
+
if (paginationData) {
|
|
3634
|
+
try {
|
|
3635
|
+
var _JSON$parse = JSON.parse(paginationData),
|
|
3636
|
+
count = _JSON$parse.count,
|
|
3637
|
+
rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded$3);
|
|
3638
|
+
setPaginationObject(rest);
|
|
3639
|
+
} catch (error) {
|
|
3640
|
+
console.error('Error parsing paginationData:', error);
|
|
3641
|
+
notification.error({
|
|
3642
|
+
message: 'Error',
|
|
3643
|
+
description: 'Failed to parse pagination data'
|
|
3644
|
+
});
|
|
3645
|
+
}
|
|
3622
3646
|
} else {
|
|
3623
3647
|
notification.error({
|
|
3624
3648
|
message: 'Error',
|
|
3625
|
-
description: 'Pagination data is null'
|
|
3649
|
+
description: 'Pagination data is null or undefined'
|
|
3626
3650
|
});
|
|
3627
3651
|
}
|
|
3628
3652
|
}
|
|
@@ -3811,7 +3835,7 @@ function SpokePhoneIcon() {
|
|
|
3811
3835
|
|
|
3812
3836
|
function useCopyToClipboard() {
|
|
3813
3837
|
var copy = /*#__PURE__*/function () {
|
|
3814
|
-
var _ref = _asyncToGenerator(
|
|
3838
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
|
|
3815
3839
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3816
3840
|
while (1) switch (_context.prev = _context.next) {
|
|
3817
3841
|
case 0:
|
|
@@ -5204,7 +5228,7 @@ function useUpdateOrder() {
|
|
|
5204
5228
|
var _useUpdateApiCall = useUpdateApiCall(),
|
|
5205
5229
|
setCallApi = _useUpdateApiCall[1]; //single detail
|
|
5206
5230
|
var update = /*#__PURE__*/function () {
|
|
5207
|
-
var _ref = _asyncToGenerator(
|
|
5231
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
5208
5232
|
var endpoint, signal, requestOptions, response, json;
|
|
5209
5233
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5210
5234
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -5312,7 +5336,7 @@ function OrderDetailsFooter() {
|
|
|
5312
5336
|
return !isSame;
|
|
5313
5337
|
};
|
|
5314
5338
|
var onSave = /*#__PURE__*/function () {
|
|
5315
|
-
var _ref = _asyncToGenerator(
|
|
5339
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5316
5340
|
var _response$data;
|
|
5317
5341
|
var payload, response, _response$data$, _response$data$2;
|
|
5318
5342
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -5430,7 +5454,7 @@ function AddNote() {
|
|
|
5430
5454
|
notificationData = _useState2[0],
|
|
5431
5455
|
setNotificationData = _useState2[1];
|
|
5432
5456
|
var saveNote = /*#__PURE__*/function () {
|
|
5433
|
-
var _ref = _asyncToGenerator(
|
|
5457
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5434
5458
|
var endpoint, payload, response;
|
|
5435
5459
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5436
5460
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -5933,7 +5957,7 @@ var tableColumns = [{
|
|
|
5933
5957
|
function useGetEventNotes() {
|
|
5934
5958
|
var ssoToken = getCookie('id_token');
|
|
5935
5959
|
var perform = /*#__PURE__*/function () {
|
|
5936
|
-
var _ref = _asyncToGenerator(
|
|
5960
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5937
5961
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
5938
5962
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5939
5963
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6018,7 +6042,7 @@ function SystemLogs() {
|
|
|
6018
6042
|
setNotesData = _useEventNotesData[1];
|
|
6019
6043
|
// const gsitId = orderDetails?.gsit_order_id;
|
|
6020
6044
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
6021
|
-
var _ref = _asyncToGenerator(
|
|
6045
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6022
6046
|
var result;
|
|
6023
6047
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6024
6048
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -8222,7 +8246,7 @@ function ConfirmOrder() {
|
|
|
8222
8246
|
return Object.keys(obj).length === 1 && obj.hasOwnProperty('id');
|
|
8223
8247
|
}
|
|
8224
8248
|
var ConfirmOrder = /*#__PURE__*/function () {
|
|
8225
|
-
var _ref = _asyncToGenerator(
|
|
8249
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8226
8250
|
var keysToRemovefromOrders, filteredOrderDetails, filteredPrevOrderDetails, payload, notUpdateOrder, _response$data, _response, formattedDate;
|
|
8227
8251
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8228
8252
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9069,7 +9093,7 @@ function useFetchSingleReminderData() {
|
|
|
9069
9093
|
setLoading = _useFlagsLoading[1];
|
|
9070
9094
|
var ssoToken = getCookie('id_token');
|
|
9071
9095
|
var res = /*#__PURE__*/function () {
|
|
9072
|
-
var _ref = _asyncToGenerator(
|
|
9096
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9073
9097
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
9074
9098
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9075
9099
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9168,7 +9192,7 @@ function useUpdateReminder() {
|
|
|
9168
9192
|
var _useFlagsLoading = useFlagsLoading(),
|
|
9169
9193
|
setLoading = _useFlagsLoading[1];
|
|
9170
9194
|
var update = /*#__PURE__*/function () {
|
|
9171
|
-
var _ref = _asyncToGenerator(
|
|
9195
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
9172
9196
|
var endpoint, requestOptions, response, json;
|
|
9173
9197
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9174
9198
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9238,7 +9262,7 @@ function useFetchReminders() {
|
|
|
9238
9262
|
var _useOrderDetails = useOrderDetails(),
|
|
9239
9263
|
OrderData = _useOrderDetails[0];
|
|
9240
9264
|
var perform = /*#__PURE__*/function () {
|
|
9241
|
-
var _ref = _asyncToGenerator(
|
|
9265
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9242
9266
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
9243
9267
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9244
9268
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9346,7 +9370,7 @@ var ViewReminderModal = function ViewReminderModal() {
|
|
|
9346
9370
|
setCurrentAction(undefined);
|
|
9347
9371
|
};
|
|
9348
9372
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
9349
|
-
var _ref = _asyncToGenerator(
|
|
9373
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9350
9374
|
var result;
|
|
9351
9375
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9352
9376
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9419,7 +9443,7 @@ var ViewReminderModal = function ViewReminderModal() {
|
|
|
9419
9443
|
}));
|
|
9420
9444
|
};
|
|
9421
9445
|
var handleEditReminder = /*#__PURE__*/function () {
|
|
9422
|
-
var _ref2 = _asyncToGenerator(
|
|
9446
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
9423
9447
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
9424
9448
|
while (1) switch (_context2.prev = _context2.next) {
|
|
9425
9449
|
case 0:
|
|
@@ -9740,7 +9764,7 @@ function useCreateReminder() {
|
|
|
9740
9764
|
var _useFlagsLoading = useFlagsLoading(),
|
|
9741
9765
|
setLoading = _useFlagsLoading[1];
|
|
9742
9766
|
var create = /*#__PURE__*/function () {
|
|
9743
|
-
var _ref = _asyncToGenerator(
|
|
9767
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
9744
9768
|
var endpoint, requestOptions, response, json;
|
|
9745
9769
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9746
9770
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9818,7 +9842,7 @@ function useFetchUnresolvedTasks() {
|
|
|
9818
9842
|
var _useOrderDetails = useOrderDetails(),
|
|
9819
9843
|
OrderData = _useOrderDetails[0];
|
|
9820
9844
|
var perform = /*#__PURE__*/function () {
|
|
9821
|
-
var _ref = _asyncToGenerator(
|
|
9845
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9822
9846
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
9823
9847
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9824
9848
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -9968,7 +9992,7 @@ function TaskReminderModal() {
|
|
|
9968
9992
|
setReminderPayload(initialValue);
|
|
9969
9993
|
};
|
|
9970
9994
|
var handleReminderSubmit = /*#__PURE__*/function () {
|
|
9971
|
-
var _ref = _asyncToGenerator(
|
|
9995
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
9972
9996
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9973
9997
|
while (1) switch (_context.prev = _context.next) {
|
|
9974
9998
|
case 0:
|
|
@@ -10018,7 +10042,7 @@ function OrderLock() {
|
|
|
10018
10042
|
setCurrentAction(undefined);
|
|
10019
10043
|
};
|
|
10020
10044
|
var onComplete = /*#__PURE__*/function () {
|
|
10021
|
-
var _ref = _asyncToGenerator(
|
|
10045
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10022
10046
|
var isLocked, payload, response;
|
|
10023
10047
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10024
10048
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -10065,7 +10089,7 @@ function useUpdateFlag() {
|
|
|
10065
10089
|
var _useFlagsLoading = useFlagsLoading(),
|
|
10066
10090
|
setLoading = _useFlagsLoading[1];
|
|
10067
10091
|
var create = /*#__PURE__*/function () {
|
|
10068
|
-
var _ref = _asyncToGenerator(
|
|
10092
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
10069
10093
|
var endpoint, requestOptions, response, json;
|
|
10070
10094
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10071
10095
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -10157,7 +10181,7 @@ function HeaderSection() {
|
|
|
10157
10181
|
setIsModalOpen(false);
|
|
10158
10182
|
};
|
|
10159
10183
|
var saveButton = /*#__PURE__*/function () {
|
|
10160
|
-
var _ref = _asyncToGenerator(
|
|
10184
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10161
10185
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10162
10186
|
while (1) switch (_context.prev = _context.next) {
|
|
10163
10187
|
case 0:
|
|
@@ -10333,7 +10357,7 @@ function ActionSection() {
|
|
|
10333
10357
|
setLoading = _useFlagsLoading[1];
|
|
10334
10358
|
var updateFlag = useUpdateFlag();
|
|
10335
10359
|
var onSubmit = /*#__PURE__*/function () {
|
|
10336
|
-
var _ref = _asyncToGenerator(
|
|
10360
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10337
10361
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10338
10362
|
while (1) switch (_context.prev = _context.next) {
|
|
10339
10363
|
case 0:
|
|
@@ -10440,7 +10464,7 @@ function useFetchSingleFlagsData() {
|
|
|
10440
10464
|
var ssoToken = getCookie('id_token');
|
|
10441
10465
|
console.log(loading, 'loading loading');
|
|
10442
10466
|
var res = /*#__PURE__*/function () {
|
|
10443
|
-
var _ref = _asyncToGenerator(
|
|
10467
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10444
10468
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
10445
10469
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10446
10470
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -10571,7 +10595,7 @@ function ViewFlag() {
|
|
|
10571
10595
|
}
|
|
10572
10596
|
}, [staticData]);
|
|
10573
10597
|
var fetchAndSetSingleFlagData = /*#__PURE__*/function () {
|
|
10574
|
-
var _ref = _asyncToGenerator(
|
|
10598
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10575
10599
|
var result;
|
|
10576
10600
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10577
10601
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -10755,7 +10779,7 @@ function useSystemLogs() {
|
|
|
10755
10779
|
var _useOrderProductSyste = useOrderProductSystemLogs(),
|
|
10756
10780
|
setSystemLogsEvents = _useOrderProductSyste[1];
|
|
10757
10781
|
var perform = /*#__PURE__*/function () {
|
|
10758
|
-
var _ref = _asyncToGenerator(
|
|
10782
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10759
10783
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
10760
10784
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10761
10785
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -11257,7 +11281,6 @@ function OrderView() {
|
|
|
11257
11281
|
useEffect(function () {
|
|
11258
11282
|
setLoading(depotDataLoading);
|
|
11259
11283
|
if (fetchedDepotData && fetchedDepotData.data) {
|
|
11260
|
-
console.log(fetchedDepotData, 'fetchedDepotData');
|
|
11261
11284
|
var requiredData = fetchedDepotData == null ? void 0 : fetchedDepotData.data;
|
|
11262
11285
|
if (requiredData.length > 0) {
|
|
11263
11286
|
var options = requiredData == null ? void 0 : requiredData.map(function (x) {
|
|
@@ -11361,7 +11384,7 @@ function OrderView() {
|
|
|
11361
11384
|
var _useOrderProductSyste = useOrderProductSystemLogs(),
|
|
11362
11385
|
setSystemLogsEvents = _useOrderProductSyste[1];
|
|
11363
11386
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
11364
|
-
var _ref = _asyncToGenerator(
|
|
11387
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
11365
11388
|
var result;
|
|
11366
11389
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
11367
11390
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -11800,14 +11823,23 @@ function ReturnMainTable() {
|
|
|
11800
11823
|
if (fetchedClientData && fetchedClientData.data) {
|
|
11801
11824
|
var result = fetchedClientData == null ? void 0 : fetchedClientData.data;
|
|
11802
11825
|
setClientData(result);
|
|
11803
|
-
if (paginationData
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11826
|
+
if (paginationData) {
|
|
11827
|
+
try {
|
|
11828
|
+
var _JSON$parse = JSON.parse(paginationData),
|
|
11829
|
+
count = _JSON$parse.count,
|
|
11830
|
+
rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded$7);
|
|
11831
|
+
setPaginationObject(rest);
|
|
11832
|
+
} catch (error) {
|
|
11833
|
+
console.error('Error parsing paginationData:', error);
|
|
11834
|
+
notification.error({
|
|
11835
|
+
message: 'Error',
|
|
11836
|
+
description: 'Failed to parse pagination data'
|
|
11837
|
+
});
|
|
11838
|
+
}
|
|
11807
11839
|
} else {
|
|
11808
11840
|
notification.error({
|
|
11809
11841
|
message: 'Error',
|
|
11810
|
-
description: 'Pagination data is null'
|
|
11842
|
+
description: 'Pagination data is null or undefined'
|
|
11811
11843
|
});
|
|
11812
11844
|
}
|
|
11813
11845
|
}
|
|
@@ -11874,7 +11906,7 @@ function ReturnClient() {
|
|
|
11874
11906
|
};
|
|
11875
11907
|
var paths = splitPath(location.pathname);
|
|
11876
11908
|
useEffect(function () {
|
|
11877
|
-
if (paths
|
|
11909
|
+
if (paths.join('/') === 'orders/view/return') {
|
|
11878
11910
|
setActionTypeOptions([]);
|
|
11879
11911
|
setLocationOptions([]);
|
|
11880
11912
|
setSelectedClient(null);
|
|
@@ -11882,19 +11914,13 @@ function ReturnClient() {
|
|
|
11882
11914
|
setSelectedLocationValue(null);
|
|
11883
11915
|
}
|
|
11884
11916
|
}, [location.pathname, searchParams]);
|
|
11885
|
-
// useEffect(() => {
|
|
11886
|
-
// if (selectedClientId) {
|
|
11887
|
-
// navigate(`filter/${selectedClientId}`);
|
|
11888
|
-
// }
|
|
11889
|
-
// }, [selectedClientId]);
|
|
11890
11917
|
//API for client data
|
|
11891
11918
|
var _useApiHook = useApiHook({
|
|
11892
11919
|
endpoint: "/return_orders/customers/",
|
|
11893
11920
|
method: 'GET',
|
|
11894
11921
|
//@ts-ignore
|
|
11895
11922
|
pagination: {
|
|
11896
|
-
|
|
11897
|
-
per_page: 50
|
|
11923
|
+
is_pagination: false
|
|
11898
11924
|
}
|
|
11899
11925
|
}),
|
|
11900
11926
|
fetchedCustomerData = _useApiHook.data,
|