@bjsdistribution/dms-client-return 0.0.16 → 0.0.17

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 (37) hide show
  1. package/dist/components/order-daily-overview/shared/elements/PrintDropDown.d.ts +6 -2
  2. package/dist/components/order-daily-overview/table/table-data/styles.d.ts +3 -0
  3. package/dist/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.d.ts +3 -1
  4. package/dist/components/order-view/types.d.ts +2 -0
  5. package/dist/components/order-view/utils.d.ts +2 -0
  6. package/dist/dms-client-return.cjs.development.js +798 -574
  7. package/dist/dms-client-return.cjs.development.js.map +1 -1
  8. package/dist/dms-client-return.cjs.production.min.js +1 -1
  9. package/dist/dms-client-return.cjs.production.min.js.map +1 -1
  10. package/dist/dms-client-return.esm.js +799 -575
  11. package/dist/dms-client-return.esm.js.map +1 -1
  12. package/package.json +1 -1
  13. package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +25 -11
  14. package/src/components/order-daily-overview/index.tsx +1 -0
  15. package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +40 -43
  16. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +5 -13
  17. package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +45 -24
  18. package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +15 -8
  19. package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +3 -2
  20. package/src/components/order-daily-overview/shared/elements/PrintDropDown.tsx +47 -10
  21. package/src/components/order-daily-overview/table/table-data/styles.ts +47 -0
  22. package/src/components/order-view/details-filters/DetailsFilters.tsx +3 -3
  23. package/src/components/order-view/details-filters/left-side-filters/ActionsMenu.tsx +2 -2
  24. package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.tsx +2 -0
  25. package/src/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.tsx +13 -6
  26. package/src/components/order-view/fakedata.ts +6 -6
  27. package/src/components/order-view/general-information/Status.tsx +1 -0
  28. package/src/components/order-view/index.tsx +11 -8
  29. package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +0 -1
  30. package/src/components/order-view/order-actions/actions/modalstyle.tsx +1 -1
  31. package/src/components/order-view/order-details/expanded-content/footer/AllowTracking.tsx +5 -33
  32. package/src/components/order-view/store.ts +2 -0
  33. package/src/components/order-view/types.ts +3 -1
  34. package/dist/components/order-view/tomtomlogs/collapsed-content/index.d.ts +0 -3
  35. package/dist/components/order-view/tomtomlogs/expanded-content/index.d.ts +0 -3
  36. package/src/components/order-view/tomtomlogs/collapsed-content/index.tsx +0 -16
  37. package/src/components/order-view/tomtomlogs/expanded-content/index.tsx +0 -21
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import DropDowns from './dropdowns/DropDowns';
4
- import Actions from './actions/Actions';
4
+ // import Actions from './actions/Actions';
5
5
 
6
6
  const ActionsMenu = () => {
7
7
  return (
8
8
  <Flex>
9
9
  <DropDowns />
10
- <Actions />
10
+ {/* <Actions /> */}
11
11
  </Flex>
12
12
  );
13
13
  };
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import OptionsDropDown from './OptionsDropDown';
4
4
  import MenuDropDown from './MenuDropDown';
5
+ import Print from '../../../general-information/dropdowns/Print';
5
6
  // components
6
7
 
