@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
|
@@ -6,7 +6,7 @@ import { useAtom, atom } from 'jotai';
|
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
7
|
import { format, isValid, parseISO } from 'date-fns';
|
|
8
8
|
import { atomWithReducer } from 'jotai/utils';
|
|
9
|
-
import { useAxios, CountItem, device, ExportButton, useApiHook, Checkbox as Checkbox$1, AntTable, Alert, AntModal, Label as Label$k, Input as Input$2, TextArea, FormSection, displayValueOrNA as displayValueOrNA$1, dropdownStyles, SelectDropdown, RadioButtonGroup as RadioButtonGroup$1, Switch, formatUtcToLocal, Button, PrivateIcon, CrossIcon, SectionHeader, AntSelect, CancelationModal, CancelAndCompleteAction, BackgroundModal as BackgroundModal$1, CalendarIcon, FlagAlert, WarningIcon, getBaseEndpoint, ViewIcon, SearchIcon as SearchIcon$1 } from '@bjsdistribution/dms-component-library';
|
|
9
|
+
import { useAxios, CountItem, device, ExportButton, useApiHook, Checkbox as Checkbox$1, AntTable, Alert, AntModal, DocumentTitle, Label as Label$k, Input as Input$2, TextArea, FormSection, displayValueOrNA as displayValueOrNA$1, dropdownStyles, SelectDropdown, RadioButtonGroup as RadioButtonGroup$1, Switch, formatUtcToLocal, Button, PrivateIcon, CrossIcon, SectionHeader, AntSelect, CancelationModal, CancelAndCompleteAction, BackgroundModal as BackgroundModal$1, CalendarIcon, FlagAlert, WarningIcon, getBaseEndpoint, ViewIcon, SearchIcon as SearchIcon$1 } from '@bjsdistribution/dms-component-library';
|
|
10
10
|
import { useReactTable, getCoreRowModel, getSortedRowModel, flexRender } from '@tanstack/react-table';
|
|
11
11
|
import Scrollbars from 'react-custom-scrollbars-2';
|
|
12
12
|
import { createPortal } from 'react-dom';
|
|
@@ -3360,6 +3360,8 @@ var ReturnTable = function ReturnTable() {
|
|
|
3360
3360
|
var _useItemsPerPage = useItemsPerPage(),
|
|
3361
3361
|
itemsPerPage = _useItemsPerPage[0],
|
|
3362
3362
|
setItemsPerPage = _useItemsPerPage[1];
|
|
3363
|
+
var _useCustomerData = useCustomerData(),
|
|
3364
|
+
customers = _useCustomerData[0];
|
|
3363
3365
|
// const location = useLocation();
|
|
3364
3366
|
var page = paginationObj.page,
|
|
3365
3367
|
total = paginationObj.total;
|
|
@@ -3373,7 +3375,17 @@ var ReturnTable = function ReturnTable() {
|
|
|
3373
3375
|
// const queryParams = new URLSearchParams(location.search);
|
|
3374
3376
|
// const clientId = queryParams.get('customerId');
|
|
3375
3377
|
// }, [location]);
|
|
3376
|
-
|
|
3378
|
+
var queryParams = new URLSearchParams(location.search);
|
|
3379
|
+
var customerId = queryParams.get('customerId');
|
|
3380
|
+
var selectedCustomer = customers == null ? void 0 : customers.find(function (customer) {
|
|
3381
|
+
var _customer$customer_id;
|
|
3382
|
+
return (customer == null || (_customer$customer_id = customer.customer_id) == null ? void 0 : _customer$customer_id.toString()) === customerId;
|
|
3383
|
+
});
|
|
3384
|
+
var customerName = selectedCustomer == null ? void 0 : selectedCustomer.customer_name;
|
|
3385
|
+
var docTitle = customerName + ": Return Product";
|
|
3386
|
+
return React.createElement("div", null, React.createElement(DashBoardWrapper, null, React.createElement(DocumentTitle, {
|
|
3387
|
+
title: docTitle
|
|
3388
|
+
}), React.createElement("div", {
|
|
3377
3389
|
className: "Tableconatiner"
|
|
3378
3390
|
}, React.createElement(HeaderFilter, null), React.createElement(Container$2, null, React.createElement(ReturnFilter, null), React.createElement(ReturnOrderTable, null), total > 0 && React.createElement(Pagination, {
|
|
3379
3391
|
currentPage: page,
|
|
@@ -4271,7 +4283,9 @@ var ReturnAfterTable = function ReturnAfterTable() {
|
|
|
4271
4283
|
}
|
|
4272
4284
|
}
|
|
4273
4285
|
}, [fetchedReturnOrderData, loading, returnAfterOrder]);
|
|
4274
|
-
return React.createElement("div", null, React.createElement(
|
|
4286
|
+
return React.createElement("div", null, React.createElement(DocumentTitle, {
|
|
4287
|
+
title: "Return Order List"
|
|
4288
|
+
}), React.createElement(DashBoardWrapper$1, null, React.createElement("div", {
|
|
4275
4289
|
className: "Tableconatiner"
|
|
4276
4290
|
}, React.createElement(Container$4, null, React.createElement(ReturnOrderFilter, null), React.createElement(OrderTable, null), total > 0 && React.createElement(ReturnPagination, {
|
|
4277
4291
|
currentPage: page,
|
|
@@ -16971,6 +16985,7 @@ function OrderView(_ref) {
|
|
|
16971
16985
|
var _useDepotOptions = useDepotOptions(),
|
|
16972
16986
|
setDepotOptions = _useDepotOptions[1];
|
|
16973
16987
|
var _useCustomerInfo = useCustomerInfo(),
|
|
16988
|
+
customerInfo = _useCustomerInfo[0],
|
|
16974
16989
|
setCustomerInfo = _useCustomerInfo[1];
|
|
16975
16990
|
var _useLocationOptions = useLocationOptions(),
|
|
16976
16991
|
setLocationOptions = _useLocationOptions[1];
|
|
@@ -17324,7 +17339,10 @@ function OrderView(_ref) {
|
|
|
17324
17339
|
showEsc ? setGlobalEscData(sortedEscData) : setGlobalEscData([]);
|
|
17325
17340
|
}
|
|
17326
17341
|
}, [escalationDataLoading]);
|
|
17327
|
-
|
|
17342
|
+
var docTitle = (customerInfo == null ? void 0 : customerInfo.recipient_name) + ", " + (customerInfo == null ? void 0 : customerInfo.postcode);
|
|
17343
|
+
return React.createElement(MainContainer$e, null, React.createElement(DocumentTitle, {
|
|
17344
|
+
title: docTitle
|
|
17345
|
+
}), React.createElement(GeneralHeader, {
|
|
17328
17346
|
statusDataLoading: statusDataLoading
|
|
17329
17347
|
}), React.createElement(DetailsFilters, null), React.createElement(Notification, null), React.createElement(OrderDetails$1, {
|
|
17330
17348
|
orderLoading: loading,
|
|
@@ -17830,7 +17848,9 @@ function ReturnMainTable() {
|
|
|
17830
17848
|
}
|
|
17831
17849
|
}
|
|
17832
17850
|
}, [statsDataLoading]);
|
|
17833
|
-
return React.createElement(React.Fragment, null, React.createElement(
|
|
17851
|
+
return React.createElement(React.Fragment, null, React.createElement(DocumentTitle, {
|
|
17852
|
+
title: "Client Return Products"
|
|
17853
|
+
}), React.createElement(DashBoardWrapper$3, {
|
|
17834
17854
|
className: " " + (isScrolled ? 'stickyTableHead' : '')
|
|
17835
17855
|
}, React.createElement("div", {
|
|
17836
17856
|
className: "Tableconatiner"
|