@bjsdistribution/dms-client-return 0.0.73 → 0.0.74
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 +44 -45
- 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 +44 -45
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/order-daily-overview/filters/Filters.tsx +42 -42
|
@@ -583,11 +583,6 @@ var PrintOptionTOggle = /*#__PURE__*/jotai.atom(null);
|
|
|
583
583
|
var usePrintOptionTOggle = function usePrintOptionTOggle() {
|
|
584
584
|
return jotai.useAtom(PrintOptionTOggle);
|
|
585
585
|
};
|
|
586
|
-
// Overview Table
|
|
587
|
-
var atomRoutesTable = /*#__PURE__*/jotai.atom([]);
|
|
588
|
-
var useRoutesTable = function useRoutesTable() {
|
|
589
|
-
return jotai.useAtom(atomRoutesTable);
|
|
590
|
-
};
|
|
591
586
|
//this
|
|
592
587
|
var loading = /*#__PURE__*/jotai.atom(false);
|
|
593
588
|
var useStatsLoading = function useStatsLoading() {
|
|
@@ -644,10 +639,6 @@ var atomItemsPerOverviewPage = /*#__PURE__*/jotai.atom(50);
|
|
|
644
639
|
var useItemsPerOverviewPage = function useItemsPerOverviewPage() {
|
|
645
640
|
return jotai.useAtom(atomItemsPerOverviewPage);
|
|
646
641
|
};
|
|
647
|
-
var countStatus = /*#__PURE__*/jotai.atom([]);
|
|
648
|
-
var useCountData = function useCountData() {
|
|
649
|
-
return jotai.useAtom(countStatus);
|
|
650
|
-
};
|
|
651
642
|
//
|
|
652
643
|
// ROUTE DETAILS PAGE STATES ->
|
|
653
644
|
// const orderId = atom<number | undefined>(undefined);
|
|
@@ -11472,45 +11463,53 @@ var BulkFilter = function BulkFilter() {
|
|
|
11472
11463
|
);
|
|
11473
11464
|
};
|
|
11474
11465
|
|
|
11475
|
-
|
|
11466
|
+
// import { TableRowType } from '../shared/interface';
|
|
11467
|
+
// import { filtersReducerAtom } from '../header-filters/filterStore';
|
|
11468
|
+
// import { useApiHook } from '@bjsdistribution/dms-component-library';
|
|
11469
|
+
// import {
|
|
11470
|
+
// UsePaginationData,
|
|
11471
|
+
// useCountData,
|
|
11472
|
+
// useRoutesTable,
|
|
11473
|
+
// } from '../store/store';
|
|
11474
|
+
// import { notification } from 'antd';
|
|
11476
11475
|
// import { useAtom } from 'jotai';
|
|
11477
11476
|
var Filters = function Filters() {
|
|
11478
|
-
|
|
11479
|
-
setData = _useRoutesTable[1];
|
|
11477
|
+
// const [, setData] = useRoutesTable();
|
|
11480
11478
|
// const [state] = useAtom(filtersReducerAtom);
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
var _useCountData = useCountData(),
|
|
11484
|
-
setCount = _useCountData[1];
|
|
11479
|
+
// const [, setPaginationObject] = UsePaginationData();
|
|
11480
|
+
// const [, setCount] = useCountData();
|
|
11485
11481
|
// Hooks
|
|
11486
11482
|
// const { 'x-filters': filters, 'x-pagination': pagination } = state;
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
}
|
|
11513
|
-
|
|
11483
|
+
// const {
|
|
11484
|
+
// data: fetchedData,
|
|
11485
|
+
// loading: apiLoading,
|
|
11486
|
+
// paginationData,
|
|
11487
|
+
// } = useApiHook<{
|
|
11488
|
+
// data: TableRowType[];
|
|
11489
|
+
// }>({
|
|
11490
|
+
// endpoint: 'orders/',
|
|
11491
|
+
// method: 'GET',
|
|
11492
|
+
// // pagination: pagination,
|
|
11493
|
+
// // filters: filters,
|
|
11494
|
+
// });
|
|
11495
|
+
// useEffect(() => {
|
|
11496
|
+
// if (fetchedData && fetchedData.data) {
|
|
11497
|
+
// const data = fetchedData.data;
|
|
11498
|
+
// setData(data);
|
|
11499
|
+
// if (paginationData !== null) {
|
|
11500
|
+
// const { count, ...rest } = JSON.parse(paginationData);
|
|
11501
|
+
// setPaginationObject(rest);
|
|
11502
|
+
// setCount(count);
|
|
11503
|
+
// } else {
|
|
11504
|
+
// // console.error('Pagination data is null');
|
|
11505
|
+
// notification.error({
|
|
11506
|
+
// message: 'Error',
|
|
11507
|
+
// description: 'Pagination data is null',
|
|
11508
|
+
// });
|
|
11509
|
+
// }
|
|
11510
|
+
// }
|
|
11511
|
+
// }, [apiLoading]);
|
|
11512
|
+
// const [] = useState(true);
|
|
11514
11513
|
// const ToggleView = () => {
|
|
11515
11514
|
// setDataView(!DataView);
|
|
11516
11515
|
// };
|
|
@@ -11783,7 +11782,7 @@ var overviewfiltersReducerAtom = /*#__PURE__*/jotai.atom(function (get) {
|
|
|
11783
11782
|
});
|
|
11784
11783
|
|
|
11785
11784
|
var _templateObject$26, _templateObject2$1C, _templateObject3$T;
|
|
11786
|
-
var _excluded$
|
|
11785
|
+
var _excluded$6 = ["count"];
|
|
11787
11786
|
function ReturnMainTable() {
|
|
11788
11787
|
var _useAtom = jotai.useAtom(overviewfiltersReducerAtom),
|
|
11789
11788
|
state = _useAtom[0];
|
|
@@ -11832,7 +11831,7 @@ function ReturnMainTable() {
|
|
|
11832
11831
|
try {
|
|
11833
11832
|
var _JSON$parse = JSON.parse(paginationData),
|
|
11834
11833
|
count = _JSON$parse.count,
|
|
11835
|
-
rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded$
|
|
11834
|
+
rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded$6);
|
|
11836
11835
|
setPaginationObject(rest);
|
|
11837
11836
|
} catch (error) {
|
|
11838
11837
|
console.error('Error parsing paginationData:', error);
|