@bjsdistribution/dms-client-return 0.0.17 → 0.0.19

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 (81) hide show
  1. package/dist/assets/icons/DustbinIcon.d.ts +3 -0
  2. package/dist/common/date-picker/header/ClearDate.d.ts +1 -1
  3. package/dist/components/order-daily-overview/header-filters/overViewFilter.d.ts +16 -0
  4. package/dist/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.d.ts +1 -1
  5. package/dist/components/order-daily-overview/store/store.d.ts +2 -0
  6. package/dist/components/order-daily-overview/table-view/ReturnPagination.d.ts +3 -0
  7. package/dist/components/order-daily-overview/table-view/TableStyle.d.ts +4 -4
  8. package/dist/components/order-view/fakedata.d.ts +1 -1
  9. package/dist/components/order-view/order-actions/Dropdown.d.ts +6 -2
  10. package/dist/components/order-view/order-actions/actions/confirm-order/customer-info/ContactWith.d.ts +3 -0
  11. package/dist/components/order-view/order-actions/actions/confirm-order/tables/NotesTable.d.ts +1 -1
  12. package/dist/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.d.ts +1 -1
  13. package/dist/components/order-view/order-actions/actions/confirm-order/tables/ReminderStyles.d.ts +9 -0
  14. package/dist/components/order-view/order-actions/store.d.ts +34 -1
  15. package/dist/components/order-view/order-actions/types.d.ts +5 -0
  16. package/dist/components/order-view/store.d.ts +1 -0
  17. package/dist/components/order-view/types.d.ts +5 -2
  18. package/dist/dms-client-return.cjs.development.js +2371 -1678
  19. package/dist/dms-client-return.cjs.development.js.map +1 -1
  20. package/dist/dms-client-return.cjs.production.min.js +1 -1
  21. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  22. package/dist/dms-client-return.esm.js +2374 -1681
  23. package/dist/dms-client-return.esm.js.map +1 -1
  24. package/package.json +2 -2
  25. package/src/assets/icons/DustbinIcon.tsx +20 -0
  26. package/src/common/modals/order-action-modal/OrderActionModal.tsx +4 -2
  27. package/src/components/order-daily-overview/header-filters/filterStore.ts +19 -18
  28. package/src/components/order-daily-overview/header-filters/overViewFilter.ts +80 -0
  29. package/src/components/order-daily-overview/index.tsx +27 -33
  30. package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +47 -5
  31. package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +9 -5
  32. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +1 -1
  33. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +2 -2
  34. package/src/components/order-daily-overview/return-order-table/ReturnTable.tsx +25 -1
  35. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +29 -11
  36. package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +1 -0
  37. package/src/components/order-daily-overview/store/store.ts +11 -1
  38. package/src/components/order-daily-overview/table-view/Pagination.tsx +2 -1
  39. package/src/components/order-daily-overview/table-view/ReturnPagination.tsx +136 -0
  40. package/src/components/order-view/details-filters/left-side-filters/dropdowns/OptionsDropDown.tsx +26 -12
  41. package/src/components/order-view/details-filters/right-side-filters/Details.tsx +8 -1
  42. package/src/components/order-view/fakedata.ts +5 -9
  43. package/src/components/order-view/general-information/dropdowns/BjsMenu.tsx +15 -4
  44. package/src/components/order-view/general-information/dropdowns/Print.tsx +79 -39
  45. package/src/components/order-view/general-information/dropdowns/index.tsx +0 -13
  46. package/src/components/order-view/general-information/index.tsx +3 -19
  47. package/src/components/order-view/generic-table/AuditLogs.tsx +7 -5
  48. package/src/components/order-view/index.tsx +1 -2
  49. package/src/components/order-view/modalsPopup/ModalManager.tsx +45 -199
  50. package/src/components/order-view/notes/AddNote.tsx +4 -14
  51. package/src/components/order-view/notes/index.tsx +8 -13
  52. package/src/components/order-view/order-actions/Dropdown.tsx +8 -3
  53. package/src/components/order-view/order-actions/actions/cancel-order/index.tsx +146 -12
  54. package/src/components/order-view/order-actions/actions/charge-log/index.tsx +126 -79
  55. package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ActionDropdown.tsx +21 -9
  56. package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ContactMobile.tsx +64 -1
  57. package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ContactPhone.tsx +67 -1
  58. package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ContactTypeDropdown.tsx +19 -7
  59. package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ContactWith.tsx +28 -0
  60. package/src/components/order-view/order-actions/actions/confirm-order/customer-info/ContactWork.tsx +65 -1
  61. package/src/components/order-view/order-actions/actions/confirm-order/customer-info/DeliveryDate.tsx +40 -3
  62. package/src/components/order-view/order-actions/actions/confirm-order/customer-info/EmailAddress.tsx +47 -2
  63. package/src/components/order-view/order-actions/actions/confirm-order/customer-info/TimedServiceDropdown.tsx +38 -9
  64. package/src/components/order-view/order-actions/actions/confirm-order/customer-info/index.tsx +4 -1
  65. package/src/components/order-view/order-actions/actions/confirm-order/index.tsx +196 -6
  66. package/src/components/order-view/order-actions/actions/confirm-order/slot-and-instructions/index.tsx +5 -1
  67. package/src/components/order-view/order-actions/actions/confirm-order/tables/NotesTable.tsx +121 -20
  68. package/src/components/order-view/order-actions/actions/confirm-order/tables/ProductTable.tsx +54 -32
  69. package/src/components/order-view/order-actions/actions/confirm-order/tables/ReminderStyles.tsx +289 -0
  70. package/src/components/order-view/order-actions/actions/create-task-reminder/CreateReminderModal.tsx +41 -8
  71. package/src/components/order-view/order-actions/actions/create-task-reminder/index.tsx +11 -83
  72. package/src/components/order-view/order-actions/actions/hold-order/HoldOrderModal.tsx +61 -14
  73. package/src/components/order-view/order-actions/actions/release-order/ReleaseOrder.tsx +93 -25
  74. package/src/components/order-view/order-actions/actions/split-order/SplitOrderTable.tsx +102 -247
  75. package/src/components/order-view/order-actions/actions/split-order/index.tsx +57 -9
  76. package/src/components/order-view/order-actions/index.tsx +7 -2
  77. package/src/components/order-view/order-actions/store.ts +45 -0
  78. package/src/components/order-view/order-actions/types.ts +5 -0
  79. package/src/components/order-view/order-details/expanded-content/footer/index.tsx +15 -12
  80. package/src/components/order-view/store.ts +7 -0
  81. package/src/components/order-view/types.ts +5 -2
