@bjsdistribution/dms-client-return 0.0.9 → 0.0.11

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.
Files changed (48) hide show
  1. package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.d.ts +16 -0
  2. package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.d.ts +1 -0
  3. package/dist/components/store.d.ts +12 -2
  4. package/dist/components/types.d.ts +7 -0
  5. package/dist/dms-client-return.cjs.development.js +657 -478
  6. package/dist/dms-client-return.cjs.development.js.map +1 -1
  7. package/dist/dms-client-return.cjs.production.min.js +1 -1
  8. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  9. package/dist/dms-client-return.esm.js +663 -484
  10. package/dist/dms-client-return.esm.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/common/custom-switch/index.tsx +12 -4
  13. package/src/components/order-daily-overview/filters/FilterStyle.tsx +2 -13
  14. package/src/components/order-daily-overview/filters/Filters.tsx +7 -1
  15. package/src/components/order-daily-overview/header-filters/HeaderFilter.tsx +1 -1
  16. package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +46 -1
  17. package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +6 -5
  18. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +130 -0
  19. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +152 -69
  20. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnFilter.tsx +3 -2
  21. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +131 -23
  22. package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +15 -1
  23. package/src/components/order-daily-overview/shared/utlis.ts +7 -1
  24. package/src/components/order-daily-overview/table/ReturnTable.tsx +12 -0
  25. package/src/components/order-view/hooks/useGetEventNotes.tsx +15 -2
  26. package/src/components/order-view/hooks/useGetSystemLogs.tsx +14 -2
  27. package/src/components/order-view/hooks/useUpdateOrder.ts +13 -2
  28. package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +14 -17
  29. package/src/components/order-view/modalsPopup/ModalManager.tsx +90 -62
  30. package/src/components/order-view/notes/AddNote.tsx +7 -2
  31. package/src/components/order-view/order-actions/actions/change-customer-account/ChangeCustomerAccModal.tsx +6 -2
  32. package/src/components/order-view/order-actions/actions/escalation/Dropdowns.tsx +5 -0
  33. package/src/components/order-view/order-actions/actions/escalation/upgrade/index.tsx +7 -1
  34. package/src/components/order-view/order-actions/hooks/useAllReminderData.ts +13 -2
  35. package/src/components/order-view/order-actions/hooks/useAllTaskData.ts +15 -5
  36. package/src/components/order-view/order-actions/hooks/useCreateReminder.ts +20 -4
  37. package/src/components/order-view/order-actions/hooks/useCreateTask.ts +14 -3
  38. package/src/components/order-view/order-actions/hooks/useFetchSingleFlagData.ts +15 -3
  39. package/src/components/order-view/order-actions/hooks/useFetchSingleReminder.ts +13 -2
  40. package/src/components/order-view/order-actions/hooks/useUpdateFlag.ts +12 -2
  41. package/src/components/order-view/order-actions/hooks/useUpdateReminder.ts +12 -2
  42. package/src/components/order-view/products-info/expanded-content/index.tsx +6 -1
  43. package/src/components/order-view/return-client-products/product-table-footer/ProductDetailsFooter.tsx +6 -1
  44. package/src/components/order-view/system-event-logs/expanded-content/index.tsx +7 -1
  45. package/src/components/order-view/view-reminder/AssigneeDropdown.tsx +6 -1
  46. package/src/components/store.ts +30 -1
  47. package/src/components/types.ts +8 -0
  48. package/src/index.tsx +8 -4
@@ -2338,14 +2338,18 @@ function AddNote() {
2338
2338
  description: error || 'Something went wrong. Please try again.'
2339
2339
  });
2340
2340
  }
2341
- _context.next = 18;
2341
+ _context.next = 17;
2342
2342
  break;
2343
2343
  case 14:
2344
2344
  _context.prev = 14;
2345
2345
  _context.t0 = _context["catch"](6);
2346
- console.error('Error saving note:', _context.t0);
2347
- alert('Failed to save note');
2348
- case 18:
2346
+ // console.error('Error saving note:', error);
2347
+ // alert('Failed to save note');
2348
+ antd.notification.error({
2349
+ message: 'Error',
2350
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
2351
+ });
2352
+ case 17:
2349
2353
  case "end":
2350
2354
  return _context.stop();
2351
2355
  }
