@bjsdistribution/dms-client-return 0.0.40 → 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 +52 -31
- 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 +52 -31
- 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 +25 -0
- package/src/components/order-view/modalsPopup/ModalManager.tsx +5 -4
|
@@ -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;
|
|
@@ -498,7 +498,7 @@ function SpokePhoneIcon() {
|
|
|
498
498
|
|
|
499
499
|
function useCopyToClipboard() {
|
|
500
500
|
var copy = /*#__PURE__*/function () {
|
|
501
|
-
var _ref = _asyncToGenerator(
|
|
501
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
|
|
502
502
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
503
503
|
while (1) switch (_context.prev = _context.next) {
|
|
504
504
|
case 0:
|
|
@@ -2372,7 +2372,7 @@ function useUpdateOrder() {
|
|
|
2372
2372
|
var controller;
|
|
2373
2373
|
var ssoToken = getCookie('id_token');
|
|
2374
2374
|
var update = /*#__PURE__*/function () {
|
|
2375
|
-
var _ref = _asyncToGenerator(
|
|
2375
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
2376
2376
|
var endpoint, signal, requestOptions, response, json;
|
|
2377
2377
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2378
2378
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -2479,7 +2479,7 @@ function OrderDetailsFooter() {
|
|
|
2479
2479
|
return !isSame;
|
|
2480
2480
|
};
|
|
2481
2481
|
var onSave = /*#__PURE__*/function () {
|
|
2482
|
-
var _ref = _asyncToGenerator(
|
|
2482
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
2483
2483
|
var _response$data;
|
|
2484
2484
|
var payload, response, _response$data$, _response$data$2;
|
|
2485
2485
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -2598,7 +2598,7 @@ function AddNote() {
|
|
|
2598
2598
|
notificationData = _useState2[0],
|
|
2599
2599
|
setNotificationData = _useState2[1];
|
|
2600
2600
|
var saveNote = /*#__PURE__*/function () {
|
|
2601
|
-
var _ref = _asyncToGenerator(
|
|
2601
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
2602
2602
|
var endpoint, payload, response, message, error;
|
|
2603
2603
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
2604
2604
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -3104,7 +3104,7 @@ var tableColumns = [{
|
|
|
3104
3104
|
function useGetEventNotes() {
|
|
3105
3105
|
var ssoToken = getCookie('id_token');
|
|
3106
3106
|
var perform = /*#__PURE__*/function () {
|
|
3107
|
-
var _ref = _asyncToGenerator(
|
|
3107
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3108
3108
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
3109
3109
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3110
3110
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -3189,7 +3189,7 @@ function SystemLogs() {
|
|
|
3189
3189
|
setNotesData = _useEventNotesData[1];
|
|
3190
3190
|
// const gsitId = orderDetails?.gsit_order_id;
|
|
3191
3191
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
3192
|
-
var _ref = _asyncToGenerator(
|
|
3192
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
3193
3193
|
var result;
|
|
3194
3194
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
3195
3195
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -5578,7 +5578,7 @@ function ConfirmOrder() {
|
|
|
5578
5578
|
return Object.keys(obj).length === 1 && obj.hasOwnProperty('id');
|
|
5579
5579
|
}
|
|
5580
5580
|
var ConfirmOrder = /*#__PURE__*/function () {
|
|
5581
|
-
var _ref = _asyncToGenerator(
|
|
5581
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
5582
5582
|
var keysToRemovefromOrders, filteredOrderDetails, filteredPrevOrderDetails, payload, notUpdateOrder, _response$data, _response;
|
|
5583
5583
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5584
5584
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6396,7 +6396,7 @@ function useFetchSingleReminderData() {
|
|
|
6396
6396
|
setLoading = _useFlagsLoading[1];
|
|
6397
6397
|
var ssoToken = getCookie('id_token');
|
|
6398
6398
|
var res = /*#__PURE__*/function () {
|
|
6399
|
-
var _ref = _asyncToGenerator(
|
|
6399
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6400
6400
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
6401
6401
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6402
6402
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6495,7 +6495,7 @@ function useUpdateReminder() {
|
|
|
6495
6495
|
var _useFlagsLoading = useFlagsLoading(),
|
|
6496
6496
|
setLoading = _useFlagsLoading[1];
|
|
6497
6497
|
var update = /*#__PURE__*/function () {
|
|
6498
|
-
var _ref = _asyncToGenerator(
|
|
6498
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
6499
6499
|
var endpoint, requestOptions, response, json;
|
|
6500
6500
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6501
6501
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6565,7 +6565,7 @@ function useFetchReminders() {
|
|
|
6565
6565
|
var _useOrderDetails = useOrderDetails(),
|
|
6566
6566
|
OrderData = _useOrderDetails[0];
|
|
6567
6567
|
var perform = /*#__PURE__*/function () {
|
|
6568
|
-
var _ref = _asyncToGenerator(
|
|
6568
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6569
6569
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
6570
6570
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6571
6571
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6673,7 +6673,7 @@ var ViewReminderModal = function ViewReminderModal() {
|
|
|
6673
6673
|
setCurrentAction(undefined);
|
|
6674
6674
|
};
|
|
6675
6675
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
6676
|
-
var _ref = _asyncToGenerator(
|
|
6676
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
6677
6677
|
var result;
|
|
6678
6678
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
6679
6679
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -6746,7 +6746,7 @@ var ViewReminderModal = function ViewReminderModal() {
|
|
|
6746
6746
|
}));
|
|
6747
6747
|
};
|
|
6748
6748
|
var handleEditReminder = /*#__PURE__*/function () {
|
|
6749
|
-
var _ref2 = _asyncToGenerator(
|
|
6749
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
6750
6750
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
6751
6751
|
while (1) switch (_context2.prev = _context2.next) {
|
|
6752
6752
|
case 0:
|
|
@@ -7067,7 +7067,7 @@ function useCreateReminder() {
|
|
|
7067
7067
|
var _useFlagsLoading = useFlagsLoading(),
|
|
7068
7068
|
setLoading = _useFlagsLoading[1];
|
|
7069
7069
|
var create = /*#__PURE__*/function () {
|
|
7070
|
-
var _ref = _asyncToGenerator(
|
|
7070
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
7071
7071
|
var endpoint, requestOptions, response, json;
|
|
7072
7072
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7073
7073
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -7145,7 +7145,7 @@ function useFetchUnresolvedTasks() {
|
|
|
7145
7145
|
var _useOrderDetails = useOrderDetails(),
|
|
7146
7146
|
OrderData = _useOrderDetails[0];
|
|
7147
7147
|
var perform = /*#__PURE__*/function () {
|
|
7148
|
-
var _ref = _asyncToGenerator(
|
|
7148
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7149
7149
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
7150
7150
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7151
7151
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -7295,7 +7295,7 @@ function TaskReminderModal() {
|
|
|
7295
7295
|
setReminderPayload(initialValue);
|
|
7296
7296
|
};
|
|
7297
7297
|
var handleReminderSubmit = /*#__PURE__*/function () {
|
|
7298
|
-
var _ref = _asyncToGenerator(
|
|
7298
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7299
7299
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7300
7300
|
while (1) switch (_context.prev = _context.next) {
|
|
7301
7301
|
case 0:
|
|
@@ -7345,7 +7345,7 @@ function OrderLock() {
|
|
|
7345
7345
|
setCurrentAction(undefined);
|
|
7346
7346
|
};
|
|
7347
7347
|
var onComplete = /*#__PURE__*/function () {
|
|
7348
|
-
var _ref = _asyncToGenerator(
|
|
7348
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7349
7349
|
var isLocked, payload, response;
|
|
7350
7350
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7351
7351
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -7392,7 +7392,7 @@ function useUpdateFlag() {
|
|
|
7392
7392
|
var _useFlagsLoading = useFlagsLoading(),
|
|
7393
7393
|
setLoading = _useFlagsLoading[1];
|
|
7394
7394
|
var create = /*#__PURE__*/function () {
|
|
7395
|
-
var _ref = _asyncToGenerator(
|
|
7395
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
|
|
7396
7396
|
var endpoint, requestOptions, response, json;
|
|
7397
7397
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7398
7398
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -7484,7 +7484,7 @@ function HeaderSection() {
|
|
|
7484
7484
|
setIsModalOpen(false);
|
|
7485
7485
|
};
|
|
7486
7486
|
var saveButton = /*#__PURE__*/function () {
|
|
7487
|
-
var _ref = _asyncToGenerator(
|
|
7487
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7488
7488
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7489
7489
|
while (1) switch (_context.prev = _context.next) {
|
|
7490
7490
|
case 0:
|
|
@@ -7660,7 +7660,7 @@ function ActionSection() {
|
|
|
7660
7660
|
setLoading = _useFlagsLoading[1];
|
|
7661
7661
|
var updateFlag = useUpdateFlag();
|
|
7662
7662
|
var onSubmit = /*#__PURE__*/function () {
|
|
7663
|
-
var _ref = _asyncToGenerator(
|
|
7663
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7664
7664
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7665
7665
|
while (1) switch (_context.prev = _context.next) {
|
|
7666
7666
|
case 0:
|
|
@@ -7767,7 +7767,7 @@ function useFetchSingleFlagsData() {
|
|
|
7767
7767
|
var ssoToken = getCookie('id_token');
|
|
7768
7768
|
console.log(loading, 'loading loading');
|
|
7769
7769
|
var res = /*#__PURE__*/function () {
|
|
7770
|
-
var _ref = _asyncToGenerator(
|
|
7770
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7771
7771
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
7772
7772
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7773
7773
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -7898,7 +7898,7 @@ function ViewFlag() {
|
|
|
7898
7898
|
}
|
|
7899
7899
|
}, [staticData]);
|
|
7900
7900
|
var fetchAndSetSingleFlagData = /*#__PURE__*/function () {
|
|
7901
|
-
var _ref = _asyncToGenerator(
|
|
7901
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
7902
7902
|
var result;
|
|
7903
7903
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
7904
7904
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -8082,7 +8082,7 @@ function useSystemLogs() {
|
|
|
8082
8082
|
var _useOrderProductSyste = useOrderProductSystemLogs(),
|
|
8083
8083
|
setSystemLogsEvents = _useOrderProductSyste[1];
|
|
8084
8084
|
var perform = /*#__PURE__*/function () {
|
|
8085
|
-
var _ref = _asyncToGenerator(
|
|
8085
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8086
8086
|
var endpoint, headers, response, _detail$, _json, detail, msg, json;
|
|
8087
8087
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8088
8088
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -8690,7 +8690,7 @@ function OrderView() {
|
|
|
8690
8690
|
var _useOrderProductSyste = useOrderProductSystemLogs(),
|
|
8691
8691
|
setSystemLogsEvents = _useOrderProductSyste[1];
|
|
8692
8692
|
var fetchReminderData = /*#__PURE__*/function () {
|
|
8693
|
-
var _ref = _asyncToGenerator(
|
|
8693
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8694
8694
|
var result;
|
|
8695
8695
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8696
8696
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -8896,6 +8896,27 @@ function SelectionFilter() {
|
|
|
8896
8896
|
localStorage.setItem('clientName', option == null ? void 0 : option.label);
|
|
8897
8897
|
localStorage.setItem('clientId', value == null ? void 0 : value.toString());
|
|
8898
8898
|
localStorage.setItem('account_number', option == null ? void 0 : option.account_number);
|
|
8899
|
+
var storedClientId = localStorage.getItem('clientId');
|
|
8900
|
+
var filteredClient = clientOptions == null ? void 0 : clientOptions.find(function (client) {
|
|
8901
|
+
return (client == null ? void 0 : client.value) == storedClientId;
|
|
8902
|
+
});
|
|
8903
|
+
if (filteredClient) {
|
|
8904
|
+
var _filteredClient$actio, _filteredClient$retur;
|
|
8905
|
+
var mappedActions = Array.isArray(filteredClient == null ? void 0 : filteredClient.actions) ? filteredClient == null || (_filteredClient$actio = filteredClient.actions) == null ? void 0 : _filteredClient$actio.map(function (action) {
|
|
8906
|
+
return {
|
|
8907
|
+
label: action,
|
|
8908
|
+
value: action
|
|
8909
|
+
};
|
|
8910
|
+
}) : [];
|
|
8911
|
+
setActionTypeOptions(mappedActions);
|
|
8912
|
+
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) {
|
|
8913
|
+
return {
|
|
8914
|
+
label: location == null ? void 0 : location.location_name,
|
|
8915
|
+
value: location == null ? void 0 : location.token
|
|
8916
|
+
};
|
|
8917
|
+
}) : [];
|
|
8918
|
+
setLocationOptions(mappedLocations);
|
|
8919
|
+
}
|
|
8899
8920
|
//set payload
|
|
8900
8921
|
setReturnPayload(function (prevState) {
|
|
8901
8922
|
return _extends({}, prevState, {
|
|
@@ -8931,15 +8952,15 @@ function SelectionFilter() {
|
|
|
8931
8952
|
return (client == null ? void 0 : client.value) == storedClientId;
|
|
8932
8953
|
});
|
|
8933
8954
|
if (filteredClient) {
|
|
8934
|
-
var _filteredClient$
|
|
8935
|
-
var mappedActions = Array.isArray(filteredClient == null ? void 0 : filteredClient.actions) ? filteredClient == null || (_filteredClient$
|
|
8955
|
+
var _filteredClient$actio2, _filteredClient$retur2;
|
|
8956
|
+
var mappedActions = Array.isArray(filteredClient == null ? void 0 : filteredClient.actions) ? filteredClient == null || (_filteredClient$actio2 = filteredClient.actions) == null ? void 0 : _filteredClient$actio2.map(function (action) {
|
|
8936
8957
|
return {
|
|
8937
8958
|
label: action,
|
|
8938
8959
|
value: action
|
|
8939
8960
|
};
|
|
8940
8961
|
}) : [];
|
|
8941
8962
|
setActionTypeOptions(mappedActions);
|
|
8942
|
-
var mappedLocations = Array.isArray(filteredClient == null ? void 0 : filteredClient.return_locations) ? filteredClient == null || (_filteredClient$
|
|
8963
|
+
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) {
|
|
8943
8964
|
return {
|
|
8944
8965
|
label: location == null ? void 0 : location.location_name,
|
|
8945
8966
|
value: location == null ? void 0 : location.token
|
|
@@ -9994,7 +10015,6 @@ var ModalManager = function ModalManager() {
|
|
|
9994
10015
|
response = _useApiHook.data,
|
|
9995
10016
|
setShouldPerformAction = _useApiHook.setShouldPerformAction,
|
|
9996
10017
|
confirmLoading = _useApiHook.loading,
|
|
9997
|
-
apiError = _useApiHook.error,
|
|
9998
10018
|
setError = _useApiHook.setError;
|
|
9999
10019
|
useEffect(function () {
|
|
10000
10020
|
SetPostLoading(confirmLoading);
|
|
@@ -10011,11 +10031,12 @@ var ModalManager = function ModalManager() {
|
|
|
10011
10031
|
};
|
|
10012
10032
|
useEffect(function () {
|
|
10013
10033
|
// @ts-ignore
|
|
10014
|
-
if (
|
|
10034
|
+
if (response && (response == null ? void 0 : response.code) == 500) {
|
|
10035
|
+
// @ts-ignore
|
|
10015
10036
|
notification.error({
|
|
10016
10037
|
message: 'Failure',
|
|
10017
10038
|
// @ts-ignore
|
|
10018
|
-
description: "" + (
|
|
10039
|
+
description: "" + (response == null ? void 0 : response.message)
|
|
10019
10040
|
});
|
|
10020
10041
|
dispatch({
|
|
10021
10042
|
type: 'close'
|
|
@@ -10048,7 +10069,7 @@ var ModalManager = function ModalManager() {
|
|
|
10048
10069
|
// for dev
|
|
10049
10070
|
navigate('/returnclient/order-return');
|
|
10050
10071
|
}
|
|
10051
|
-
}, [
|
|
10072
|
+
}, [postLoading]);
|
|
10052
10073
|
return React.createElement(React.Fragment, null, (popupName == null ? void 0 : popupName.state) === 'create-return' && React.createElement(React.Fragment, null, React.createElement(AntModal, {
|
|
10053
10074
|
openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
|
|
10054
10075
|
closeModal: function closeModal() {
|