@bjsdistribution/dms-client-return 0.0.16 → 0.0.18
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.
- package/dist/components/order-daily-overview/shared/elements/PrintDropDown.d.ts +6 -2
- package/dist/components/order-daily-overview/table/table-data/styles.d.ts +3 -0
- package/dist/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.d.ts +3 -1
- package/dist/components/order-view/types.d.ts +2 -0
- package/dist/components/order-view/utils.d.ts +2 -0
- package/dist/dms-client-return.cjs.development.js +815 -590
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +816 -591
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-daily-overview/header-filters/SelectionFilter.tsx +25 -11
- package/src/components/order-daily-overview/index.tsx +1 -0
- package/src/components/order-daily-overview/return-after-table/table/OrderTable.tsx +40 -43
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnFilterStore.ts +5 -13
- package/src/components/order-daily-overview/return-after-table/table-filters/ReturnOrderFilter.tsx +45 -24
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/ReturnOrderTable.tsx +15 -8
- package/src/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.ts +4 -2
- package/src/components/order-daily-overview/shared/elements/PrintDropDown.tsx +47 -10
- package/src/components/order-daily-overview/table/table-data/styles.ts +47 -0
- package/src/components/order-view/details-filters/DetailsFilters.tsx +3 -3
- package/src/components/order-view/details-filters/left-side-filters/ActionsMenu.tsx +2 -2
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/DropDowns.tsx +2 -0
- package/src/components/order-view/details-filters/left-side-filters/dropdowns/PrintDropDownReturn.tsx +13 -6
- package/src/components/order-view/fakedata.ts +6 -6
- package/src/components/order-view/general-information/Status.tsx +1 -0
- package/src/components/order-view/index.tsx +11 -8
- package/src/components/order-view/modalsPopup/CreateReturnModal.tsx +0 -1
- package/src/components/order-view/modalsPopup/ModalManager.tsx +17 -12
- package/src/components/order-view/order-actions/actions/modalstyle.tsx +1 -1
- package/src/components/order-view/order-details/expanded-content/footer/AllowTracking.tsx +5 -33
- package/src/components/order-view/store.ts +2 -0
- package/src/components/order-view/types.ts +3 -1
- package/dist/components/order-view/tomtomlogs/collapsed-content/index.d.ts +0 -3
- package/dist/components/order-view/tomtomlogs/expanded-content/index.d.ts +0 -3
- package/src/components/order-view/tomtomlogs/collapsed-content/index.tsx +0 -16
- 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 Details from './right-side-filters/Details';
|
|
4
|
-
|
|
4
|
+
import ActionsMenu from './left-side-filters/ActionsMenu';
|
|
5
5
|
|
|
6
6
|
const DetailsFilters = () => {
|
|
7
7
|
return (
|
|
8
8
|
<Flex>
|
|
9
9
|
<Details />
|
|
10
|
-
|
|
10
|
+
<ActionsMenu />
|
|
11
11
|
</Flex>
|
|
12
12
|
);
|
|
13
13
|
};
|
|
@@ -28,7 +28,7 @@ const Flex = styled.div`
|
|
|
28
28
|
margin-bottom: -71px;
|
|
29
29
|
width: 97%;
|
|
30
30
|
margin-left: 21px;
|
|
31
|
-
top: -
|
|
31
|
+
top: -132px;
|
|
32
32
|
justify-content: space-between;
|
|
33
33
|
`;
|
|
34
34
|
export default DetailsFilters;
|
|
@@ -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
|
-
|
|
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
|
|
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: '
|
|
93
|
-
value: '
|
|
92
|
+
label: 'Return Notes',
|
|
93
|
+
value: 'return-notes',
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
|
-
label: '
|
|
97
|
-
value: '
|
|
96
|
+
label: 'Product Labels',
|
|
97
|
+
value: 'product-labels',
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
|
-
label: '
|
|
101
|
-
value: '
|
|
100
|
+
label: 'Return Cover Notes',
|
|
101
|
+
value: 'return-cover-notes',
|
|
102
102
|
},
|
|
103
103
|
];
|
|
104
104
|
|
|
@@ -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
|
-
|
|
335
|
-
<
|
|
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) => {
|
|
@@ -49,7 +49,7 @@ const ModalManager = () => {
|
|
|
49
49
|
const [, setNewPayload] = useNewReturnPayload();
|
|
50
50
|
const [, setGrouped] = useGroupedPayload();
|
|
51
51
|
const [, setSelectAll] = useSelectAll();
|
|
52
|
-
const [forCheck, setStateCheck] = useState(false);
|
|
52
|
+
// const [forCheck, setStateCheck] = useState(false);
|
|
53
53
|
|
|
54
54
|
console.log(orderProduct, 'abcabcabcabcabcabcabcabcabcabcabc');
|
|
55
55
|
|
|
@@ -243,6 +243,7 @@ const ModalManager = () => {
|
|
|
243
243
|
}, [updateResponse]);
|
|
244
244
|
|
|
245
245
|
//Confirm return popup
|
|
246
|
+
// Confirm return popup
|
|
246
247
|
const {
|
|
247
248
|
data: response,
|
|
248
249
|
setShouldPerformAction,
|
|
@@ -261,28 +262,32 @@ const ModalManager = () => {
|
|
|
261
262
|
}, [confirmLoading]);
|
|
262
263
|
|
|
263
264
|
console.log(response, 'response');
|
|
265
|
+
console.log(newGrouped, 'newGrouped');
|
|
264
266
|
|
|
265
267
|
const handleConfirmReturn = () => {
|
|
266
268
|
setShouldPerformAction(false);
|
|
267
|
-
|
|
268
|
-
if (newGrouped
|
|
269
|
+
|
|
270
|
+
if (newGrouped?.length > 0) {
|
|
269
271
|
setShouldPerformAction(true);
|
|
270
272
|
} else {
|
|
271
273
|
setShouldPerformAction(false);
|
|
272
274
|
}
|
|
275
|
+
|
|
273
276
|
dispatch({ type: 'close' });
|
|
274
277
|
};
|
|
275
278
|
|
|
276
279
|
useEffect(() => {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
280
|
+
if (response && !response) {
|
|
281
|
+
dispatch({ type: 'close' });
|
|
282
|
+
setNewGrouped([]);
|
|
283
|
+
setSelectedReturnOrder([]);
|
|
284
|
+
setCheck([]);
|
|
285
|
+
setNewPayload([]);
|
|
286
|
+
setGrouped([]);
|
|
287
|
+
setShouldPerformAction(false);
|
|
288
|
+
setSelectAll(false);
|
|
289
|
+
}
|
|
290
|
+
}, [response]);
|
|
286
291
|
|
|
287
292
|
return (
|
|
288
293
|
<>
|
|
@@ -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
|
-
|
|
3
|
+
import { useOrderDetails } from '../../../store';
|
|
5
4
|
|
|
6
5
|
function AllowTracking() {
|
|
7
|
-
|
|
8
|
-
|
|
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>
|
|
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;
|
|
@@ -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,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;
|