@@ -0,0 +1,136 @@
1
+ import React from 'react';
2
+ import {
3
+ StyledContainer,
4
+ StyledContentWrapper,
5
+ // StyledDropdown,
6
+ StyledInfoBox,
7
+ StyledLabel,
8
+ StyledPaginationItem,
9
+ StyledPaginationWrapper,
10
+ // StyledDropdownData,
11
+ } from './PaginationStyle';
12
+ import PrevIcon from '../../../assets/icons/PrevIcon';
13
+ import NextIcon from '../../../assets/icons/NextIcon';
14
+ import { useAtom } from 'jotai';
15
+ import { Select } from 'antd';
16
+ import { filtersReducerReturnAtom } from '../return-after-table/table-filters/ReturnFilterStore';
17
+
18
+ const PAGE_SIZE_OPTIONS = [50, 100, 150];
19
+ const MAX_PAGES_TO_SHOW = 5;
20
+
21
+ const ReturnPagination: React.FC<any> = ({
22
+ currentPage,
23
+ totalItems,
24
+ itemsPerPage,
25
+ onPageChange,
26
+ onItemsPerPageChange,
27
+ }) => {
28
+ const [, dispatch] = useAtom(filtersReducerReturnAtom);
29
+
30
+ const totalPages = Math.ceil(totalItems / itemsPerPage);
31
+ const startItem = (currentPage - 1) * itemsPerPage + 1;
32
+ const endItem = Math.min(currentPage * itemsPerPage, totalItems);
33
+
34
+ const handlePageChange = (page: number) => {
35
+ if (page >= 1 && page <= totalPages) {
36
+ dispatch({
37
+ type: 'SET_PAGE',
38
+ payload: page,
39
+ });
40
+
41
+ onPageChange(page);
42
+ }
43
+ };
44
+
45
+ const handleItemsPerPageChange = (value: number) => {
46
+ const newItemsPerPage = value;
47
+ dispatch({
48
+ type: 'SET_PERPAGE',
49
+ payload: newItemsPerPage,
50
+ });
51
+
52
+ // Reset to the first page
53
+ dispatch({
54
+ type: 'SET_PAGE',
55
+ payload: 1,
56
+ });
57
+
58
+ onPageChange(1);
59
+ onItemsPerPageChange(newItemsPerPage);
60
+ };
61
+
62
+ const getPageNumbers = (
63
+ currentPage: number,
64
+ totalPages: number
65
+ ): number[] => {
66
+ const pageNumbers: number[] = [1]; // Always show the first page
67
+
68
+ if (currentPage > MAX_PAGES_TO_SHOW / 2 + 1) {
69
+ pageNumbers.push(-1); // Ellipsis
70
+ }
71
+
72
+ const startPage = Math.max(
73
+ 2,
74
+ Math.min(currentPage - 1, totalPages - MAX_PAGES_TO_SHOW + 2)
75
+ );
76
+ const endPage = Math.min(startPage + MAX_PAGES_TO_SHOW - 3, totalPages - 1);
77
+ for (let i = startPage; i <= endPage; i++) {
78
+ pageNumbers.push(i);
79
+ }
80
+
81
+ if (currentPage < totalPages - MAX_PAGES_TO_SHOW / 2 - 1) {
82
+ pageNumbers.push(-1); // Ellipsis
83
+ }
84
+
85
+ if (totalPages > 1) {
86
+ pageNumbers.push(totalPages); // Always show the last page
87
+ }
88
+
89
+ return pageNumbers;
90
+ };
91
+
92
+ return (
93
+ <StyledContainer>
94
+ <StyledContentWrapper>
95
+ <StyledInfoBox>
96
+ Showing {startItem}-{endItem} from {totalItems}
97
+ </StyledInfoBox>
98
+ <StyledLabel>Row on Page</StyledLabel>
99
+ <Select
100
+ value={itemsPerPage}
101
+ onChange={handleItemsPerPageChange}
102
+ style={{ width: 75 }}
103
+ >
104
+ {PAGE_SIZE_OPTIONS.map(option => (
105
+ <Select.Option key={option} value={option}>
106
+ {option}
107
+ </Select.Option>
108
+ ))}
109
+ </Select>
110
+ <StyledPaginationWrapper>
111
+ <StyledPaginationItem
112
+ onClick={() => handlePageChange(currentPage - 1)}
113
+ >
114
+ <PrevIcon />
115
+ </StyledPaginationItem>
116
+ {getPageNumbers(currentPage, totalPages).map((pageNumber, index) => (
117
+ <StyledPaginationItem
118
+ key={index}
119
+ active={pageNumber === currentPage}
120
+ onClick={() => handlePageChange(pageNumber)}
121
+ >
122
+ {pageNumber === -1 ? '...' : pageNumber}
123
+ </StyledPaginationItem>
124
+ ))}
125
+ <StyledPaginationItem
126
+ onClick={() => handlePageChange(currentPage + 1)}
127
+ >
128
+ <NextIcon />
129
+ </StyledPaginationItem>
130
+ </StyledPaginationWrapper>
131
+ </StyledContentWrapper>
132
+ </StyledContainer>
133
+ );
134
+ };
135
+
136
+ export default ReturnPagination;
@@ -4,31 +4,43 @@ import { DropDownContainer } from './DropdownStyles';
4
4
  import DropDownMenu from './DropDownMenu';
