@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
|
@@ -575,11 +575,6 @@ var PrintOptionTOggle = /*#__PURE__*/atom(null);
|
|
|
575
575
|
var usePrintOptionTOggle = function usePrintOptionTOggle() {
|
|
576
576
|
return useAtom(PrintOptionTOggle);
|
|
577
577
|
};
|
|
578
|
-
// Overview Table
|
|
579
|
-
var atomRoutesTable = /*#__PURE__*/atom([]);
|
|
580
|
-
var useRoutesTable = function useRoutesTable() {
|
|
581
|
-
return useAtom(atomRoutesTable);
|
|
582
|
-
};
|
|
583
578
|
//this
|
|
584
579
|
var loading = /*#__PURE__*/atom(false);
|
|
585
580
|
var useStatsLoading = function useStatsLoading() {
|
|
@@ -636,10 +631,6 @@ var atomItemsPerOverviewPage = /*#__PURE__*/atom(50);
|
|
|
636
631
|
var useItemsPerOverviewPage = function useItemsPerOverviewPage() {
|
|
637
632
|
return useAtom(atomItemsPerOverviewPage);
|
|
638
633
|
};
|
|
639
|
-
var countStatus = /*#__PURE__*/atom([]);
|
|
640
|
-
var useCountData = function useCountData() {
|
|
641
|
-
return useAtom(countStatus);
|
|
642
|
-
};
|
|
643
634
|
//
|
|
644
635
|
// ROUTE DETAILS PAGE STATES ->
|
|
645
636
|
// const orderId = atom<number | undefined>(undefined);
|
|
@@ -11464,45 +11455,53 @@ var BulkFilter = function BulkFilter() {
|
|
|
11464
11455
|
);
|
|
11465
11456
|
};
|
|
11466
11457
|
|
|
11467
|
-
|
|
11458
|
+
// import { TableRowType } from '../shared/interface';
|
|
11459
|
+
// import { filtersReducerAtom } from '../header-filters/filterStore';
|
|
11460
|
+
// import { useApiHook } from '@bjsdistribution/dms-component-library';
|
|
11461
|
+
// import {
|
|
11462
|
+
// UsePaginationData,
|
|
11463
|
+
// useCountData,
|
|
11464
|
+
// useRoutesTable,
|
|
11465
|
+
// } from '../store/store';
|
|
11466
|
+
// import { notification } from 'antd';
|
|
11468
11467
|
// import { useAtom } from 'jotai';
|
|
11469
11468
|
var Filters = function Filters() {
|
|
11470
|
-
|
|
11471
|
-
setData = _useRoutesTable[1];
|
|
11469
|
+
// const [, setData] = useRoutesTable();
|
|
11472
11470
|
// const [state] = useAtom(filtersReducerAtom);
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
var _useCountData = useCountData(),
|
|
11476
|
-
setCount = _useCountData[1];
|
|
11471
|
+
// const [, setPaginationObject] = UsePaginationData();
|
|
11472
|
+
// const [, setCount] = useCountData();
|
|
11477
11473
|
// Hooks
|
|
11478
11474
|
// const { 'x-filters': filters, 'x-pagination': pagination } = state;
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
}
|
|
11505
|
-
|
|
11475
|
+
// const {
|
|
11476
|
+
// data: fetchedData,
|
|
11477
|
+
// loading: apiLoading,
|
|
11478
|
+
// paginationData,
|
|
11479
|
+
// } = useApiHook<{
|
|
11480
|
+
// data: TableRowType[];
|
|
11481
|
+
// }>({
|
|
11482
|
+
// endpoint: 'orders/',
|
|
11483
|
+
// method: 'GET',
|
|
11484
|
+
// // pagination: pagination,
|
|
11485
|
+
// // filters: filters,
|
|
11486
|
+
// });
|
|
11487
|
+
// useEffect(() => {
|
|
11488
|
+
// if (fetchedData && fetchedData.data) {
|
|
11489
|
+
// const data = fetchedData.data;
|
|
11490
|
+
// setData(data);
|
|
11491
|
+
// if (paginationData !== null) {
|
|
11492
|
+
// const { count, ...rest } = JSON.parse(paginationData);
|
|
11493
|
+
// setPaginationObject(rest);
|
|
11494
|
+
// setCount(count);
|
|
11495
|
+
// } else {
|
|
11496
|
+
// // console.error('Pagination data is null');
|
|
11497
|
+
// notification.error({
|
|
11498
|
+
// message: 'Error',
|
|
11499
|
+
// description: 'Pagination data is null',
|
|
11500
|
+
// });
|
|
11501
|
+
// }
|
|
11502
|
+
// }
|
|
11503
|
+
// }, [apiLoading]);
|
|
11504
|
+
// const [] = useState(true);
|
|
11506
11505
|
// const ToggleView = () => {
|
|
11507
11506
|
// setDataView(!DataView);
|
|
11508
11507
|
// };
|
|
@@ -11775,7 +11774,7 @@ var overviewfiltersReducerAtom = /*#__PURE__*/atom(function (get) {
|
|
|
11775
11774
|
});
|
|
11776
11775
|
|
|
11777
11776
|
var _templateObject$26, _templateObject2$1C, _templateObject3$T;
|
|
11778
|
-
var _excluded$
|
|
11777
|
+
var _excluded$6 = ["count"];
|
|
11779
11778
|
function ReturnMainTable() {
|
|
11780
11779
|
var _useAtom = useAtom(overviewfiltersReducerAtom),
|
|
11781
11780
|
state = _useAtom[0];
|
|
@@ -11824,7 +11823,7 @@ function ReturnMainTable() {
|
|
|
11824
11823
|
try {
|
|
11825
11824
|
var _JSON$parse = JSON.parse(paginationData),
|
|
11826
11825
|
count = _JSON$parse.count,
|
|
11827
|
-
rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded$
|
|
11826
|
+
rest = _objectWithoutPropertiesLoose(_JSON$parse, _excluded$6);
|
|
11828
11827
|
setPaginationObject(rest);
|
|
11829
11828
|
} catch (error) {
|
|
11830
11829
|
console.error('Error parsing paginationData:', error);
|