@bjsdistribution/dms-client-return 0.0.68 → 0.0.70

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.
@@ -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.indexOf(n) >= 0) continue;
57
+ if (e.includes(n)) continue;
58
58
  t[n] = r[n];
59
59
  }
60
60
  return t;
@@ -2830,11 +2830,6 @@ var OrderTable = function OrderTable() {
2830
2830
  color: '#845ADF',
2831
2831
  background: 'rgba(132, 90, 223, 0.15)'
2832
2832
  };
2833
- case 'Awaiting':
2834
- return {
2835
- color: '#845ADF',
2836
- background: 'rgba(132, 90, 223, 0.15)'
2837
- };
2838
2833
  case 'Completed':
2839
2834
  return {
2840
2835
  color: '#1F9254',
@@ -2953,7 +2948,6 @@ var OrderTable = function OrderTable() {
2953
2948
  OO: 'On Hold',
2954
2949
  SC: 'Sub-Contracted',
2955
2950
  'awaiting route': 'Awaiting route',
2956
- 'awaiting confirmation': 'Awaiting',
2957
2951
  completed: 'completed',
2958
2952
  outstanding: 'Outstanding',
2959
2953
  routed: 'Routed'
@@ -3835,7 +3829,7 @@ function SpokePhoneIcon() {
3835
3829
 
3836
3830
  function useCopyToClipboard() {
3837
3831
  var copy = /*#__PURE__*/function () {
3838
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
3832
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(text) {
3839
3833
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3840
3834
  while (1) switch (_context.prev = _context.next) {
3841
3835
  case 0:
@@ -5228,7 +5222,7 @@ function useUpdateOrder() {
5228
5222
  var _useUpdateApiCall = useUpdateApiCall(),
5229
5223
  setCallApi = _useUpdateApiCall[1]; //single detail
5230
5224
  var update = /*#__PURE__*/function () {
5231
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
5225
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
5232
5226
  var endpoint, signal, requestOptions, response, json;
5233
5227
  return _regeneratorRuntime().wrap(function _callee$(_context) {
5234
5228
  while (1) switch (_context.prev = _context.next) {
@@ -5336,7 +5330,7 @@ function OrderDetailsFooter() {
5336
5330
  return !isSame;
5337
5331
  };
5338
5332
  var onSave = /*#__PURE__*/function () {
5339
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5333
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5340
5334
  var _response$data;
5341
5335
  var payload, response, _response$data$, _response$data$2;
5342
5336
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -5454,7 +5448,7 @@ function AddNote() {
5454
5448
  notificationData = _useState2[0],
5455
5449
  setNotificationData = _useState2[1];
5456
5450
  var saveNote = /*#__PURE__*/function () {
5457
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5451
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5458
5452
  var endpoint, payload, response;
5459
5453
  return _regeneratorRuntime().wrap(function _callee$(_context) {
5460
5454
  while (1) switch (_context.prev = _context.next) {
@@ -5957,7 +5951,7 @@ var tableColumns = [{
5957
5951
  function useGetEventNotes() {
5958
5952
  var ssoToken = getCookie('id_token');
5959
5953
  var perform = /*#__PURE__*/function () {
5960
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5954
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5961
5955
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
5962
5956
  return _regeneratorRuntime().wrap(function _callee$(_context) {
5963
5957
  while (1) switch (_context.prev = _context.next) {
@@ -6042,7 +6036,7 @@ function SystemLogs() {
6042
6036
  setNotesData = _useEventNotesData[1];
6043
6037
  // const gsitId = orderDetails?.gsit_order_id;
6044
6038
  var fetchReminderData = /*#__PURE__*/function () {
6045
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6039
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
6046
6040
  var result;
6047
6041
  return _regeneratorRuntime().wrap(function _callee$(_context) {
6048
6042
  while (1) switch (_context.prev = _context.next) {
@@ -8246,7 +8240,7 @@ function ConfirmOrder() {
8246
8240
  return Object.keys(obj).length === 1 && obj.hasOwnProperty('id');
8247
8241
  }
8248
8242
  var ConfirmOrder = /*#__PURE__*/function () {
8249
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8243
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
8250
8244
  var keysToRemovefromOrders, filteredOrderDetails, filteredPrevOrderDetails, payload, notUpdateOrder, _response$data, _response, formattedDate;
8251
8245
  return _regeneratorRuntime().wrap(function _callee$(_context) {
8252
8246
  while (1) switch (_context.prev = _context.next) {
@@ -9093,7 +9087,7 @@ function useFetchSingleReminderData() {
9093
9087
  setLoading = _useFlagsLoading[1];
9094
9088
  var ssoToken = getCookie('id_token');
9095
9089
  var res = /*#__PURE__*/function () {
9096
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9090
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9097
9091
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
9098
9092
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9099
9093
  while (1) switch (_context.prev = _context.next) {
@@ -9192,7 +9186,7 @@ function useUpdateReminder() {
9192
9186
  var _useFlagsLoading = useFlagsLoading(),
9193
9187
  setLoading = _useFlagsLoading[1];
9194
9188
  var update = /*#__PURE__*/function () {
9195
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
9189
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
9196
9190
  var endpoint, requestOptions, response, json;
9197
9191
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9198
9192
  while (1) switch (_context.prev = _context.next) {
@@ -9262,7 +9256,7 @@ function useFetchReminders() {
9262
9256
  var _useOrderDetails = useOrderDetails(),
9263
9257
  OrderData = _useOrderDetails[0];
9264
9258
  var perform = /*#__PURE__*/function () {
9265
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9259
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9266
9260
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
9267
9261
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9268
9262
  while (1) switch (_context.prev = _context.next) {
@@ -9370,7 +9364,7 @@ var ViewReminderModal = function ViewReminderModal() {
9370
9364
  setCurrentAction(undefined);
9371
9365
  };
9372
9366
  var fetchReminderData = /*#__PURE__*/function () {
9373
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9367
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9374
9368
  var result;
9375
9369
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9376
9370
  while (1) switch (_context.prev = _context.next) {
@@ -9443,7 +9437,7 @@ var ViewReminderModal = function ViewReminderModal() {
9443
9437
  }));
9444
9438
  };
9445
9439
  var handleEditReminder = /*#__PURE__*/function () {
9446
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
9440
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
9447
9441
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
9448
9442
  while (1) switch (_context2.prev = _context2.next) {
9449
9443
  case 0:
@@ -9764,7 +9758,7 @@ function useCreateReminder() {
9764
9758
  var _useFlagsLoading = useFlagsLoading(),
9765
9759
  setLoading = _useFlagsLoading[1];
9766
9760
  var create = /*#__PURE__*/function () {
9767
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
9761
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
9768
9762
  var endpoint, requestOptions, response, json;
9769
9763
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9770
9764
  while (1) switch (_context.prev = _context.next) {
@@ -9842,7 +9836,7 @@ function useFetchUnresolvedTasks() {
9842
9836
  var _useOrderDetails = useOrderDetails(),
9843
9837
  OrderData = _useOrderDetails[0];
9844
9838
  var perform = /*#__PURE__*/function () {
9845
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9839
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9846
9840
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
9847
9841
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9848
9842
  while (1) switch (_context.prev = _context.next) {
@@ -9992,7 +9986,7 @@ function TaskReminderModal() {
9992
9986
  setReminderPayload(initialValue);
9993
9987
  };
9994
9988
  var handleReminderSubmit = /*#__PURE__*/function () {
9995
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9989
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
9996
9990
  return _regeneratorRuntime().wrap(function _callee$(_context) {
9997
9991
  while (1) switch (_context.prev = _context.next) {
9998
9992
  case 0:
@@ -10042,7 +10036,7 @@ function OrderLock() {
10042
10036
  setCurrentAction(undefined);
10043
10037
  };
10044
10038
  var onComplete = /*#__PURE__*/function () {
10045
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10039
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10046
10040
  var isLocked, payload, response;
10047
10041
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10048
10042
  while (1) switch (_context.prev = _context.next) {
@@ -10089,7 +10083,7 @@ function useUpdateFlag() {
10089
10083
  var _useFlagsLoading = useFlagsLoading(),
10090
10084
  setLoading = _useFlagsLoading[1];
10091
10085
  var create = /*#__PURE__*/function () {
10092
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
10086
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
10093
10087
  var endpoint, requestOptions, response, json;
10094
10088
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10095
10089
  while (1) switch (_context.prev = _context.next) {
@@ -10181,7 +10175,7 @@ function HeaderSection() {
10181
10175
  setIsModalOpen(false);
10182
10176
  };
10183
10177
  var saveButton = /*#__PURE__*/function () {
10184
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10178
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10185
10179
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10186
10180
  while (1) switch (_context.prev = _context.next) {
10187
10181
  case 0:
@@ -10357,7 +10351,7 @@ function ActionSection() {
10357
10351
  setLoading = _useFlagsLoading[1];
10358
10352
  var updateFlag = useUpdateFlag();
10359
10353
  var onSubmit = /*#__PURE__*/function () {
10360
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10354
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10361
10355
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10362
10356
  while (1) switch (_context.prev = _context.next) {
10363
10357
  case 0:
@@ -10464,7 +10458,7 @@ function useFetchSingleFlagsData() {
10464
10458
  var ssoToken = getCookie('id_token');
10465
10459
  console.log(loading, 'loading loading');
10466
10460
  var res = /*#__PURE__*/function () {
10467
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10461
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10468
10462
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
10469
10463
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10470
10464
  while (1) switch (_context.prev = _context.next) {
@@ -10595,7 +10589,7 @@ function ViewFlag() {
10595
10589
  }
10596
10590
  }, [staticData]);
10597
10591
  var fetchAndSetSingleFlagData = /*#__PURE__*/function () {
10598
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10592
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10599
10593
  var result;
10600
10594
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10601
10595
  while (1) switch (_context.prev = _context.next) {
@@ -10779,7 +10773,7 @@ function useSystemLogs() {
10779
10773
  var _useOrderProductSyste = useOrderProductSystemLogs(),
10780
10774
  setSystemLogsEvents = _useOrderProductSyste[1];
10781
10775
  var perform = /*#__PURE__*/function () {
10782
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10776
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
10783
10777
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
10784
10778
  return _regeneratorRuntime().wrap(function _callee$(_context) {
10785
10779
  while (1) switch (_context.prev = _context.next) {
@@ -11384,7 +11378,7 @@ function OrderView() {
11384
11378
  var _useOrderProductSyste = useOrderProductSystemLogs(),
11385
11379
  setSystemLogsEvents = _useOrderProductSyste[1];
11386
11380
  var fetchReminderData = /*#__PURE__*/function () {
11387
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11381
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
11388
11382
  var result;
11389
11383
  return _regeneratorRuntime().wrap(function _callee$(_context) {
11390
11384
  while (1) switch (_context.prev = _context.next) {
@@ -11906,7 +11900,7 @@ function ReturnClient() {
11906
11900
  };
11907
11901
  var paths = splitPath(location.pathname);
11908
11902
  useEffect(function () {
11909
- if (paths.join('/') === 'orders/view/return') {
11903
+ if (paths[paths.length - 1] === 'orders/view/return') {
11910
11904
  setActionTypeOptions([]);
11911
11905
  setLocationOptions([]);
11912
11906
  setSelectedClient(null);
@@ -11914,14 +11908,18 @@ function ReturnClient() {
11914
11908
  setSelectedLocationValue(null);
11915
11909
  }
11916
11910
  }, [location.pathname, searchParams]);
11911
+ // useEffect(() => {
11912
+ // if (selectedClientId) {
11913
+ // navigate(`filter/${selectedClientId}`);
11914
+ // }
11915
+ // }, [selectedClientId]);
11917
11916
  //API for client data
11918
11917
  var _useApiHook = useApiHook({
11919
11918
  endpoint: "/return_orders/customers/",
11920
11919
  method: 'GET',
11921
11920
  //@ts-ignore
11922
11921
  pagination: {
11923
- page: 1,
11924
- per_page: 50
11922
+ is_pagination: false
11925
11923
  }
11926
11924
  }),
11927
11925
  fetchedCustomerData = _useApiHook.data,