5
5
  import DropDownItem from './DropDownItem';
6
6
  import DropDownLarge from '../../../../../assets/icons/DropDownLarge';
7
+ import { useCurrentAction, useIsOnHoldOrder } from '../../../store';
7
8
 
8
9
  const Options = [
9
- { label: 'Create Reminder', value: 'create-reminder' },
10
- { label: 'Confirm', value: 'confirm' },
11
- { label: 'Force Debrief', value: 'force-debrief' },
12
- { label: 'Clear Booking Status', value: 'booking-status' },
13
- { label: 'Remove From Route', value: 'remove-route' },
14
- { label: 'Hold', value: 'hold' },
15
- { label: 'Flag', value: 'flag' },
16
- { label: 'Cancel', value: 'cancel' },
10
+ { label: 'Create Reminder', value: 'create-task' },
11
+ { label: 'Confirm', value: 'confirm-order' },
12
+ // { label: 'Force Debrief', value: 'force-debrief' },
13
+ // { label: 'Clear Booking Status', value: 'booking-status' },
14
+ // { label: 'Remove From Route', value: 'remove-route' },
15
+ { label: 'Hold', value: 'hold-order' },
16
+ // { label: 'Flag', value: 'view-flag' },
17
+ { label: 'Cancel', value: 'cancel-order' },
17
18
  { label: 'Charge Log', value: 'charge-log' },
18
19
  ];
