@bjsdistribution/dms-client-return 0.1.14-prod → 0.1.15-prod
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/dms-client-return.cjs.development.js +24 -4
- 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 +25 -5
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/order-daily-overview/index.tsx +5 -1
- package/src/components/order-daily-overview/return-after-table/ReturnAfterTable.tsx +5 -1
- package/src/components/order-daily-overview/return-order-table/ReturnTable.tsx +16 -0
- package/src/components/order-view/index.tsx +9 -2
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.15-prod",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"testEnvironment": "jest-environment-jsdom-sixteen"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@bjsdistribution/dms-component-library": "0.3.
|
|
62
|
+
"@bjsdistribution/dms-component-library": "0.3.51-prod",
|
|
63
63
|
"@size-limit/preset-small-lib": "^11.0.1",
|
|
64
64
|
"@tippyjs/react": "^4.2.6",
|
|
65
65
|
"@types/react": "^18.2.47",
|
|
@@ -8,7 +8,10 @@ import Filters from './filters/Filters';
|
|
|
8
8
|
import styled from 'styled-components';
|
|
9
9
|
import { useCustomerData, useStickyStatus } from '../store';
|
|
10
10
|
import HeaderFilter from './header-filters/HeaderFilter';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
DocumentTitle,
|
|
13
|
+
useApiHook,
|
|
14
|
+
} from '@bjsdistribution/dms-component-library';
|
|
12
15
|
import { useAtom, useClientData } from '../order-view/store';
|
|
13
16
|
import { ClientData } from './common/interface';
|
|
14
17
|
import ReturnFilter from './return-order-table/return-orders-filters/ReturnFilter';
|
|
@@ -97,6 +100,7 @@ function ReturnMainTable() {
|
|
|
97
100
|
|
|
98
101
|
return (
|
|
99
102
|
<>
|
|
103
|
+
<DocumentTitle title="Client Return Products" />
|
|
100
104
|
<DashBoardWrapper className={` ${isScrolled ? 'stickyTableHead' : ''}`}>
|
|
101
105
|
{/* <RouterHeader /> */}
|
|
102
106
|
<div className="Tableconatiner">
|
|
@@ -10,7 +10,10 @@ import {
|
|
|
10
10
|
UsePaginationReturnData,
|
|
11
11
|
} from '../store/store';
|
|
12
12
|
import { ApiResponse } from '../common/interface';
|
|
13
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
DocumentTitle,
|
|
15
|
+
useApiHook,
|
|
16
|
+
} from '@bjsdistribution/dms-component-library';
|
|
14
17
|
import { filtersReducerReturnAtom } from './table-filters/ReturnFilterStore';
|
|
15
18
|
import { notification } from 'antd';
|
|
16
19
|
import ReturnPagination from '../table-view/ReturnPagination';
|
|
@@ -80,6 +83,7 @@ const ReturnAfterTable = () => {
|
|
|
80
83
|
|
|
81
84
|
return (
|
|
82
85
|
<div>
|
|
86
|
+
<DocumentTitle title="Return Order List" />
|
|
83
87
|
<DashBoardWrapper>
|
|
84
88
|
{/* <RouterHeader /> */}
|
|
85
89
|
<div className="Tableconatiner">
|
|
@@ -8,12 +8,15 @@ import ReturnOrderTable from './return-orders-filters/ReturnOrderTable';
|
|
|
8
8
|
import ModalManager from '../../order-view/modalsPopup/ModalManager';
|
|
9
9
|
import { useItemsPerPage, UsePaginationData } from '../store/store';
|
|
10
10
|
import Pagination from '../table-view/Pagination';
|
|
11
|
+
import { useCustomerData } from '../../store';
|
|
12
|
+
import { DocumentTitle } from '@bjsdistribution/dms-component-library';
|
|
11
13
|
// import { useLocation } from 'react-router-dom';
|
|
12
14
|
|
|
13
15
|
const ReturnTable = () => {
|
|
14
16
|
const [paginationObj] = UsePaginationData();
|
|
15
17
|
const [, setCurrentPage] = useState(1);
|
|
16
18
|
const [itemsPerPage, setItemsPerPage] = useItemsPerPage();
|
|
19
|
+
const [customers] = useCustomerData();
|
|
17
20
|
// const location = useLocation();
|
|
18
21
|
const { page, total } = paginationObj;
|
|
19
22
|
|
|
@@ -30,10 +33,23 @@ const ReturnTable = () => {
|
|
|
30
33
|
// const clientId = queryParams.get('customerId');
|
|
31
34
|
// }, [location]);
|
|
32
35
|
|
|
36
|
+
const queryParams = new URLSearchParams(location.search);
|
|
37
|
+
|
|
38
|
+
const customerId = queryParams.get('customerId');
|
|
39
|
+
|
|
40
|
+
const selectedCustomer = customers?.find(
|
|
41
|
+
(customer: any) => customer?.customer_id?.toString() === customerId
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
const customerName = selectedCustomer?.customer_name;
|
|
45
|
+
|
|
46
|
+
const docTitle = `${customerName}: Return Product`;
|
|
47
|
+
|
|
33
48
|
return (
|
|
34
49
|
<div>
|
|
35
50
|
<DashBoardWrapper>
|
|
36
51
|
{/* <RouterHeader /> */}
|
|
52
|
+
<DocumentTitle title={docTitle} />
|
|
37
53
|
<div className="Tableconatiner">
|
|
38
54
|
<HeaderFilter />
|
|
39
55
|
<Container>
|
|
@@ -6,7 +6,11 @@ import SystemLogs from './system-event-logs/expanded-content';
|
|
|
6
6
|
import GeneralHeader from './general-information';
|
|
7
7
|
import ProductsInfo from './products-info';
|
|
8
8
|
import OrderActions from './order-actions';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
DocumentTitle,
|
|
11
|
+
useApiHook,
|
|
12
|
+
useAxios,
|
|
13
|
+
} from '@bjsdistribution/dms-component-library';
|
|
10
14
|
import {
|
|
11
15
|
useOrderDetails,
|
|
12
16
|
// useOrderStaticData,
|
|
@@ -60,7 +64,7 @@ function OrderView({ locationloading }: any) {
|
|
|
60
64
|
const [, setLoading] = useState<boolean>(false);
|
|
61
65
|
const [, setOrderStatus] = useStatusDetails();
|
|
62
66
|
const [, setDepotOptions] = useDepotOptions();
|
|
63
|
-
const [, setCustomerInfo] = useCustomerInfo();
|
|
67
|
+
const [customerInfo, setCustomerInfo] = useCustomerInfo();
|
|
64
68
|
const [, setLocationOptions] = useLocationOptions();
|
|
65
69
|
const [orderResources, setOrderResources] = useOrderProductsResources();
|
|
66
70
|
const [GsitCUstomerId, setGsitCUstomerId] = useGsitCUstomerId();
|
|
@@ -450,8 +454,11 @@ function OrderView({ locationloading }: any) {
|
|
|
450
454
|
}
|
|
451
455
|
}, [escalationDataLoading]);
|
|
452
456
|
|
|
457
|
+
const docTitle = `${customerInfo?.recipient_name}, ${customerInfo?.postcode}`;
|
|
458
|
+
|
|
453
459
|
return (
|
|
454
460
|
<MainContainer>
|
|
461
|
+
<DocumentTitle title={docTitle} />
|
|
455
462
|
<GeneralHeader statusDataLoading={statusDataLoading} />
|
|
456
463
|
|
|
457
464
|
<DetailsFilters />
|