fix(webapp): resource meta of vendors list

This commit is contained in:
a.bouhuolia
2023-05-05 15:41:32 +02:00
parent 06c7ee71b4
commit 36611652da
2 changed files with 6 additions and 6 deletions

View File

@@ -16,21 +16,21 @@ function InvoicesListProvider({ query, tableStateChanged, ...props }) {
const { data: invoicesViews, isLoading: isViewsLoading } =
useResourceViews('sale_invoices');
// Fetch the accounts resource fields.
// Fetch resource fields of the sale invoices.
const {
data: resourceMeta,
isLoading: isResourceLoading,
isFetching: isResourceFetching,
} = useResourceMeta('sale_invoices');
// Fetch accounts list according to the given custom view id.
// Fetch sale invoices of the given query.
const {
data: { invoices, pagination, filterMeta },
isFetching: isInvoicesFetching,
isLoading: isInvoicesLoading,
} = useInvoices(query, { keepPreviousData: true });
// Detarmines the datatable empty status.
// Detarmines whether the table should show empty state.
const isEmptyStatus =
isEmpty(invoices) && !tableStateChanged && !isInvoicesLoading;