mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
import React, { createContext, useContext } from 'react';
|
import React, { createContext, useContext } from 'react';
|
||||||
|
import { isEmpty } from 'lodash';
|
||||||
|
|
||||||
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
import DashboardInsider from 'components/Dashboard/DashboardInsider';
|
||||||
import {
|
import {
|
||||||
useResourceViews,
|
useResourceViews,
|
||||||
@@ -12,12 +14,10 @@ const PaymentReceivesListContext = createContext();
|
|||||||
/**
|
/**
|
||||||
* Payment receives list data provider.
|
* Payment receives list data provider.
|
||||||
*/
|
*/
|
||||||
function PaymentReceivesListProvider({ query, ...props }) {
|
function PaymentReceivesListProvider({ query, tableStateChanged, ...props }) {
|
||||||
// Fetch payment receives resource views and fields.
|
// Fetch payment receives resource views and fields.
|
||||||
const {
|
const { data: paymentReceivesViews, isFetching: isViewsLoading } =
|
||||||
data: paymentReceivesViews,
|
useResourceViews('payment_receives');
|
||||||
isFetching: isViewsLoading,
|
|
||||||
} = useResourceViews('payment_receives');
|
|
||||||
|
|
||||||
// Fetch the payment receives resource fields.
|
// Fetch the payment receives resource fields.
|
||||||
const {
|
const {
|
||||||
@@ -35,11 +35,7 @@ function PaymentReceivesListProvider({ query, ...props }) {
|
|||||||
|
|
||||||
// Detarmines the datatable empty status.
|
// Detarmines the datatable empty status.
|
||||||
const isEmptyStatus =
|
const isEmptyStatus =
|
||||||
isTableEmptyStatus({
|
isEmpty(paymentReceives) && !isPaymentReceivesLoading && !tableStateChanged;
|
||||||
data: paymentReceives,
|
|
||||||
pagination,
|
|
||||||
filterMeta,
|
|
||||||
}) && !isPaymentReceivesLoading;
|
|
||||||
|
|
||||||
// Provider payload.
|
// Provider payload.
|
||||||
const state = {
|
const state = {
|
||||||
|
|||||||
Reference in New Issue
Block a user