@bjsdistribution/dms-client-return 0.0.39 → 0.0.41
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 +62 -40
- 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 +62 -40
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +38 -9
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +4 -2
- package/src/components/order-daily-overview/table/ReturnTable.tsx +4 -2
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.tsx +0 -2
- package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +1 -1
- package/src/components/order-view/modalsPopup/ModalManager.tsx +5 -4
|
@@ -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;
|
|
@@ -506,7 +506,7 @@ function SpokePhoneIcon() {
|
|
|
506
506
|
|
|
507
507
|
function useCopyToClipboard() {
|
|
508
508
|
var copy = /*#__PURE__*/function () {
|
|
509
|
-
var _ref = _asyncToGenerator(
|
|
509
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
|
|
510
510
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
511
511
|
while (1) switch (_context.prev = _context.next) {
|
|
512
512
|
case 0:
|
|
@@ -2380,7 +2380,7 @@ function useUpdateOrder() {
|
|
|
2380
2380
|
var controller;
|
|
2381
2381
|
var ssoToken = getCookie('id_token');
|
|
2382
2382
|
var update = /*#__PURE__*/function () {
|
|
2383
|
-
var _ref = _asyncToGenerator(
|
|
2383
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
2384
2384
|
var endpoint, signal, requestOptions, response, json;
|
|
2385
2385
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2386
2386
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -2487,7 +2487,7 @@ function OrderDetailsFooter() {
|
|
|
2487
2487
|
return !isSame;
|
|
2488
2488
|
};
|
|
2489
2489
|
var onSave = /*#__PURE__*/function () {
|
|
2490
|
-
var _ref = _asyncToGenerator(
|
|
2490
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
2491
2491
|
var _response$data;
|
|
2492
2492
|
var payload, response, _response$data$, _response$data$2;
|
|
2493
2493
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -2606,7 +2606,7 @@ function AddNote() {
|
|
|
2606
2606
|
notificationData = _useState2[0],
|
|
2607
2607
|
setNotificationData = _useState2[1];
|
|
2608
2608
|
var saveNote = /*#__PURE__*/function () {
|
|
2609
|
-
var _ref = _asyncToGenerator(
|
|
2609
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
2610
2610
|
var endpoint, payload, response, message, error;
|
|
2611
2611
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2612
2612
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -3112,7 +3112,7 @@ var tableColumns = [{
|
|
|
3112
3112
|
function useGetEventNotes() {
|
|
3113
3113
|
var ssoToken = getCookie('id_token');
|
|
3114
3114
|
var perform = /*#__PURE__*/function () {
|
|
3115
|
-
var _ref = _asyncToGenerator(
|
|
3115
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3116
3116
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
3117
3117
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3118
3118
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -3197,7 +3197,7 @@ function SystemLogs() {
|
|
|
3197
3197
|
setNotesData = _useEventNotesData[1];
|
|
3198
3198
|
// const gsitId = orderDetails?.gsit_order_id;
|
|
3199
3199
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
3200
|
-
var _ref = _asyncToGenerator(
|
|
3200
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3201
3201
|
var result;
|
|
3202
3202
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3203
3203
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -5586,7 +5586,7 @@ function ConfirmOrder() {
|
|
|
5586
5586
|
return Object.keys(obj).length === 1 && obj.hasOwnProperty('id');
|
|
5587
5587
|
}
|
|
5588
5588
|
var ConfirmOrder = /*#__PURE__*/function () {
|
|
5589
|
-
var _ref = _asyncToGenerator(
|
|
5589
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5590
5590
|
var keysToRemovefromOrders, filteredOrderDetails, filteredPrevOrderDetails, payload, notUpdateOrder, _response$data, _response;
|
|
5591
5591
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5592
5592
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6404,7 +6404,7 @@ function useFetchSingleReminderData() {
|
|
|
6404
6404
|
setLoading = _useFlagsLoading[1];
|
|
6405
6405
|
var ssoToken = getCookie('id_token');
|
|
6406
6406
|
var res = /*#__PURE__*/function () {
|
|
6407
|
-
var _ref = _asyncToGenerator(
|
|
6407
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6408
6408
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
6409
6409
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6410
6410
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6503,7 +6503,7 @@ function useUpdateReminder() {
|
|
|
6503
6503
|
var _useFlagsLoading = useFlagsLoading(),
|
|
6504
6504
|
setLoading = _useFlagsLoading[1];
|
|
6505
6505
|
var update = /*#__PURE__*/function () {
|
|
6506
|
-
var _ref = _asyncToGenerator(
|
|
6506
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
6507
6507
|
var endpoint, requestOptions, response, json;
|
|
6508
6508
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6509
6509
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6573,7 +6573,7 @@ function useFetchReminders() {
|
|
|
6573
6573
|
var _useOrderDetails = useOrderDetails(),
|
|
6574
6574
|
OrderData = _useOrderDetails[0];
|
|
6575
6575
|
var perform = /*#__PURE__*/function () {
|
|
6576
|
-
var _ref = _asyncToGenerator(
|
|
6576
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6577
6577
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
6578
6578
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6579
6579
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6681,7 +6681,7 @@ var ViewReminderModal = function ViewReminderModal() {
|
|
|
6681
6681
|
setCurrentAction(undefined);
|
|
6682
6682
|
};
|
|
6683
6683
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
6684
|
-
var _ref = _asyncToGenerator(
|
|
6684
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6685
6685
|
var result;
|
|
6686
6686
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6687
6687
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6754,7 +6754,7 @@ var ViewReminderModal = function ViewReminderModal() {
|
|
|
6754
6754
|
}));
|
|
6755
6755
|
};
|
|
6756
6756
|
var handleEditReminder = /*#__PURE__*/function () {
|
|
6757
|
-
var _ref2 = _asyncToGenerator(
|
|
6757
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
6758
6758
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
6759
6759
|
while (1) switch (_context2.prev = _context2.next) {
|
|
6760
6760
|
case 0:
|
|
@@ -7075,7 +7075,7 @@ function useCreateReminder() {
|
|
|
7075
7075
|
var _useFlagsLoading = useFlagsLoading(),
|
|
7076
7076
|
setLoading = _useFlagsLoading[1];
|
|
7077
7077
|
var create = /*#__PURE__*/function () {
|
|
7078
|
-
var _ref = _asyncToGenerator(
|
|
7078
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
7079
7079
|
var endpoint, requestOptions, response, json;
|
|
7080
7080
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7081
7081
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -7153,7 +7153,7 @@ function useFetchUnresolvedTasks() {
|
|
|
7153
7153
|
var _useOrderDetails = useOrderDetails(),
|
|
7154
7154
|
OrderData = _useOrderDetails[0];
|
|
7155
7155
|
var perform = /*#__PURE__*/function () {
|
|
7156
|
-
var _ref = _asyncToGenerator(
|
|
7156
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7157
7157
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
7158
7158
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7159
7159
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -7303,7 +7303,7 @@ function TaskReminderModal() {
|
|
|
7303
7303
|
setReminderPayload(initialValue);
|
|
7304
7304
|
};
|
|
7305
7305
|
var handleReminderSubmit = /*#__PURE__*/function () {
|
|
7306
|
-
var _ref = _asyncToGenerator(
|
|
7306
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7307
7307
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7308
7308
|
while (1) switch (_context.prev = _context.next) {
|
|
7309
7309
|
case 0:
|
|
@@ -7353,7 +7353,7 @@ function OrderLock() {
|
|
|
7353
7353
|
setCurrentAction(undefined);
|
|
7354
7354
|
};
|
|
7355
7355
|
var onComplete = /*#__PURE__*/function () {
|
|
7356
|
-
var _ref = _asyncToGenerator(
|
|
7356
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7357
7357
|
var isLocked, payload, response;
|
|
7358
7358
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7359
7359
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -7400,7 +7400,7 @@ function useUpdateFlag() {
|
|
|
7400
7400
|
var _useFlagsLoading = useFlagsLoading(),
|
|
7401
7401
|
setLoading = _useFlagsLoading[1];
|
|
7402
7402
|
var create = /*#__PURE__*/function () {
|
|
7403
|
-
var _ref = _asyncToGenerator(
|
|
7403
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
7404
7404
|
var endpoint, requestOptions, response, json;
|
|
7405
7405
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7406
7406
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -7492,7 +7492,7 @@ function HeaderSection() {
|
|
|
7492
7492
|
setIsModalOpen(false);
|
|
7493
7493
|
};
|
|
7494
7494
|
var saveButton = /*#__PURE__*/function () {
|
|
7495
|
-
var _ref = _asyncToGenerator(
|
|
7495
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7496
7496
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7497
7497
|
while (1) switch (_context.prev = _context.next) {
|
|
7498
7498
|
case 0:
|
|
@@ -7668,7 +7668,7 @@ function ActionSection() {
|
|
|
7668
7668
|
setLoading = _useFlagsLoading[1];
|
|
7669
7669
|
var updateFlag = useUpdateFlag();
|
|
7670
7670
|
var onSubmit = /*#__PURE__*/function () {
|
|
7671
|
-
var _ref = _asyncToGenerator(
|
|
7671
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7672
7672
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7673
7673
|
while (1) switch (_context.prev = _context.next) {
|
|
7674
7674
|
case 0:
|
|
@@ -7775,7 +7775,7 @@ function useFetchSingleFlagsData() {
|
|
|
7775
7775
|
var ssoToken = getCookie('id_token');
|
|
7776
7776
|
console.log(loading, 'loading loading');
|
|
7777
7777
|
var res = /*#__PURE__*/function () {
|
|
7778
|
-
var _ref = _asyncToGenerator(
|
|
7778
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7779
7779
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
7780
7780
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7781
7781
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -7906,7 +7906,7 @@ function ViewFlag() {
|
|
|
7906
7906
|
}
|
|
7907
7907
|
}, [staticData]);
|
|
7908
7908
|
var fetchAndSetSingleFlagData = /*#__PURE__*/function () {
|
|
7909
|
-
var _ref = _asyncToGenerator(
|
|
7909
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7910
7910
|
var result;
|
|
7911
7911
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7912
7912
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -8090,7 +8090,7 @@ function useSystemLogs() {
|
|
|
8090
8090
|
var _useOrderProductSyste = useOrderProductSystemLogs(),
|
|
8091
8091
|
setSystemLogsEvents = _useOrderProductSyste[1];
|
|
8092
8092
|
var perform = /*#__PURE__*/function () {
|
|
8093
|
-
var _ref = _asyncToGenerator(
|
|
8093
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8094
8094
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
8095
8095
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8096
8096
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -8698,7 +8698,7 @@ function OrderView() {
|
|
|
8698
8698
|
var _useOrderProductSyste = useOrderProductSystemLogs(),
|
|
8699
8699
|
setSystemLogsEvents = _useOrderProductSyste[1];
|
|
8700
8700
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
8701
|
-
var _ref = _asyncToGenerator(
|
|
8701
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8702
8702
|
var result;
|
|
8703
8703
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8704
8704
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -8885,7 +8885,9 @@ function SelectionFilter() {
|
|
|
8885
8885
|
var _useLocationOptions = useLocationOptions(),
|
|
8886
8886
|
locationOptions = _useLocationOptions[0],
|
|
8887
8887
|
setLocationOptions = _useLocationOptions[1];
|
|
8888
|
-
var clientOptions = customers == null ? void 0 : customers.
|
|
8888
|
+
var clientOptions = customers == null ? void 0 : customers.filter(function (option) {
|
|
8889
|
+
return 'customer_id' in option && option.customer_id != null;
|
|
8890
|
+
}).map(function (option) {
|
|
8889
8891
|
var _option$customer_name, _option$customer_name2;
|
|
8890
8892
|
return {
|
|
8891
8893
|
label: (option == null || (_option$customer_name = option.customer_name) == null || (_option$customer_name = _option$customer_name.charAt(0)) == null ? void 0 : _option$customer_name.toUpperCase()) + (option == null || (_option$customer_name2 = option.customer_name) == null ? void 0 : _option$customer_name2.slice(1)),
|
|
@@ -8902,6 +8904,27 @@ function SelectionFilter() {
|
|
|
8902
8904
|
localStorage.setItem('clientName', option == null ? void 0 : option.label);
|
|
8903
8905
|
localStorage.setItem('clientId', value == null ? void 0 : value.toString());
|
|
8904
8906
|
localStorage.setItem('account_number', option == null ? void 0 : option.account_number);
|
|
8907
|
+
var storedClientId = localStorage.getItem('clientId');
|
|
8908
|
+
var filteredClient = clientOptions == null ? void 0 : clientOptions.find(function (client) {
|
|
8909
|
+
return (client == null ? void 0 : client.value) == storedClientId;
|
|
8910
|
+
});
|
|
8911
|
+
if (filteredClient) {
|
|
8912
|
+
var _filteredClient$actio, _filteredClient$retur;
|
|
8913
|
+
var mappedActions = Array.isArray(filteredClient == null ? void 0 : filteredClient.actions) ? filteredClient == null || (_filteredClient$actio = filteredClient.actions) == null ? void 0 : _filteredClient$actio.map(function (action) {
|
|
8914
|
+
return {
|
|
8915
|
+
label: action,
|
|
8916
|
+
value: action
|
|
8917
|
+
};
|
|
8918
|
+
}) : [];
|
|
8919
|
+
setActionTypeOptions(mappedActions);
|
|
8920
|
+
var mappedLocations = Array.isArray(filteredClient == null ? void 0 : filteredClient.return_locations) ? filteredClient == null || (_filteredClient$retur = filteredClient.return_locations) == null ? void 0 : _filteredClient$retur.map(function (location) {
|
|
8921
|
+
return {
|
|
8922
|
+
label: location == null ? void 0 : location.location_name,
|
|
8923
|
+
value: location == null ? void 0 : location.token
|
|
8924
|
+
};
|
|
8925
|
+
}) : [];
|
|
8926
|
+
setLocationOptions(mappedLocations);
|
|
8927
|
+
}
|
|
8905
8928
|
//set payload
|
|
8906
8929
|
setReturnPayload(function (prevState) {
|
|
8907
8930
|
return _extends({}, prevState, {
|
|
@@ -8937,15 +8960,15 @@ function SelectionFilter() {
|
|
|
8937
8960
|
return (client == null ? void 0 : client.value) == storedClientId;
|
|
8938
8961
|
});
|
|
8939
8962
|
if (filteredClient) {
|
|
8940
|
-
var _filteredClient$
|
|
8941
|
-
var mappedActions = Array.isArray(filteredClient == null ? void 0 : filteredClient.actions) ? filteredClient == null || (_filteredClient$
|
|
8963
|
+
var _filteredClient$actio2, _filteredClient$retur2;
|
|
8964
|
+
var mappedActions = Array.isArray(filteredClient == null ? void 0 : filteredClient.actions) ? filteredClient == null || (_filteredClient$actio2 = filteredClient.actions) == null ? void 0 : _filteredClient$actio2.map(function (action) {
|
|
8942
8965
|
return {
|
|
8943
8966
|
label: action,
|
|
8944
8967
|
value: action
|
|
8945
8968
|
};
|
|
8946
8969
|
}) : [];
|
|
8947
8970
|
setActionTypeOptions(mappedActions);
|
|
8948
|
-
var mappedLocations = Array.isArray(filteredClient == null ? void 0 : filteredClient.return_locations) ? filteredClient == null || (_filteredClient$
|
|
8971
|
+
var mappedLocations = Array.isArray(filteredClient == null ? void 0 : filteredClient.return_locations) ? filteredClient == null || (_filteredClient$retur2 = filteredClient.return_locations) == null ? void 0 : _filteredClient$retur2.map(function (location) {
|
|
8949
8972
|
return {
|
|
8950
8973
|
label: location == null ? void 0 : location.location_name,
|
|
8951
8974
|
value: location == null ? void 0 : location.token
|
|
@@ -9408,7 +9431,6 @@ var _templateObject$1V, _templateObject2$1p;
|
|
|
9408
9431
|
var options = optionsForReturnPrint;
|
|
9409
9432
|
var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
|
|
9410
9433
|
var legacyProductId = _ref.legacyProductId;
|
|
9411
|
-
console.log(legacyProductId, 'legacyProductId');
|
|
9412
9434
|
var downloadFiles = function downloadFiles() {
|
|
9413
9435
|
var url = "https://us.toolbox.bjshomedelivery.com/offload/return_label?gsit_products_id=" + legacyProductId;
|
|
9414
9436
|
window.open(url, '_blank'); // Opens the URL in a new tab
|
|
@@ -9708,7 +9730,6 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
9708
9730
|
}, []);
|
|
9709
9731
|
var mergedPayload = Object.values(groupedPayload);
|
|
9710
9732
|
setGrouped(mergedPayload);
|
|
9711
|
-
console.log(mergedPayload, 'mergedPayload');
|
|
9712
9733
|
}, [newpayload]);
|
|
9713
9734
|
return React__default.createElement(React__default.Fragment, null, postLoading && React__default.createElement(Loader, null), React__default.createElement(StyledTableWrapper, {
|
|
9714
9735
|
className: "fortables"
|
|
@@ -9765,7 +9786,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
9765
9786
|
}))) : (sortedData == null ? void 0 : sortedData.length) === 0 ? React__default.createElement("tr", null, React__default.createElement("td", {
|
|
9766
9787
|
colSpan: 14
|
|
9767
9788
|
}, React__default.createElement(EmptyDataContainer$1, null, React__default.createElement(antd.Empty, null)))) : sortedData == null ? void 0 : sortedData.map(function (item, index) {
|
|
9768
|
-
var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$order_data, _item$order_data2, _item$order_product_r3, _item$return_reasons, _item$order_product_r4, _item$order_product_r5, _item$collection_reas;
|
|
9789
|
+
var _item$order_product_r2, _item$orders_products, _item$orders_products2, _item$return_location, _item$order_data, _item$order_data2, _item$order_product_r3, _item$return_reasons, _item$order_product_r4, _item$order_product_r5, _item$collection_reas;
|
|
9769
9790
|
return React__default.createElement("tr", {
|
|
9770
9791
|
key: item.id
|
|
9771
9792
|
}, 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, {
|
|
@@ -9780,7 +9801,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
|
|
|
9780
9801
|
}
|
|
9781
9802
|
})) : null), React__default.createElement("td", null, (item == null || (_item$orders_products = item.orders_products_stock) == null ? void 0 : _item$orders_products.location) !== null && (item == null || (_item$orders_products2 = item.orders_products_stock) == null ? void 0 : _item$orders_products2.location) !== undefined ? item.orders_products_stock.location : React__default.createElement("div", {
|
|
9782
9803
|
className: "awaiting"
|
|
9783
|
-
}, "Awaiting")), React__default.createElement("td", null,
|
|
9804
|
+
}, "Awaiting")), React__default.createElement("td", null, ' ', displayValueOrNA(item == null || (_item$return_location = item.return_locations) == null ? void 0 : _item$return_location.location_name)), React__default.createElement("td", null, React__default.createElement("ul", {
|
|
9784
9805
|
style: {
|
|
9785
9806
|
listStyleType: 'none',
|
|
9786
9807
|
padding: 0
|
|
@@ -9929,6 +9950,7 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
9929
9950
|
padding: 0
|
|
9930
9951
|
}
|
|
9931
9952
|
}, uniqueLocations == null ? void 0 : uniqueLocations.map(function (returnLoc) {
|
|
9953
|
+
var _returnLoc$return_loc;
|
|
9932
9954
|
return React__default.createElement("li", {
|
|
9933
9955
|
key: returnLoc.id,
|
|
9934
9956
|
style: {
|
|
@@ -9945,7 +9967,7 @@ var CreateReturnModal = function CreateReturnModal() {
|
|
|
9945
9967
|
style: {
|
|
9946
9968
|
marginLeft: '8px'
|
|
9947
9969
|
}
|
|
9948
|
-
}, displayValueOrNA(returnLoc == null ? void 0 :
|
|
9970
|
+
}, displayValueOrNA(returnLoc == null || (_returnLoc$return_loc = returnLoc.return_locations) == null ? void 0 : _returnLoc$return_loc.location_name)));
|
|
9949
9971
|
})))));
|
|
9950
9972
|
};
|
|
9951
9973
|
var StyledText$1 = /*#__PURE__*/styled__default.div(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
|
|
@@ -10001,7 +10023,6 @@ var ModalManager = function ModalManager() {
|
|
|
10001
10023
|
response = _useApiHook.data,
|
|
10002
10024
|
setShouldPerformAction = _useApiHook.setShouldPerformAction,
|
|
10003
10025
|
confirmLoading = _useApiHook.loading,
|
|
10004
|
-
apiError = _useApiHook.error,
|
|
10005
10026
|
setError = _useApiHook.setError;
|
|
10006
10027
|
React.useEffect(function () {
|
|
10007
10028
|
SetPostLoading(confirmLoading);
|
|
@@ -10018,11 +10039,12 @@ var ModalManager = function ModalManager() {
|
|
|
10018
10039
|
};
|
|
10019
10040
|
React.useEffect(function () {
|
|
10020
10041
|
// @ts-ignore
|
|
10021
|
-
if (
|
|
10042
|
+
if (response && (response == null ? void 0 : response.code) == 500) {
|
|
10043
|
+
// @ts-ignore
|
|
10022
10044
|
antd.notification.error({
|
|
10023
10045
|
message: 'Failure',
|
|
10024
10046
|
// @ts-ignore
|
|
10025
|
-
description: "" + (
|
|
10047
|
+
description: "" + (response == null ? void 0 : response.message)
|
|
10026
10048
|
});
|
|
10027
10049
|
dispatch({
|
|
10028
10050
|
type: 'close'
|
|
@@ -10055,7 +10077,7 @@ var ModalManager = function ModalManager() {
|
|
|
10055
10077
|
// for dev
|
|
10056
10078
|
navigate('/returnclient/order-return');
|
|
10057
10079
|
}
|
|
10058
|
-
}, [
|
|
10080
|
+
}, [postLoading]);
|
|
10059
10081
|
return React__default.createElement(React__default.Fragment, null, (popupName == null ? void 0 : popupName.state) === 'create-return' && React__default.createElement(React__default.Fragment, null, React__default.createElement(dmsComponentLibrary.AntModal, {
|
|
10060
10082
|
openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
|
|
10061
10083
|
closeModal: function closeModal() {
|
|
@@ -11207,8 +11229,7 @@ var ReturnTable$1 = function ReturnTable() {
|
|
|
11207
11229
|
updatedData = _useState[0],
|
|
11208
11230
|
setUpdatedData = _useState[1];
|
|
11209
11231
|
var _useStatsLoading = useStatsLoading(),
|
|
11210
|
-
statsLoading = _useStatsLoading[0]
|
|
11211
|
-
setLoading = _useStatsLoading[1];
|
|
11232
|
+
statsLoading = _useStatsLoading[0];
|
|
11212
11233
|
var _useOrderStaticData = useOrderStaticData(),
|
|
11213
11234
|
setOrderStaticData = _useOrderStaticData[1];
|
|
11214
11235
|
var _useAtom = jotai.useAtom(filtersReducerAtom),
|
|
@@ -11264,7 +11285,7 @@ var ReturnTable$1 = function ReturnTable() {
|
|
|
11264
11285
|
fetchedStaticData = _useApiHook.data,
|
|
11265
11286
|
staticDataLoading = _useApiHook.loading;
|
|
11266
11287
|
React.useEffect(function () {
|
|
11267
|
-
setLoading(staticDataLoading);
|
|
11288
|
+
// setLoading(staticDataLoading);
|
|
11268
11289
|
if (fetchedStaticData && fetchedStaticData.data) {
|
|
11269
11290
|
var result = fetchedStaticData == null ? void 0 : fetchedStaticData.data;
|
|
11270
11291
|
setOrderStaticData(result[0]);
|
|
@@ -11307,6 +11328,7 @@ var ReturnTable$1 = function ReturnTable() {
|
|
|
11307
11328
|
//for local
|
|
11308
11329
|
// navigate(`/filter/${customerId}`);
|
|
11309
11330
|
};
|
|
11331
|
+
console.log(statsLoading, 'statsLoading');
|
|
11310
11332
|
return React__default.createElement(React__default.Fragment, null, statsLoading && React__default.createElement(Loader, null), React__default.createElement(StyledTableWrapper$2, {
|
|
11311
11333
|
id: "tableScrolling"
|
|
11312
11334
|
}, React__default.createElement(StyledTable$3, null, React__default.createElement("thead", null, React__default.createElement("tr", null, [{
|