mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat: change default page size pagination.
This commit is contained in:
@@ -5,7 +5,7 @@ import useApiRequest from '../useRequest';
|
||||
import t from './types';
|
||||
|
||||
const defaultPagination = {
|
||||
pageSize: 12,
|
||||
pageSize: 20,
|
||||
page: 0,
|
||||
pagesCount: 0,
|
||||
};
|
||||
|
||||
@@ -86,7 +86,7 @@ export function useEstimates(query, props) {
|
||||
estimates: [],
|
||||
pagination: {
|
||||
page: 1,
|
||||
pageSize: 12,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
},
|
||||
filterMeta: {},
|
||||
|
||||
@@ -5,7 +5,7 @@ import { transformPagination } from 'utils';
|
||||
import useApiRequest from '../useRequest';
|
||||
|
||||
const defaultPagination = {
|
||||
pageSize: 12,
|
||||
pageSize: 20,
|
||||
page: 0,
|
||||
pagesCount: 0,
|
||||
};
|
||||
@@ -82,7 +82,7 @@ export function useExchangeRates(query, props) {
|
||||
exchangesRates: [],
|
||||
pagination: {
|
||||
page: 1,
|
||||
pageSize: 12,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
},
|
||||
filterMeta: {},
|
||||
|
||||
@@ -5,7 +5,7 @@ import { transformPagination } from 'utils';
|
||||
import t from './types';
|
||||
|
||||
const defaultPagination = {
|
||||
pageSize: 12,
|
||||
pageSize: 20,
|
||||
page: 0,
|
||||
pagesCount: 0,
|
||||
};
|
||||
|
||||
@@ -76,7 +76,7 @@ export function useInventoryAdjustments(query, props) {
|
||||
transactions: [],
|
||||
pagination: {
|
||||
page: 1,
|
||||
pageSize: 12,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
pagesCount: 0,
|
||||
},
|
||||
|
||||
@@ -110,7 +110,7 @@ export function useInvoices(query, props) {
|
||||
invoices: [],
|
||||
pagination: {
|
||||
page: 1,
|
||||
pageSize: 12,
|
||||
pageSize: 20,
|
||||
total: 0,
|
||||
},
|
||||
filterMeta: {},
|
||||
|
||||
@@ -5,7 +5,7 @@ import useApiRequest from '../useRequest';
|
||||
import t from './types';
|
||||
|
||||
const DEFAULT_PAGINATION = {
|
||||
pageSize: 12,
|
||||
pageSize: 20,
|
||||
page: 0,
|
||||
pagesCount: 0,
|
||||
};
|
||||
@@ -75,7 +75,7 @@ export function useDeleteItem(props) {
|
||||
/**
|
||||
* Activate the given item.
|
||||
*/
|
||||
export function useActivateItem(props) {
|
||||
export function useActivateItem(props) {
|
||||
const queryClient = useQueryClient();
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
@@ -114,7 +114,9 @@ export function useInactivateItem(props) {
|
||||
const transformItemsResponse = (response) => {
|
||||
return {
|
||||
items: response.data.items,
|
||||
pagination: transformPagination(transformResponse(response.data.pagination)),
|
||||
pagination: transformPagination(
|
||||
transformResponse(response.data.pagination),
|
||||
),
|
||||
filterMeta: transformResponse(response.data.filter_meta),
|
||||
};
|
||||
};
|
||||
@@ -137,8 +139,8 @@ export function useItems(query, props) {
|
||||
pagination: DEFAULT_PAGINATION,
|
||||
filterMeta: {},
|
||||
},
|
||||
...props
|
||||
}
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -149,7 +151,7 @@ export function useRefreshItems() {
|
||||
refresh: () => {
|
||||
queryClient.invalidateQueries(t.ITEMS);
|
||||
},
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,7 +168,7 @@ export function useItem(id, props) {
|
||||
{
|
||||
select: (response) => response.data.item,
|
||||
defaultData: {},
|
||||
...props
|
||||
...props,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ export function usePaymentReceives(query, props) {
|
||||
select: transformPaymentReceives,
|
||||
defaultData: {
|
||||
paymentReceives: [],
|
||||
pagination: { page: 1, pageSize: 12, total: 0 },
|
||||
pagination: { page: 1, pageSize: 20, total: 0 },
|
||||
filterMeta: {},
|
||||
},
|
||||
...props,
|
||||
|
||||
Reference in New Issue
Block a user