mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat(FinancialReports): add loading progress bar.
fix(preformance): Optimize preformance of virtualized list. fix(preformance): Optimize financial reports preformance.
This commit is contained in:
@@ -10,14 +10,14 @@ const BillsListContext = createContext();
|
||||
*/
|
||||
function BillsListProvider({ query, ...props }) {
|
||||
// Fetch accounts resource views and fields.
|
||||
const { data: billsViews, isFetching: isViewsLoading } = useResourceViews(
|
||||
const { data: billsViews, isLoading: isViewsLoading } = useResourceViews(
|
||||
'bills',
|
||||
);
|
||||
|
||||
// Fetch the accounts resource fields.
|
||||
const {
|
||||
data: billsFields,
|
||||
isFetching: isFieldsLoading,
|
||||
isLoading: isFieldsLoading,
|
||||
} = useResourceFields('bills');
|
||||
|
||||
// Fetch accounts list according to the given custom view id.
|
||||
|
||||
@@ -21,7 +21,7 @@ function PaymentMadeFormProvider({ paymentMadeId, ...props }) {
|
||||
const [paymentVendorId, setPaymentVendorId] = React.useState(null);
|
||||
|
||||
// Handle fetch accounts data.
|
||||
const { data: accounts, isFetching: isAccountsFetching } = useAccounts();
|
||||
const { data: accounts, isLoading: isAccountsLoading } = useAccounts();
|
||||
|
||||
// Handle fetch Items data table or list.
|
||||
const {
|
||||
@@ -33,7 +33,7 @@ function PaymentMadeFormProvider({ paymentMadeId, ...props }) {
|
||||
// Handle fetch venders data table or list.
|
||||
const {
|
||||
data: { vendors },
|
||||
isFetching: isVendorsFetching,
|
||||
isLoading: isVendorsLoading,
|
||||
} = useVendors({ page_size: 10000 });
|
||||
|
||||
// Handle fetch specific payment made details.
|
||||
@@ -66,10 +66,10 @@ function PaymentMadeFormProvider({ paymentMadeId, ...props }) {
|
||||
paymentVendorId,
|
||||
|
||||
isNewMode,
|
||||
isAccountsFetching,
|
||||
isAccountsLoading,
|
||||
isItemsFetching,
|
||||
isItemsLoading,
|
||||
isVendorsFetching,
|
||||
isVendorsLoading,
|
||||
isPaymentFetching,
|
||||
isPaymentLoading,
|
||||
|
||||
@@ -83,9 +83,9 @@ function PaymentMadeFormProvider({ paymentMadeId, ...props }) {
|
||||
return (
|
||||
<DashboardInsider
|
||||
loading={
|
||||
isVendorsFetching ||
|
||||
isVendorsLoading ||
|
||||
isItemsFetching ||
|
||||
isAccountsFetching ||
|
||||
isAccountsLoading ||
|
||||
isPaymentFetching ||
|
||||
isPaymentLoading
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user