@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
|
@@ -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) {
|
|
@@ -8904,6 +8904,27 @@ function SelectionFilter() {
|
|
|
8904
8904
|
localStorage.setItem('clientName', option == null ? void 0 : option.label);
|
|
8905
8905
|
localStorage.setItem('clientId', value == null ? void 0 : value.toString());
|
|
8906
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
|
+
}
|
|
8907
8928
|
//set payload
|
|
8908
8929
|
setReturnPayload(function (prevState) {
|
|
8909
8930
|
return _extends({}, prevState, {
|
|
@@ -8939,15 +8960,15 @@ function SelectionFilter() {
|
|
|
8939
8960
|
return (client == null ? void 0 : client.value) == storedClientId;
|
|
8940
8961
|
});
|
|
8941
8962
|
if (filteredClient) {
|
|
8942
|
-
var _filteredClient$
|
|
8943
|
-
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) {
|
|
8944
8965
|
return {
|
|
8945
8966
|
label: action,
|
|
8946
8967
|
value: action
|
|
8947
8968
|
};
|
|
8948
8969
|
}) : [];
|
|
8949
8970
|
setActionTypeOptions(mappedActions);
|
|
8950
|
-
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) {
|
|
8951
8972
|
return {
|
|
8952
8973
|
label: location == null ? void 0 : location.location_name,
|
|
8953
8974
|
value: location == null ? void 0 : location.token
|
|
@@ -10002,7 +10023,6 @@ var ModalManager = function ModalManager() {
|
|
|
10002
10023
|
response = _useApiHook.data,
|
|
10003
10024
|
setShouldPerformAction = _useApiHook.setShouldPerformAction,
|
|
10004
10025
|
confirmLoading = _useApiHook.loading,
|
|
10005
|
-
apiError = _useApiHook.error,
|
|
10006
10026
|
setError = _useApiHook.setError;
|
|
10007
10027
|
React.useEffect(function () {
|
|
10008
10028
|
SetPostLoading(confirmLoading);
|
|
@@ -10019,11 +10039,12 @@ var ModalManager = function ModalManager() {
|
|
|
10019
10039
|
};
|
|
10020
10040
|
React.useEffect(function () {
|
|
10021
10041
|
// @ts-ignore
|
|
10022
|
-
if (
|
|
10042
|
+
if (response && (response == null ? void 0 : response.code) == 500) {
|
|
10043
|
+
// @ts-ignore
|
|
10023
10044
|
antd.notification.error({
|
|
10024
10045
|
message: 'Failure',
|
|
10025
10046
|
// @ts-ignore
|
|
10026
|
-
description: "" + (
|
|
10047
|
+
description: "" + (response == null ? void 0 : response.message)
|
|
10027
10048
|
});
|
|
10028
10049
|
dispatch({
|
|
10029
10050
|
type: 'close'
|
|
@@ -10056,7 +10077,7 @@ var ModalManager = function ModalManager() {
|
|
|
10056
10077
|
// for dev
|
|
10057
10078
|
navigate('/returnclient/order-return');
|
|
10058
10079
|
}
|
|
10059
|
-
}, [
|
|
10080
|
+
}, [postLoading]);
|
|
10060
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, {
|
|
10061
10082
|
openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
|
|
10062
10083
|
closeModal: function closeModal() {
|