mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-23 08:10:32 +00:00
fix(webapp): resource meta of vendors list
This commit is contained in:
@@ -16,21 +16,21 @@ function InvoicesListProvider({ query, tableStateChanged, ...props }) {
|
|||||||
const { data: invoicesViews, isLoading: isViewsLoading } =
|
const { data: invoicesViews, isLoading: isViewsLoading } =
|
||||||
useResourceViews('sale_invoices');
|
useResourceViews('sale_invoices');
|
||||||
|
|
||||||
// Fetch the accounts resource fields.
|
// Fetch resource fields of the sale invoices.
|
||||||
const {
|
const {
|
||||||
data: resourceMeta,
|
data: resourceMeta,
|
||||||
isLoading: isResourceLoading,
|
isLoading: isResourceLoading,
|
||||||
isFetching: isResourceFetching,
|
isFetching: isResourceFetching,
|
||||||
} = useResourceMeta('sale_invoices');
|
} = useResourceMeta('sale_invoices');
|
||||||
|
|
||||||
// Fetch accounts list according to the given custom view id.
|
// Fetch sale invoices of the given query.
|
||||||
const {
|
const {
|
||||||
data: { invoices, pagination, filterMeta },
|
data: { invoices, pagination, filterMeta },
|
||||||
isFetching: isInvoicesFetching,
|
isFetching: isInvoicesFetching,
|
||||||
isLoading: isInvoicesLoading,
|
isLoading: isInvoicesLoading,
|
||||||
} = useInvoices(query, { keepPreviousData: true });
|
} = useInvoices(query, { keepPreviousData: true });
|
||||||
|
|
||||||
// Detarmines the datatable empty status.
|
// Detarmines whether the table should show empty state.
|
||||||
const isEmptyStatus =
|
const isEmptyStatus =
|
||||||
isEmpty(invoices) && !tableStateChanged && !isInvoicesLoading;
|
isEmpty(invoices) && !tableStateChanged && !isInvoicesLoading;
|
||||||
|
|
||||||
|
|||||||
@@ -20,16 +20,16 @@ function VendorsListProvider({ tableState, tableStateChanged, ...props }) {
|
|||||||
isFetching: isVendorsFetching,
|
isFetching: isVendorsFetching,
|
||||||
} = useVendors(tableQuery, { keepPreviousData: true });
|
} = useVendors(tableQuery, { keepPreviousData: true });
|
||||||
|
|
||||||
// Fetch customers resource views and fields.
|
// Fetch vendors resource views and fields.
|
||||||
const { data: vendorsViews, isLoading: isVendorsViewsLoading } =
|
const { data: vendorsViews, isLoading: isVendorsViewsLoading } =
|
||||||
useResourceViews('vendors');
|
useResourceViews('vendors');
|
||||||
|
|
||||||
// Fetch the customers resource fields.
|
// Fetch the vendors resource fields.
|
||||||
const {
|
const {
|
||||||
data: resourceMeta,
|
data: resourceMeta,
|
||||||
isLoading: isResourceMetaLoading,
|
isLoading: isResourceMetaLoading,
|
||||||
isFetching: isResourceMetaFetching,
|
isFetching: isResourceMetaFetching,
|
||||||
} = useResourceMeta('customers');
|
} = useResourceMeta('vendors');
|
||||||
|
|
||||||
// Detarmines the datatable empty status.
|
// Detarmines the datatable empty status.
|
||||||
const isEmptyStatus =
|
const isEmptyStatus =
|
||||||
|
|||||||
Reference in New Issue
Block a user