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;

View File

@@ -20,16 +20,16 @@ function VendorsListProvider({ tableState, tableStateChanged, ...props }) {
isFetching: isVendorsFetching,
} = useVendors(tableQuery, { keepPreviousData: true });
// Fetch customers resource views and fields.
// Fetch vendors resource views and fields.
const { data: vendorsViews, isLoading: isVendorsViewsLoading } =
useResourceViews('vendors');
// Fetch the customers resource fields.
// Fetch the vendors resource fields.
const {
data: resourceMeta,
isLoading: isResourceMetaLoading,
isFetching: isResourceMetaFetching,
} = useResourceMeta('customers');
} = useResourceMeta('vendors');
// Detarmines the datatable empty status.
const isEmptyStatus =