@bjsdistribution/dms-client-return 0.0.54 → 0.0.56

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 (31) hide show
  1. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/MenuDropDown.d.ts +2 -2
  2. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/OptionsDropDown.d.ts +2 -2
  3. package/dist/components/order-view/fakedata.d.ts +1 -1
  4. package/dist/components/order-view/store.d.ts +1 -0
  5. package/dist/dms-client-return.cjs.development.js +400 -369
  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 +400 -369
  10. package/dist/dms-client-return.esm.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +1 -1
  13. package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +1 -1
  14. package/src/components/order-daily-overview/table/ReturnTable.tsx +2 -2
  15. package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.tsx +1 -1
  16. package/src/components/order-view/details-filters/left-side-filters/dropdowns/MenuDropDown.tsx +57 -45
  17. package/src/components/order-view/details-filters/left-side-filters/dropdowns/OptionsDropDown.tsx +74 -61
  18. package/src/components/order-view/fakedata.ts +6 -69
  19. package/src/components/order-view/general-information/dropdowns/Print.tsx +57 -35
  20. package/src/components/order-view/general-information/dropdowns/index.tsx +1 -2
  21. package/src/components/order-view/index.tsx +81 -59
  22. package/src/components/order-view/modalsPopup/ModalManager.tsx +1 -1
  23. package/src/components/order-view/notes/order-dropdown/NewReturnDropdown.tsx +3 -1
  24. package/src/components/order-view/order-actions/actions/change-customer-account/ChangeCustomerAccModal.tsx +3 -3
  25. package/src/components/order-view/order-actions/actions/confirm-order/tables/NotesTable.tsx +3 -1
  26. package/src/components/order-view/order-actions/actions/unhold-order/UnholdOrder.tsx +72 -7
  27. package/src/components/order-view/return-client-products/product-table/ReturnProductTable.tsx +9 -3
  28. package/src/components/order-view/store.ts +7 -0
  29. package/src/index.tsx +4 -20
  30. package/dist/components/order-view/general-information/dropdowns/Options.d.ts +0 -3
  31. package/src/components/order-view/general-information/dropdowns/Options.tsx +0 -68