@@ -2827,8 +2831,11 @@ function useGetEventNotes() {
2827
2831
  case 9:
2828
2832
  _json = _context.sent;
2829
2833
  detail = _json == null ? void 0 : _json.detail;
2830
- msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg;
2831
- console.error('Error response:', msg);
2834
+ msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg; // console.error('Error response:', msg);
2835
+ antd.notification.error({
2836
+ message: 'Error',
2837
+ description: "" + msg || 'An error has occurred. Please try again later.'
2838
+ });
2832
2839
  // setLoading(false);
2833
2840
  return _context.abrupt("return", []);
2834
2841
  case 14:
@@ -2846,7 +2853,11 @@ function useGetEventNotes() {
2846
2853
  case 22:
2847
2854
  _context.prev = 22;
2848
2855
  _context.t0 = _context["catch"](1);
2849
- console.error('Error fetching data:', _context.t0);
2856
+ // console.error('Error fetching data:', err);
2857
+ antd.notification.error({
2858
+ message: 'Error',
2859
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
2860
+ });
2850
2861
  return _context.abrupt("return", []);
2851
2862
  case 26:
2852
2863
  _context.prev = 26;
@@ -2893,7 +2904,11 @@ function SystemLogs() {
2893
2904
  case 7:
2894
2905
  _context.prev = 7;
2895
2906
  _context.t0 = _context["catch"](0);
2896
- console.error('Error fetching event notes:', _context.t0);
2907
+ // console.error('Error fetching event notes:', error);
2908
+ antd.notification.error({
2909
+ message: 'Error',
2910
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
2911
+ });
2897
2912
  case 10:
2898
2913
  case "end":
2899
2914
  return _context.stop();
@@ -3136,9 +3151,9 @@ function GeneralHeader() {
3136
3151
  var Section = /*#__PURE__*/styled__default.div(_templateObject$V || (_templateObject$V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* display: flex;\n background: #ffffff;\n // padding: 15px;\n flex-direction: column;\n gap: 14px;\n border-radius: 12px;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n border: 1px solid #e0e0e0; */\n"])));
3137
3152
 
3138
3153
  var _templateObject19, _templateObject20, _templateObject21;
3139
- var StyledTable = /*#__PURE__*/styled__default.table(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n white-space: nowrap;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .emailInvoiceNo {\n padding-left: 0px;\n }\n .emailInvoiceShare {\n width: 100px;\n }\n th {\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n }\n tbody {\n tr {\n td {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 12px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n .actionbox {\n display: flex;\n gap: 5px;\n }\n .shareIconContainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n gap: 8px;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-101, #e2e0db);\n background: #fff;\n list-style-type: none;\n /* padding-left: 0; */\n /* fontWeight: 600,\n paddingLeft: 0, */\n cursor: pointer;\n position: relative;\n }\n .statusCancelled {\n color: #e95252;\n /* background: rgba(233, 82, 82, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOnHold {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusSubContracted {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusAwaiting {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusCompleted {\n color: #1f9254;\n /* background: rgba(41, 204, 106, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOutstanding {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusUnknown {\n color: #000;\n /* background: #fff; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n .statustext {\n color: #1f9254;\n font-family: 'Open Sans';\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n }\n .downloadcontainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n\n width: 28px;\n height: 28px;\n flex-direction: column;\n\n border-radius: 14px;\n border: 1px solid #e2e0db;\n background: #fff;\n }\n .statuscontainer {\n display: flex;\n padding: 5px 30px 5px 30px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n flex: 1 0 0;\n border-radius: 22px;\n background: rgba(41, 204, 106, 0.15);\n }\n ul > li > a {\n text-decoration: none !important;\n color: #0099ff;\n }\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .flex {\n display: flex;\n flex-direction: row;\n gap: 5px;\n height: 29px;\n align-items: center;\n }\n\n &.insideTable {\n td {\n border-radius: 0;\n border: none;\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n table {\n border-spacing: 0;\n width: 100%;\n border-radius: 5px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n overflow: hidden;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n thead {\n tr {\n border-bottom: none;\n th {\n padding: 14px 20px;\n text-align: left;\n border-top: 0;\n border-right: 0;\n border-left: 0;\n background: #f8fafc;\n\n &:first-child {\n border-radius: 0;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n border-top-left-radius: 15px;\n }\n &:last-child {\n border-radius: 0;\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 14px 20px;\n text-align: left;\n border-bottom: 1px solid rgba(58, 54, 48, 0.15);\n background: #fff;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n }\n }\n }\n }\n }\n }\n .actions {\n display: flex;\n align-items: center;\n gap: 20px;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n\n .close-icon {\n transform: scale(1.3);\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n"])));
3154
+ var StyledTable = /*#__PURE__*/styled__default.table(_templateObject19 || (_templateObject19 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-spacing: 0 10px;\n width: 100%;\n /* min-width: 1600px; */\n thead {\n white-space: nowrap;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .emailInvoiceNo {\n padding-left: 0px;\n }\n .emailInvoiceShare {\n width: 100px;\n }\n th {\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n }\n tbody {\n tr {\n td {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 12px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n .actionbox {\n display: flex;\n gap: 5px;\n }\n .shareIconContainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n gap: 8px;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-101, #e2e0db);\n background: #fff;\n list-style-type: none;\n /* padding-left: 0; */\n /* fontWeight: 600,\n paddingLeft: 0, */\n cursor: pointer;\n position: relative;\n }\n .statusCancelled {\n color: #e95252;\n /* background: rgba(233, 82, 82, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOnHold {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusSubContracted {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusAwaiting {\n color: #845adf;\n /* background: rgba(132, 90, 223, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusCompleted {\n color: #1f9254;\n /* background: rgba(41, 204, 106, 0.15); */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusOutstanding {\n color: #f4a503;\n /* background: #fff1d6; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n\n .statusUnknown {\n color: #000;\n /* background: #fff; */\n padding: 4px 8px;\n border-radius: 4px;\n }\n .statustext {\n color: #1f9254;\n font-family: 'Open Sans';\n font-size: 12px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n }\n .downloadcontainer {\n display: flex;\n padding: 2px 12px;\n align-items: center;\n\n width: 28px;\n height: 28px;\n flex-direction: column;\n\n border-radius: 14px;\n border: 1px solid #e2e0db;\n background: #fff;\n }\n .statuscontainer {\n display: flex;\n padding: 5px 30px 5px 30px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n flex: 1 0 0;\n border-radius: 22px;\n background: rgba(41, 204, 106, 0.15);\n }\n .awaiting {\n display: flex;\n min-width: 85px;\n padding: 6px 10px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n border-radius: 22px;\n background: rgba(233, 82, 82, 0.15);\n color: #e95252;\n font-family: 'Open Sans';\n font-size: 12px;\n font-weight: 600;\n }\n ul > li > a {\n text-decoration: none !important;\n color: #0099ff;\n }\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .flex {\n display: flex;\n flex-direction: row;\n gap: 5px;\n height: 29px;\n align-items: center;\n }\n\n &.insideTable {\n td {\n border-radius: 0;\n border: none;\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n table {\n border-spacing: 0;\n width: 100%;\n border-radius: 5px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n overflow: hidden;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n thead {\n tr {\n border-bottom: none;\n th {\n padding: 14px 20px;\n text-align: left;\n border-top: 0;\n border-right: 0;\n border-left: 0;\n background: #f8fafc;\n\n &:first-child {\n border-radius: 0;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n border-top-left-radius: 15px;\n }\n &:last-child {\n border-radius: 0;\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 14px 20px;\n text-align: left;\n border-bottom: 1px solid rgba(58, 54, 48, 0.15);\n background: #fff;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n }\n }\n }\n }\n }\n }\n .actions {\n display: flex;\n align-items: center;\n gap: 20px;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n\n .close-icon {\n transform: scale(1.3);\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n"])));
3140
3155
  // Styled components
3141
- var StyledTableWrapper = /*#__PURE__*/styled__default.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\n scrollbar-width: none;\n height: 400px;\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n"])));
3156
+ var StyledTableWrapper = /*#__PURE__*/styled__default.div(_templateObject20 || (_templateObject20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\n scrollbar-width: none;\n height: 600px;\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n"])));
3142
3157
  var CustomDrop = /*#__PURE__*/styled__default.div(_templateObject21 || (_templateObject21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #fff;\n display: flex;\n padding: 4px 8px;\n gap: 8px;\n align-items: center; */\n cursor: pointer;\n &.active .drop {\n transform: rotate(180deg);\n }\n"])));
3143
3158
 
3144
3159
  var ActionIcon = function ActionIcon() {
@@ -3158,9 +3173,19 @@ var ActionIcon = function ActionIcon() {
3158
3173
  }));
3159
3174
  };
3160
3175
 
3176
+ var CreateReturnInitial = {
3177
+ customer_id: 0,
3178
+ account_number: '',
3179
+ return_location_token: '',
3180
+ products: [],
3181
+ return_action: []
3182
+ };
3161
3183
  var customerData = /*#__PURE__*/jotai.atom([]);
3162
3184
  var actionTypeData = /*#__PURE__*/jotai.atom([]);
3163
3185
  var locationData = /*#__PURE__*/jotai.atom([]);
3186
+ var createReturnPayload = /*#__PURE__*/jotai.atom(CreateReturnInitial);
3187
+ var newPayload = /*#__PURE__*/jotai.atom([]);
3188
+ var grpPayload = /*#__PURE__*/jotai.atom([]);
3164
3189
  var selectedOrderlList = /*#__PURE__*/jotai.atom([]);
3165
3190
  function useSelectedOrders() {
3166
3191
  return jotai.useAtom(selectedOrderlList);
@@ -3179,6 +3204,15 @@ function useActionType() {
3179
3204
  function useLocationData() {
3180
3205
  return jotai.useAtom(locationData);
3181
3206
  }
3207
+ function useReturnPayload() {
3208
+ return jotai.useAtom(createReturnPayload);
3209
+ }
3210
+ function useNewReturnPayload() {
3211
+ return jotai.useAtom(newPayload);
3212
+ }
3213
+ function useGroupedPayload() {
3214
+ return jotai.useAtom(grpPayload);
3215
+ }
3182
3216
 
3183
3217
  var ReturnProductTable = function ReturnProductTable() {
3184
3218
  var _useSelectedOrders = useSelectedOrders(),
@@ -3227,7 +3261,11 @@ var Container$B = /*#__PURE__*/styled__default.div(_templateObject$W || (_templa
3227
3261
  var _templateObject$X, _templateObject2$C, _templateObject3$k;
3228
3262
  function ExpandedContent$2() {
3229
3263
  var SaveNote = function SaveNote() {
3230
- alert('saved');
3264
+ // alert('saved');
3265
+ antd.notification.success({
3266
+ message: 'Success',
3267
+ description: ' Saved successfully.'
3268
+ });
3231
3269
  };
3232
3270
  return React__default.createElement(Container$C, null, React__default.createElement(ProductTable, null), React__default.createElement(MidConatiner, null, React__default.createElement(SaveNoteContainer$1, null, React__default.createElement(dmsComponentLibrary.Button, {
3233
3271
  style: {
@@ -4778,7 +4816,11 @@ function ChangeCustomerAccModal() {
4778
4816
  setCurrentAction(undefined);
4779
4817
  };
4780
4818
  var handleSelectChange = function handleSelectChange() {
4781
- alert('hello');
4819
+ // alert('hello');
4820
+ antd.notification.success({
4821
+ message: 'Success',
4822
+ description: 'Saved successfully.'
4823
+ });
4782
4824
  };
4783
4825
  return React__default.createElement(OrderActionModal, {
4784
4826
  headerTitle: "Change customer account",
@@ -4908,6 +4950,10 @@ var StyledAntSelect = /*#__PURE__*/styled__default(dmsComponentLibrary.AntSelect
4908
4950
  var Dropdowns = function Dropdowns() {
4909
4951
  var handleSelectChange = function handleSelectChange() {
4910
4952
  // alert('hello');
4953
+ antd.notification.success({
4954
+ message: 'Success',
4955
+ description: 'Saved successfully.'
4956
+ });
4911
4957
  };
4912
4958
  return React__default.createElement(FlexContainer, null, React__default.createElement(InnerCont, null, React__default.createElement(dmsComponentLibrary.Label, {
4913
4959
  label: "Escalation Category",
@@ -4981,7 +5027,11 @@ var Notes$2 = function Notes() {
4981
5027
  var _templateObject$1w, _templateObject2$14, _templateObject3$z, _templateObject4$i, _templateObject5$a, _templateObject6$8, _templateObject7$7, _templateObject8$4, _templateObject9$2, _templateObject10$1;
4982
5028
  var Upgrade = function Upgrade() {
4983
5029
  var handleSelectChange = function handleSelectChange() {
4984
- alert('hello');
5030
+ // alert('hello');
5031
+ antd.notification.success({
5032
+ message: 'Success',
5033
+ description: 'Upgrade successfully.'
5034
+ });
4985
5035
  };
4986
5036
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(Wrapper$g, null, React__default.createElement(Heading$2, null, "Upgrade"), React__default.createElement(Container$_, null, React__default.createElement(Top$3, null, React__default.createElement(InnerCont$1, null, React__default.createElement(Toggle, {
4987
5037
  label: 'Timed Service',
@@ -5543,7 +5593,11 @@ var RestoreProducts = function RestoreProducts() {
5543
5593
  var _templateObject$1B, _templateObject2$17;
5544
5594
  function AssigneeDropdown() {
5545
5595
  var handleSelectChange = function handleSelectChange() {
5546
- alert('hello');
5596
+ // alert('hello');
5597
+ antd.notification.success({
5598
+ message: 'Success',
5599
+ description: 'Order has been saved successfully.'
5600
+ });
5547
5601
  };
5548
5602
  return React__default.createElement(FormContainer$2, null, React__default.createElement(dmsComponentLibrary.Label, {
5549
5603
  label: "Assigned To",
@@ -5763,8 +5817,11 @@ function useFetchSingleReminderData() {
5763
5817
  case 10:
5764
5818
  _json = _context.sent;
5765
5819
  detail = _json == null ? void 0 : _json.detail;
5766
- msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg;
5767
- alert("" + msg);
5820
+ msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg; // alert(`${msg}`);
5821
+ antd.notification.error({
5822
+ message: 'Error',
5823
+ description: "" + msg || 'An error has occurred. Please try again later.'
5824
+ });
5768
5825
  setLoading(false);
5769
5826
  return _context.abrupt("return", []);
5770
5827
  case 16:
@@ -5784,7 +5841,11 @@ function useFetchSingleReminderData() {
5784
5841
  _context.prev = 25;
5785
5842
  _context.t0 = _context["catch"](2);
5786
5843
  //setloading(false);
5787
- console.error('Error fetching data:', _context.t0);
5844
+ // console.error('Error fetching data:', err);
5845
+ antd.notification.error({
5846
+ message: 'Error',
5847
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
5848
+ });
5788
5849
  return _context.abrupt("return", []);
5789
5850
  case 29:
5790
5851
  case "end":
@@ -5871,12 +5932,20 @@ function useUpdateReminder() {
5871
5932
  return response.json();
5872
5933
  case 11:
5873
5934
  json = _context.sent;
5874
- alert('Reminder has been updated');
5935
+ // alert('Reminder has been updated');
5936
+ antd.notification.success({
5937
+ message: 'Success',
5938
+ description: 'Reminder has been updated'
5939
+ });
5875
5940
  return _context.abrupt("return", json);
5876
5941
  case 16:
5877
5942
  _context.prev = 16;
5878
5943
  _context.t0 = _context["catch"](2);
5879
- console.error('Error:', _context.t0);
5944
+ // console.error('Error:', err);
5945
+ antd.notification.error({
5946
+ message: 'Error',
5947
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
5948
+ });
5880
5949
  case 19:
5881
5950
  _context.prev = 19;
5882
5951
  setLoading(false);
@@ -5940,8 +6009,11 @@ function useFetchReminders() {
5940
6009
  case 9:
5941
6010
  _json = _context.sent;
5942
6011
  detail = _json == null ? void 0 : _json.detail;
5943
- msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg;
5944
- console.error('Error response:', msg);
6012
+ msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg; // console.error('Error response:', msg);
6013
+ antd.notification.error({
6014
+ message: 'Error',
6015
+ description: "" + msg || 'An error has occurred. Please try again later.'
6016
+ });
5945
6017
  // setLoading(false);
5946
6018
  return _context.abrupt("return", []);
5947
6019
  case 14:
@@ -5961,7 +6033,11 @@ function useFetchReminders() {
5961
6033
  case 23:
5962
6034
  _context.prev = 23;
5963
6035
  _context.t0 = _context["catch"](1);
5964
- console.error('Error fetching data:', _context.t0);
6036
+ // console.error('Error fetching data:', err);
6037
+ antd.notification.error({
6038
+ message: 'Error',
6039
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
6040
+ });
5965
6041
  return _context.abrupt("return", []);
5966
6042
  case 27:
5967
6043
  _context.prev = 27;
@@ -6224,7 +6300,14 @@ var CustomSwitchSelector = function CustomSwitchSelector(_ref) {
6224
6300
  if (typeof selectedOptionValue === 'string') {
6225
6301
  onSwitchChange(selectedOptionValue);
6226
6302
  } else {
6227
- console.error('Unexpected type for selectedOptionValue:', typeof selectedOptionValue);
6303
+ // console.error(
6304
+ // 'Unexpected type for selectedOptionValue:',
6305
+ // typeof selectedOptionValue
6306
+ // );
6307
+ antd.notification.error({
6308
+ message: 'Error',
6309
+ description: "" + typeof selectedOptionValue || 'Unexpected type for selectedOptionValue.'
6310
+ });
6228
6311
  }
6229
6312
  };
6230
6313
  return React__default.createElement(StyledSwitch, null, React__default.createElement(SwitchSelector, {
@@ -6674,7 +6757,11 @@ function useCreateTask() {
6674
6757
  setLoading(false);
6675
6758
  throw new Error('response is not ok');
6676
6759
  case 10:
6677
- alert('Task Created Successfully');
6760
+ // alert('Task Created Successfully');
6761
+ antd.notification.success({
6762
+ message: 'Success',
6763
+ description: 'Task Created Successfully'
6764
+ });
6678
6765
  _context.next = 13;
6679
6766
  return response.json();
6680
6767
  case 13:
@@ -6684,19 +6771,23 @@ function useCreateTask() {
6684
6771
  _context.prev = 17;
6685
6772
  _context.t0 = _context["catch"](2);
6686
6773
  setLoading(false);
6687
- alert(_context.t0);
6688
- console.error('Error:', _context.t0);
6689
- case 22:
6690
- _context.prev = 22;
6774
+ // alert(err);
6775
+ // console.error('Error:', err);
6776
+ antd.notification.error({
6777
+ message: 'Error',
6778
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
6779
+ });
6780
+ case 21:
6781
+ _context.prev = 21;
6691
6782
  setLoading(false);
6692
- return _context.finish(22);
6693
- case 25:
6783
+ return _context.finish(21);
6784
+ case 24:
6694
6785
  setLoading(false);
6695
- case 26:
6786
+ case 25:
6696
6787
  case "end":
6697
6788
  return _context.stop();
6698
6789
  }
6699
- }, _callee, null, [[2, 17, 22, 25]]);
6790
+ }, _callee, null, [[2, 17, 21, 24]]);
6700
6791
  }));
6701
6792
  return function create(_x) {
6702
6793
  return _ref.apply(this, arguments);
@@ -6734,9 +6825,17 @@ function useCreateReminder() {
6734
6825
  response = _context.sent;
6735
6826
  if (!response.ok) {
6736
6827
  setLoading(false);
6737
- alert('response is not ok');
6828
+ // alert('response is not ok');
6829
+ antd.notification.error({
6830
+ message: 'Error',
6831
+ description: 'response is not ok'
6832
+ });
6738
6833
  }
6739
- alert('Reminder Created Successfully');
6834
+ // alert('Reminder Created Successfully');
6835
+ antd.notification.success({
6836
+ message: 'Success',
6837
+ description: 'Reminder Created Successfully'
6838
+ });
6740
6839
  _context.next = 11;
6741
6840
  return response.json();
6742
6841
  case 11:
@@ -6746,19 +6845,23 @@ function useCreateReminder() {
6746
6845
  _context.prev = 15;
6747
6846
  _context.t0 = _context["catch"](2);
6748
6847
  setLoading(false);
6749
- alert(_context.t0);
6750
- console.error('Error:', _context.t0);
6751
- case 20:
6752
- _context.prev = 20;
6848
+ // alert(err);
6849
+ // console.error('Error:', err);
6850
+ antd.notification.error({
6851
+ message: 'Error',
6852
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
6853
+ });
6854
+ case 19:
6855
+ _context.prev = 19;
6753
6856
  setLoading(false);
6754
- return _context.finish(20);
6755
- case 23:
6857
+ return _context.finish(19);
6858
+ case 22:
6756
6859
  setLoading(false);
6757
- case 24:
6860
+ case 23:
6758
6861
  case "end":
6759
6862
  return _context.stop();
6760
6863
  }
6761
- }, _callee, null, [[2, 15, 20, 23]]);
6864
+ }, _callee, null, [[2, 15, 19, 22]]);
6762
6865
  }));
6763
6866
  return function create(_x) {
6764
6867
  return _ref.apply(this, arguments);
@@ -6813,8 +6916,11 @@ function useFetchUnresolvedTasks() {
6813
6916
  case 9:
6814
6917
  _json = _context.sent;
6815
6918
  detail = _json == null ? void 0 : _json.detail;
6816
- msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg;
6817
- console.error('Error response:', msg);
6919
+ msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg; // console.error('Error response:', msg);
6920
+ antd.notification.error({
6921
+ message: 'Error',
6922
+ description: "" + msg || 'An error has occurred. Please try again later.'
6923
+ });
6818
6924
  setLoading(false);
6819
6925
  return _context.abrupt("return", []);
6820
6926
  case 15:
@@ -6834,7 +6940,11 @@ function useFetchUnresolvedTasks() {
6834
6940
  case 25:
6835
6941
  _context.prev = 25;
6836
6942
  _context.t0 = _context["catch"](1);
6837
- console.error('Error fetching data:', _context.t0);
6943
+ // console.error('Error fetching data:', err);
6944
+ antd.notification.error({
6945
+ message: 'Error',
6946
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
6947
+ });
6838
6948
  setLoading(false);
6839
6949
  return _context.abrupt("return", []);
6840
6950
  case 30:
@@ -7066,13 +7176,21 @@ function useUpdateOrder() {
7066
7176
  return response.json();
7067
7177
  case 13:
7068
7178
  json = _context.sent;
7069
- alert('Order has been updated');
7179
+ // alert('Order has been updated');
7180
+ antd.notification.success({
7181
+ message: 'Success',
7182
+ description: 'Order has been updated.'
7183
+ });
7070
7184
  return _context.abrupt("return", json);
7071
7185
  case 18:
7072
7186
  _context.prev = 18;
7073
7187
  _context.t0 = _context["catch"](4);
7074
7188
  // setLoading(false);
7075
- console.log(_context.t0, 'error');
7189
+ // console.log(err, 'error');
7190
+ antd.notification.error({
7191
+ message: 'Error',
7192
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
7193
+ });
7076
7194
  case 21:
7077
7195
  _context.prev = 21;
7078
7196
  return _context.finish(21);
@@ -7180,12 +7298,20 @@ function useUpdateFlag() {
7180
7298
  return response.json();
7181
7299
  case 11:
7182
7300
  json = _context.sent;
7183
- alert('Flag has been updated');
7301
+ // alert('Flag has been updated');
7302
+ antd.notification.success({
7303
+ message: 'Success',
7304
+ description: 'Flag has been updated'
7305
+ });
7184
7306
  return _context.abrupt("return", json);
7185
7307
  case 16:
7186
7308
  _context.prev = 16;
7187
7309
  _context.t0 = _context["catch"](2);
7188
- console.error('Error:', _context.t0);
7310
+ // console.error('Error:', err);
7311
+ antd.notification.error({
7312
+ message: 'Error',
7313
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
7314
+ });
7189
7315
  case 19:
7190
7316
  _context.prev = 19;
7191
7317
  setLoading(false);
@@ -7517,7 +7643,7 @@ function useFetchSingleFlagsData() {
7517
7643
  loading = _useFlagsLoading[0],
7518
7644
  setLoading = _useFlagsLoading[1];
7519
7645
  var ssoToken = getCookie('id_token');
7520
- console.log(loading, "loading loading");
7646
+ console.log(loading, 'loading loading');
7521
7647
  var res = /*#__PURE__*/function () {
7522
7648
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
7523
7649
  var endpoint, headers, response, _detail$, _json, detail, msg, json;
@@ -7547,8 +7673,11 @@ function useFetchSingleFlagsData() {
7547
7673
  case 9:
7548
7674
  _json = _context.sent;
7549
7675
  detail = _json == null ? void 0 : _json.detail;
7550
- msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg;
7551
- alert("" + msg);
7676
+ msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg; // alert(`${msg}`);
7677
+ antd.notification.error({
7678
+ message: 'Error',
7679
+ description: "" + msg || 'An error has occurred. Please try again later.'
7680
+ });
7552
7681
  setLoading(false);
7553
7682
  return _context.abrupt("return", []);
7554
7683
  case 15:
@@ -7568,7 +7697,11 @@ function useFetchSingleFlagsData() {
7568
7697
  _context.prev = 24;
7569
7698
  _context.t0 = _context["catch"](1);
7570
7699
  setLoading(false);
7571
- console.error('Error fetching data:', _context.t0);
7700
+ // console.error('Error fetching data:', err);
7701
+ antd.notification.error({
7702
+ message: 'Error',
7703
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
7704
+ });
7572
7705
  return _context.abrupt("return", []);
7573
7706
  case 29:
7574
7707
  case "end":
@@ -7856,8 +7989,11 @@ function useSystemLogs() {
7856
7989
  case 9:
7857
7990
  _json = _context.sent;
7858
7991
  detail = _json == null ? void 0 : _json.detail;
7859
- msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg;
7860
- console.error('Error response:', msg);
7992
+ msg = (_detail$ = detail[0]) == null ? void 0 : _detail$.msg; // console.error('Error response:', msg);
7993
+ antd.notification.error({
7994
+ message: 'Error',
7995
+ description: "" + msg || 'An error has occurred. Please try again later.'
7996
+ });
7861
7997
  // setLoading(false);
7862
7998
  return _context.abrupt("return", []);
7863
7999
  case 14:
@@ -7877,7 +8013,11 @@ function useSystemLogs() {
7877
8013
  case 23:
7878
8014
  _context.prev = 23;
7879
8015
  _context.t0 = _context["catch"](1);
7880
- console.error('Error fetching data:', _context.t0);
8016
+ // console.error('Error fetching data:', err);
8017
+ antd.notification.error({
8018
+ message: 'Error',
8019
+ description: "" + _context.t0 || 'An error has occurred. Please try again later.'
8020
+ });
7881
8021
  return _context.abrupt("return", []);
7882
8022
  case 27:
7883
8023
  _context.prev = 27;
@@ -8193,6 +8333,16 @@ function SelectionFilter() {
8193
8333
  var _useState4 = React.useState(false),
8194
8334
  isButtonEnabled = _useState4[0],
8195
8335
  setIsButtonEnabled = _useState4[1];
8336
+ var _useReturnPayload = useReturnPayload(),
8337
+ setReturnPayload = _useReturnPayload[1];
8338
+ var _useState5 = React.useState(),
8339
+ storedAccNumber = _useState5[0],
8340
+ setStoredAccNumber = _useState5[1];
8341
+ var _useState6 = React.useState(),
8342
+ storedCustomerId = _useState6[0],
8343
+ setStoredCustomerId = _useState6[1];
8344
+ var _useNewReturnPayload = useNewReturnPayload(),
8345
+ setNewPayload = _useNewReturnPayload[1];
8196
8346
  //client options
8197
8347
  var clientOptions = customers == null ? void 0 : customers.map(function (option) {
8198
8348
  var _option$customer_name, _option$customer_name2;
@@ -8200,7 +8350,9 @@ function SelectionFilter() {
8200
8350
  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)),
8201
8351
  value: (option == null ? void 0 : option.id) + "_" + (option == null ? void 0 : option.uuid),
8202
8352
  id: option == null ? void 0 : option.id,
8203
- uuid: option == null ? void 0 : option.uuid
8353
+ uuid: option == null ? void 0 : option.uuid,
8354
+ account_number: option == null ? void 0 : option.account_number,
8355
+ gsit_customer_id: option == null ? void 0 : option.gsit_customer_id
8204
8356
  };
8205
8357
  });
8206
8358
  var actionTypeOptions = actionType == null ? void 0 : actionType.map(function (option) {
@@ -8218,14 +8370,28 @@ function SelectionFilter() {
8218
8370
  });
8219
8371
  //client change
8220
8372
  var handleSelectChange = function handleSelectChange(value, option) {
8373
+ setNewPayload([]);
8221
8374
  console.log(value, 'value');
8222
8375
  var selectedLabel = option == null ? void 0 : option.label;
8223
8376
  var selectedValue = option == null ? void 0 : option.id;
8224
8377
  var selectedUuids = option == null ? void 0 : option.uuid;
8378
+ var selectAccountNumber = option.account_number;
8379
+ var selectedCustomerId = option.gsit_customer_id;
8225
8380
  setSelectedClient(selectedValue);
8226
8381
  setName(selectedLabel);
8227
8382
  localStorage.setItem('clientName', selectedLabel);
8228
8383
  localStorage.setItem('clientId', selectedValue.toString());
8384
+ localStorage.setItem('account_number', selectAccountNumber);
8385
+ localStorage.setItem('customer_id', selectedCustomerId.toString());
8386
+ var storedAccNo = localStorage.getItem('account_number');
8387
+ var storedCustomerId = localStorage.getItem('customer_id');
8388
+ setReturnPayload(function (prevState) {
8389
+ return _extends({}, prevState, {
8390
+ account_number: storedAccNo,
8391
+ customer_id: storedCustomerId
8392
+ });
8393
+ });
8394
+ console.log(selectedUuids, 'selectedUuids');
8229
8395
  var filteredSubLocations = locationData == null ? void 0 : locationData.filter(function (subCat) {
8230
8396
  return (subCat == null ? void 0 : subCat.customer_id) === selectedUuids;
8231
8397
  }).map(function (subCat) {
@@ -8237,6 +8403,24 @@ function SelectionFilter() {
8237
8403
  setFilteredLocationOptions(filteredSubLocations);
8238
8404
  setUuid('');
8239
8405
  };
8406
+ React.useEffect(function () {
8407
+ var accountNumberFromStorage = localStorage.getItem('account_number');
8408
+ var customerIdFromStorage = localStorage.getItem('customer_id');
8409
+ if (accountNumberFromStorage) {
8410
+ setStoredAccNumber(accountNumberFromStorage);
8411
+ }
8412
+ if (customerIdFromStorage) {
8413
+ setStoredCustomerId(customerIdFromStorage);
8414
+ }
8415
+ if (storedAccNumber && storedCustomerId) {
8416
+ setReturnPayload(function (prevState) {
8417
+ return _extends({}, prevState, {
8418
+ account_number: storedAccNumber,
8419
+ customer_id: storedCustomerId
8420
+ });
8421
+ });
8422
+ }
8423
+ }, [storedAccNumber, storedCustomerId]);
8240
8424
  React.useEffect(function () {}, [getUuid, filteredLocationOptions]);
8241
8425
  //location change
8242
8426
  var handleLocationChange = function handleLocationChange(value, option) {
@@ -8301,6 +8485,7 @@ function SelectionFilter() {
8301
8485
  setIsButtonEnabled(false);
8302
8486
  }
8303
8487
  }, [storedName, selectedFilterValue, selectedLocationValue]);
8488
+ console.log(filteredLocationOptions, 'filteredLocationOptions');
8304
8489
  console.log('check', storedName, selectedFilterValue, selectedLocationValue);
8305
8490
  return React__default.createElement(Wrapper$k, null, React__default.createElement(FilterRow, null, React__default.createElement(LeftColumn, null, React__default.createElement(FilterColumn, null, React__default.createElement(Label$g, null, "Clients"), React__default.createElement(StyledAntSelect$5, {
8306
8491
  options: clientOptions,
@@ -8385,7 +8570,7 @@ function HeaderFilter() {
8385
8570
  if (fetchedStaticData && fetchedStaticData != null && fetchedStaticData.data) {
8386
8571
  var _fetchedStaticData$da;
8387
8572
  setActionType(fetchedStaticData == null || (_fetchedStaticData$da = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da.flatMap(function (i) {
8388
- return i.order_contact_action_type;
8573
+ return i == null ? void 0 : i.order_product_return_action;
8389
8574
  }));
8390
8575
  }
8391
8576
  }, [actionLoading, fetchedStaticData]);
@@ -8399,7 +8584,7 @@ function HeaderFilter() {
8399
8584
 
8400
8585
  var _templateObject$1$, _templateObject4$v, _templateObject5$k, _templateObject7$d, _templateObject8$8;
8401
8586
  //Left side
8402
- var LeftSideConatiner = /*#__PURE__*/styled__default.div(_templateObject$1$ || (_templateObject$1$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 1px 5px 1px 1.1px;\n align-items: center;\n gap: 10px;\n border-radius: 40px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: var(--Flowkit-White, #fff);\n\n .filtercontainer {\n display: flex;\n padding: 8px 8px 8px 4px;\n align-items: center;\n gap: 4px;\n align-self: stretch;\n border-radius: 20px 0px 0px 20px;\n border-right: 1px solid rgba(0, 0, 0, 0.04);\n background: var(--BjsColor-Bg-F0F2F2, #f0f2f2);\n\n .filtericon {\n display: flex;\n padding: 7px 0px 5px 5px;\n align-items: flex-start;\n gap: 10px;\n border-radius: 30px;\n }\n .textcont {\n color: #758588;\n text-align: center;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n }\n }\n .datefilter {\n display: flex;\n height: 36px;\n padding: 6px 8px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-10, #edebe8);\n\n .dateiconcontainer {\n display: flex;\n width: 24px;\n height: 24px;\n padding: 5px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-101, #e2e0db);\n background: #f1f5f6;\n }\n .datetext {\n color: #6a7378;\n\n /* body/captions */\n font-family: 'Lato';\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px; /* 123.077% */\n }\n .roundbox {\n display: flex;\n width: 18px;\n height: 18px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n }\n }\n"])));
8587
+ var LeftSideConatiner = /*#__PURE__*/styled__default.div(_templateObject$1$ || (_templateObject$1$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 1px 5px 1px 1.1px;\n align-items: center;\n gap: 10px;\n border-radius: 40px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: var(--Flowkit-White, #fff);\n\n .filtercontainer {\n display: flex;\n padding: 8px 8px 8px 4px;\n align-items: center;\n gap: 4px;\n align-self: stretch;\n border-radius: 20px 0px 0px 20px;\n border-right: 1px solid rgba(0, 0, 0, 0.04);\n background: var(--BjsColor-Bg-F0F2F2, #f0f2f2);\n\n .filtericon {\n display: flex;\n padding: 7px 0px 5px 5px;\n align-items: flex-start;\n gap: 10px;\n border-radius: 30px;\n }\n .textcont {\n color: #758588;\n text-align: center;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n }\n }\n .datefilter {\n display: flex;\n height: 36px;\n padding: 6px 8px;\n justify-content: center;\n align-items: center;\n gap: 2px;\n border-radius: 20px;\n border: 1px solid #edebe8;\n\n .dateiconcontainer {\n display: flex;\n width: 24px;\n height: 24px;\n padding: 5px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 20px;\n border: 1px solid var(--tonal-brown-101, #e2e0db);\n background: #f1f5f6;\n }\n .datetext {\n color: #6a7378;\n\n /* body/captions */\n font-family: 'Lato';\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px; /* 123.077% */\n }\n }\n"])));
8403
8588
  //
8404
8589
  var StyledFiter = /*#__PURE__*/styled__default.div(_templateObject4$v || (_templateObject4$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
8405
8590
  var StyledFIlterELements = /*#__PURE__*/styled__default.div(_templateObject5$k || (_templateObject5$k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 0;\n gap: 10px;\n align-items: center;\n"])));
@@ -8469,8 +8654,8 @@ var IconText = /*#__PURE__*/styled__default.div(_templateObject5$l || (_template
8469
8654
 
8470
8655
  var ReturnFilter = function ReturnFilter() {
8471
8656
  var _useParams = reactRouterDom.useParams(),
8472
- selectedClient = _useParams.selectedClient;
8473
- return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledFiter, null, React__default.createElement(Text$7, null, " ", selectedClient), React__default.createElement(StyledFIlterELements, null, React__default.createElement(StyledTableFilter, null)), React__default.createElement(RightFilters, null)));
8657
+ clientName = _useParams.clientName;
8658
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledFiter, null, React__default.createElement(Text$7, null, " ", clientName), React__default.createElement(StyledFIlterELements, null, React__default.createElement(StyledTableFilter, null)), React__default.createElement(RightFilters, null)));
8474
8659
  };
8475
8660
 
8476
8661
  var _templateObject$22, _templateObject2$1s, _templateObject3$P, _templateObject4$x, _templateObject34;
@@ -8631,6 +8816,16 @@ var formatDate$1 = function formatDate(date) {
8631
8816
  // const seconds = padZero(date.getSeconds());
8632
8817
  return year + "-" + month + "-" + day;
8633
8818
  };
8819
+ var displayValueOrNA = function displayValueOrNA(value) {
8820
+ var isBlankArray = Array.isArray(value) && value.length === 0;
8821
+ if (value === 0) {
8822
+ return 0;
8823
+ }
8824
+ if (value === 'NA' || value === undefined || value === null || isBlankArray) {
8825
+ return 'NA';
8826
+ }
8827
+ return value;
8828
+ };
8634
8829
 
8635
8830
  var optionsPrint = [{
8636
8831
  icon: 'runSheet',
@@ -8689,6 +8884,14 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
8689
8884
  var _usePrintOptionTOggle = usePrintOptionTOggle(),
8690
8885
  printToogle = _usePrintOptionTOggle[0],
8691
8886
  setPrintToggle = _usePrintOptionTOggle[1];
8887
+ var _useReturnPayload = useReturnPayload(),
8888
+ createReturn = _useReturnPayload[0],
8889
+ setReturnPayload = _useReturnPayload[1];
8890
+ var _useNewReturnPayload = useNewReturnPayload(),
8891
+ newpayload = _useNewReturnPayload[0],
8892
+ setNewPayload = _useNewReturnPayload[1];
8893
+ var _useGroupedPayload = useGroupedPayload(),
8894
+ setGrouped = _useGroupedPayload[1];
8692
8895
  var OpenDropDown = function OpenDropDown(index) {
8693
8896
  setPrintToggle(function (prevIndex) {
8694
8897
  return prevIndex === index ? null : index;
@@ -8723,41 +8926,109 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
8723
8926
  var handleSelectAll = function handleSelectAll(e) {
8724
8927
  setSelectAll(e.target.checked);
8725
8928
  if (e.target.checked) {
8726
- setSelectedReturnOrder(returnData.map(function (invoice) {
8929
+ setSelectedReturnOrder(returnData == null ? void 0 : returnData.map(function (loc) {
8930
+ var _loc$return_locations;
8727
8931
  return {
8728
- id: invoice.id,
8729
- status_id: 3
8932
+ id: loc.id,
8933
+ return_locations: loc == null ? void 0 : loc.return_locations,
8934
+ return_location: loc == null ? void 0 : loc.return_location,
8935
+ products: loc.id,
8936
+ order_product_return_action: loc == null ? void 0 : loc.order_product_return_action,
8937
+ return_location_token: loc == null || (_loc$return_locations = loc.return_locations) == null ? void 0 : _loc$return_locations.token
8938
+ };
8939
+ }));
8940
+ setNewPayload(returnData == null ? void 0 : returnData.map(function (loc) {
8941
+ var _loc$order_product_re, _loc$return_locations2;
8942
+ return {
8943
+ id: loc.id,
8944
+ account_number: createReturn == null ? void 0 : createReturn.account_number,
8945
+ customer_id: createReturn == null ? void 0 : createReturn.customer_id,
8946
+ products: loc.id,
8947
+ return_action: (loc == null || (_loc$order_product_re = loc.order_product_return_action) == null ? void 0 : _loc$order_product_re.type) || null,
8948
+ return_location_token: loc == null || (_loc$return_locations2 = loc.return_locations) == null ? void 0 : _loc$return_locations2.token
8730
8949
  };
8731
8950
  }));
8732
8951
  } else {
8733
8952
  setSelectedReturnOrder([]);
8734
8953
  }
8735
8954
  };
8736
- var handleSelectInvoice = function handleSelectInvoice(id) {
8737
- setSelectedReturnOrder(function (prevSelectedInvoices) {
8738
- var isSelected = prevSelectedInvoices == null ? void 0 : prevSelectedInvoices.some(function (invoice) {
8739
- return invoice.id === id;
8955
+ var handleSelectOrderReturn = function handleSelectOrderReturn(id, return_location, return_locations, order_product_return_action) {
8956
+ setSelectedReturnOrder(function (prevSelectedLocations) {
8957
+ var isSelected = prevSelectedLocations == null ? void 0 : prevSelectedLocations.some(function (loc) {
8958
+ return loc.id === id;
8740
8959
  });
8741
8960
  if (isSelected) {
8742
- return prevSelectedInvoices.filter(function (invoice) {
8743
- return invoice.id !== id;
8961
+ var updatedSelectedLocations = prevSelectedLocations.filter(function (loc) {
8962
+ return loc.id !== id;
8963
+ });
8964
+ setReturnPayload(function (prevState) {
8965
+ return _extends({}, prevState, {
8966
+ products: id,
8967
+ return_action: (order_product_return_action == null ? void 0 : order_product_return_action.type) || null,
8968
+ return_location_token: (return_locations == null ? void 0 : return_locations.token) || null
8969
+ });
8744
8970
  });
8971
+ setNewPayload(function (prevPayload) {
8972
+ return prevPayload.filter(function (item) {
8973
+ return item.id !== id;
8974
+ });
8975
+ });
8976
+ return updatedSelectedLocations;
8745
8977
  } else {
8746
- return [].concat(prevSelectedInvoices, [{
8978
+ var newReturnPayload = {
8747
8979
  id: id,
8748
- status_id: 3
8980
+ account_number: createReturn == null ? void 0 : createReturn.account_number,
8981
+ customer_id: createReturn == null ? void 0 : createReturn.customer_id,
8982
+ products: id,
8983
+ return_action: (order_product_return_action == null ? void 0 : order_product_return_action.type) || null,
8984
+ return_location_token: (return_locations == null ? void 0 : return_locations.token) || null
8985
+ };
8986
+ setNewPayload(function (prevPayload) {
8987
+ return [].concat(prevPayload, [newReturnPayload]);
8988
+ });
8989
+ setReturnPayload(function (prevState) {
8990
+ return _extends({}, prevState, {
8991
+ products: id,
8992
+ return_action: (order_product_return_action == null ? void 0 : order_product_return_action.type) || null,
8993
+ return_location_token: (return_locations == null ? void 0 : return_locations.token) || null
8994
+ });
8995
+ });
8996
+ return [].concat(prevSelectedLocations, [{
8997
+ id: id,
8998
+ return_location: return_location,
8999
+ return_locations: return_locations,
9000
+ order_product_return_action: order_product_return_action
8749
9001
  }]);
8750
9002
  }
8751
9003
  });
8752
9004
  };
8753
- return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledTableWrapper, {
8754
- id: "tableScrolling"
8755
- }, React__default.createElement(StyledTable, null, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", {
9005
+ React.useEffect(function () {
9006
+ if ((newpayload == null ? void 0 : newpayload.length) === 0) return;
9007
+ var groupedPayload = newpayload == null ? void 0 : newpayload.reduce(function (acc, item) {
9008
+ var return_location_token = item.return_location_token;
9009
+ if (!return_location_token) {
9010
+ acc.push(item);
9011
+ } else {
9012
+ if (!acc[return_location_token]) {
9013
+ acc[return_location_token] = _extends({}, item, {
9014
+ products: [],
9015
+ return_action: []
9016
+ });
9017
+ }
9018
+ acc[return_location_token].products = [].concat(acc[return_location_token].products, item.products);
9019
+ acc[return_location_token].return_action = [].concat(acc[return_location_token].return_action, item.return_action);
9020
+ }
9021
+ return acc;
9022
+ }, []);
9023
+ var mergedPayload = Object.values(groupedPayload);
9024
+ setGrouped(mergedPayload);
9025
+ }, [newpayload]);
9026
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledTableWrapper, null, React__default.createElement(StyledTable, null, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", {
8756
9027
  className: "emailInvoiceCheckbox"
8757
9028
  }, React__default.createElement(dmsComponentLibrary.Checkbox, {
8758
9029
  checked: selectAll,
8759
9030
  onChange: handleSelectAll
8760
- })), React__default.createElement("th", null, "Product Location"), React__default.createElement("th", null, "Return Location"), React__default.createElement("th", null, "Recipient"), React__default.createElement("th", null, "Code"), React__default.createElement("th", null, " Description"), React__default.createElement("th", null, "Part"), React__default.createElement("th", null, "Weight"), React__default.createElement("th", null, " CBM"), React__default.createElement("th", null, "Return Reason"), React__default.createElement("th", null, "Collected"), React__default.createElement("th", null, "Collection Reason"), React__default.createElement("th", {
9031
+ })), React__default.createElement("th", null, "Product Location"), React__default.createElement("th", null, "Return Location"), React__default.createElement("th", null, "Recipient"), React__default.createElement("th", null, "Code"), React__default.createElement("th", null, "Description"), React__default.createElement("th", null, "Part"), React__default.createElement("th", null, "Weight"), React__default.createElement("th", null, "CBM"), React__default.createElement("th", null, "Return Reason"), React__default.createElement("th", null, "Collected"), React__default.createElement("th", null, "Collection Reason"), React__default.createElement("th", {
8761
9032
  className: "emailInvoiceShare"
8762
9033
  }, "Labels"))), React__default.createElement("tbody", null, loadingskeleton ? React__default.createElement("tr", null, React__default.createElement("td", {
8763
9034
  colSpan: 6
@@ -8776,9 +9047,11 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
8776
9047
  return (selectedInvoice == null ? void 0 : selectedInvoice.id) === item.id;
8777
9048
  }),
8778
9049
  onChange: function onChange() {
8779
- return handleSelectInvoice(item.id);
9050
+ return handleSelectOrderReturn(item.id, item.return_location, item.return_locations, item.order_product_return_action);
8780
9051
  }
8781
- })), React__default.createElement("td", null, dmsComponentLibrary.displayValueOrNA(item == null || (_item$orders_products = item.orders_products_stock) == null ? void 0 : _item$orders_products.location)), React__default.createElement("td", null, " ", dmsComponentLibrary.displayValueOrNA(item == null ? void 0 : item.return_location)), React__default.createElement("td", null, React__default.createElement("ul", {
9052
+ })), React__default.createElement("td", null, item != null && (_item$orders_products = item.orders_products_stock) != null && _item$orders_products.location ? null : React__default.createElement("div", {
9053
+ className: "awaiting"
9054
+ }, "Awating")), React__default.createElement("td", null, " ", displayValueOrNA(item == null ? void 0 : item.return_location)), React__default.createElement("td", null, React__default.createElement("ul", {
8782
9055
  style: {
8783
9056
  listStyleType: 'none',
8784
9057
  padding: 0
@@ -8789,11 +9062,11 @@ var ReturnOrderTable = function ReturnOrderTable(_ref) {
8789
9062
  fontWeight: 600,
8790
9063
  paddingLeft: 0
8791
9064
  }
8792
- }, dmsComponentLibrary.displayValueOrNA(item == null || (_item$order_data = item.order_data) == null || (_item$order_data = _item$order_data.order_recipient) == null ? void 0 : _item$order_data.recipient_name)), React__default.createElement("li", {
9065
+ }, displayValueOrNA(item == null || (_item$order_data = item.order_data) == null || (_item$order_data = _item$order_data.order_recipient) == null ? void 0 : _item$order_data.recipient_name)), React__default.createElement("li", {
8793
9066
  style: {
8794
9067
  color: '#888075'
8795
9068
  }
8796
- }, dmsComponentLibrary.displayValueOrNA(item == null || (_item$order_data2 = item.order_data) == null || (_item$order_data2 = _item$order_data2.order_recipient) == null ? void 0 : _item$order_data2.postcode)))), React__default.createElement("td", null, dmsComponentLibrary.displayValueOrNA(item == null ? void 0 : item.code)), React__default.createElement("td", null, dmsComponentLibrary.displayValueOrNA(item == null ? void 0 : item.description)), React__default.createElement("td", null, "N/A"), React__default.createElement("td", null, dmsComponentLibrary.displayValueOrNA(item == null ? void 0 : item.weight), "KG"), React__default.createElement("td", null, dmsComponentLibrary.displayValueOrNA(item == null ? void 0 : item.cube)), React__default.createElement("td", null, dmsComponentLibrary.displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React__default.createElement("td", null, "N/A"), React__default.createElement("td", null, dmsComponentLibrary.displayValueOrNA(item == null || (_item$collection_reas = item.collection_reasons) == null ? void 0 : _item$collection_reas.reason)), React__default.createElement("td", null, React__default.createElement("ul", {
9069
+ }, displayValueOrNA(item == null || (_item$order_data2 = item.order_data) == null || (_item$order_data2 = _item$order_data2.order_recipient) == null ? void 0 : _item$order_data2.postcode)))), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.code)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.description)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.parts_count)), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.weight), "KG"), React__default.createElement("td", null, displayValueOrNA(item == null ? void 0 : item.cube)), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$return_reasons = item.return_reasons) == null ? void 0 : _item$return_reasons.reason)), React__default.createElement("td", null, "N/A"), React__default.createElement("td", null, displayValueOrNA(item == null || (_item$collection_reas = item.collection_reasons) == null ? void 0 : _item$collection_reas.reason)), React__default.createElement("td", null, React__default.createElement("ul", {
8797
9070
  className: "actionbox"
8798
9071
  }, React__default.createElement(CustomDrop, {
8799
9072
  ref: dropdownRefParent,
@@ -9311,161 +9584,7 @@ var ProductAction = function ProductAction() {
9311
9584
  var GLobalPopupContent$4 = /*#__PURE__*/styled__default.div(_templateObject$2c || (_templateObject$2c = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9312
9585
  var Container$1a = /*#__PURE__*/styled__default.div(_templateObject2$1B || (_templateObject2$1B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n height: 50vh;\n padding-bottom: 30px;\n flex-direction: column;\n align-items: flex-start;\n gap: 20px;\n align-self: stretch;\n border-radius: 6px;\n border: 1px solid #edebe8;\n padding: 15px;\n overflow-y: scroll;\n .ant-tabs {\n width: 100%;\n }\n .ant-tabs-tab-active {\n .ant-tabs-tab-btn {\n color: #3a3630 !important;\n font-family: 'Lato', sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n }\n }\n .ant-tabs-ink-bar {\n background: #feba30;\n }\n"])));
9313
9586
 
9314
- var BarCode = function BarCode() {
9315
- return React__default.createElement("svg", {
9316
- xmlns: "http://www.w3.org/2000/svg",
9317
- width: "18",
9318
- height: "18",
9319
- viewBox: "0 0 18 18",
9320
- fill: "none"
9321
- }, React__default.createElement("path", {
9322
- d: "M1.5 4.3125C1.5 3.76549 1.7173 3.24089 2.10409 2.85409C2.49089 2.4673 3.01549 2.25 3.5625 2.25H4.6875C4.83668 2.25 4.97976 2.30926 5.08525 2.41475C5.19074 2.52024 5.25 2.66332 5.25 2.8125C5.25 2.96168 5.19074 3.10476 5.08525 3.21025C4.97976 3.31574 4.83668 3.375 4.6875 3.375H3.5625C3.045 3.375 2.625 3.795 2.625 4.3125V5.4375C2.625 5.58668 2.56574 5.72976 2.46025 5.83525C2.35476 5.94074 2.21168 6 2.0625 6C1.91332 6 1.77024 5.94074 1.66475 5.83525C1.55926 5.72976 1.5 5.58668 1.5 5.4375V4.3125ZM12.75 2.8125C12.75 2.66332 12.8093 2.52024 12.9148 2.41475C13.0202 2.30926 13.1633 2.25 13.3125 2.25H14.4375C14.9845 2.25 15.5091 2.4673 15.8959 2.85409C16.2827 3.24089 16.5 3.76549 16.5 4.3125V5.4375C16.5 5.58668 16.4407 5.72976 16.3352 5.83525C16.2298 5.94074 16.0867 6 15.9375 6C15.7883 6 15.6452 5.94074 15.5398 5.83525C15.4343 5.72976 15.375 5.58668 15.375 5.4375V4.3125C15.375 3.795 14.955 3.375 14.4375 3.375H13.3125C13.1633 3.375 13.0202 3.31574 12.9148 3.21025C12.8093 3.10476 12.75 2.96168 12.75 2.8125ZM2.0625 12C2.21168 12 2.35476 12.0593 2.46025 12.1648C2.56574 12.2702 2.625 12.4133 2.625 12.5625V13.6875C2.625 14.205 3.045 14.625 3.5625 14.625H4.6875C4.83668 14.625 4.97976 14.6843 5.08525 14.7898C5.19074 14.8952 5.25 15.0383 5.25 15.1875C5.25 15.3367 5.19074 15.4798 5.08525 15.5852C4.97976 15.6907 4.83668 15.75 4.6875 15.75H3.5625C3.01549 15.75 2.49089 15.5327 2.10409 15.1459C1.7173 14.7591 1.5 14.2345 1.5 13.6875V12.5625C1.5 12.4133 1.55926 12.2702 1.66475 12.1648C1.77024 12.0593 1.91332 12 2.0625 12ZM15.9375 12C16.0867 12 16.2298 12.0593 16.3352 12.1648C16.4407 12.2702 16.5 12.4133 16.5 12.5625V13.6875C16.5 14.2345 16.2827 14.7591 15.8959 15.1459C15.5091 15.5327 14.9845 15.75 14.4375 15.75H13.3125C13.1633 15.75 13.0202 15.6907 12.9148 15.5852C12.8093 15.4798 12.75 15.3367 12.75 15.1875C12.75 15.0383 12.8093 14.8952 12.9148 14.7898C13.0202 14.6843 13.1633 14.625 13.3125 14.625H14.4375C14.955 14.625 15.375 14.205 15.375 13.6875V12.5625C15.375 12.4133 15.4343 12.2702 15.5398 12.1648C15.6452 12.0593 15.7883 12 15.9375 12ZM4.3125 5.25C4.46168 5.25 4.60476 5.30926 4.71025 5.41475C4.81574 5.52024 4.875 5.66332 4.875 5.8125V12.1875C4.875 12.3367 4.81574 12.4798 4.71025 12.5852C4.60476 12.6907 4.46168 12.75 4.3125 12.75C4.16332 12.75 4.02024 12.6907 3.91475 12.5852C3.80926 12.4798 3.75 12.3367 3.75 12.1875V5.8125C3.75 5.66332 3.80926 5.52024 3.91475 5.41475C4.02024 5.30926 4.16332 5.25 4.3125 5.25ZM7.875 5.8125C7.875 5.66332 7.81574 5.52024 7.71025 5.41475C7.60476 5.30926 7.46168 5.25 7.3125 5.25C7.16332 5.25 7.02024 5.30926 6.91475 5.41475C6.80926 5.52024 6.75 5.66332 6.75 5.8125V12.1875C6.75 12.3367 6.80926 12.4798 6.91475 12.5852C7.02024 12.6907 7.16332 12.75 7.3125 12.75C7.46168 12.75 7.60476 12.6907 7.71025 12.5852C7.81574 12.4798 7.875 12.3367 7.875 12.1875V5.8125ZM10.3125 5.25C10.4617 5.25 10.6048 5.30926 10.7102 5.41475C10.8157 5.52024 10.875 5.66332 10.875 5.8125V12.1875C10.875 12.3367 10.8157 12.4798 10.7102 12.5852C10.6048 12.6907 10.4617 12.75 10.3125 12.75C10.1633 12.75 10.0202 12.6907 9.91475 12.5852C9.80926 12.4798 9.75 12.3367 9.75 12.1875V5.8125C9.75 5.66332 9.80926 5.52024 9.91475 5.41475C10.0202 5.30926 10.1633 5.25 10.3125 5.25ZM13.875 5.8125C13.875 5.66332 13.8157 5.52024 13.7102 5.41475C13.6048 5.30926 13.4617 5.25 13.3125 5.25C13.1633 5.25 13.0202 5.30926 12.9148 5.41475C12.8093 5.52024 12.75 5.66332 12.75 5.8125V12.1875C12.75 12.3367 12.8093 12.4798 12.9148 12.5852C13.0202 12.6907 13.1633 12.75 13.3125 12.75C13.4617 12.75 13.6048 12.6907 13.7102 12.5852C13.8157 12.4798 13.875 12.3367 13.875 12.1875V5.8125Z",
9323
- fill: "#3A3630",
9324
- fillOpacity: "0.8"
9325
- }));
9326
- };
9327
-
9328
- var WeightIcon = function WeightIcon() {
9329
- return React__default.createElement("svg", {
9330
- xmlns: "http://www.w3.org/2000/svg",
9331
- width: "18",
9332
- height: "18",
9333
- viewBox: "0 0 18 18",
9334
- fill: "none"
9335
- }, React__default.createElement("path", {
9336
- d: "M9 2.25C9.79565 2.25 10.5587 2.56607 11.1213 3.12868C11.6839 3.69129 12 4.45435 12 5.25C12 5.7975 11.8575 6.3075 11.595 6.75H13.5C14.2125 6.75 14.8125 7.2525 14.9625 7.92C16.47 13.9275 16.5 14.085 16.5 14.25C16.5 14.6478 16.342 15.0294 16.0607 15.3107C15.7794 15.592 15.3978 15.75 15 15.75H3C2.60218 15.75 2.22064 15.592 1.93934 15.3107C1.65804 15.0294 1.5 14.6478 1.5 14.25C1.5 14.085 1.53 13.9275 3.0375 7.92C3.1875 7.2525 3.7875 6.75 4.5 6.75H6.405C6.13724 6.29565 5.99731 5.77737 6 5.25C6 4.45435 6.31607 3.69129 6.87868 3.12868C7.44129 2.56607 8.20435 2.25 9 2.25ZM9 3.75C8.60218 3.75 8.22064 3.90804 7.93934 4.18934C7.65804 4.47064 7.5 4.85218 7.5 5.25C7.5 5.64782 7.65804 6.02936 7.93934 6.31066C8.22064 6.59196 8.60218 6.75 9 6.75C9.39782 6.75 9.77936 6.59196 10.0607 6.31066C10.342 6.02936 10.5 5.64782 10.5 5.25C10.5 4.85218 10.342 4.47064 10.0607 4.18934C9.77936 3.90804 9.39782 3.75 9 3.75ZM4.5 8.25V14.25H6V12.375L6.75 13.125V14.25H8.25V12.75L6.75 11.25L8.25 9.75V8.25H6.75V9.375L6 10.125V8.25H4.5ZM11.25 8.25C10.4175 8.25 9.75 8.9175 9.75 9.75V12.75C9.75 13.5825 10.4175 14.25 11.25 14.25H13.5V10.5H12V12.75H11.25V9.75H13.5V8.25H11.25Z",
9337
- fill: "#3A3630",
9338
- fillOpacity: "0.6"
9339
- }));
9340
- };
9341
-
9342
- var CbmIcon = function CbmIcon() {
9343
- return React__default.createElement("svg", {
9344
- xmlns: "http://www.w3.org/2000/svg",
9345
- width: "18",
9346
- height: "18",
9347
- viewBox: "0 0 18 18",
9348
- fill: "none"
9349
- }, React__default.createElement("path", {
9350
- d: "M13.4213 2.66475C13.3589 2.54013 13.2631 2.43533 13.1446 2.36208C13.026 2.28883 12.8894 2.25002 12.75 2.25H5.25005C4.9658 2.25 4.7063 2.4105 4.5788 2.66475L1.5788 8.66475C1.52666 8.76895 1.49951 8.88386 1.49951 9.00037C1.49951 9.11689 1.52666 9.2318 1.5788 9.336L4.5788 15.336C4.7063 15.5895 4.9658 15.75 5.25005 15.75H12.75C13.0343 15.75 13.2938 15.5895 13.4213 15.3353L16.4213 9.33525C16.4734 9.23105 16.5006 9.11614 16.5006 8.99963C16.5006 8.88311 16.4734 8.7682 16.4213 8.664L13.4213 2.66475ZM14.5365 8.25H8.71355L6.46355 3.75H12.2865L14.5365 8.25ZM3.08855 9L5.25005 4.677L7.41155 9L5.25005 13.323L3.08855 9ZM12.2865 14.25H6.46355L8.71355 9.75H14.5365L12.2865 14.25Z",
9351
- fill: "#3A3630",
9352
- fillOpacity: "0.6"
9353
- }));
9354
- };
9355
-
9356
- var _templateObject$2d, _templateObject2$1C;
9357
- var AddProduct = function AddProduct() {
9358
- var _orderStaticData$orde;
9359
- var _useCreateOrderProduc = useCreateOrderProducts(),
9360
- orderProduct = _useCreateOrderProduc[0],
9361
- setOrderProduct = _useCreateOrderProduc[1];
9362
- var _useOrderStaticData = useOrderStaticData(),
9363
- orderStaticData = _useOrderStaticData[0];
9364
- var typeOptions = orderStaticData == null || (_orderStaticData$orde = orderStaticData.order_product_type) == null ? void 0 : _orderStaticData$orde.map(function (option) {
9365
- return {
9366
- label: option == null ? void 0 : option.type,
9367
- value: option == null ? void 0 : option.id
9368
- };
9369
- });
9370
- var handleInputChange = function handleInputChange(index, field, value) {
9371
- setOrderProduct(function (prevProducts) {
9372
- var _extends2;
9373
- var newProducts = [].concat(prevProducts);
9374
- newProducts[index] = _extends({}, newProducts[index], (_extends2 = {}, _extends2[field] = value, _extends2));
9375
- return newProducts;
9376
- });
9377
- };
9378
- var onSelectChange = function onSelectChange(index, value) {
9379
- handleInputChange(index, 'product_type_id', +value);
9380
- };
9381
- var onSearch = function onSearch(value) {
9382
- console.log('search item value:', value);
9383
- };
9384
- return React__default.createElement(GLobalPopupContent$5, null, React__default.createElement(SimpleTable, null, React__default.createElement("table", null, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", null, "Product Type"), React__default.createElement("th", {
9385
- style: {
9386
- width: '130px'
9387
- }
9388
- }, React__default.createElement("span", null, "Code ", React__default.createElement("em", null, "*"))), React__default.createElement("th", {
9389
- style: {
9390
- width: '33%'
9391
- }
9392
- }, React__default.createElement("span", null, "Description ", React__default.createElement("em", null, "*"))), React__default.createElement("th", null, "Barcode"), React__default.createElement("th", {
9393
- style: {
9394
- width: '120px'
9395
- }
9396
- }, "Weight"), React__default.createElement("th", {
9397
- style: {
9398
- width: '120px'
9399
- }
9400
- }, "CBM"))), React__default.createElement("tbody", null, orderProduct.length > 0 && (orderProduct == null ? void 0 : orderProduct.map(function (item, index) {
9401
- return React__default.createElement("tr", {
9402
- key: index
9403
- }, React__default.createElement("td", null, React__default.createElement(dmsComponentLibrary.AntSelect, {
9404
- options: typeOptions,
9405
- placeholder: "Deliver",
9406
- onChange: function onChange(value) {
9407
- return onSelectChange(index, value);
9408
- },
9409
- disabled: false,
9410
- style: {
9411
- width: 120
9412
- },
9413
- onSearch: onSearch,
9414
- showSearch: true,
9415
- popupClassName: 'dropDownStyle',
9416
- selectWrapperClass: ''
9417
- })), React__default.createElement("td", null, React__default.createElement("div", {
9418
- className: "inputWrap"
9419
- }, React__default.createElement("input", {
9420
- type: "text",
9421
- placeholder: "code",
9422
- value: item.code,
9423
- onChange: function onChange(e) {
9424
- return handleInputChange(index, 'code', e.target.value);
9425
- }
9426
- }))), React__default.createElement("td", null, React__default.createElement("div", {
9427
- className: "inputWrap"
9428
- }, React__default.createElement("input", {
9429
- type: "text",
9430
- placeholder: "Enter Description of Product",
9431
- value: item.description,
9432
- onChange: function onChange(e) {
9433
- return handleInputChange(index, 'description', e.target.value);
9434
- }
9435
- }))), React__default.createElement("td", null, React__default.createElement("div", {
9436
- className: "inputWrap"
9437
- }, React__default.createElement("input", {
9438
- type: "text",
9439
- placeholder: "Enter barcode of product",
9440
- value: item.sku,
9441
- onChange: function onChange(e) {
9442
- return handleInputChange(index, 'sku', e.target.value);
9443
- }
9444
- }), React__default.createElement(BarCode, null))), React__default.createElement("td", null, React__default.createElement("div", {
9445
- className: "inputWrap"
9446
- }, React__default.createElement("input", {
9447
- type: "text",
9448
- placeholder: "00.00",
9449
- value: item.weight,
9450
- onChange: function onChange(e) {
9451
- return handleInputChange(index, 'weight', parseFloat(e.target.value));
9452
- }
9453
- }), React__default.createElement(WeightIcon, null))), React__default.createElement("td", null, React__default.createElement("div", {
9454
- className: "inputWrap"
9455
- }, React__default.createElement("input", {
9456
- type: "text",
9457
- placeholder: "00.00",
9458
- value: item.cube,
9459
- onChange: function onChange(e) {
9460
- return handleInputChange(index, 'cube', parseFloat(e.target.value));
9461
- }
9462
- }), React__default.createElement(CbmIcon, null))));
9463
- }))))));
9464
- };
9465
- var GLobalPopupContent$5 = /*#__PURE__*/styled__default.div(_templateObject$2d || (_templateObject$2d = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9466
- var SimpleTable = /*#__PURE__*/styled__default.div(_templateObject2$1C || (_templateObject2$1C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0 15px;\n min-height: 158px;\n table {\n border-spacing: 0px 12px;\n border-collapse: separate;\n thead {\n tr {\n th {\n padding: 0 10px 0;\n color: #6a7378;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n span {\n position: relative;\n em {\n color: #fc5555;\n font-style: normal;\n }\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 10px 8px;\n background: #f8fafc;\n box-shadow: 5px 1px 5px 0px rgba(16, 24, 40, 0.1);\n\n .inputWrap {\n position: relative;\n input[type='text'] {\n border-radius: 6px;\n border: 1px solid #e0e2e7;\n background: #fff;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n padding: 8px 10px;\n width: 100%;\n padding-right: 30px;\n &:focus-visible {\n outline: none;\n }\n }\n svg {\n position: absolute;\n right: 11px;\n top: 7px;\n }\n }\n &:first-child {\n border-radius: 5px 0 0 5px;\n }\n &:last-child {\n border-radius: 0 5px 5px 0;\n }\n }\n }\n }\n }\n"])));
9467
-
9468
- var _templateObject$2e;
9587
+ var _templateObject$2d;
9469
9588
  var LogsTable = function LogsTable() {
9470
9589
  var options = [{
9471
9590
  value: 'bjsCouriers',
@@ -9540,9 +9659,9 @@ var LogsTable = function LogsTable() {
9540
9659
  }
9541
9660
  })));
9542
9661
  };
9543
- var GlobalPopupContent = /*#__PURE__*/styled__default.div(_templateObject$2e || (_templateObject$2e = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9662
+ var GlobalPopupContent = /*#__PURE__*/styled__default.div(_templateObject$2d || (_templateObject$2d = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9544
9663
 
9545
- var _templateObject$2f, _templateObject2$1D;
9664
+ var _templateObject$2e, _templateObject2$1C;
9546
9665
  var DefectsModal = function DefectsModal() {
9547
9666
  var options = [{
9548
9667
  value: 'bjsCouriers',
@@ -9585,7 +9704,7 @@ var DefectsModal = function DefectsModal() {
9585
9704
  key: 'images',
9586
9705
  title: 'Images'
9587
9706
  }];
9588
- return React__default.createElement(React__default.Fragment, null, React__default.createElement(GLobalPopupContent$6, null, React__default.createElement(StyledConatiner, null, React__default.createElement(dmsComponentLibrary.AntTable, {
9707
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement(GLobalPopupContent$5, null, React__default.createElement(StyledConatiner, null, React__default.createElement(dmsComponentLibrary.AntTable, {
9589
9708
  columns: columns,
9590
9709
  data: DefectsData,
9591
9710
  selectOptions: options,
@@ -9594,10 +9713,10 @@ var DefectsModal = function DefectsModal() {
9594
9713
  }
9595
9714
  }))));
9596
9715
  };
9597
- var StyledConatiner = /*#__PURE__*/styled__default.div(_templateObject$2f || (_templateObject$2f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* tex: nowrap; */\n"])));
9598
- var GLobalPopupContent$6 = /*#__PURE__*/styled__default.div(_templateObject2$1D || (_templateObject2$1D = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9716
+ var StyledConatiner = /*#__PURE__*/styled__default.div(_templateObject$2e || (_templateObject$2e = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* tex: nowrap; */\n"])));
9717
+ var GLobalPopupContent$5 = /*#__PURE__*/styled__default.div(_templateObject2$1C || (_templateObject2$1C = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9599
9718
 
9600
- var _templateObject$2g;
9719
+ var _templateObject$2f;
9601
9720
  var repackModal = function repackModal() {
9602
9721
  var columns = [{
9603
9722
  key: 'packaging_type',
@@ -9627,28 +9746,24 @@ var repackModal = function repackModal() {
9627
9746
  }
9628
9747
  }))));
9629
9748
  };
9630
- var StyledConatiner$1 = /*#__PURE__*/styled__default.div(_templateObject$2g || (_templateObject$2g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* text-wrap: nowrap; */\n"])));
9749
+ var StyledConatiner$1 = /*#__PURE__*/styled__default.div(_templateObject$2f || (_templateObject$2f = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* text-wrap: nowrap; */\n"])));
9631
9750
 
9632
- var _templateObject$2h, _templateObject2$1E, _templateObject3$X;
9751
+ var _templateObject$2g, _templateObject2$1D, _templateObject3$X;
9633
9752
  var CreateReturnModal = function CreateReturnModal() {
9634
- var _useState = React.useState(),
9753
+ var _useState = React.useState([]),
9754
+ selectedlocation = _useState[0],
9635
9755
  setSelectedLocations = _useState[1];
9636
- var _useLocationData = useLocationData(),
9637
- locationData = _useLocationData[0];
9756
+ var _useSelectedOrders = useSelectedOrders(),
9757
+ selectedReturnOrder = _useSelectedOrders[0];
9638
9758
  var handleSelectLocations = function handleSelectLocations(id) {
9639
9759
  setSelectedLocations(function (prevSelectedLocations) {
9640
- var isSelected = prevSelectedLocations == null ? void 0 : prevSelectedLocations.some(function (location) {
9641
- return location.id === id;
9642
- });
9760
+ var isSelected = prevSelectedLocations.includes(id);
9643
9761
  if (isSelected) {
9644
- return prevSelectedLocations.filter(function (invoice) {
9645
- return invoice.id !== id;
9762
+ return prevSelectedLocations.filter(function (selectedId) {
9763
+ return selectedId !== id;
9646
9764
  });
9647
9765
  } else {
9648
- return [].concat(prevSelectedLocations, [{
9649
- id: id,
9650
- status_id: 3
9651
- }]);
9766
+ return [].concat(prevSelectedLocations, [id]);
9652
9767
  }
9653
9768
  });
9654
9769
  };
@@ -9663,38 +9778,38 @@ var CreateReturnModal = function CreateReturnModal() {
9663
9778
  listStyle: 'none',
9664
9779
  padding: 0
9665
9780
  }
9666
- }, locationData == null ? void 0 : locationData.map(function (invoice) {
9781
+ }, selectedReturnOrder == null ? void 0 : selectedReturnOrder.map(function (returnLoc) {
9667
9782
  return React__default.createElement("li", {
9668
- key: invoice.id,
9783
+ key: returnLoc.id,
9669
9784
  style: {
9670
9785
  marginBottom: '8px',
9671
9786
  display: 'flex',
9672
9787
  alignItems: 'center'
9673
9788
  }
9674
9789
  }, React__default.createElement(dmsComponentLibrary.Checkbox, {
9675
- checked: true,
9790
+ checked: selectedlocation.includes(returnLoc.id),
9676
9791
  onChange: function onChange() {
9677
- return handleSelectLocations(invoice.id);
9792
+ return handleSelectLocations(returnLoc.id);
9678
9793
  }
9679
9794
  }), React__default.createElement(StyledText$1, {
9680
9795
  style: {
9681
9796
  marginLeft: '8px'
9682
9797
  }
9683
- }, invoice.location_name));
9798
+ }, returnLoc == null ? void 0 : returnLoc.return_location));
9684
9799
  }))));
9685
9800
  };
9686
- var StyledText$1 = /*#__PURE__*/styled__default.div(_templateObject$2h || (_templateObject$2h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
9687
- var Container$1b = /*#__PURE__*/styled__default.div(_templateObject2$1E || (_templateObject2$1E = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9801
+ var StyledText$1 = /*#__PURE__*/styled__default.div(_templateObject$2g || (_templateObject$2g = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
9802
+ var Container$1b = /*#__PURE__*/styled__default.div(_templateObject2$1D || (_templateObject2$1D = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9688
9803
  var Wrapper$l = /*#__PURE__*/styled__default.div(_templateObject3$X || (_templateObject3$X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 15px;\n flex-direction: column;\n justify-content: center;\n align-items: flex-start;\n gap: 15px;\n align-self: stretch;\n border-radius: 8px;\n background: #f8fafc;\n box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1);\n"])));
9689
9804
 
9805
+ var _excluded$2 = ["id"];
9690
9806
  var ModalManager = function ModalManager() {
9691
9807
  var _useAtom = jotai.useAtom(countReducerAtom),
9692
9808
  popupName = _useAtom[0],
9693
9809
  dispatch = _useAtom[1];
9694
9810
  var _useProductDetails = useProductDetails();
9695
9811
  var _useCreateOrderProduc = useCreateOrderProducts(),
9696
- orderProduct = _useCreateOrderProduc[0],
9697
- setOrderProduct = _useCreateOrderProduc[1];
9812
+ orderProduct = _useCreateOrderProduc[0];
9698
9813
  var _useOrderId = useOrderId(),
9699
9814
  orderId = _useOrderId[0];
9700
9815
  var _useDeleteProdsID = useDeleteProdsID(),
@@ -9711,6 +9826,9 @@ var ModalManager = function ModalManager() {
9711
9826
  selectedTab = _useAtom3[0];
9712
9827
  var _useState = React.useState(false),
9713
9828
  setIsFormValid = _useState[1];
9829
+ var _useNewReturnPayload = useNewReturnPayload(),
9830
+ newPayload = _useNewReturnPayload[0],
9831
+ setNewPayload = _useNewReturnPayload[1];
9714
9832
  console.log(orderProduct, 'abcabcabcabcabcabcabcabcabcabcabc');
9715
9833
  var _closeModal = function closeModal() {
9716
9834
  dispatch({
@@ -9761,68 +9879,73 @@ var ModalManager = function ModalManager() {
9761
9879
  // }
9762
9880
  // };
9763
9881
  // API block for creating product order
9764
- var _useApiHook = dmsComponentLibrary.useApiHook({
9765
- endpoint: "order/order_products/create/",
9766
- method: 'POST',
9767
- body: [orderProduct],
9768
- performAction: false
9769
- }),
9770
- response = _useApiHook.data,
9771
- setOrderAction = _useApiHook.setShouldPerformAction;
9772
- var validateAddForm = function validateAddForm() {
9773
- if (!Array.isArray(orderProduct)) return false;
9774
- return orderProduct.every(function (product) {
9775
- return product.code !== '' && product.description !== '' && product.weight !== 0 && product.cube !== 0 && product.order_product_type_id !== 0 && product.sku !== '';
9776
- });
9777
- };
9778
- React.useEffect(function () {
9779
- setAddIsFormValid(validateAddForm());
9780
- }, [orderProduct]);
9781
- var onAddOrderProduct = function onAddOrderProduct() {
9782
- if (isAddFormValid) {
9783
- setOrderProduct(function (prev) {
9784
- return prev.map(function (product) {
9785
- return _extends({}, product, {
9786
- order_id: orderId
9787
- });
9788
- });
9789
- });
9790
- setOrderAction(true);
9791
- } else {
9792
- console.log('Please fill in all required fields before proceeding.');
9793
- }
9794
- };
9795
- React.useEffect(function () {
9796
- if (response && response != null && response.data) {
9797
- dispatch({
9798
- type: 'close'
9799
- });
9800
- }
9801
- }, [response]);
9802
- var _useState2 = React.useState(false),
9803
- isAddFormValid = _useState2[0],
9804
- setAddIsFormValid = _useState2[1];
9805
- var AddMore = function AddMore() {
9806
- setOrderProduct(function (prevProducts) {
9807
- return [].concat(prevProducts, [{
9808
- code: '',
9809
- description: '',
9810
- sku: '',
9811
- weight: '',
9812
- cube: '',
9813
- order_product_type_id: ''
9814
- }]);
9815
- });
9816
- };
9882
+ // const {
9883
+ // data: response,
9884
+ // setShouldPerformAction: setOrderAction,
9885
+ // } = useApiHook<{
9886
+ // data: ApiResponse[];
9887
+ // }>({
9888
+ // endpoint: `order/order_products/create/`,
9889
+ // method: 'POST',
9890
+ // body: [orderProduct],
9891
+ // performAction: false,
9892
+ // });
9893
+ // const validateAddForm = () => {
9894
+ // if (!Array.isArray(orderProduct)) return false;
9895
+ // return orderProduct.every(
9896
+ // (product: any) =>
9897
+ // product.code !== '' &&
9898
+ // product.description !== '' &&
9899
+ // product.weight !== 0 &&
9900
+ // product.cube !== 0 &&
9901
+ // product.order_product_type_id !== 0 &&
9902
+ // product.sku !== ''
9903
+ // );
9904
+ // };
9905
+ // useEffect(() => {
9906
+ // setAddIsFormValid(validateAddForm());
9907
+ // }, [orderProduct]);
9908
+ // const onAddOrderProduct = () => {
9909
+ // if (isAddFormValid) {
9910
+ // setOrderProduct((prev: any) =>
9911
+ // prev.map((product: any) => ({
9912
+ // ...product,
9913
+ // order_id: orderId,
9914
+ // }))
9915
+ // );
9916
+ // setOrderAction(true);
9917
+ // } else {
9918
+ // console.log('Please fill in all required fields before proceeding.');
9919
+ // }
9920
+ // };
9921
+ // useEffect(() => {
9922
+ // if (response && response?.data) {
9923
+ // dispatch({ type: 'close' });
9924
+ // }
9925
+ // }, [response]);
9926
+ // const [isAddFormValid, setAddIsFormValid] = useState(false);
9927
+ // const AddMore = () => {
9928
+ // setOrderProduct((prevProducts: any) => [
9929
+ // ...prevProducts,
9930
+ // {
9931
+ // code: '',
9932
+ // description: '',
9933
+ // sku: '',
9934
+ // weight: '',
9935
+ // cube: '',
9936
+ // order_product_type_id: '',
9937
+ // },
9938
+ // ]);
9939
+ // };
9817
9940
  // api block for the create product order
9818
- var _useApiHook2 = dmsComponentLibrary.useApiHook({
9941
+ var _useApiHook = dmsComponentLibrary.useApiHook({
9819
9942
  endpoint: "order/order_products/unrecieve/",
9820
9943
  method: 'POST',
9821
9944
  body: [unRecieve],
9822
9945
  performAction: false
9823
9946
  }),
9824
- actionResponse = _useApiHook2.data,
9825
- setUnrecieveaction = _useApiHook2.setShouldPerformAction;
9947
+ actionResponse = _useApiHook.data,
9948
+ setUnrecieveaction = _useApiHook.setShouldPerformAction;
9826
9949
  React.useEffect(function () {
9827
9950
  if (actionResponse && actionResponse != null && actionResponse.data) {
9828
9951
  dispatch({
@@ -9831,14 +9954,14 @@ var ModalManager = function ModalManager() {
9831
9954
  }
9832
9955
  }, [actionResponse]);
9833
9956
  // api block for the update product order
9834
- var _useApiHook3 = dmsComponentLibrary.useApiHook({
9957
+ var _useApiHook2 = dmsComponentLibrary.useApiHook({
9835
9958
  endpoint: "order/order_products/type/update/",
9836
9959
  method: 'PUT',
9837
9960
  body: [updateOrderProduct],
9838
9961
  performAction: false
9839
9962
  }),
9840
- updateResponse = _useApiHook3.data,
9841
- setUpdateSction = _useApiHook3.setShouldPerformAction;
9963
+ updateResponse = _useApiHook2.data,
9964
+ setUpdateSction = _useApiHook2.setShouldPerformAction;
9842
9965
  // const onUnrecieveProductOrder = () => {
9843
9966
  // setUnRecieve((prev: any) => ({
9844
9967
  // ...prev,
@@ -9877,6 +10000,28 @@ var ModalManager = function ModalManager() {
9877
10000
  });
9878
10001
  }
9879
10002
  }, [updateResponse]);
10003
+ //Confirm return popup
10004
+ var _useApiHook3 = dmsComponentLibrary.useApiHook({
10005
+ endpoint: "return_orders/",
10006
+ method: 'POST',
10007
+ body: [newPayload],
10008
+ performAction: false
10009
+ }),
10010
+ response = _useApiHook3.data,
10011
+ setShouldPerformAction = _useApiHook3.setShouldPerformAction;
10012
+ var handleConfirmReturn = function handleConfirmReturn() {
10013
+ var payloadWithoutId = newPayload == null ? void 0 : newPayload.map(function (_ref) {
10014
+ var rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
10015
+ return _extends({}, rest);
10016
+ });
10017
+ console.log(response);
10018
+ if (payloadWithoutId) {
10019
+ setNewPayload(payloadWithoutId);
10020
+ setShouldPerformAction(true);
10021
+ } else {
10022
+ setShouldPerformAction(false);
10023
+ }
10024
+ };
9880
10025
  return React__default.createElement(React__default.Fragment, null, (popupName == null ? void 0 : popupName.state) == 'create-return' && React__default.createElement(dmsComponentLibrary.AntModal, {
9881
10026
  openStatus: (popupName == null ? void 0 : popupName.state) == 'create-return' ? true : false,
9882
10027
  closeModal: function closeModal() {
@@ -9890,37 +10035,15 @@ var ModalManager = function ModalManager() {
9890
10035
  btns: [{
9891
10036
  name: 'Submit',
9892
10037
  btnStyle: 'rounded',
9893
- type: 'button'
10038
+ onClick: handleConfirmReturn,
10039
+ type: 'button',
10040
+ disabled: !newPayload
9894
10041
  }],
9895
10042
  btnAlign: 'justifyEnd'
9896
10043
  },
9897
10044
  BodyComponent: CreateReturnModal,
9898
10045
  width: 800,
9899
10046
  classNameAdd: 'globalPopup'
9900
- }), (popupName == null ? void 0 : popupName.state) === 'addProduct' && React__default.createElement(dmsComponentLibrary.AntModal, {
9901
- openStatus: (popupName == null ? void 0 : popupName.state) === 'addProduct',
9902
- closeModal: _closeModal,
9903
- PopupHeader: {
9904
- heading: 'Add Product(s) to Order',
9905
- subHeading: 'Full Stock Control'
9906
- },
9907
- PopupFooter: {
9908
- btns: [{
9909
- name: 'Add More Product',
9910
- btnStyle: 'normalLink',
9911
- icon: 'addIcon',
9912
- onClick: AddMore
9913
- }, {
9914
- name: 'Save Details',
9915
- btnStyle: 'rounded',
9916
- onClick: onAddOrderProduct,
9917
- disabled: !isAddFormValid
9918
- }],
9919
- btnAlign: 'justifySpaceBetween'
9920
- },
9921
- BodyComponent: AddProduct,
9922
- width: 1104,
9923
- classNameAdd: 'globalPopup'
9924
10047
  }), (popupName == null ? void 0 : popupName.state) === 'qclog' && React__default.createElement(dmsComponentLibrary.AntModal, {
9925
10048
  openStatus: (popupName == null ? void 0 : popupName.state) === 'qclog',
9926
10049
  closeModal: _closeModal,
@@ -9993,14 +10116,14 @@ var ModalManager = function ModalManager() {
9993
10116
  }));
9994
10117
  };
9995
10118
 
9996
- var _templateObject$2i, _templateObject2$1F;
10119
+ var _templateObject$2h, _templateObject2$1E;
9997
10120
  var ReturnTable = function ReturnTable() {
9998
10121
  return React__default.createElement("div", null, React__default.createElement(DashBoardWrapper$1, null, React__default.createElement(RouterHeader, null), React__default.createElement("div", {
9999
10122
  className: "Tableconatiner"
10000
10123
  }, React__default.createElement(HeaderFilter, null), React__default.createElement(Container$1c, null, React__default.createElement(ReturnFilter, null), React__default.createElement(ReturnOrderTable, null)))), React__default.createElement(ModalManager, null));
10001
10124
  };
10002
- var Container$1c = /*#__PURE__*/styled__default.div(_templateObject$2i || (_templateObject$2i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
10003
- var DashBoardWrapper$1 = /*#__PURE__*/styled__default.section(_templateObject2$1F || (_templateObject2$1F = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
10125
+ var Container$1c = /*#__PURE__*/styled__default.div(_templateObject$2h || (_templateObject$2h = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
10126
+ var DashBoardWrapper$1 = /*#__PURE__*/styled__default.section(_templateObject2$1E || (_templateObject2$1E = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
10004
10127
 
10005
10128
  function LoadIcon() {
10006
10129
  return React__default.createElement("svg", {
@@ -10223,7 +10346,7 @@ var OrderTable = function OrderTable(_ref) {
10223
10346
  })))));
10224
10347
  };
10225
10348
 
10226
- var _templateObject$2j, _templateObject2$1G, _templateObject3$Y, _templateObject4$E;
10349
+ var _templateObject$2i, _templateObject2$1F, _templateObject3$Y, _templateObject4$E;
10227
10350
  var TableFilters = function TableFilters() {
10228
10351
  return React__default.createElement(Container$1d, null, React__default.createElement(StyledBulkItem, null, React__default.createElement(SearchType, null)), React__default.createElement(IconConatiner$1, null, React__default.createElement(Mid$1, null, React__default.createElement(IconText$1, null, "Export"), React__default.createElement(DownloadIcon, null))));
10229
10352
  // return (
@@ -10239,8 +10362,8 @@ var TableFilters = function TableFilters() {
10239
10362
  // // </StyledBulkFilterCover>
10240
10363
  // );
10241
10364
  };
10242
- var Container$1d = /*#__PURE__*/styled__default.div(_templateObject$2j || (_templateObject$2j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
10243
- var Mid$1 = /*#__PURE__*/styled__default.div(_templateObject2$1G || (_templateObject2$1G = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 10px 10px 10px 10px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n /* border-radius: 15px 15px 15px 15px; */\n"])));
10365
+ var Container$1d = /*#__PURE__*/styled__default.div(_templateObject$2i || (_templateObject$2i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
10366
+ var Mid$1 = /*#__PURE__*/styled__default.div(_templateObject2$1F || (_templateObject2$1F = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 10px 10px 10px 10px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n /* border-radius: 15px 15px 15px 15px; */\n"])));
10244
10367
  // const TextConatiner = styled.div`
10245
10368
  // display: flex;
10246
10369
  // padding: 7px 12px;
@@ -10307,41 +10430,6 @@ var DateIcon = function DateIcon() {
10307
10430
  }));
10308
10431
  };
10309
10432
 
10310
- var DownArrowIcon = function DownArrowIcon() {
10311
- return React__default.createElement("svg", {
10312
- xmlns: "http://www.w3.org/2000/svg",
10313
- width: "8",
10314
- height: "4",
10315
- viewBox: "0 0 8 4",
10316
- fill: "none"
10317
- }, React__default.createElement("path", {
10318
- d: "M0.350098 0.125L4.1001 3.875L7.8501 0.125H0.350098Z",
10319
- fill: "#888075"
10320
- }));
10321
- };
10322
-
10323
- var StatusIcon = function StatusIcon() {
10324
- return React__default.createElement("svg", {
10325
- xmlns: "http://www.w3.org/2000/svg",
10326
- width: "13",
10327
- height: "12",
10328
- viewBox: "0 0 13 12",
10329
- fill: "none"
10330
- }, React__default.createElement("path", {
10331
- d: "M2.60002 6V4.83333C2.60002 3.90507 2.96877 3.01483 3.62514 2.35845C4.28152 1.70208 5.17176 1.33333 6.10002 1.33333C7.02827 1.33333 7.91851 1.70208 8.57489 2.35845C9.23127 3.01483 9.60002 3.90507 9.60002 4.83333V6M1.43335 9.5C1.43335 9.80941 1.55627 10.1062 1.77506 10.325C1.99385 10.5437 2.2906 10.6667 2.60002 10.6667C2.90944 10.6667 3.20618 10.5437 3.42497 10.325C3.64377 10.1062 3.76668 9.80941 3.76668 9.5C3.76668 9.19058 3.64377 8.89383 3.42497 8.67504C3.20618 8.45625 2.90944 8.33333 2.60002 8.33333C2.2906 8.33333 1.99385 8.45625 1.77506 8.67504C1.55627 8.89383 1.43335 9.19058 1.43335 9.5ZM8.43335 9.5C8.43335 9.80941 8.55627 10.1062 8.77506 10.325C8.99385 10.5437 9.2906 10.6667 9.60002 10.6667C9.90944 10.6667 10.2062 10.5437 10.425 10.325C10.6438 10.1062 10.7667 9.80941 10.7667 9.5C10.7667 9.19058 10.6438 8.89383 10.425 8.67504C10.2062 8.45625 9.90944 8.33333 9.60002 8.33333C9.2906 8.33333 8.99385 8.45625 8.77506 8.67504C8.55627 8.89383 8.43335 9.19058 8.43335 9.5Z",
10332
- stroke: "#6D6B68",
10333
- "stroke-width": "2",
10334
- "stroke-linecap": "round",
10335
- "stroke-linejoin": "round"
10336
- }), React__default.createElement("path", {
10337
- d: "M7.8501 4.25L9.6001 6L11.3501 4.25",
10338
- stroke: "#6D6B68",
10339
- "stroke-width": "2",
10340
- "stroke-linecap": "round",
10341
- "stroke-linejoin": "round"
10342
- }));
10343
- };
10344
-
10345
10433
  var ClientIcon = function ClientIcon() {
10346
10434
  return React__default.createElement("svg", {
10347
10435
  xmlns: "http://www.w3.org/2000/svg",
@@ -10355,59 +10443,134 @@ var ClientIcon = function ClientIcon() {
10355
10443
  }));
10356
10444
  };
10357
10445
 
10358
- var AssigneIcon = function AssigneIcon() {
10359
- return React__default.createElement("svg", {
10360
- xmlns: "http://www.w3.org/2000/svg",
10361
- width: "15",
10362
- height: "14",
10363
- viewBox: "0 0 15 14",
10364
- fill: "none"
10365
- }, React__default.createElement("g", {
10366
- "clip-path": "url(#clip0_504_13636)"
10367
- }, React__default.createElement("path", {
10368
- d: "M4.4751 1.16667H12.6418V6.70834H11.4751V2.33334H10.3084V5.61051L8.55843 4.7355L6.80843 5.61051V2.33334H5.64176V5.54167H4.4751V1.16667ZM7.9751 2.33334V3.72284L8.55843 3.43117L9.14176 3.72284V2.33334H7.9751ZM5.02051 7.72917C4.92474 7.72892 4.82985 7.74755 4.74127 7.78398C4.65269 7.82041 4.57215 7.87394 4.50426 7.9415L3.30843 9.13734V11.375H6.59085L9.97593 10.5292L12.0363 9.6495C12.1064 9.61158 12.1601 9.54908 12.1871 9.47399C12.214 9.3989 12.2123 9.31652 12.1822 9.24263C12.1521 9.16875 12.0958 9.10857 12.0241 9.07364C11.9524 9.0387 11.8703 9.03147 11.7936 9.05334L11.7819 9.05625L8.0416 9.91667H5.93343V8.75H7.75635C7.89172 8.75 8.02154 8.69623 8.11727 8.60051C8.21299 8.50479 8.26676 8.37496 8.26676 8.23959C8.26676 8.10422 8.21299 7.97439 8.11727 7.87867C8.02154 7.78295 7.89172 7.72917 7.75635 7.72917H5.02051ZM9.42585 8.40117L11.4978 7.92459C11.7185 7.86656 11.9496 7.85988 12.1732 7.90505C12.3969 7.95022 12.6072 8.04605 12.7881 8.18518C12.969 8.3243 13.1155 8.50302 13.2166 8.70762C13.3176 8.91221 13.3704 9.13724 13.3709 9.36542C13.3707 9.64241 13.2934 9.91388 13.1478 10.1495C13.0021 10.3851 12.7938 10.5755 12.5461 10.6995L12.5303 10.7077L10.3487 11.6381L6.73435 12.5417H0.100098V8.3125H2.4836L3.6806 7.1155C3.85696 6.93974 4.06622 6.80044 4.29643 6.70555C4.52663 6.61067 4.77327 6.56206 5.02226 6.5625H7.75635C7.99023 6.56247 8.22153 6.61136 8.4354 6.70603C8.64926 6.8007 8.84096 6.93905 8.99818 7.11221C9.15541 7.28536 9.27467 7.48948 9.34832 7.71146C9.42198 7.93345 9.44838 8.16838 9.42585 8.40117ZM2.14176 9.47917H1.26676V11.375H2.14176V9.47917Z",
10369
- fill: "#6D6B68"
10370
- })), React__default.createElement("defs", null, React__default.createElement("clipPath", {
10371
- id: "clip0_504_13636"
10372
- }, React__default.createElement("rect", {
10373
- width: "14",
10374
- height: "14",
10375
- fill: "white",
10376
- transform: "translate(0.100098)"
10377
- }))));
10446
+ var initialState$2 = {
10447
+ 'x-filters': [],
10448
+ 'x-pagination': {
10449
+ page: 1,
10450
+ per_page: 50
10451
+ }
10452
+ };
10453
+ var filterReducer$1 = function filterReducer(state, action) {
10454
+ switch (action.type) {
10455
+ case 'SET_DATE_FILTER':
10456
+ return _extends({}, state, {
10457
+ 'x-filters': [].concat(state['x-filters'].filter(function (f) {
10458
+ return f.field !== 'created_at';
10459
+ }), [{
10460
+ field: 'created_at',
10461
+ op: '>=',
10462
+ value: dateFns.format(new Date(action.payload), 'yyyy-MM-dd') + "T00:00:00+00:00"
10463
+ }, {
10464
+ field: 'created_at',
10465
+ op: '<=',
10466
+ value: dateFns.format(new Date(action.payload), 'yyyy-MM-dd') + "T23:59:59+00:00"
10467
+ }])
10468
+ });
10469
+ case 'SET_CLIENT_FILTER':
10470
+ return _extends({}, state, {
10471
+ 'x-filters': [].concat(state['x-filters'].filter(function (f) {
10472
+ return f.field !== 'customer_id';
10473
+ }), [{
10474
+ field: 'customer_id',
10475
+ op: '=',
10476
+ value: action.payload
10477
+ }])
10478
+ });
10479
+ // case 'SET_ACTIONS_FILTER':
10480
+ // return {
10481
+ // ...state,
10482
+ // 'x-filters': [
10483
+ // ...state['x-filters'].filter(
10484
+ // f => f.field !== 'product_return_action_id'
10485
+ // ),
10486
+ // {
10487
+ // field: 'product_return_action_id',
10488
+ // op: '=',
10489
+ // value: action.payload,
10490
+ // },
10491
+ // ],
10492
+ // };
10493
+ // case 'SET_LOCATION_FILTER':
10494
+ // return {
10495
+ // ...state,
10496
+ // 'x-filters': [
10497
+ // ...state['x-filters'].filter(f => f.field !== 'return_location'),
10498
+ // {
10499
+ // field: 'return_location',
10500
+ // op: 'in',
10501
+ // value: action.payload,
10502
+ // },
10503
+ // ],
10504
+ // };
10505
+ case 'SET_PAGE':
10506
+ return _extends({}, state, {
10507
+ 'x-pagination': _extends({}, state['x-pagination'], {
10508
+ page: action.payload
10509
+ })
10510
+ });
10511
+ case 'SET_PERPAGE':
10512
+ return _extends({}, state, {
10513
+ 'x-pagination': _extends({}, state['x-pagination'], {
10514
+ per_page: action.payload
10515
+ })
10516
+ });
10517
+ case 'CLEAR_FILTERS':
10518
+ return _extends({}, state);
10519
+ default:
10520
+ return state;
10521
+ }
10378
10522
  };
10523
+ var filtersStateAtom$1 = /*#__PURE__*/jotai.atom(initialState$2);
10524
+ var filtersReducerAtom$1 = /*#__PURE__*/jotai.atom(function (get) {
10525
+ return get(filtersStateAtom$1);
10526
+ }, function (get, set, action) {
10527
+ return set(filtersStateAtom$1, filterReducer$1(get(filtersStateAtom$1), action));
10528
+ });
10379
10529
 
10380
- var _templateObject$2k;
10530
+ var _templateObject$2j, _templateObject2$1G;
10381
10531
  var ReturnOrderFilter = function ReturnOrderFilter() {
10382
- var _useOrderDetails = useOrderDetails(),
10383
- orderDetails = _useOrderDetails[0],
10384
- setOrderDetails = _useOrderDetails[1];
10385
- var _usePrevOrderDetails = usePrevOrderDetails(),
10386
- prevOrderDetails = _usePrevOrderDetails[0];
10387
- var actionDate = orderDetails != null && orderDetails.action_date ? new Date(orderDetails == null ? void 0 : orderDetails.action_date) : null;
10388
- var onChange = function onChange(date, _dateString) {
10389
- var selectedDate = date == null ? void 0 : date.format('YYYY-MM-DDTHH:mm:ss');
10390
- if (selectedDate !== undefined && prevOrderDetails.action_date !== undefined) {
10391
- if (new Date(selectedDate).toLocaleDateString() === new Date(prevOrderDetails.action_date).toLocaleDateString()) {
10392
- setOrderDetails(function (prev) {
10393
- return _extends({}, prev, {
10394
- action_date: prevOrderDetails.action_date
10395
- });
10396
- });
10397
- } else {
10398
- setOrderDetails(function (prev) {
10399
- return _extends({}, prev, {
10400
- action_date: selectedDate
10401
- });
10402
- });
10403
- }
10404
- } else {
10405
- setOrderDetails(function (prev) {
10406
- return _extends({}, prev, {
10407
- action_date: null
10408
- });
10532
+ var _useAtom = jotai.useAtom(filtersReducerAtom$1),
10533
+ dispatch = _useAtom[1];
10534
+ var _useCustomerData = useCustomerData(),
10535
+ customers = _useCustomerData[0];
10536
+ var _useState = React.useState(),
10537
+ selectedDate = _useState[0],
10538
+ setSelectedDate = _useState[1];
10539
+ // const zoneOptions = [
10540
+ // { label: 'Zone 1', value: 'zone1' },
10541
+ // { label: 'Zone 2', value: 'zone2' },
10542
+ // { label: 'Zone 3', value: 'zone3' },
10543
+ // { label: 'Zone 4', value: 'zone4' },
10544
+ // { label: 'Zone 5', value: 'zone5' },
10545
+ // ];
10546
+ // date change here
10547
+ var handleDateChange = function handleDateChange(date) {
10548
+ setSelectedDate(date ? date == null ? void 0 : date.$d : null);
10549
+ console.log(selectedDate, 'selected');
10550
+ };
10551
+ React.useEffect(function () {
10552
+ if (selectedDate) {
10553
+ console.log(selectedDate, 'selected');
10554
+ dispatch({
10555
+ type: 'SET_DATE_FILTER',
10556
+ payload: selectedDate
10409
10557
  });
10410
10558
  }
10559
+ }, [selectedDate]);
10560
+ //client options
10561
+ var clientOptions = customers == null ? void 0 : customers.map(function (option) {
10562
+ var _option$customer_name, _option$customer_name2;
10563
+ return {
10564
+ 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)),
10565
+ value: option == null ? void 0 : option.id
10566
+ };
10567
+ });
10568
+ var handleClientChange = function handleClientChange(value) {
10569
+ console.log(value, 'value');
10570
+ dispatch({
10571
+ type: 'SET_CLIENT_FILTER',
10572
+ payload: value
10573
+ });
10411
10574
  };
10412
10575
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledFiter, null, React__default.createElement(StyledFIlterELements, null, React__default.createElement(LeftSideConatiner, null, React__default.createElement("div", {
10413
10576
  className: "filtercontainer"
@@ -10421,48 +10584,58 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
10421
10584
  className: "dateiconcontainer"
10422
10585
  }, React__default.createElement(DateIcon, null)), React__default.createElement(StyledDatePicker, null, React__default.createElement(antd.DatePicker, {
10423
10586
  className: "custom-datepicker",
10424
- onChange: onChange,
10425
- value: actionDate === null ? actionDate : dayjs(actionDate),
10587
+ onChange: handleDateChange,
10588
+ style: {
10589
+ width: '100px'
10590
+ },
10591
+ value: selectedDate ? dayjs(selectedDate) : null,
10426
10592
  format: "DD/MM/YY",
10427
- placeholder: "Date"
10593
+ placeholder: "Date",
10594
+ needConfirm: true
10428
10595
  }))), React__default.createElement("div", {
10429
10596
  className: "datefilter"
10430
10597
  }, React__default.createElement("div", {
10431
10598
  className: "dateiconcontainer"
10432
- }, ' ', React__default.createElement(StatusIcon, null), ' '), React__default.createElement("div", {
10433
- className: "datetext"
10434
- }, "Status of Order"), React__default.createElement("div", {
10435
- className: "roundbox"
10436
- }, React__default.createElement(DownArrowIcon, null), ' ')), React__default.createElement("div", {
10437
- className: "datefilter"
10438
- }, React__default.createElement("div", {
10439
- className: "dateiconcontainer"
10440
- }, React__default.createElement(ClientIcon, null)), React__default.createElement("div", {
10441
- className: "datetext"
10442
- }, "Client"), React__default.createElement("div", {
10443
- className: "roundbox"
10444
- }, React__default.createElement(DownArrowIcon, null))), React__default.createElement("div", {
10445
- className: "datefilter"
10446
- }, React__default.createElement("div", {
10447
- className: "dateiconcontainer"
10448
- }, React__default.createElement(AssigneIcon, null)), React__default.createElement("div", {
10449
- className: "datetext"
10450
- }, "Assignee"), React__default.createElement("div", {
10451
- className: "roundbox"
10452
- }, React__default.createElement(DownArrowIcon, null))))), React__default.createElement(TableFilters, null)));
10599
+ }, React__default.createElement(ClientIcon, null)), React__default.createElement(StyledAntSelect$d, null, React__default.createElement(antd.Select, {
10600
+ options: clientOptions,
10601
+ className: "custom-select",
10602
+ placeholder: "Client",
10603
+ onChange: handleClientChange,
10604
+ style: {
10605
+ width: '125px',
10606
+ border: 'none'
10607
+ },
10608
+ maxTagCount: 0,
10609
+ maxTagPlaceholder: function maxTagPlaceholder(omittedValues) {
10610
+ return React__default.createElement(antd.Tooltip, {
10611
+ overlayStyle: {
10612
+ pointerEvents: 'none'
10613
+ },
10614
+ title: omittedValues.map(function (_ref) {
10615
+ var label = _ref.label;
10616
+ return label;
10617
+ }).join(', ')
10618
+ }, React__default.createElement("span", null, omittedValues.length + " selected"));
10619
+ }
10620
+ }))))), React__default.createElement(TableFilters, null)));
10453
10621
  };
10454
- var StyledDatePicker = /*#__PURE__*/styled__default.div(_templateObject$2k || (_templateObject$2k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n width: 80px;\n }\n"])));
10622
+ var StyledDatePicker = /*#__PURE__*/styled__default.div(_templateObject$2j || (_templateObject$2j = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
10623
+ // const DropdownContainer = styled.div``;
10624
+ var StyledAntSelect$d = /*#__PURE__*/styled__default.div(_templateObject2$1G || (_templateObject2$1G = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-select {\n border: none;\n width: 80px;\n }\n .ant-select-selector {\n border: 1px solid #ffffff !important;\n }\n :where(.css-dev-only-do-not-override-m4timi).ant-select-single:not(.ant-select-customize-input)\n .ant-select-selector {\n padding: 0 5px;\n }\n\n :where(.css-dev-only-do-not-override-m4timi).ant-select-outlined:not(.ant-select-customize-input)\n .ant-select-selector {\n border: none;\n }\n .roundbox {\n display: flex;\n width: 18px;\n height: 18px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n left: 359px;\n position: absolute;\n border-radius: 18px;\n background: #fff;\n box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.1);\n top: 16px;\n }\n"])));
10455
10625
 
10456
- var _templateObject$2l, _templateObject2$1H;
10626
+ var _templateObject$2k, _templateObject2$1H;
10457
10627
  var ReturnAfterTable = function ReturnAfterTable() {
10458
10628
  var _useReturnAfterOrderD = useReturnAfterOrderData(),
10459
- returnAfterOrder = _useReturnAfterOrderD[0],
10460
10629
  setReturnOrderData = _useReturnAfterOrderD[1];
10461
10630
  var _useLoading = useLoading(),
10462
10631
  setLoading = _useLoading[1];
10632
+ var _useAtom = jotai.useAtom(filtersReducerAtom$1),
10633
+ state = _useAtom[0];
10634
+ var filters = state['x-filters'];
10463
10635
  var _useApiHook = dmsComponentLibrary.useApiHook({
10464
10636
  endpoint: '/return_orders/?skip_filters=0',
10465
- method: 'GET'
10637
+ method: 'GET',
10638
+ filters: filters
10466
10639
  }),
10467
10640
  fetchedReturnOrderData = _useApiHook.data,
10468
10641
  staticDataLoading = _useApiHook.loading;
@@ -10472,12 +10645,11 @@ var ReturnAfterTable = function ReturnAfterTable() {
10472
10645
  setReturnOrderData(fetchedReturnOrderData == null ? void 0 : fetchedReturnOrderData.data);
10473
10646
  }
10474
10647
  }, [fetchedReturnOrderData, staticDataLoading]);
10475
- console.log('returnAfterOrder', returnAfterOrder);
10476
10648
  return React__default.createElement("div", null, React__default.createElement(DashBoardWrapper$2, null, React__default.createElement(RouterHeader, null), React__default.createElement("div", {
10477
10649
  className: "Tableconatiner"
10478
10650
  }, React__default.createElement(HeaderFilter, null), React__default.createElement(Container$1e, null, React__default.createElement(ReturnOrderFilter, null), React__default.createElement(OrderTable, null)))));
10479
10651
  };
10480
- var Container$1e = /*#__PURE__*/styled__default.div(_templateObject$2l || (_templateObject$2l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -30px;\n"])));
10652
+ var Container$1e = /*#__PURE__*/styled__default.div(_templateObject$2k || (_templateObject$2k = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -30px;\n"])));
10481
10653
  var DashBoardWrapper$2 = /*#__PURE__*/styled__default.section(_templateObject2$1H || (_templateObject2$1H = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
10482
10654
 
10483
10655
  var BulkFilter = function BulkFilter() {
@@ -10507,7 +10679,7 @@ var BulkFilter = function BulkFilter() {
10507
10679
  );
10508
10680
  };
10509
10681
 
10510
- var _excluded$2 = ["count"];
10682
+ var _excluded$3 = ["count"];
10511
10683
  // import { useAtom } from 'jotai';
10512
10684
  var Filters = function Filters() {
10513
10685
  var _useRoutesTable = useRoutesTable(),
@@ -10533,11 +10705,15 @@ var Filters = function Filters() {
10533
10705
  if (paginationData !== null) {
10534
10706
  var _JSON$parse = JSON.parse(paginationData),
10535
10707
  count = _JSON$parse.count,
10536
- rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded$2);
10708
+ rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded$3);
10537
10709
  setPaginationObject(rest);
10538
10710
  setCount(count);
10539
10711
  } else {
10540
- console.error('Pagination data is null');
10712
+ // console.error('Pagination data is null');
10713
+ antd.notification.error({
10714
+ message: 'Error',
10715
+ description: 'Pagination data is null'
10716
+ });
10541
10717
  }
10542
10718
  }
10543
10719
  }, [apiLoading]);
@@ -10571,7 +10747,7 @@ var ReturnTable$1 = function ReturnTable(_ref) {
10571
10747
  }, [staticDataLoading, fetchedStaticData]);
10572
10748
  return React__default.createElement(React__default.Fragment, null, React__default.createElement(StyledTableWrapper$1, {
10573
10749
  id: "tableScrolling"
10574
- }, React__default.createElement(StyledTable$1, null, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", null, "Trading Name"), React__default.createElement("th", null, "Client"), React__default.createElement("th", null, "Orders"), React__default.createElement("th", null, "Products"), React__default.createElement("th", null, "Dispose"), React__default.createElement("th", null, "Re-allocate"), React__default.createElement("th", null, "Re-Del"), React__default.createElement("th", null, "Recycle"), React__default.createElement("th", null, "Unknown"))), React__default.createElement("tbody", null, loadingskeleton ? React__default.createElement("tr", null, React__default.createElement("td", {
10750
+ }, React__default.createElement(StyledTable$1, null, React__default.createElement("thead", null, React__default.createElement("tr", null, React__default.createElement("th", null, "Trading Name"), React__default.createElement("th", null, "Client"), React__default.createElement("th", null, "Orders"), React__default.createElement("th", null, "Products"), React__default.createElement("th", null, "RTS"), React__default.createElement("th", null, "Pending"), React__default.createElement("th", null, "Dispose"), React__default.createElement("th", null, "Re-allocate"), React__default.createElement("th", null, "Re-Del"), React__default.createElement("th", null, "Recycle"), React__default.createElement("th", null, "Unknown"))), React__default.createElement("tbody", null, loadingskeleton ? React__default.createElement("tr", null, React__default.createElement("td", {
10575
10751
  colSpan: 9
10576
10752
  }, React__default.createElement(antd.Skeleton, {
10577
10753
  active: true
@@ -10591,11 +10767,11 @@ var ReturnTable$1 = function ReturnTable(_ref) {
10591
10767
  fontWeight: 600,
10592
10768
  paddingLeft: 0
10593
10769
  }
10594
- }, key == null ? void 0 : key.customer_name)), ' '), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.return_orders))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.return_order_products))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.DISPOSE))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key['RE-ALLOCATE']), ' ')), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key['RE-DEL']))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.RECYCLE))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.UNKNOWN))));
10770
+ }, key == null ? void 0 : key.customer_name)), ' '), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.return_orders))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.return_order_products))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.RTS))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.PENDING))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.DISPOSE))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key['RE-ALLOCATE']), ' ')), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key['RE-DEL']))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.RECYCLE))), React__default.createElement("td", null, React__default.createElement(ColumStyle, null, React__default.createElement(GreyBox, null, key == null ? void 0 : key.UNKNOWN))));
10595
10771
  })))));
10596
10772
  };
10597
10773
 
10598
- var _templateObject$2m, _templateObject2$1I, _templateObject3$Z;
10774
+ var _templateObject$2l, _templateObject2$1I, _templateObject3$Z;
10599
10775
  // import Loader from '../loader/Loader';
10600
10776
  // interface ApiResponse {
10601
10777
  // message: string;
@@ -10644,12 +10820,15 @@ function ReturnMainTable() {
10644
10820
  className: "Tableconatiner"
10645
10821
  }, React__default.createElement(HeaderFilter, null), React__default.createElement(Container$1f, null, React__default.createElement(Row$7, null, React__default.createElement(Text$7, null, "Client Return"), selectedClient ? React__default.createElement(ReturnFilter, null) : React__default.createElement(Filters, null)), React__default.createElement(ReturnTable$1, null)))));
10646
10822
  }
10647
- var Row$7 = /*#__PURE__*/styled__default.div(_templateObject$2m || (_templateObject$2m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
10823
+ var Row$7 = /*#__PURE__*/styled__default.div(_templateObject$2l || (_templateObject$2l = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
10648
10824
  var Container$1f = /*#__PURE__*/styled__default.div(_templateObject2$1I || (_templateObject2$1I = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
10649
10825
  var DashBoardWrapper$3 = /*#__PURE__*/styled__default.section(_templateObject3$Z || (_templateObject3$Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
10650
10826
 
10651
10827
  function ReturnClient() {
10652
10828
  var _selectedClientString;
10829
+ antd.notification.config({
10830
+ top: 80
10831
+ });
10653
10832
  var LoadingMessage = function LoadingMessage() {
10654
10833
  return React__default.createElement("div", null, "Loading...");
10655
10834
  };
@@ -10659,9 +10838,9 @@ function ReturnClient() {
10659
10838
  var selectedClientString = selectedClient == null ? void 0 : selectedClient.replace(/\s+/g, '-');
10660
10839
  selectedClientString = (_selectedClientString = selectedClientString) == null ? void 0 : _selectedClientString.toLowerCase();
10661
10840
  console.log(selectedClientString, 'selectedClient');
10662
- console.log("../return/:" + selectedClientString);
10841
+ console.log("../filter/:" + selectedClientString);
10663
10842
  React.useEffect(function () {
10664
- if (!location.pathname.includes('/return')) {
10843
+ if (!location.pathname.includes('/filter')) {
10665
10844
  localStorage.removeItem('clientName');
10666
10845
  localStorage.removeItem('clientId');
10667
10846
  }
@@ -10669,7 +10848,7 @@ function ReturnClient() {
10669
10848
  React.useEffect(function () {
10670
10849
  if (selectedClient) {
10671
10850
  var _selectedClientString2 = selectedClient.replace(/\s+/g, '-');
10672
- navigate("return/" + _selectedClientString2);
10851
+ navigate("filter/" + _selectedClientString2);
10673
10852
  }
10674
10853
  }, [selectedClient]);
10675
10854
  return React__default.createElement(React.Suspense, {
@@ -10684,7 +10863,7 @@ function ReturnClient() {
10684
10863
  path: "order-return/:id",
10685
10864
  element: React__default.createElement(OrderView, null)
10686
10865
  }), React__default.createElement(reactRouterDom.Route, {
10687
- path: "return/:name",
10866
+ path: "filter/:clientName",
10688
10867
  element: React__default.createElement(ReturnTable, null)
10689
10868
  })));
10690
10869
  }