19
20
 
20
21
  const OptionsDropDown: React.FC = () => {
21
22
  const [isOpen, setIsOpen] = useState(false);
22
23
  const dropdownRef = useRef<HTMLDivElement>(null);
23
-
24
+ const [action, setCurrentAction] = useCurrentAction();
25
+ const [hold] = useIsOnHoldOrder();
26
+ console.log(action, 'action');
24
27
  const handleClick = () => {
25
28
  setIsOpen(prev => !prev);
26
29
  };
27
30
 
28
- const handleSelect = (value: string) => {
29
- console.log(`Selected: ${value}`);
31
+ const filteredOptions = Options?.filter(option => {
32
+ if (hold) {
33
+ return option.value !== 'hold-order';
34
+ } else {
35
+ return option.value !== 'unhold-order';
36
+ }
37
+ });
38
+ const handleSelect = (selectedOption: any) => {
39
+ console.log(selectedOption);
40
+ setCurrentAction(selectedOption);
30
41
  setIsOpen(false);
31
42
  };
43
+
32
44
  useEffect(() => {
33
45
  const handleClickOutside = (event: MouseEvent) => {
34
46
  if (
@@ -51,7 +63,9 @@ const OptionsDropDown: React.FC = () => {
51
63
  icon={<DropDownLarge />}
52
64
  onClick={handleClick}
53
65
  />
54
- {isOpen && <DropDownMenu options={Options} onSelect={handleSelect} />}
66
+ {isOpen && (
67
+ <DropDownMenu options={filteredOptions} onSelect={handleSelect} />
68
+ )}
55
69
  </DropDownContainer>
56
70
  );
57
71
  };
@@ -1,10 +1,17 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
+ import { useOrderDetails } from '../../store';
3
4
 
4
5
  const Details = () => {
6
+ const [orderDetails] = useOrderDetails();
7
+ const recipient = orderDetails?.order_recipient?.recipient_name || '';
8
+ const postcodeShow = orderDetails?.order_recipient?.postcode || '';
9
+
5
10
  return (
6
11
  <DetailsContainer>
7
- <Typo>CUSTOMER RETURN - BJS DEV TEST COMPANY, WS10 8RR</Typo>
12
+ <Typo>
13
+ CUSTOMER RETURN - {recipient} , {postcodeShow}
14
+ </Typo>
8
15
  </DetailsContainer>
9
16
  );
10
17
  };
@@ -1,11 +1,11 @@
1
1
  import { ChargeLogData } from './types';
2
2
 
3
3
 
4
- export const BJSMenu = [
5
- {
6
- label: 'Add Order Resources',
7
- value: 'add-resources',
8
- },
4
+ export const bjsMenu = [
5
+ // {
6
+ // label: 'Add Order Resources',
7
+ // value: 'add-resources',
8
+ // },
9
9
  {
10
10
  label: 'Split Order',
11
11
  value: 'split-order',
@@ -18,10 +18,6 @@ export const BJSMenu = [
18
18
  label: 'Release Order',
19
19
  value: 'release-order',
20
20
  },
21
- {
22
- label: 'Restore Products',
23
- value: 'restore-products',
24
- }
25
21
  ];
26
22
 
27
23
  export const OptionsMenu = [
@@ -4,21 +4,32 @@ import {
4
4
  filterDropdownStyles,
5
5
  } from '@bjsdistribution/dms-component-library';
6
6
  import React from 'react';
7
- import { BJSMenu } from '../../fakedata';
8
- import { useCurrentAction } from '../../store';
7
+ import { bjsMenu } from '../../fakedata';
8
+ import { useCurrentAction, useStatusDetails } from '../../store';
9
9
 
10
10
  function BjsMenu() {
11
11
  const [, setCurrentAction] = useCurrentAction();
12
12
  const handleSelectChange = (selectedOption: any) => {
13
- console.log(selectedOption, 'selectedOption')
14
13
  setCurrentAction(selectedOption.value);
15
14
  };
16
15
 
16
+ const [orderStatus] = useStatusDetails();
17
+
18
+ const isReleased = orderStatus[0]?.released;
19
+
20
+ const filteredOptions = bjsMenu?.filter(option => {
21
+ if (isReleased) {
22
+ return option.value !== 'release-order';
23
+ } else {
24
+ return option;
25
+ }
26
+ });
27
+
17
28
  return (
18
29
  <SelectDropdown
19
30
  placeholder="BJS MENU"
20
31
  inputId="bjsmenu"
21
- options={BJSMenu}
32
+ options={filteredOptions}
22
33
  onChange={handleSelectChange}
23
34
  isSearchable={false}
24
35
  styles={{
@@ -1,48 +1,88 @@
1
- import {
2
- SelectDropdown,
3
- dropdownStyles,
4
- filterDropdownStyles,
5
- } from '@bjsdistribution/dms-component-library';
6
- import React from 'react';
7
- import styled from 'styled-components';
1
+ import React, { useRef, useState } from 'react';
8
2
  import { PrintMenu } from '../../fakedata';
3
+ import { useOrderDetails } from '../../store';
4
+ import { DropDownContainer } from '../../details-filters/left-side-filters/dropdowns/DropdownStyles';
5
+ import DropDownItem from '../../details-filters/left-side-filters/dropdowns/DropDownItem';
6
+ import DropDownLarge from '../../../../assets/icons/DropDownLarge';
7
+ import DropDownMenu from '../../details-filters/left-side-filters/dropdowns/DropDownMenu';
9
8
 
10
9
  function Print() {
10
+ const [orderDetails] = useOrderDetails();
11
+ const gsitId = orderDetails?.gsit_order_id;
12
+ const dropdownRef = useRef<HTMLDivElement>(null);
13
+ console.log(gsitId, 'gsitId');
14
+ const [isOpen, setIsOpen] = useState(false);
15
+
16
+ const handleClick = () => {
17
+ setIsOpen(prev => !prev);
18
+ };
19
+
20
+ const getEnvironment = (): 'development' | 'us' => {
21
+ console.log('project env', process.env.REACT_APP_API_PATH);
22
+ return process.env.REACT_APP_API_PATH ===
23
+ 'https://us.dms.api.bjshomedelivery.com'
24
+ ? 'us'
25
+ : 'development';
26
+ };
27
+
28
+ const getBaseUrl = (): string => {
29
+ const environment = getEnvironment();
30
+ return environment === 'us'
31
+ ? 'https://us.toolbox.bjshomedelivery.com/api/v1/gsit'
32
+ : 'https://staging.toolbox.bjshomedelivery.com/api/v1/gsit';
33
+ };
34
+
35
+ const getUrl = (option: string) => {
36
+ const val = option?.toLowerCase()?.replaceAll(' ', '');
37
+ const baseUrl = getBaseUrl();
38
+
39
+ if (val === 'Proof Of Delivery') {
40
+ return '';
41
+ }
42
+ if (val === 'Proof Of Delivery(DOC)') {
43
+ return '';
44
+ }
45
+ if (val === 'Order Delivery labels') {
46
+ return `${baseUrl}/generate_labels?pdf=true&product_type=Deliver&order_id=${gsitId}`;
47
+ }
48
+ // if (val === 'ordercollectionlabels') {
49
+ // return `${baseUrl}/generate_labels?pdf=true&product_type=Collect&order_id=${gsitId}`;
50
+ // }
51
+ // if (val === 'orderreturnlabels') {
52
+ // return `${baseUrl}/generate_labels?pdf=true&product_type=Return&order_id=${gsitId}`;
53
+ // }
54
+ // if (val === 'returnscovernote') {
55
+ // return '';
56
+ // }
57
+ else {
58
+ return '';
59
+ }
60
+ };
61
+
62
+ const handleSelectChange = (selectedOption: any) => {
63
+ const selectedValue = selectedOption?.value;
64
+
65
+ console.log(selectedValue, 'erf');
66
+ if (selectedValue) {
67
+ console.log(selectedValue);
68
+ const url = getUrl(selectedValue);
69
+ console.log('Generated URL:', url);
70
+ window.open(url, '_blank');
71
+ }
72
+ };
73
+
11
74
  return (
12
- <Container>
13
- <SelectDropdown
14
- placeholder="PRINT"
15
- options={PrintMenu}
16
- styles={{
17
- ...dropdownStyles,
18
- ...filterDropdownStyles,
19
- container: styles => ({
20
- ...styles,
21
- cursor: 'pointer',
22
- }),
23
- menu: styles => ({
24
- ...styles,
25
- top: '113%',
26
- borderRadius: '5px',
27
- width: 'max-content',
28
- cursor: 'pointer',
29
- }),
30
- control: styles => ({
31
- ...styles,
32
- width: '90px',
33
- boxShadow: 'none',
34
- borderColor: 'transparent',
35
- cursor: 'pointer',
36
- '&:hover': {
37
- boxShadow: 'none',
38
- borderColor: 'transparent',
39
- },
40
- }),
41
- }}
75
+ <DropDownContainer ref={dropdownRef}>
76
+ <DropDownItem
77
+ label="PRINT"
78
+ icon={<DropDownLarge />}
79
+ onClick={handleClick}
42
80
  />
43
- </Container>
81
+ {isOpen && (
82
+ <DropDownMenu options={PrintMenu} onSelect={handleSelectChange} />
83
+ )}
84
+ </DropDownContainer>
44
85
  );
45
86
  }
46
- const Container = styled.div``;
47
87
 
48
88
  export default Print;
@@ -1,27 +1,14 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import BjsMenu from './BjsMenu';
4
- import CreateTask from './CreateTask';
5
4
  import Options from './Options';
6
5
  import Print from './Print';
7
- import ViewEpod from './ViewEpod';
8
- import SendSms from './SendSms';
9
- import Tasks from './Tasks';
10
- import Videos from './Videos';
11
- import SendEmail from './SendEmail';
12
-
13
6
  function DropDownOptions() {
14
7
  return (
15
8
  <Container>
16
- <CreateTask />
17
9
  <BjsMenu />
18
10
  <Options />
19
11
  <Print />
20
- <ViewEpod />
21
- <Tasks />
22
- <Videos />
23
- <SendEmail />
24
- <SendSms />
25
12
  </Container>
26
13
  );
27
14
  }
@@ -1,33 +1,17 @@
1
1
  import React from 'react';
2
2
  import Status from './Status';
3
- // import LockOrder from './LockOrder';
4
- // import DropDownOptions from './dropdowns';
5
3
  import styled from 'styled-components';
6
- // import LockOrder from './LockOrder';
4
+ // import DropDownOptions from './dropdowns';
7
5
 
8
6
  function GeneralHeader() {
9
7
  return (
10
8
  <Section>
11
9
  <Status />
12
- {/* <LockOrder /> */}
13
-
14
- {/* <LockOrder />
15
-
16
-
17
- <DropDownOptions /> */}
10
+ {/* <DropDownOptions /> */}
18
11
  </Section>
19
12
  );
20
13
  }
21
14
 
22
- const Section = styled.div`
23
- /* display: flex;
24
- background: #ffffff;
25
- // padding: 15px;
26
- flex-direction: column;
27
- gap: 14px;
28
- border-radius: 12px;
29
- box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);
30
- border: 1px solid #e0e0e0; */
31
- `;
15
+ const Section = styled.div``;
32
16
 
33
17
  export default GeneralHeader;
@@ -2,7 +2,7 @@ import styled from 'styled-components';
2
2
  import React from 'react';
3
3
  import { Skeleton } from 'antd';
4
4
  import { formatDateTime } from '@bjsdistribution/dms-component-library';
5
- import { usegetNotes, UseNotesLoading } from '../store';
5
+ import { usegetNotes } from '../store';
6
6
  import { NotesTableData } from '../notes/logs/fakeData';
7
7
  import {
8
8
  IconCover,
@@ -14,7 +14,9 @@ import {
14
14
  const GenericAuditLogsTable = () => {
15
15
  const tableHeadData = NotesTableData[0].tableHead; // Assuming NotesTableData contains table header information
16
16
  const [getNotes] = usegetNotes();
17
- const [isLoading] = UseNotesLoading();
17
+
18
+ // const [isLoading] = UseNotesLoading();
19
+ // console.log(getNotes,'getNotesgetNotes');
18
20
 
19
21
  return (
20
22
  <ScrollableTableWrapper>
@@ -34,14 +36,14 @@ const GenericAuditLogsTable = () => {
34
36
  </StickyHeaderWrapper>
35
37
  <StyledTable>
36
38
  <tbody>
37
- {isLoading ? (
39
+ {getNotes?.loading ? (
38
40
  <tr>
39
41
  <td className="noBoder" colSpan={tableHeadData?.length}>
40
42
  <Skeleton />
41
43
  </td>
42
44
  </tr>
43
- ) : getNotes && getNotes?.length > 0 ? (
44
- getNotes?.map((note: any) => (
45
+ ) : getNotes?.data && getNotes?.data?.length > 0 ? (
46
+ getNotes?.data?.map((note: any) => (
45
47
  <StyledTr key={note?.id}>
46
48
  <DateTd>
47
49
  <CreatedBy title={note?.created_by}>
@@ -73,7 +73,6 @@ function OrderView() {
73
73
  const paths = splitPath(location.pathname);
74
74
  const [, setLocationOptions] = useLocationOptions();
75
75
  const [apiCalling] = useApiCalling();
76
- console.log(paths, 'paths');
77
76
  const [orderResources, setOrderResources] = useOrderProductsResources();
78
77
  const [orderToolbox, setOrderToolbox] = useOrderProductsToolbox();
79
78
  const [GsitCUstomerId, setGsitCUstomerId] = useGsitCUstomerId();
@@ -142,7 +141,7 @@ function OrderView() {
142
141
  }
143
142
  // for local
144
143
  // if (paths.length >= 0) {
145
- // setOrderId(paths[0]);
144
+ // setOrderId(paths[1]);
146
145
  // }
147
146
  }, [paths]);
148
147