@@ -548,7 +548,6 @@ function CopyText(props) {
548
548
  var IconContainer = /*#__PURE__*/styled.div(_templateObject$1 || (_templateObject$1 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n cursor: pointer;\n"])));
549
549
 
550
550
  var currentActionAtom = /*#__PURE__*/atom(undefined);
551
- var isOnHold = /*#__PURE__*/atom(false);
552
551
  var orderStaticDataAtom = /*#__PURE__*/atom({});
553
552
  var customerInfoAtom = /*#__PURE__*/atom({
554
553
  recipient_name: '',
@@ -638,9 +637,6 @@ function useOrderStaticData() {
638
637
  function useCustomerInfo() {
639
638
  return useAtom(customerInfoAtom);
640
639
  }
641
- function useIsOnHoldOrder() {
642
- return useAtom(isOnHold);
643
- }
644
640
  //value
645
641
  var orderId = /*#__PURE__*/atom([]);
646
642
  var useOrderId = function useOrderId() {
@@ -3617,7 +3613,7 @@ var ReturnProductTable = function ReturnProductTable() {
3617
3613
  if (isresponse && isresponse.data) {
3618
3614
  notification.success({
3619
3615
  message: 'Success',
3620
- description: 'An error has occurred. Please try again later.'
3616
+ description: 'Successfully Delete Order Product.'
3621
3617
  });
3622
3618
  handleRemoveRow();
3623
3619
  setSelectedRowId(null);
@@ -3639,7 +3635,7 @@ var ReturnProductTable = function ReturnProductTable() {
3639
3635
  if (selectAll) {
3640
3636
  setSelectedProducts([]);
3641
3637
  } else {
3642
- var allProductIds = productData.map(function (product) {
3638
+ var allProductIds = productData == null ? void 0 : productData.map(function (product) {
3643
3639
  return product.id;
3644
3640
  });
3645
3641
  setSelectedProducts(allProductIds);
@@ -3667,6 +3663,7 @@ var ReturnProductTable = function ReturnProductTable() {
3667
3663
  });
3668
3664
  return matchedReason ? matchedReason.label : 'N/A';
3669
3665
  };
3666
+ var disableCheckbox = (productData == null ? void 0 : productData.length) == 0;
3670
3667
  return React.createElement("div", null, loading && React.createElement(Loader, {
3671
3668
  title: "Deleting"
3672
3669
  }), React.createElement(StyledTableWrapper, {
@@ -3675,6 +3672,7 @@ var ReturnProductTable = function ReturnProductTable() {
3675
3672
  }, React.createElement(StyledTable$1, null, React.createElement("thead", null, React.createElement("tr", null, React.createElement("th", {
3676
3673
  className: "emailproductsCheckbox"
3677
3674
  }, React.createElement(Checkbox$1, {
3675
+ disabled: disableCheckbox,
3678
3676
  checked: selectAll,
3679
3677
  onChange: handleSelectAll
3680
3678
  })), React.createElement("th", null, "Location"), React.createElement("th", null, "Sender"), React.createElement("th", null, "Code"), React.createElement("th", null, "Description"), React.createElement("th", null, "Return Reason"), React.createElement("th", null, "Part"), React.createElement("th", null, "Action"))), React.createElement("tbody", null, productData && (productData == null ? void 0 : productData.length) > 0 ? productData == null ? void 0 : productData.map(function (product) {
@@ -3733,6 +3731,8 @@ var NewReturnDropdown = function NewReturnDropdown() {
3733
3731
  var _useState3 = useState(),
3734
3732
  idProduct = _useState3[0],
3735
3733
  setId = _useState3[1];
3734
+ var _useOrderId = useOrderId(),
3735
+ orderId = _useOrderId[0];
3736
3736
  var id = orderData == null ? void 0 : orderData.customer_id;
3737
3737
  useEffect(function () {
3738
3738
  var allProductIds = (productData == null ? void 0 : productData.map(function (product) {
@@ -3752,6 +3752,10 @@ var NewReturnDropdown = function NewReturnDropdown() {
3752
3752
  field: 'status',
3753
3753
  op: '!=',
3754
3754
  value: 'SD'
3755
+ }, {
3756
+ field: 'id',
3757
+ op: '!=',
3758
+ value: orderId
3755
3759
  }];
3756
3760
  if ((idProduct == null ? void 0 : idProduct.length) > 0 && idProduct[0]) {
3757
3761
  filters.push({
@@ -5432,7 +5436,11 @@ function NotesTable() {
5432
5436
  fontWeight: 'bold',
5433
5437
  textTransform: 'capitalize'
5434
5438
  }
5435
- }, order == null ? void 0 : order.created_by), React.createElement("div", null, format(new Date(order == null ? void 0 : order.created_at), "dd/MM/yyyy '@' HH:mm"))), React.createElement("td", null, order == null ? void 0 : order.description));
5439
+ }, order == null ? void 0 : order.created_by), React.createElement("div", null, format(new Date(order == null ? void 0 : order.created_at), "dd/MM/yyyy '@' HH:mm"))), React.createElement("td", {
5440
+ dangerouslySetInnerHTML: {
5441
+ __html: order == null ? void 0 : order.description
5442
+ }
5443
+ }));
5436
5444
  })))));
5437
5445
  }
5438
5446
  var Title$4 = /*#__PURE__*/styled.h2(_templateObject$1m || (_templateObject$1m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #3a3630;\n font-family: 'Roboto', sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n text-transform: uppercase;\n padding: 0;\n margin: 0;\n"])));
@@ -5737,51 +5745,27 @@ function SendEmailModal() {
5737
5745
  })));
5738
5746
  }
5739
5747
 
5740
- var OptionsMenu = [{
5741
- label: 'Log Service Refusal',
5742
- value: 'log-service-refusal'
5748
+ var bjsMenu = [
5749
+ // {
5750
+ // label: 'Add Order Resources',
5751
+ // value: 'add-resources',
5752
+ // },
5753
+ {
5754
+ label: 'Split Order',
5755
+ value: 'split-order'
5756
+ }];
5757
+ var optionsMenu = [{
5758
+ label: 'Create Reminder',
5759
+ value: 'create-task'
5743
5760
  }, {
5744
5761
  label: 'Confirm',
5745
5762
  value: 'confirm-order'
5746
5763
  }, {
5747
- label: 'Force Debrief',
5748
- value: 'force-debrief'
5749
- }, {
5750
- label: 'Charge Log',
5751
- value: 'charge-log'
5752
- }, {
5753
- label: 'Log Feedback',
5754
- value: 'log-feedback'
5755
- }, {
5756
- label: 'On Hold',
5764
+ label: 'Hold',
5757
5765
  value: 'hold-order'
5758
- }, {
5759
- label: 'Un Hold',
5760
- value: 'unhold-order'
5761
- }, {
5762
- label: 'Change Customer Account',
5763
- value: 'change-customer-account'
5764
- }, {
5765
- label: 'Proximity Report',
5766
- value: 'promixity-report'
5767
- }, {
5768
- label: 'Raise Collection',
5769
- value: 'raise-collection'
5770
- }, {
5771
- label: 'Remove from Route',
5772
- value: 'remove-from-route'
5773
- }, {
5774
- label: 'Add New Flag',
5775
- value: 'add-new-flag'
5776
- }, {
5777
- label: 'Un-Release Order',
5778
- value: 'unrelease-order'
5779
5766
  }, {
5780
5767
  label: 'Cancel',
5781
5768
  value: 'cancel-order'
5782
- }, {
5783
- label: 'Clear Booking Status',
5784
- value: 'clear-booking-status'
5785
5769
  }];
5786
5770
  var PrintMenu = [{
5787
5771
  label: 'Return Notes',
@@ -5815,7 +5799,7 @@ function ChangeCustomerAccModal() {
5815
5799
  infoText: "632801 (OFS)",
5816
5800
  submitBtnTitle: "Save Details"
5817
5801
  }, React.createElement(ContentContainer$5, null, React.createElement(SplitLayout, null, React.createElement(Row$4, null, React.createElement(Label$d, null, "New Customer"), React.createElement(AntSelect, {
5818
- options: OptionsMenu,
5802
+ options: optionsMenu,
5819
5803
  placeholder: "Select Customer",
5820
5804
  onChange: handleSelectChange,
5821
5805
  disabled: false,
@@ -5827,7 +5811,7 @@ function ChangeCustomerAccModal() {
5827
5811
  popupClassName: 'dropDownStyle',
5828
5812
  selectWrapperClass: 'rounded'
5829
5813
  })), React.createElement(Row$4, null, React.createElement(Label$d, null, "New Trading Name"), React.createElement(AntSelect, {
5830
- options: OptionsMenu,
5814
+ options: optionsMenu,
5831
5815
  placeholder: "Select Trading Name",
5832
5816
  onChange: handleSelectChange,
5833
5817
  disabled: false,
@@ -6309,20 +6293,71 @@ function ChargeLog() {
6309
6293
 
6310
6294
  var _templateObject$1s;
6311
6295
  var UnholdOrder = function UnholdOrder() {
6296
+ var _useOrderId = useOrderId(),
6297
+ orderId = _useOrderId[0];
6312
6298
  var _useCurrentAction = useCurrentAction(),
6313
6299
  setCurrentAction = _useCurrentAction[1];
6314
- var _useIsOnHoldOrder = useIsOnHoldOrder(),
6315
- setOnHoldOrder = _useIsOnHoldOrder[1];
6300
+ var _useOrderDetails = useOrderDetails(),
6301
+ setOrderDetails = _useOrderDetails[1];
6302
+ var _usePrevOrderDetails = usePrevOrderDetails(),
6303
+ setPrevOrderDetails = _usePrevOrderDetails[1];
6304
+ var _useLoading = useLoading(),
6305
+ setLoading = _useLoading[1];
6306
+ var _useApiHook = useApiHook({
6307
+ endpoint: "orders/" + orderId + "/unhold/?unhold_reason=\"unhold\"",
6308
+ method: 'POST',
6309
+ performAction: false
6310
+ }),
6311
+ response = _useApiHook.data,
6312
+ setPerformAction = _useApiHook.setShouldPerformAction;
6313
+ var _useApiHook2 = useApiHook({
6314
+ endpoint: "orders/" + orderId,
6315
+ method: 'GET',
6316
+ performAction: false
6317
+ }),
6318
+ fetchedData = _useApiHook2.data,
6319
+ loading = _useApiHook2.loading,
6320
+ setShouldPerformAction = _useApiHook2.setShouldPerformAction;
6321
+ useEffect(function () {
6322
+ var _fetchedData$data;
6323
+ setLoading(loading);
6324
+ if (fetchedData && fetchedData.data) {
6325
+ var requiredData = fetchedData == null ? void 0 : fetchedData.data;
6326
+ setOrderDetails(requiredData[0]);
6327
+ setPrevOrderDetails(requiredData[0]);
6328
+ setCurrentAction(undefined);
6329
+ }
6330
+ if (fetchedData && (fetchedData == null ? void 0 : fetchedData.data) === null || (fetchedData == null || (_fetchedData$data = fetchedData.data) == null ? void 0 : _fetchedData$data.length) === 0) {
6331
+ setCurrentAction(undefined);
6332
+ }
6333
+ }, [loading]);
6334
+ useEffect(function () {
6335
+ if (response) {
6336
+ //@ts-ignore
6337
+ if (response != null && response.data && (response == null ? void 0 : response.code) === 200) {
6338
+ setShouldPerformAction(true);
6339
+ } else {
6340
+ notification.error({
6341
+ message: 'Error',
6342
+ description:
6343
+ //@ts-ignore
6344
+ (response == null ? void 0 : response.error_traceback) || 'An error has occurred. Please try again later.'
6345
+ });
6346
+ setCurrentAction(undefined);
6347
+ }
6348
+ }
6349
+ }, [response]);
6316
6350
  var saveButton = function saveButton() {
6317
- setOnHoldOrder(false);
6318
- setCurrentAction(undefined);
6351
+ if (orderId) {
6352
+ setPerformAction(true);
6353
+ }
6319
6354
  };
6320
6355
  var closeModal = function closeModal() {
6321
6356
  setCurrentAction(undefined);
6322
6357
  };
6323
6358
  return React.createElement(CancelationModal, {
6324
- title: "Un-hold Order",
6325
- description: "Are you sure, you want to Un-Hold the Order?",
6359
+ title: "Unhold Order",
6360
+ description: "Are you sure, you want to UnHold the Order?",
6326
6361
  actions: React.createElement(CustomCancelAndCompleteAction, {
6327
6362
  cancelLabel: "Cancel",
6328
6363
  onCancel: closeModal,
@@ -8178,187 +8213,133 @@ var DetailsContainer = /*#__PURE__*/styled.div(_templateObject$1J || (_templateO
8178
8213
  var Typo = /*#__PURE__*/styled.div(_templateObject2$1m || (_templateObject2$1m = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n font-size: 20px;\n font-style: normal;\n font-weight: 600;\n line-height: 32px; /* 160% */\n text-transform: uppercase;\n margin: 0;\n padding: 0;\n\n @media screen and (max-width: 1220px) {\n font-size: 14px;\n }\n"])));
8179
8214
 
8180
8215
  var _templateObject$1K;
8181
- var DropDownContainer$1 = /*#__PURE__*/styled.div(_templateObject$1K || (_templateObject$1K = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 20px;\n border-right: 1px solid #d0d5dd;\n padding: 4px;\n @media screen and (max-width: 1220px) {\n font-size: 12px;\n }\n"])));
8182
-
8183
- var _templateObject$1L;
8184
- var DropDownItem = function DropDownItem(_ref) {
8185
- var label = _ref.label,
8186
- icon = _ref.icon,
8187
- onClick = _ref.onClick;
8188
- return React.createElement(Flex$2, {
8189
- onClick: onClick
8190
- }, React.createElement("label", null, label), icon);
8191
- };
8192
- var Flex$2 = /*#__PURE__*/styled.div(_templateObject$1L || (_templateObject$1L = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n align-items: center;\n display: flex;\n position: relative;\n label {\n color: #3a3630;\n font-size: 14px;\n line-height: 18px;\n cursor: pointer;\n }\n"])));
8193
-
8194
- var _templateObject$1M;
8195
- var DropDownMenu = function DropDownMenu(_ref) {
8196
- var options = _ref.options,
8197
- onSelect = _ref.onSelect;
8198
- return React.createElement(DropDownContent, null, options.map(function (option) {
8199
- return React.createElement(DropDownItem, {
8200
- key: option.value,
8201
- label: option.label,
8202
- icon: '',
8203
- onClick: function onClick() {
8204
- return onSelect(option.value);
8205
- }
8206
- });
8207
- }));
8208
- };
8209
- var DropDownContent = /*#__PURE__*/styled.div(_templateObject$1M || (_templateObject$1M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 173px;\n position: absolute;\n flex-direction: column;\n align-items: flex-start;\n gap: 7px;\n padding-left: 28px;\n top: 46px;\n background-color: white;\n border: 1px solid #ddd;\n box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);\n z-index: 1;\n border-radius: 10px;\n padding: 8px 8px 10px 16px;\n"])));
8210
-
8211
- var DropDownLarge = function DropDownLarge() {
8212
- return React.createElement("svg", {
8213
- className: "arrowDown",
8214
- xmlns: "http://www.w3.org/2000/svg",
8215
- width: "24",
8216
- height: "24",
8217
- viewBox: "0 0 24 24",
8218
- fill: "none"
8219
- }, React.createElement("rect", {
8220
- width: "24",
8221
- height: "24",
8222
- fill: "none"
8223
- }), React.createElement("path", {
8224
- opacity: "0.4",
8225
- fillRule: "evenodd",
8226
- clipRule: "evenodd",
8227
- d: "M6.69128 9.8912C6.82628 9.75637 7.00928 9.68063 7.20008 9.68063C7.39088 9.68063 7.57388 9.75637 7.70888 9.8912L12.0001 14.1824L16.2913 9.8912C16.4278 9.76402 16.6083 9.69478 16.7948 9.69807C16.9814 9.70136 17.1593 9.77693 17.2912 9.90884C17.4232 10.0408 17.4987 10.2187 17.502 10.4053C17.5053 10.5918 17.4361 10.7723 17.3089 10.9088L12.5089 15.7088C12.3739 15.8436 12.1909 15.9194 12.0001 15.9194C11.8093 15.9194 11.6263 15.8436 11.4913 15.7088L6.69128 10.9088C6.55645 10.7738 6.48071 10.5908 6.48071 10.4C6.48071 10.2092 6.55645 10.0262 6.69128 9.8912Z",
8228
- fill: "#3A3630"
8229
- }));
8230
- };
8231
-
8232
- var Options = [{
8233
- label: 'Create Reminder',
8234
- value: 'create-task'
8235
- }, {
8236
- label: 'Confirm',
8237
- value: 'confirm-order'
8238
- },
8239
- // { label: 'Force Debrief', value: 'force-debrief' },
8240
- // { label: 'Clear Booking Status', value: 'booking-status' },
8241
- // { label: 'Remove From Route', value: 'remove-route' },
8242
- {
8243
- label: 'Hold',
8244
- value: 'hold-order'
8245
- },
8246
- // { label: 'Flag', value: 'view-flag' },
8247
- {
8248
- label: 'Cancel',
8249
- value: 'cancel-order'
8250
- }, {
8251
- label: 'Charge Log',
8252
- value: 'charge-log'
8253
- }];
8254
- var OptionsDropDown = function OptionsDropDown() {
8255
- var _useState = useState(false),
8256
- isOpen = _useState[0],
8257
- setIsOpen = _useState[1];
8258
- var dropdownRef = useRef(null);
8216
+ function Options() {
8259
8217
  var _useCurrentAction = useCurrentAction(),
8260
8218
  setCurrentAction = _useCurrentAction[1];
8261
- var _useIsOnHoldOrder = useIsOnHoldOrder(),
8262
- hold = _useIsOnHoldOrder[0];
8263
- // console.log(action, 'action');
8264
- var handleClick = function handleClick() {
8265
- setIsOpen(function (prev) {
8266
- return !prev;
8267
- });
8219
+ var handleSelectChange = function handleSelectChange(selectedOption) {
8220
+ setCurrentAction(selectedOption.value);
8268
8221
  };
8269
- var filteredOptions = Options == null ? void 0 : Options.filter(function (option) {
8270
- if (hold) {
8271
- return option.value !== 'hold-order';
8272
- } else {
8273
- return option.value !== 'unhold-order';
8222
+ var _useOrderDetails = useOrderDetails(),
8223
+ orderDetails = _useOrderDetails[0];
8224
+ var isOrderOnHold = (orderDetails == null ? void 0 : orderDetails.status) === 'OO';
8225
+ var isOrderCancelled = (orderDetails == null ? void 0 : orderDetails.status) === 'CO';
8226
+ var filteredOptions = optionsMenu.filter(function (option) {
8227
+ var shouldExclude = false;
8228
+ if (isOrderOnHold && option.value === 'hold-order') {
8229
+ shouldExclude = true;
8230
+ }
8231
+ if (isOrderCancelled && option.value === 'cancel-order') {
8232
+ shouldExclude = true;
8233
+ }
8234
+ if (!isOrderCancelled || isOrderOnHold) {
8235
+ if (option.value === 'uncancel-order') {
8236
+ shouldExclude = true;
8237
+ }
8274
8238
  }
8239
+ if (!isOrderOnHold && option.value === 'unhold-order') {
8240
+ shouldExclude = true;
8241
+ }
8242
+ return !shouldExclude;
8275
8243
  });
8276
- var handleSelect = function handleSelect(selectedOption) {
8277
- setCurrentAction(selectedOption);
8278
- setIsOpen(false);
8279
- };
8280
- useEffect(function () {
8281
- var handleClickOutside = function handleClickOutside(event) {
8282
- if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
8283
- setIsOpen(false);
8284
- }
8285
- };
8286
- document.addEventListener('mousedown', handleClickOutside);
8287
- return function () {
8288
- document.removeEventListener('mousedown', handleClickOutside);
8289
- };
8290
- }, []);
8291
- return React.createElement(DropDownContainer$1, {
8292
- ref: dropdownRef
8293
- }, React.createElement(DropDownItem, {
8294
- label: "Options",
8295
- icon: React.createElement(DropDownLarge, null),
8296
- onClick: handleClick
8297
- }), isOpen && React.createElement(DropDownMenu, {
8244
+ return React.createElement(Option, null, React.createElement(SelectDropdown, {
8245
+ placeholder: "OPTIONS",
8246
+ inputId: "bjsmenu",
8298
8247
  options: filteredOptions,
8299
- onSelect: handleSelect
8248
+ onChange: handleSelectChange,
8249
+ isSearchable: false,
8250
+ styles: _extends({}, dropdownStyles, filterDropdownStyles, {
8251
+ container: function container(styles) {
8252
+ return _extends({}, styles, {
8253
+ cursor: 'pointer'
8254
+ });
8255
+ },
8256
+ menu: function menu(styles) {
8257
+ return _extends({}, styles, {
8258
+ top: '113%',
8259
+ borderRadius: '5px',
8260
+ width: 'max-content',
8261
+ cursor: 'pointer'
8262
+ });
8263
+ },
8264
+ control: function control(styles) {
8265
+ return _extends({}, styles, {
8266
+ width: '105px',
8267
+ boxShadow: 'none',
8268
+ borderColor: 'transparent',
8269
+ cursor: 'pointer',
8270
+ backgroundColor: 'transparent',
8271
+ '&:hover': {
8272
+ boxShadow: 'none',
8273
+ borderColor: 'transparent'
8274
+ }
8275
+ });
8276
+ }
8277
+ }),
8278
+ value: "OPTIONS"
8300
8279
  }));
8301
- };
8280
+ }
8281
+ var Option = /*#__PURE__*/styled.div(_templateObject$1K || (_templateObject$1K = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
8302
8282
 
8303
- var Options$1 = [
8304
- // { label: 'Add Order Resource ', value: 'add-order-resources' },
8305
- {
8306
- label: 'Split Order ',
8307
- value: 'split-order'
8308
- }];
8309
- var MenuDropDown = function MenuDropDown() {
8310
- var _useState = useState(false),
8311
- isOpen = _useState[0],
8312
- setIsOpen = _useState[1];
8313
- var dropdownRef = useRef(null);
8283
+ function BjsMenu() {
8284
+ var _orderStatus$;
8314
8285
  var _useCurrentAction = useCurrentAction(),
8315
8286
  setCurrentAction = _useCurrentAction[1];
8316
- var handleClick = function handleClick() {
8317
- setIsOpen(function (prev) {
8318
- return !prev;
8319
- });
8320
- };
8321
- var handleSelect = function handleSelect(selectedOption) {
8322
- setCurrentAction(selectedOption);
8323
- setIsOpen(false);
8287
+ var handleSelectChange = function handleSelectChange(selectedOption) {
8288
+ setCurrentAction(selectedOption.value);
8324
8289
  };
8325
- useEffect(function () {
8326
- var handleClickOutside = function handleClickOutside(event) {
8327
- if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
8328
- setIsOpen(false);
8290
+ var _useStatusDetails = useStatusDetails(),
8291
+ orderStatus = _useStatusDetails[0];
8292
+ var isReleased = (_orderStatus$ = orderStatus[0]) == null ? void 0 : _orderStatus$.released;
8293
+ var filteredOptions = bjsMenu.filter(function (option) {
8294
+ if (isReleased) {
8295
+ return option.value !== 'release-order';
8296
+ } else {
8297
+ return option;
8298
+ }
8299
+ });
8300
+ return React.createElement(SelectDropdown, {
8301
+ placeholder: "BJS MENU",
8302
+ inputId: "bjsmenu",
8303
+ options: filteredOptions,
8304
+ onChange: handleSelectChange,
8305
+ isSearchable: false,
8306
+ styles: _extends({}, dropdownStyles, filterDropdownStyles, {
8307
+ container: function container(styles) {
8308
+ return _extends({}, styles, {
8309
+ cursor: 'pointer'
8310
+ });
8311
+ },
8312
+ menu: function menu(styles) {
8313
+ return _extends({}, styles, {
8314
+ top: '113%',
8315
+ borderRadius: '5px',
8316
+ width: 'max-content',
8317
+ cursor: 'pointer'
8318
+ });
8319
+ },
8320
+ control: function control(styles) {
8321
+ return _extends({}, styles, {
8322
+ width: '105px',
8323
+ boxShadow: 'none',
8324
+ borderColor: 'transparent',
8325
+ cursor: 'pointer',
8326
+ backgroundColor: 'transparent',
8327
+ '&:hover': {
8328
+ boxShadow: 'none',
8329
+ borderColor: 'transparent'
8330
+ }
8331
+ });
8329
8332
  }
8330
- };
8331
- document.addEventListener('mousedown', handleClickOutside);
8332
- return function () {
8333
- document.removeEventListener('mousedown', handleClickOutside);
8334
- };
8335
- }, []);
8336
- return React.createElement(DropDownContainer$1, {
8337
- ref: dropdownRef
8338
- }, React.createElement(DropDownItem, {
8339
- label: "BJS MENU",
8340
- icon: React.createElement(DropDownLarge, null),
8341
- onClick: handleClick
8342
- }), isOpen && React.createElement(DropDownMenu, {
8343
- options: Options$1,
8344
- onSelect: handleSelect
8345
- }));
8346
- };
8333
+ }),
8334
+ value: "BJS MENU"
8335
+ });
8336
+ }
8347
8337
 
8338
+ var _templateObject$1L;
8348
8339
  function Print() {
8349
8340
  var _useOrderDetails = useOrderDetails(),
8350
8341
  orderDetails = _useOrderDetails[0];
8351
8342
  var gsitId = orderDetails == null ? void 0 : orderDetails.gsit_order_id;
8352
- var dropdownRef = useRef(null);
8353
- // console.log(gsitId, 'gsitId');
8354
- var _useState = useState(false),
8355
- isOpen = _useState[0],
8356
- setIsOpen = _useState[1];
8357
- var handleClick = function handleClick() {
8358
- setIsOpen(function (prev) {
8359
- return !prev;
8360
- });
8361
- };
8362
8343
  var getEnvironment = function getEnvironment() {
8363
8344
  console.log('project env', process.env.REACT_APP_API_PATH);
8364
8345
  return process.env.REACT_APP_API_PATH === 'https://us.dms.api.bjshomedelivery.com' ? 'us' : 'development';
@@ -8374,68 +8355,94 @@ function Print() {
8374
8355
  if (val === 'Proof Of Delivery') {
8375
8356
  return '';
8376
8357
  }
8377
- if (val === 'Proof Of Delivery(DOC)') {
8358
+ if (val === 'proofofdelivery(doc)') {
8378
8359
  return '';
8379
8360
  }
8380
- if (val === 'Order Delivery labels') {
8361
+ if (val === 'orderdeliverylabels') {
8381
8362
  return baseUrl + "/generate_labels?pdf=true&product_type=Deliver&order_id=" + gsitId;
8382
8363
  }
8383
- // if (val === 'ordercollectionlabels') {
8384
- // return `${baseUrl}/generate_labels?pdf=true&product_type=Collect&order_id=${gsitId}`;
8385
- // }
8386
- // if (val === 'orderreturnlabels') {
8387
- // return `${baseUrl}/generate_labels?pdf=true&product_type=Return&order_id=${gsitId}`;
8388
- // }
8389
- // if (val === 'returnscovernote') {
8390
- // return '';
8391
- // }
8392
- else {
8364
+ if (val === 'ordercollectionlabels') {
8365
+ return baseUrl + "/generate_labels?pdf=true&product_type=Collect&order_id=" + gsitId;
8366
+ }
8367
+ if (val === 'orderreturnlabels') {
8368
+ return baseUrl + "/generate_labels?pdf=true&product_type=Return&order_id=" + gsitId;
8369
+ }
8370
+ if (val === 'returnscovernote') {
8371
+ return '';
8372
+ } else {
8393
8373
  return '';
8394
8374
  }
8395
8375
  };
8396
8376
  var handleSelectChange = function handleSelectChange(selectedOption) {
8377
+ console.log(selectedOption);
8397
8378
  var selectedValue = selectedOption == null ? void 0 : selectedOption.value;
8398
- console.log(selectedValue, 'erf');
8399
8379
  if (selectedValue) {
8400
8380
  console.log(selectedValue);
8401
8381
  var url = getUrl(selectedValue);
8402
8382
  console.log('Generated URL:', url);
8383
+ // You can navigate to the URL or handle it further here
8403
8384
  window.open(url, '_blank');
8404
8385
  }
8405
8386
  };
8406
- return React.createElement(DropDownContainer$1, {
8407
- ref: dropdownRef
8408
- }, React.createElement(DropDownItem, {
8409
- label: "PRINT",
8410
- icon: React.createElement(DropDownLarge, null),
8411
- onClick: handleClick
8412
- }), isOpen && React.createElement(DropDownMenu, {
8387
+ return React.createElement(Container$13, null, React.createElement(SelectDropdown, {
8388
+ placeholder: "PRINT",
8413
8389
  options: PrintMenu,
8414
- onSelect: handleSelectChange
8390
+ value: "PRINT",
8391
+ isSearchable: false,
8392
+ onChange: handleSelectChange,
8393
+ styles: _extends({}, dropdownStyles, filterDropdownStyles, {
8394
+ container: function container(styles) {
8395
+ return _extends({}, styles, {
8396
+ cursor: 'pointer'
8397
+ });
8398
+ },
8399
+ menu: function menu(styles) {
8400
+ return _extends({}, styles, {
8401
+ top: '113%',
8402
+ borderRadius: '5px',
8403
+ width: 'max-content',
8404
+ cursor: 'pointer'
8405
+ });
8406
+ },
8407
+ control: function control(styles) {
8408
+ return _extends({}, styles, {
8409
+ width: '90px',
8410
+ boxShadow: 'none',
8411
+ borderColor: 'transparent',
8412
+ cursor: 'pointer',
8413
+ backgroundColor: 'transparent',
8414
+ '&:hover': {
8415
+ boxShadow: 'none',
8416
+ borderColor: 'transparent'
8417
+ }
8418
+ });
8419
+ }
8420
+ })
8415
8421
  }));
8416
8422
  }
8423
+ var Container$13 = /*#__PURE__*/styled.div(_templateObject$1L || (_templateObject$1L = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
8417
8424
 
8418
- var _templateObject$1N;
8425
+ var _templateObject$1M;
8419
8426
  // components
8420
8427
  function DropDowns$1() {
8421
- return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper, null, React.createElement(MenuDropDown, null), React.createElement(OptionsDropDown, null), React.createElement(Print, null)));
8428
+ return React.createElement(React.Fragment, null, React.createElement(DashBoardWrapper, null, React.createElement(BjsMenu, null), React.createElement(Options, null), React.createElement(Print, null)));
8422
8429
  }
8423
- var DashBoardWrapper = /*#__PURE__*/styled.section(_templateObject$1N || (_templateObject$1N = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0 5px;\n display: flex;\n align-content: center;\n gap: 10px;\n"])));
8430
+ var DashBoardWrapper = /*#__PURE__*/styled.section(_templateObject$1M || (_templateObject$1M = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 0 5px;\n display: flex;\n align-self: center;\n gap: 10px;\n"])));
8424
8431
 
8425
- var _templateObject$1O;
8432
+ var _templateObject$1N;
8426
8433
  // import Actions from './actions/Actions';
8427
8434
  var ActionsMenu = function ActionsMenu() {
8428
- return React.createElement(Flex$3, null, React.createElement(DropDowns$1, null));
8435
+ return React.createElement(Flex$2, null, React.createElement(DropDowns$1, null));
8429
8436
  };
8430
- var Flex$3 = /*#__PURE__*/styled.div(_templateObject$1O || (_templateObject$1O = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n display: flex;\n height: 34px;\n padding: 1px;\n align-items: flex-start;\n border-radius: 20px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: #f0f2f2;\n cursor: pointer;\n"])));
8437
+ var Flex$2 = /*#__PURE__*/styled.div(_templateObject$1N || (_templateObject$1N = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n display: flex;\n height: 34px;\n padding: 1px;\n align-items: flex-start;\n border-radius: 20px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: #f0f2f2;\n cursor: pointer;\n"])));
8431
8438
 
8432
- var _templateObject$1P;
8439
+ var _templateObject$1O;
8433
8440
  var DetailsFilters = function DetailsFilters() {
8434
- return React.createElement(Flex$4, null, React.createElement(Details, null), React.createElement(ActionsMenu, null));
8441
+ return React.createElement(Flex$3, null, React.createElement(Details, null), React.createElement(ActionsMenu, null));
8435
8442
  };
8436
- var Flex$4 = /*#__PURE__*/styled.div(_templateObject$1P || (_templateObject$1P = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 40px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: linear-gradient(180deg, #fff 0%, #f9fcff 100%);\n\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n /* z-index: 9999; */\n display: flex;\n padding: 10px;\n flex-direction: row;\n gap: 10px;\n align-self: stretch;\n position: relative;\n margin-bottom: -71px;\n width: 97%;\n margin-left: 21px;\n top: -132px;\n justify-content: space-between;\n"])));
8443
+ var Flex$3 = /*#__PURE__*/styled.div(_templateObject$1O || (_templateObject$1O = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 40px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: linear-gradient(180deg, #fff 0%, #f9fcff 100%);\n\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n /* z-index: 9999; */\n display: flex;\n padding: 10px;\n flex-direction: row;\n gap: 10px;\n align-self: stretch;\n position: relative;\n margin-bottom: -71px;\n width: 97%;\n margin-left: 21px;\n top: -132px;\n justify-content: space-between;\n"])));
8437
8444
 
8438
- var _templateObject$1Q, _templateObject2$1n, _templateObject3$O, _templateObject4$s;
8445
+ var _templateObject$1P, _templateObject2$1n, _templateObject3$O, _templateObject4$s;
8439
8446
  function OrderView() {
8440
8447
  notification.config({
8441
8448
  top: 150
@@ -8446,13 +8453,6 @@ function OrderView() {
8446
8453
  var _useGsitOrderId = useGsitOrderId(),
8447
8454
  gsitOrderId = _useGsitOrderId[0],
8448
8455
  setGsitOrderId = _useGsitOrderId[1];
8449
- var splitPath = function splitPath(str) {
8450
- var _str$split;
8451
- var parts = str == null || (_str$split = str.split('/')) == null ? void 0 : _str$split.filter(function (part) {
8452
- return part !== '';
8453
- }); // Filter out empty parts
8454
- return parts;
8455
- };
8456
8456
  // For API Call
8457
8457
  var _useOrderDetails = useOrderDetails(),
8458
8458
  orderDetails = _useOrderDetails[0],
@@ -8469,12 +8469,8 @@ function OrderView() {
8469
8469
  setDepotOptions = _useDepotOptions[1];
8470
8470
  var _useCustomerInfo = useCustomerInfo(),
8471
8471
  setCustomerInfo = _useCustomerInfo[1];
8472
- var location = useLocation();
8473
- var paths = splitPath(location.pathname);
8474
8472
  var _useLocationOptions = useLocationOptions(),
8475
8473
  setLocationOptions = _useLocationOptions[1];
8476
- var _useApiCalling = useApiCalling(),
8477
- apiCalling = _useApiCalling[0];
8478
8474
  var _useOrderProductsReso = useOrderProductsResources(),
8479
8475
  orderResources = _useOrderProductsReso[0],
8480
8476
  setOrderResources = _useOrderProductsReso[1];
@@ -8493,30 +8489,83 @@ function OrderView() {
8493
8489
  var _useLiveRecalling = useLiveRecalling(),
8494
8490
  liveRecalling = _useLiveRecalling[0];
8495
8491
  var systemLogsData = useSystemLogs();
8492
+ var _useAssignData = useAssignData(),
8493
+ setAssignData = _useAssignData[1];
8494
+ // query param
8495
+ var location = useLocation();
8496
+ var _useState2 = useState([]),
8497
+ filters = _useState2[0],
8498
+ setFilters = _useState2[1];
8499
+ // for third party apps
8496
8500
  var _useApiHook = useApiHook({
8497
- endpoint: "orders/" + orderId,
8501
+ endpoint: "orders/",
8498
8502
  method: 'GET',
8503
+ filters: filters,
8499
8504
  performAction: false
8500
8505
  }),
8501
- fetchedData = _useApiHook.data,
8502
- loading = _useApiHook.loading,
8503
- orderUpdate = _useApiHook.setShouldPerformAction;
8506
+ fetchedDataExternal = _useApiHook.data,
8507
+ loadingExternal = _useApiHook.loading,
8508
+ setShouldPerformExternal = _useApiHook.setShouldPerformAction;
8509
+ useEffect(function () {
8510
+ var searchParams = new URLSearchParams(location.search);
8511
+ if (searchParams != null && searchParams.toString()) {
8512
+ var dynamicFilters = [];
8513
+ searchParams == null || searchParams.forEach(function (value, key) {
8514
+ if (key === 'order') {
8515
+ dynamicFilters.push({
8516
+ field: 'gsit_order_id',
8517
+ op: '=',
8518
+ value: value
8519
+ });
8520
+ } else {
8521
+ dynamicFilters.push({
8522
+ field: key,
8523
+ op: '=',
8524
+ value: value
8525
+ });
8526
+ }
8527
+ });
8528
+ setFilters(dynamicFilters);
8529
+ if (filters) {
8530
+ var _fetchedDataExternal$;
8531
+ setShouldPerformExternal(true);
8532
+ setOrderId(fetchedDataExternal == null || (_fetchedDataExternal$ = fetchedDataExternal.data[0]) == null ? void 0 : _fetchedDataExternal$.id);
8533
+ }
8534
+ } else {
8535
+ var paths = location.pathname.split('/');
8536
+ setOrderId(paths[paths.length - 1]);
8537
+ }
8538
+ }, [location.search, loadingExternal]);
8504
8539
  var _useApiHook2 = useApiHook({
8540
+ endpoint: "orders/" + orderId,
8541
+ method: 'GET',
8542
+ performAction: false
8543
+ }),
8544
+ fetchedData = _useApiHook2.data,
8545
+ loading = _useApiHook2.loading,
8546
+ orderUpdate = _useApiHook2.setShouldPerformAction;
8547
+ useEffect(function () {
8548
+ if (orderId) {
8549
+ orderUpdate(true);
8550
+ liveRecalling ? setLivePerformAction(false) : setLivePerformAction(true);
8551
+ }
8552
+ }, [orderId, liveRecalling]);
8553
+ var _useApiHook3 = useApiHook({
8505
8554
  endpoint: "/orders/getStaticData/all/",
8506
8555
  method: 'GET'
8507
8556
  }),
8508
- fetchedStaticData = _useApiHook2.data,
8509
- staticDataLoading = _useApiHook2.loading;
8557
+ fetchedStaticData = _useApiHook3.data,
8558
+ staticDataLoading = _useApiHook3.loading;
8510
8559
  //Order status api
8511
- var _useApiHook3 = useApiHook({
8560
+ var _useApiHook4 = useApiHook({
8512
8561
  endpoint: "/orders/get_live_status/" + orderId,
8513
8562
  method: 'GET',
8514
8563
  performAction: false
8515
8564
  }),
8516
- fetchedStatusData = _useApiHook3.data,
8517
- statusDataLoading = _useApiHook3.loading,
8518
- setLivePerformAction = _useApiHook3.setShouldPerformAction;
8519
- var _useApiHook4 = useApiHook({
8565
+ fetchedStatusData = _useApiHook4.data,
8566
+ statusDataLoading = _useApiHook4.loading,
8567
+ setLivePerformAction = _useApiHook4.setShouldPerformAction;
8568
+ var _useApiHook5 = useApiHook({
8520
8569
  endpoint: "/depot/",
8521
8570
  method: 'GET',
8522
8571
  filters: [{
@@ -8525,35 +8574,17 @@ function OrderView() {
8525
8574
  value: true
8526
8575
  }]
8527
8576
  }),
8528
- fetchedDepotData = _useApiHook4.data,
8529
- depotDataLoading = _useApiHook4.loading;
8530
- useEffect(function () {
8531
- if (orderId) {
8532
- orderUpdate(true);
8533
- liveRecalling ? setLivePerformAction(false) : setLivePerformAction(true);
8534
- }
8535
- }, [orderId, liveRecalling]);
8536
- useEffect(function () {
8537
- if (apiCalling) {
8538
- orderUpdate(true);
8539
- } else {
8540
- orderUpdate(false);
8541
- }
8542
- }, [apiCalling]);
8543
- useEffect(function () {
8544
- if (paths.length > 1) {
8545
- setOrderId(paths[2]);
8546
- }
8547
- // for local
8548
- // if (paths.length >= 0) {
8549
- // setOrderId(paths[1]);
8550
- // }
8551
- }, [paths]);
8577
+ fetchedDepotData = _useApiHook5.data,
8578
+ depotDataLoading = _useApiHook5.loading;
8552
8579
  useEffect(function () {
8553
8580
  setLoading(staticDataLoading);
8554
8581
  if (fetchedStaticData && fetchedStaticData.data) {
8582
+ var _fetchedStaticData$da;
8555
8583
  var result = fetchedStaticData == null ? void 0 : fetchedStaticData.data;
8556
8584
  setOrderStaticData(result[0]);
8585
+ setAssignData(fetchedStaticData == null || (_fetchedStaticData$da = fetchedStaticData.data) == null ? void 0 : _fetchedStaticData$da.flatMap(function (i) {
8586
+ return i == null ? void 0 : i.resource_visibility_type;
8587
+ }));
8557
8588
  }
8558
8589
  }, [staticDataLoading]);
8559
8590
  useEffect(function () {
@@ -8585,7 +8616,7 @@ function OrderView() {
8585
8616
  }
8586
8617
  }
8587
8618
  return function () {
8588
- setOrderId(null);
8619
+ // setOrderId(null);
8589
8620
  };
8590
8621
  }, [statusDataLoading, fetchedStatusData]);
8591
8622
  useEffect(function () {
@@ -8605,17 +8636,17 @@ function OrderView() {
8605
8636
  }
8606
8637
  }
8607
8638
  return function () {
8608
- setOrderId(null);
8639
+ // setOrderId(null);
8609
8640
  };
8610
8641
  }, [depotDataLoading]);
8611
8642
  // Order resources
8612
- var _useApiHook5 = useApiHook({
8643
+ var _useApiHook6 = useApiHook({
8613
8644
  endpoint: "/orders/" + orderId + "/order_resources/",
8614
8645
  method: 'GET',
8615
8646
  performAction: false
8616
8647
  }),
8617
- fetchedResourcesData = _useApiHook5.data,
8618
- setActions = _useApiHook5.setShouldPerformAction;
8648
+ fetchedResourcesData = _useApiHook6.data,
8649
+ setActions = _useApiHook6.setShouldPerformAction;
8619
8650
  useEffect(function () {
8620
8651
  if (orderId) {
8621
8652
  setActions(true);
@@ -8626,17 +8657,17 @@ function OrderView() {
8626
8657
  setOrderResources(fetchedResourcesData);
8627
8658
  }
8628
8659
  return function () {
8629
- setOrderId(null);
8660
+ // setOrderId(null);
8630
8661
  };
8631
8662
  }, [fetchedResourcesData, orderResources, setOrderResources]);
8632
8663
  // Toolbox resources
8633
- var _useApiHook6 = useApiHook({
8664
+ var _useApiHook7 = useApiHook({
8634
8665
  endpoint: "/orders/" + orderId + "/toolbox_resources/",
8635
8666
  method: 'GET',
8636
8667
  performAction: false
8637
8668
  }),
8638
- fetchedToolboxData = _useApiHook6.data,
8639
- setAction = _useApiHook6.setShouldPerformAction;
8669
+ fetchedToolboxData = _useApiHook7.data,
8670
+ setAction = _useApiHook7.setShouldPerformAction;
8640
8671
  useEffect(function () {
8641
8672
  if (orderId) {
8642
8673
  setAction(true);
@@ -8647,16 +8678,9 @@ function OrderView() {
8647
8678
  setOrderToolbox(fetchedToolboxData);
8648
8679
  }
8649
8680
  return function () {
8650
- setOrderId(undefined);
8681
+ // setOrderId(undefined);
8651
8682
  };
8652
8683
  }, [fetchedToolboxData, orderToolbox, setOrderToolbox]);
8653
- useEffect(function () {
8654
- if (GsitCUstomerId != null && GsitCUstomerId.id) {
8655
- shouldFetch(true);
8656
- } else {
8657
- shouldFetch(false);
8658
- }
8659
- }, [GsitCUstomerId]);
8660
8684
  useEffect(function () {
8661
8685
  return function () {
8662
8686
  setGsitCUstomerId(function (prev) {
@@ -8666,14 +8690,21 @@ function OrderView() {
8666
8690
  });
8667
8691
  };
8668
8692
  }, []);
8669
- var _useApiHook7 = useApiHook({
8693
+ var _useApiHook8 = useApiHook({
8670
8694
  endpoint: "/return_locations/?customer_id=" + (GsitCUstomerId == null ? void 0 : GsitCUstomerId.id),
8671
8695
  method: 'GET',
8672
8696
  performAction: false
8673
8697
  }),
8674
- fetchedLocationData = _useApiHook7.data,
8675
- dataLoading = _useApiHook7.loading,
8676
- shouldFetch = _useApiHook7.setShouldPerformAction;
8698
+ fetchedLocationData = _useApiHook8.data,
8699
+ dataLoading = _useApiHook8.loading,
8700
+ shouldFetch = _useApiHook8.setShouldPerformAction;
8701
+ useEffect(function () {
8702
+ if (GsitCUstomerId != null && GsitCUstomerId.id) {
8703
+ shouldFetch(true);
8704
+ } else {
8705
+ shouldFetch(false);
8706
+ }
8707
+ }, [GsitCUstomerId]);
8677
8708
  useEffect(function () {
8678
8709
  if (fetchedLocationData && fetchedLocationData != null && fetchedLocationData.data) {
8679
8710
  var _fetchedLocationData$;
@@ -8721,7 +8752,7 @@ function OrderView() {
8721
8752
  }, [gsitId]);
8722
8753
  return React.createElement(MainContainer$b, null, React.createElement(GeneralHeader, null), React.createElement(DetailsFilters, null), React.createElement(OrderDetails$1, null), React.createElement(ProductsInfo, null), React.createElement(SplitLayout$1, null, React.createElement(NotesContainer, null, React.createElement(Notes, null)), React.createElement(TablesContainer, null, React.createElement(SystemLogs, null))), React.createElement(OrderActions, null));
8723
8754
  }
8724
- var MainContainer$b = /*#__PURE__*/styled.div(_templateObject$1Q || (_templateObject$1Q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding-bottom: 30px;\n border-radius: 25px;\n border: 1px solid #e3e3e3;\n"])));
8755
+ var MainContainer$b = /*#__PURE__*/styled.div(_templateObject$1P || (_templateObject$1P = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 10px;\n padding-bottom: 30px;\n"])));
8725
8756
  var SplitLayout$1 = /*#__PURE__*/styled.div(_templateObject2$1n || (_templateObject2$1n = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 15px;\n @media (max-width: 1024px) {\n display: contents;\n }\n"])));
8726
8757
  var NotesContainer = /*#__PURE__*/styled.div(_templateObject3$O || (_templateObject3$O = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n"])));
8727
8758
  var TablesContainer = /*#__PURE__*/styled.div(_templateObject4$s || (_templateObject4$s = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 15px;\n"])));
@@ -8843,7 +8874,7 @@ var filtersReducerAtom = /*#__PURE__*/atom(function (get) {
8843
8874
  return set(filtersStateAtom, filterReducer(get(filtersStateAtom), action));
8844
8875
  });
8845
8876
 
8846
- var _templateObject$1R;
8877
+ var _templateObject$1Q;
8847
8878
  function SelectionFilter() {
8848
8879
  var _useCustomerData = useCustomerData(),
8849
8880
  customers = _useCustomerData[0];
@@ -8982,7 +9013,7 @@ function SelectionFilter() {
8982
9013
  if (!currentSearch.includes('filter')) {
8983
9014
  console.log('inside include');
8984
9015
  // for dev
8985
- navigate("/order/return/filter?" + queryParams.toString());
9016
+ navigate("/filter?" + queryParams.toString());
8986
9017
  // for local
8987
9018
  //navigate(`/filter?${queryParams.toString()}`);
8988
9019
  }
@@ -9151,7 +9182,7 @@ function SelectionFilter() {
9151
9182
  disabled: !isButtonEnabled
9152
9183
  }, "Apply"))));
9153
9184
  }
9154
- var StyledAntSelect$2 = /*#__PURE__*/styled(Select)(_templateObject$1R || (_templateObject$1R = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n"])));
9185
+ var StyledAntSelect$2 = /*#__PURE__*/styled(Select)(_templateObject$1Q || (_templateObject$1Q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n"])));
9155
9186
 
9156
9187
  // import { ApiResponse } from '../../types';
9157
9188
  // import { useApiHook } from '@bjsdistribution/dms-component-library';
@@ -9215,9 +9246,9 @@ function HeaderFilter() {
9215
9246
  return React.createElement(CoverPage, null, React.createElement(SelectionFilter, null));
9216
9247
  }
9217
9248
 
9218
- var _templateObject$1S, _templateObject4$t, _templateObject5$i, _templateObject7$c, _templateObject8$8;
9249
+ var _templateObject$1R, _templateObject4$t, _templateObject5$i, _templateObject7$c, _templateObject8$8;
9219
9250
  //Left side
9220
- var LeftSideConatiner = /*#__PURE__*/styled.div(_templateObject$1S || (_templateObject$1S = /*#__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"])));
9251
+ var LeftSideConatiner = /*#__PURE__*/styled.div(_templateObject$1R || (_templateObject$1R = /*#__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"])));
9221
9252
  //
9222
9253
  var StyledFiter = /*#__PURE__*/styled.div(_templateObject4$t || (_templateObject4$t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
9223
9254
  var StyledFIlterELements = /*#__PURE__*/styled.div(_templateObject5$i || (_templateObject5$i = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 0;\n gap: 10px;\n align-items: center;\n"])));
@@ -9225,7 +9256,7 @@ var Text$8 = /*#__PURE__*/styled.div(_templateObject7$c || (_templateObject7$c =
9225
9256
  // Right side filter
9226
9257
  var StyledTableFilter = /*#__PURE__*/styled.div(_templateObject8$8 || (_templateObject8$8 = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9227
9258
 
9228
- var _templateObject$1T, _templateObject2$1o;
9259
+ var _templateObject$1S, _templateObject2$1o;
9229
9260
  // import { StyledBulkItem } from '../../filters/BulkFilterStyle';
9230
9261
  // import SearchType from '../../header/route-header/search/SearchType';
9231
9262
  // import DownloadIcon from '../../../../assets/icons/DownloadIcon';
@@ -9234,7 +9265,7 @@ var RightFilters = function RightFilters() {
9234
9265
  dispatch = _useAtom[1];
9235
9266
  var _useSelectedOrders = useSelectedOrders(),
9236
9267
  selectedReturnOrder = _useSelectedOrders[0];
9237
- return React.createElement(Container$13, null, React.createElement(ButtonText, {
9268
+ return React.createElement(Container$14, null, React.createElement(ButtonText, {
9238
9269
  onClick: function onClick() {
9239
9270
  return dispatch({
9240
9271
  type: 'create-return'
@@ -9243,7 +9274,7 @@ var RightFilters = function RightFilters() {
9243
9274
  disabled: (selectedReturnOrder == null ? void 0 : selectedReturnOrder.length) === 0
9244
9275
  }, "Create Return"));
9245
9276
  };
9246
- var Container$13 = /*#__PURE__*/styled.div(_templateObject$1T || (_templateObject$1T = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
9277
+ var Container$14 = /*#__PURE__*/styled.div(_templateObject$1S || (_templateObject$1S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
9247
9278
  // const Mid = styled.div`
9248
9279
  // display: flex;
9249
9280
  // padding: 4px 10px;
@@ -9268,8 +9299,8 @@ var ReturnFilter = function ReturnFilter() {
9268
9299
  return React.createElement(React.Fragment, null, React.createElement(StyledFiter, null, React.createElement(Text$8, null, customerName), React.createElement(StyledFIlterELements, null, React.createElement(StyledTableFilter, null)), React.createElement(RightFilters, null)));
9269
9300
  };
9270
9301
 
9271
- var _templateObject$1U, _templateObject2$1p, _templateObject3$Q, _templateObject4$u, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
9272
- var ColumStyle = /*#__PURE__*/styled.div(_templateObject$1U || (_templateObject$1U = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 67px;\n align-items: center;\n gap: 7px;\n"])));
9302
+ var _templateObject$1T, _templateObject2$1p, _templateObject3$Q, _templateObject4$u, _templateObject34, _templateObject35, _templateObject36, _templateObject37;
9303
+ var ColumStyle = /*#__PURE__*/styled.div(_templateObject$1T || (_templateObject$1T = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n width: 67px;\n align-items: center;\n gap: 7px;\n"])));
9273
9304
  var GreyBox = /*#__PURE__*/styled.div(_templateObject2$1p || (_templateObject2$1p = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 3px 12px;\n align-items: flex-start;\n gap: 24px;\n border-radius: 6px;\n background: rgba(153, 153, 153, 0.1);\n"])));
9274
9305
  // Styled components
9275
9306
  var StyledTableWrapper$2 = /*#__PURE__*/styled.div(_templateObject3$Q || (_templateObject3$Q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n overflow-x: auto;\n max-height: calc(100vh - 396px);\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"])));
@@ -9466,7 +9497,7 @@ var optionsForReturnPrint = [{
9466
9497
  label: 'Print Return Labels'
9467
9498
  }];
9468
9499
 
9469
- var _templateObject$1V, _templateObject2$1q;
9500
+ var _templateObject$1U, _templateObject2$1q;
9470
9501
  var options = optionsForReturnPrint;
9471
9502
  var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
9472
9503
  var legacyProductId = _ref.legacyProductId;
@@ -9482,7 +9513,7 @@ var PrintDropDownReturn = function PrintDropDownReturn(_ref) {
9482
9513
  }, IconComponent && React.createElement(IconComponent, null), " ", item.label);
9483
9514
  }));
9484
9515
  };
9485
- var OptionsList = /*#__PURE__*/styled.ul(_templateObject$1V || (_templateObject$1V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n border-radius: 6px;\n border: 1px solid rgba(224, 226, 231, 0.5);\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n width: 177px;\n padding: 5px 1px 3px 1px;\n position: absolute;\n top: 26px;\n right: 0;\n z-index: 99;\n min-width: 194px;\n"])));
9516
+ var OptionsList = /*#__PURE__*/styled.ul(_templateObject$1U || (_templateObject$1U = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n border-radius: 6px;\n border: 1px solid rgba(224, 226, 231, 0.5);\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n width: 177px;\n padding: 5px 1px 3px 1px;\n position: absolute;\n top: 26px;\n right: 0;\n z-index: 99;\n min-width: 194px;\n"])));
9486
9517
  var OptionsListLi = /*#__PURE__*/styled.li(_templateObject2$1q || (_templateObject2$1q = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom: 1px solid #f0f2f2;\n padding: 8px 10px;\n display: flex;\n gap: 12px;\n align-items: center;\n font-size: 13px;\n cursor: pointer;\n &:last-child {\n border: none;\n }\n"])));
9487
9518
 
9488
9519
  function CaretDownFilledIcon(props) {
@@ -9875,7 +9906,7 @@ var ReturnOrderTable = function ReturnOrderTable() {
9875
9906
  })))));
9876
9907
  };
9877
9908
 
9878
- var _templateObject$1W, _templateObject2$1r;
9909
+ var _templateObject$1V, _templateObject2$1r;
9879
9910
  var DefectsModal = function DefectsModal() {
9880
9911
  var options = [{
9881
9912
  value: 'bjsCouriers',
@@ -9927,10 +9958,10 @@ var DefectsModal = function DefectsModal() {
9927
9958
  }
9928
9959
  }))));
9929
9960
  };
9930
- var StyledConatiner = /*#__PURE__*/styled.div(_templateObject$1W || (_templateObject$1W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* tex: nowrap; */\n"])));
9961
+ var StyledConatiner = /*#__PURE__*/styled.div(_templateObject$1V || (_templateObject$1V = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n /* tex: nowrap; */\n"])));
9931
9962
  var GLobalPopupContent = /*#__PURE__*/styled.div(_templateObject2$1r || (_templateObject2$1r = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
9932
9963
 
9933
- var _templateObject$1X, _templateObject2$1s, _templateObject3$R;
9964
+ var _templateObject$1W, _templateObject2$1s, _templateObject3$R;
9934
9965
  var _excluded$4 = ["id"];
9935
9966
  var CreateReturnModal = function CreateReturnModal() {
9936
9967
  var _useSelectedConfirmLo = useSelectedConfirmLoc(),
@@ -9983,7 +10014,7 @@ var CreateReturnModal = function CreateReturnModal() {
9983
10014
  type: "info",
9984
10015
  title: "Do you wish to proceed?",
9985
10016
  showOkButton: false
9986
- }), React.createElement(Container$14, null, React.createElement("ul", {
10017
+ }), React.createElement(Container$15, null, React.createElement("ul", {
9987
10018
  style: {
9988
10019
  listStyle: 'none',
9989
10020
  padding: 0
@@ -10009,8 +10040,8 @@ var CreateReturnModal = function CreateReturnModal() {
10009
10040
  }, displayValueOrNA(returnLoc == null || (_returnLoc$return_loc = returnLoc.return_locations) == null ? void 0 : _returnLoc$return_loc.location_name)));
10010
10041
  })))));
10011
10042
  };
10012
- var StyledText$1 = /*#__PURE__*/styled.div(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
10013
- var Container$14 = /*#__PURE__*/styled.div(_templateObject2$1s || (_templateObject2$1s = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10043
+ var StyledText$1 = /*#__PURE__*/styled.div(_templateObject$1W || (_templateObject$1W = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8d8f90;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n"])));
10044
+ var Container$15 = /*#__PURE__*/styled.div(_templateObject2$1s || (_templateObject2$1s = /*#__PURE__*/_taggedTemplateLiteralLoose([""])));
10014
10045
  var Wrapper$l = /*#__PURE__*/styled.div(_templateObject3$R || (_templateObject3$R = /*#__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"])));
10015
10046
 
10016
10047
  var ModalManager = function ModalManager() {
@@ -10114,7 +10145,7 @@ var ModalManager = function ModalManager() {
10114
10145
  // for local
10115
10146
  // navigate('/order-return');
10116
10147
  // for dev
10117
- navigate('/order/return/view');
10148
+ navigate('/orders/view/return');
10118
10149
  }
10119
10150
  }, [postLoading]);
10120
10151
  return React.createElement(React.Fragment, null, (popupName == null ? void 0 : popupName.state) === 'create-return' && React.createElement(React.Fragment, null, React.createElement(AntModal, {
@@ -10160,8 +10191,8 @@ var ModalManager = function ModalManager() {
10160
10191
  }));
10161
10192
  };
10162
10193
 
10163
- var _templateObject$1Y, _templateObject2$1t, _templateObject3$S, _templateObject4$v, _templateObject6$c, _templateObject7$d;
10164
- var StyledContainer = /*#__PURE__*/styled.div(_templateObject$1Y || (_templateObject$1Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n padding: 0;\n max-width: 100%;\n margin-top: 11px;\n margin-bottom: 0;\n"])));
10194
+ var _templateObject$1X, _templateObject2$1t, _templateObject3$S, _templateObject4$v, _templateObject6$c, _templateObject7$d;
10195
+ var StyledContainer = /*#__PURE__*/styled.div(_templateObject$1X || (_templateObject$1X = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: stretch;\n padding: 0;\n max-width: 100%;\n margin-top: 11px;\n margin-bottom: 0;\n"])));
10165
10196
  var StyledContentWrapper = /*#__PURE__*/styled.div(_templateObject2$1t || (_templateObject2$1t = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n gap: 12px;\n"])));
10166
10197
  var StyledInfoBox = /*#__PURE__*/styled.div(_templateObject3$S || (_templateObject3$S = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #fff;\n color: #8e8a85;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0.07px;\n padding: 6px 10px;\n"])));
10167
10198
  var StyledLabel$2 = /*#__PURE__*/styled.div(_templateObject4$v || (_templateObject4$v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #8e8a85;\n\n font-size: 13px;\n font-weight: 400;\n line-height: 16px;\n display: flex;\n align-items: center;\n"])));
@@ -10284,7 +10315,7 @@ var Pagination = function Pagination(_ref) {
10284
10315
  }, React.createElement(NextIcon, null)))));
10285
10316
  };
10286
10317
 
10287
- var _templateObject$1Z, _templateObject2$1u;
10318
+ var _templateObject$1Y, _templateObject2$1u;
10288
10319
  // import { useLocation } from 'react-router-dom';
10289
10320
  var ReturnTable = function ReturnTable() {
10290
10321
  var _UsePaginationData = UsePaginationData(),
@@ -10309,7 +10340,7 @@ var ReturnTable = function ReturnTable() {
10309
10340
  // }, [location]);
10310
10341
  return React.createElement("div", null, React.createElement(DashBoardWrapper$1, null, React.createElement("div", {
10311
10342
  className: "Tableconatiner"
10312
- }, React.createElement(HeaderFilter, null), React.createElement(Container$15, null, React.createElement(ReturnFilter, null), React.createElement(ReturnOrderTable, null), total > 0 && React.createElement(Pagination, {
10343
+ }, React.createElement(HeaderFilter, null), React.createElement(Container$16, null, React.createElement(ReturnFilter, null), React.createElement(ReturnOrderTable, null), total > 0 && React.createElement(Pagination, {
10313
10344
  currentPage: page,
10314
10345
  totalItems: total,
10315
10346
  itemsPerPage: itemsPerPage,
@@ -10317,7 +10348,7 @@ var ReturnTable = function ReturnTable() {
10317
10348
  onItemsPerPageChange: handleItemsPerPageChange
10318
10349
  })))), React.createElement(ModalManager, null));
10319
10350
  };
10320
- var Container$15 = /*#__PURE__*/styled.div(_templateObject$1Z || (_templateObject$1Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
10351
+ var Container$16 = /*#__PURE__*/styled.div(_templateObject$1Y || (_templateObject$1Y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
10321
10352
  var DashBoardWrapper$1 = /*#__PURE__*/styled.section(_templateObject2$1u || (_templateObject2$1u = /*#__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"])));
10322
10353
 
10323
10354
  function LoadIcon() {
@@ -10336,7 +10367,7 @@ function LoadIcon() {
10336
10367
  }));
10337
10368
  }
10338
10369
 
10339
- var _templateObject$1_, _templateObject2$1v;
10370
+ var _templateObject$1Z, _templateObject2$1v;
10340
10371
  var PrintDropDown = function PrintDropDown(_ref) {
10341
10372
  var legacyProductId = _ref.legacyProductId;
10342
10373
  var downloadFiles = function downloadFiles(type) {
@@ -10362,7 +10393,7 @@ var PrintDropDown = function PrintDropDown(_ref) {
10362
10393
  }, IconComponent && React.createElement(IconComponent, null), item.label);
10363
10394
  }));
10364
10395
  };
10365
- var OptionsList$1 = /*#__PURE__*/styled.ul(_templateObject$1_ || (_templateObject$1_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n border-radius: 6px;\n border: 1px solid rgba(224, 226, 231, 0.5);\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n width: 177px;\n padding: 5px 1px 3px 1px;\n position: absolute;\n top: 34px;\n right: 0;\n z-index: 99;\n min-width: 194px;\n"])));
10396
+ var OptionsList$1 = /*#__PURE__*/styled.ul(_templateObject$1Z || (_templateObject$1Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n border-radius: 6px;\n border: 1px solid rgba(224, 226, 231, 0.5);\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n width: 177px;\n padding: 5px 1px 3px 1px;\n position: absolute;\n top: 34px;\n right: 0;\n z-index: 99;\n min-width: 194px;\n"])));
10366
10397
  var OptionsListLi$1 = /*#__PURE__*/styled.li(_templateObject2$1v || (_templateObject2$1v = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-bottom: 1px solid #f0f2f2;\n padding: 8px 10px;\n display: flex;\n gap: 12px;\n align-items: center;\n font-size: 13px;\n cursor: ", ";\n color: ", ";\n &:last-child {\n border: none;\n }\n &:hover {\n background-color: ", ";\n }\n"])), function (_ref2) {
10367
10398
  var disabled = _ref2.disabled;
10368
10399
  return disabled ? 'not-allowed' : 'pointer';
@@ -10374,7 +10405,7 @@ var OptionsListLi$1 = /*#__PURE__*/styled.li(_templateObject2$1v || (_templateOb
10374
10405
  return disabled ? 'transparent' : '#f0f0f0';
10375
10406
  });
10376
10407
 
10377
- var _templateObject$1$;
10408
+ var _templateObject$1_;
10378
10409
  var OrderTable = function OrderTable(_ref) {
10379
10410
  var loadingskeleton = _ref.loadingskeleton;
10380
10411
  // const [, setSelectedReturnOrder] = useSelectedOrders();
@@ -10643,7 +10674,7 @@ var OrderTable = function OrderTable(_ref) {
10643
10674
  paddingLeft: 0
10644
10675
  }
10645
10676
  }, React.createElement(NavLink, {
10646
- to: "" + item.id
10677
+ to: "/" + item.id
10647
10678
  }, displayValueOrNA(item == null || (_item$order_recipient = item.order_recipient) == null ? void 0 : _item$order_recipient.recipient_name))), React.createElement("li", {
10648
10679
  style: {
10649
10680
  color: '#888075'
@@ -10690,12 +10721,12 @@ var OrderTable = function OrderTable(_ref) {
10690
10721
  }, React.createElement(LoadIcon, null)))));
10691
10722
  })))));
10692
10723
  };
10693
- var StyledAntSelect$3 = /*#__PURE__*/styled(Select)(_templateObject$1$ || (_templateObject$1$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n"])));
10724
+ var StyledAntSelect$3 = /*#__PURE__*/styled(Select)(_templateObject$1_ || (_templateObject$1_ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .ant-select-selector {\n /* width: 22vw; */\n border-radius: 22px;\n }\n .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n"])));
10694
10725
 
10695
- var _templateObject$20;
10726
+ var _templateObject$1$;
10696
10727
  // import DownloadIcon from '../../../../assets/icons/DownloadIcon';
10697
10728
  var TableFilters = function TableFilters() {
10698
- return React.createElement(Container$16, null);
10729
+ return React.createElement(Container$17, null);
10699
10730
  // return (
10700
10731
  // // <StyledBulkFilterCover>
10701
10732
  // <StyledBulkItem>
@@ -10709,7 +10740,7 @@ var TableFilters = function TableFilters() {
10709
10740
  // // </StyledBulkFilterCover>
10710
10741
  // );
10711
10742
  };
10712
- var Container$16 = /*#__PURE__*/styled.div(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
10743
+ var Container$17 = /*#__PURE__*/styled.div(_templateObject$1$ || (_templateObject$1$ = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n /* align-items: flex-start; */\n gap: 16px;\n align-items: center;\n"])));
10713
10744
 
10714
10745
  var FilterIcon = function FilterIcon() {
10715
10746
  return React.createElement("svg", {
@@ -10942,7 +10973,7 @@ var filtersReducerReturnAtom = /*#__PURE__*/atom(function (get) {
10942
10973
  return set(filtersStateAtom$1, filterReducer$1(get(filtersStateAtom$1), action));
10943
10974
  });
10944
10975
 
10945
- var _templateObject$21, _templateObject2$1w;
10976
+ var _templateObject$20, _templateObject2$1w;
10946
10977
  var ReturnOrderFilter = function ReturnOrderFilter() {
10947
10978
  var _useAtom = useAtom(filtersReducerReturnAtom),
10948
10979
  dispatch = _useAtom[1];
@@ -11157,7 +11188,7 @@ var ReturnOrderFilter = function ReturnOrderFilter() {
11157
11188
  className: "cross"
11158
11189
  })), React.createElement(StyledFilterBtnLabel, null, "Clear all"))) : null)), React.createElement(TableFilters, null)));
11159
11190
  };
11160
- var StyledDatePicker = /*#__PURE__*/styled.div(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
11191
+ var StyledDatePicker = /*#__PURE__*/styled.div(_templateObject$20 || (_templateObject$20 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .custom-datepicker {\n border: none;\n }\n"])));
11161
11192
  // const DropdownContainer = styled.div``;
11162
11193
  var StyledAntSelect$4 = /*#__PURE__*/styled.div(_templateObject2$1w || (_templateObject2$1w = /*#__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 :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 .ant-select-clear {\n top: 40% !important;\n font-size: 18px !important;\n }\n"])));
11163
11194
 
@@ -11245,7 +11276,7 @@ var ReturnPagination = function ReturnPagination(_ref) {
11245
11276
  }, React.createElement(NextIcon, null)))));
11246
11277
  };
11247
11278
 
11248
- var _templateObject$22, _templateObject2$1x;
11279
+ var _templateObject$21, _templateObject2$1x;
11249
11280
  var _excluded$5 = ["count"];
11250
11281
  var ReturnAfterTable = function ReturnAfterTable() {
11251
11282
  var _useReturnAfterOrderD = useReturnAfterOrderData(),
@@ -11308,7 +11339,7 @@ var ReturnAfterTable = function ReturnAfterTable() {
11308
11339
  }, [fetchedReturnOrderData, loading, returnAfterOrder]);
11309
11340
  return React.createElement("div", null, React.createElement(DashBoardWrapper$2, null, React.createElement("div", {
11310
11341
  className: "Tableconatiner"
11311
- }, React.createElement(Container$17, null, React.createElement(ReturnOrderFilter, null), React.createElement(OrderTable, null), total > 0 && React.createElement(ReturnPagination, {
11342
+ }, React.createElement(Container$18, null, React.createElement(ReturnOrderFilter, null), React.createElement(OrderTable, null), total > 0 && React.createElement(ReturnPagination, {
11312
11343
  currentPage: page,
11313
11344
  totalItems: total,
11314
11345
  itemsPerPage: itemsPerPage,
@@ -11316,13 +11347,13 @@ var ReturnAfterTable = function ReturnAfterTable() {
11316
11347
  onItemsPerPageChange: handleItemsPerPageChange
11317
11348
  })))));
11318
11349
  };
11319
- var Container$17 = /*#__PURE__*/styled.div(_templateObject$22 || (_templateObject$22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n /* top: -30px; */\n"])));
11350
+ var Container$18 = /*#__PURE__*/styled.div(_templateObject$21 || (_templateObject$21 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n /* top: -30px; */\n"])));
11320
11351
  var DashBoardWrapper$2 = /*#__PURE__*/styled.section(_templateObject2$1x || (_templateObject2$1x = /*#__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"])));
11321
11352
 
11322
11353
  var _templateObject2$1y;
11323
11354
  var StyledBulkItem = /*#__PURE__*/styled.div(_templateObject2$1y || (_templateObject2$1y = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n padding: 8px 12px;\n display: flex;\n align-items: center;\n /* border-right: 1px solid #d0d5dd; */\n gap: 8px;\n cursor: pointer;\n position: relative;\n\n @media screen and (max-width: 1030px) {\n padding: 8px 11px;\n }\n\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n box-sizing: border-box;\n top: 54px;\n }\n &:last-child {\n border-right: none;\n }\n &.active svg.arrowDown {\n transform: rotate(180deg);\n }\n label {\n color: #6a7378;\n text-align: center;\n font-family: 'Open Sans';\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 18px;\n cursor: pointer;\n }\n\n &.noPadding {\n padding: 0;\n }\n"])));
11324
11355
 
11325
- var _templateObject$23, _templateObject2$1z;
11356
+ var _templateObject$22, _templateObject2$1z;
11326
11357
  var SearchType = function SearchType() {
11327
11358
  var _useState = useState(''),
11328
11359
  searchText = _useState[0],
@@ -11337,7 +11368,7 @@ var SearchType = function SearchType() {
11337
11368
  onChange: handleInputChange
11338
11369
  }));
11339
11370
  };
11340
- var Search = /*#__PURE__*/styled.div(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n svg {\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n }\n"])));
11371
+ var Search = /*#__PURE__*/styled.div(_templateObject$22 || (_templateObject$22 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n svg {\n position: absolute;\n left: 12px;\n top: 50%;\n transform: translateY(-50%);\n }\n"])));
11341
11372
  var SearchInput = /*#__PURE__*/styled.input(_templateObject2$1z || (_templateObject2$1z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n border-radius: 20px;\n border: 1px solid #e0e2e7;\n background: #fff;\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n display: flex;\n padding: 8.5px 12px;\n align-items: center;\n gap: 8px;\n align-self: stretch;\n padding-left: 39px;\n"])));
11342
11373
 
11343
11374
  var BulkFilter = function BulkFilter() {
@@ -11514,7 +11545,7 @@ var ReturnTable$1 = function ReturnTable() {
11514
11545
  customerId: customerId == null ? void 0 : customerId.toString()
11515
11546
  });
11516
11547
  //for dev
11517
- navigate("/order/return/filter?" + queryParams.toString());
11548
+ navigate("/filter?" + queryParams.toString());
11518
11549
  //for local
11519
11550
  //navigate(`/filter?${queryParams.toString()}`);
11520
11551
  };
@@ -11540,7 +11571,7 @@ var ReturnTable$1 = function ReturnTable() {
11540
11571
  type: RTS
11541
11572
  });
11542
11573
  //for dev
11543
- navigate("/order/return/filter?" + queryParams.toString());
11574
+ navigate("/filter?" + queryParams.toString());
11544
11575
  //for local
11545
11576
  //navigate(`/filter?${queryParams.toString()}`);
11546
11577
  };
@@ -11677,7 +11708,7 @@ var overviewfiltersReducerAtom = /*#__PURE__*/atom(function (get) {
11677
11708
  return set(filtersStateAtom$2, filterReducer$2(get(filtersStateAtom$2), action));
11678
11709
  });
11679
11710
 
11680
- var _templateObject$24, _templateObject2$1A, _templateObject3$T;
11711
+ var _templateObject$23, _templateObject2$1A, _templateObject3$T;
11681
11712
  var _excluded$7 = ["count"];
11682
11713
  function ReturnMainTable() {
11683
11714
  var _useAtom = useAtom(overviewfiltersReducerAtom),
@@ -11739,7 +11770,7 @@ function ReturnMainTable() {
11739
11770
  className: " " + (isScrolled ? 'stickyTableHead' : '')
11740
11771
  }, React.createElement("div", {
11741
11772
  className: "Tableconatiner"
11742
- }, React.createElement(HeaderFilter, null), React.createElement(Container$18, null, React.createElement(Row$7, null, React.createElement(Text$8, null, "Client Return"), customerId ? React.createElement(ReturnFilter, null) : React.createElement(Filters, null)), React.createElement(ReturnTable$1, null)), total > 0 && React.createElement(Pagination, {
11773
+ }, React.createElement(HeaderFilter, null), React.createElement(Container$19, null, React.createElement(Row$7, null, React.createElement(Text$8, null, "Client Return"), customerId ? React.createElement(ReturnFilter, null) : React.createElement(Filters, null)), React.createElement(ReturnTable$1, null)), total > 0 && React.createElement(Pagination, {
11743
11774
  currentPage: page,
11744
11775
  totalItems: total,
11745
11776
  itemsPerPage: itemsPerPage,
@@ -11747,25 +11778,25 @@ function ReturnMainTable() {
11747
11778
  onItemsPerPageChange: handleItemsPerPageChange
11748
11779
  }))));
11749
11780
  }
11750
- var Row$7 = /*#__PURE__*/styled.div(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
11751
- var Container$18 = /*#__PURE__*/styled.div(_templateObject2$1A || (_templateObject2$1A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
11781
+ var Row$7 = /*#__PURE__*/styled.div(_templateObject$23 || (_templateObject$23 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])));
11782
+ var Container$19 = /*#__PURE__*/styled.div(_templateObject2$1A || (_templateObject2$1A = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: relative;\n top: -46px;\n"])));
11752
11783
  var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject3$T || (_templateObject3$T = /*#__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"])));
11753
11784
 
11754
- var _templateObject$25, _templateObject2$1B;
11755
- var HeaderWrapper = /*#__PURE__*/styled.div(_templateObject$25 || (_templateObject$25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 20px;\n gap: 10px;\n border-radius: 0px 0px 30px 30px;\n background: #313130;\n height: 151px;\n background: url(./assets/bgBlack.png) no-repeat;\n background-size: cover;\n background-color: #000000d9;\n"])));
11785
+ var _templateObject$24, _templateObject2$1B;
11786
+ var HeaderWrapper = /*#__PURE__*/styled.div(_templateObject$24 || (_templateObject$24 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n padding: 20px;\n gap: 10px;\n border-radius: 0px 0px 30px 30px;\n background: #313130;\n height: 151px;\n background: url(./assets/bgBlack.png) no-repeat;\n background-size: cover;\n background-color: #000000d9;\n"])));
11756
11787
  var StyledFlex = /*#__PURE__*/styled.div(_templateObject2$1B || (_templateObject2$1B = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: space-between;\n width: 100%;\n"])));
11757
11788
 
11758
- var _templateObject$26;
11789
+ var _templateObject$25;
11759
11790
  var HeaderTitle = function HeaderTitle(props) {
11760
11791
  return React.createElement(React.Fragment, null, React.createElement(Title$7, null, props.title));
11761
11792
  };
11762
- var Title$7 = /*#__PURE__*/styled.h2(_templateObject$26 || (_templateObject$26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0px;\n padding: 0px;\n color: #fff;\n font-size: 26px;\n font-style: normal;\n font-weight: 700;\n line-height: 36px;\n text-transform: uppercase;\n margin-bottom: 8px;\n"])));
11793
+ var Title$7 = /*#__PURE__*/styled.h2(_templateObject$25 || (_templateObject$25 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin: 0px;\n padding: 0px;\n color: #fff;\n font-size: 26px;\n font-style: normal;\n font-weight: 700;\n line-height: 36px;\n text-transform: uppercase;\n margin-bottom: 8px;\n"])));
11763
11794
 
11764
- var _templateObject$27, _templateObject2$1C;
11795
+ var _templateObject$26, _templateObject2$1C;
11765
11796
  function Breadcrumb(props) {
11766
11797
  return React.createElement(BreadcrumbContainer, null, React.createElement(BreadcrumbList, null, props.title || ''), React.createElement(BreadcrumbList, null, props.subtitle || ''), props.subPart && React.createElement(React.Fragment, null, React.createElement(BreadcrumbList, null, props.subPart)));
11767
11798
  }
11768
- var BreadcrumbContainer = /*#__PURE__*/styled.div(_templateObject$27 || (_templateObject$27 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n"])));
11799
+ var BreadcrumbContainer = /*#__PURE__*/styled.div(_templateObject$26 || (_templateObject$26 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n display: flex;\n"])));
11769
11800
  var BreadcrumbList = /*#__PURE__*/styled.span(_templateObject2$1C || (_templateObject2$1C = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: #edebe8;\n font-family: 'Open Sans', sans-serif;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n"])));
11770
11801
 
11771
11802
  var RouterHeader = function RouterHeader(_ref) {
@@ -11824,7 +11855,7 @@ function ReturnClient() {
11824
11855
  };
11825
11856
  var paths = splitPath(location.pathname);
11826
11857
  useEffect(function () {
11827
- if (paths[paths.length - 1] === 'order/return') {
11858
+ if (paths[paths.length - 1] === 'orders/view/return') {
11828
11859
  setActionTypeOptions([]);
11829
11860
  setLocationOptions([]);
11830
11861
  setSelectedClient(null);
@@ -11896,10 +11927,10 @@ function ReturnClient() {
11896
11927
  path: "",
11897
11928
  element: React.createElement(ReturnMainTable, null)
11898
11929
  }), React.createElement(Route, {
11899
- path: "view",
11930
+ path: "overview",
11900
11931
  element: React.createElement(ReturnAfterTable, null)
11901
11932
  }), React.createElement(Route, {
11902
- path: "view/:id",
11933
+ path: "/:id",
11903
11934
  element: React.createElement(OrderView, null)
11904
11935
  }), React.createElement(Route, {
11905
11936
  path: "filter",