7
8
  function DropDowns() {
@@ -10,6 +11,7 @@ function DropDowns() {
10
11
  <DashBoardWrapper>
11
12
  <MenuDropDown />
12
13
  <OptionsDropDown />
14
+ <Print />
13
15
  </DashBoardWrapper>
14
16
  </>
15
17
  );
@@ -3,17 +3,24 @@ import styled from 'styled-components';
3
3
  import { PrintIconMap } from '../../../../order-daily-overview/shared/utlis';
4
4
  import { PrintData } from '../../../../order-daily-overview/shared/interface';
5
5
  import { optionsForReturnPrint } from '../../../../order-daily-overview/common/fakedata';
6
- // import { PrintIconMap } from '../utils';
7
- // import { optionsPrint } from '../fakeData';
8
- // import { PrintData } from '../interface';
9
6
 
10
7
  const options: PrintData[] = optionsForReturnPrint;
11
8
 
12
- const PrintDropDownReturn = () => {
13
- const downloadFiles = () => {};
9
+ const PrintDropDownReturn = ({
10
+ legacyProductId,
11
+ }: {
12
+ legacyProductId: number;
13
+ }) => {
14
+ console.log(legacyProductId, 'legacyProductId');
15
+
16
+ const downloadFiles = () => {
17
+ const url = `https://toolbox.bjshomedelivery.com/offload/return_label?gsit_products_id=${legacyProductId}`;
18
+ window.open(url, '_blank'); // Opens the URL in a new tab
19
+ };
20
+
14
21
  return (
15
22
  <OptionsList>
16
- {options.map((item, index) => {
23
+ {options?.map((item, index) => {
17
24
  const IconComponent = PrintIconMap[item.icon];
18
25
 
19
26
  return (
@@ -89,16 +89,16 @@ export const OptionsMenu = [
89
89
 
90
90
  export const PrintMenu = [
91
91
  {
92
- label: 'Proof Of Delivery',
93
- value: 'proof-of-delivery',
92
+ label: 'Return Notes',
93
+ value: 'return-notes',
94
94
  },
95
95
  {
96
- label: 'Proof Of Delivery(DOC)',
97
- value: 'doc',
96
+ label: 'Product Labels',
97
+ value: 'product-labels',
98
98
  },
99
99
  {
100
- label: 'Order Delivery labels',
101
- value: 'order-delivery-labels',
100
+ label: 'Return Cover Notes',
101
+ value: 'return-cover-notes',
102
102
  },
103
103
  ];
104
104
 
@@ -92,6 +92,7 @@ const Heading = styled.div`
92
92
 
93
93
  const Container = styled.div`
94
94
  padding: 15px;
95
+ margin-top: 25px;
95
96
  `;
96
97
 
97
98
  const TextContainer = styled.div`
@@ -3,12 +3,11 @@ import React, { useEffect, useState } from 'react';
3
3
  import styled from 'styled-components';
4
4
  import OrderDetails from './order-details';
5
5
  import Notes from './notes';
6
- import Order from './order-resources/expanded-content';
7
- import Toolbox from './toolbox-resources/expanded-content';
6
+ // import Order from './order-resources/expanded-content';
7
+ // import Toolbox from './toolbox-resources/expanded-content';
8
8
  import SystemLogs from './system-event-logs/expanded-content';
9
9
  import GeneralHeader from './general-information';
10
10
  import ProductsInfo from './products-info';
11
- import TomTomLogs from './tomtomlogs/expanded-content';
12
11
  // import { OrderViewType } from '../types';
13
12
  // import Modals from './modals';
14
13
  import OrderActions from './order-actions';
@@ -34,12 +33,13 @@ import {
34
33
  useApiCalling,
35
34
  useLiveRecalling,
36
35
  } from './store';
37
- import Loader from '../order-daily-overview/header/loader/Loader';
36
+ // import Loader from '../order-daily-overview/header/loader/Loader';
38
37
  // import { useLoading } from '../order-daily-overview/store/store';
39
38
  import { OrdersType } from './types';
40
39
  import { useLocation } from 'react-router-dom';
41
40
  import useSystemLogs from './hooks/useGetSystemLogs';
42
41
  import { notification } from 'antd';
42
+ import DetailsFilters from './details-filters/DetailsFilters';
43
43
 
44
44
  interface ApiResponse {
45
45
  message: string;
@@ -321,8 +321,9 @@ function OrderView() {
321
321
 
322
322
  return (
323
323
  <MainContainer>
324
- <Loader />
324
+ {/* <Loader /> */}
325
325
  <GeneralHeader />
326
+ <DetailsFilters />
326
327
  {/* <Notification /> */}
327
328
  <OrderDetails />
328
329
  <ProductsInfo />
@@ -331,10 +332,10 @@ function OrderView() {
331
332
  <Notes />
332
333
  </NotesContainer>
333
334
  <TablesContainer>
334
- <Order />
335
- <Toolbox />
335
+ {/* call logs */}
336
+ {/* <Order /> */}
337
+ {/* <Toolbox /> */}
336
338
  <SystemLogs />
337
- <TomTomLogs />
338
339
  </TablesContainer>
339
340
  </SplitLayout>
340
341
  <OrderActions />
@@ -347,6 +348,8 @@ const MainContainer = styled.div`
347
348
  flex-direction: column;
348
349
  gap: 10px;
349
350
  padding-bottom: 30px;
351
+ border-radius: 25px;
352
+ border: 1px solid #e3e3e3;
350
353
  `;
351
354
 
352
355
  const SplitLayout = styled.div`
@@ -16,7 +16,6 @@ const CreateReturnModal = () => {
16
16
  const [selectedReturnOrder] = useSelectedOrders();
17
17
  const [load] = usePostLoading();
18
18
  const [groupedPayload] = useGroupedPayload();
19
- // const [forDisabledCheck] = useSelectedConfirmLoc();
20
19
  const [, setNew] = useFinalPayload();
21
20
 
22
21
  const handleSelectLocations = (id: number) => {
@@ -252,7 +252,7 @@ export const DeleteCircleIcon = styled.div`
252
252
  export const RoundedTableSkelton = styled.div`
253
253
  margin-top: -8px;
254
254
  min-height: auto;
255
- max-height: 300px;
255
+ max-height: 60vh;
256
256
  table {
257
257
  border-collapse: separate;
258
258
  width: 100%;
@@ -1,40 +1,21 @@
1
- // import { Checkbox } from '@bjsdistribution/dms-component-library';
2
1
  import React from 'react';
3
2
  import styled from 'styled-components';
4
- // import { useOrderDetails } from '../../../store';
3
+ import { useOrderDetails } from '../../../store';
5
4
 
6
5
  function AllowTracking() {
7
- // const [orderDetails, setOrderDetails] = useOrderDetails();
8
- // const allowTracking = orderDetails?.allow_live_tracking;
9
-
10
- // const onChange = () => {
11
- // setOrderDetails(prev => {
12
- // return {
13
- // ...prev,
14
- // allow_live_tracking: !orderDetails.allow_live_tracking,
15
- // };
16
- // });
17
- // };
6
+ const [orderDetails] = useOrderDetails();
7
+ const createdBy = orderDetails?.created_by || 'Unknown';
8
+ const createdAt = orderDetails?.created_at || 'Not available';
18
9
 
19
10
  return (
20
11
  <Container>
21
- {/* <Wrapper>
22
- <Checkbox checked={allowTracking} onChange={onChange} />
23
- <Tracking>Allow Tracking?</Tracking>
24
- </Wrapper> */}
25
12
  <CreatedBy>
26
- <Text>Created: </Text> IT - Manpreet Kaur, 21/08/2024 13:00:51
13
+ <Text>Created: </Text> {createdBy}, {createdAt}
27
14
  </CreatedBy>
28
15
  </Container>
29
16
  );
30
17
  }
31
18
 
32
- // const Wrapper = styled.div`
33
- // display: flex;
34
- // gap: 10px;
35
- // align-items: center;
36
- // `;
37
-
38
19
  const Text = styled.span`
39
20
  color: #3a3630;
40
21
  font-family: 'Lato', sans-serif;
@@ -53,15 +34,6 @@ const CreatedBy = styled.span`
53
34
  line-height: 16px;
54
35
  `;
55
36
 
56
- // const Tracking = styled.span`
57
- // color: #3a3630;
58
- // font-family: 'Lato', sans-serif;
59
- // font-size: 13px;
60
- // font-style: normal;
61
- // font-weight: 400;
62
- // line-height: 16px;
63
- // `;
64
-
65
37
  const Container = styled.div`
66
38
  display: flex;
67
39
  flex-direction: column;
@@ -50,6 +50,8 @@ export const ordersInitialValue: OrdersType = {
50
50
  order_locked_by: null,
51
51
  delivery_instructions: null,
52
52
  drop_time: null,
53
+ created_by: null,
54
+ created_at: null,
53
55
  order_recipient: {
54
56
  id: null,
55
57
  order_id: null,
@@ -159,7 +159,9 @@ export interface OrdersType {
159
159
  name: string
160
160
  order_locked_by: string | null;
161
161
  delivery_instructions: string | null;
162
- drop_time: string | null
162
+ drop_time: string | null;
163
+ created_by: any | null;
164
+ created_at: any | null;
163
165
  }
164
166
 
165
167
  export type DeleteProds = {
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare function TomTomCollapsedContent(): React.JSX.Element;
3
- export default TomTomCollapsedContent;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare function TomTomLogs(): React.JSX.Element;
3
- export default TomTomLogs;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import styled from 'styled-components';
3
- // import styled from 'styled-components';
4
-
5
- function TomTomCollapsedContent() {
6
- return <Font>TOMTOM LOGS</Font>;
7
- }
8
-
9
- const Font = styled.div`
10
- font-family: 'Roboto', sans-serif;
11
- font-size: 16px;
12
- font-style: normal;
13
- font-weight: 500;
14
- line-height: 24px; /* 150% */
15
- `;
16
- export default TomTomCollapsedContent;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import CollapsedContent from '../collapsed-content';
3
- // import styled from 'styled-components';
4
- import styled from 'styled-components';
5
- import CollapsableForm from '../../../../common/expand-collapse';
6
- import DynamicTable from '../../DynamicTable';
7
- import { TomTomColumns, tomtomResources } from '../../../fakeData';
8
-
9
- function TomTomLogs() {
10
- return (
11
- <Table>
12
- <CollapsableForm collapsedContent={<CollapsedContent />}>
13
- <DynamicTable columns={TomTomColumns} data={tomtomResources} />
14
- </CollapsableForm>
15
- </Table>
16
- );
17
- }
18
- const Table = styled.div`
19
- width: 100%;
20
- `;
21
- export default TomTomLogs;