mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
feat: bill payment transactions.
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
useBill,
|
||||
useTransactionsByReference,
|
||||
useBillLocatedLandedCost,
|
||||
useBillPaymentTransactions,
|
||||
} from 'hooks/query';
|
||||
|
||||
const BillDrawerContext = React.createContext();
|
||||
@@ -33,15 +34,31 @@ function BillDrawerProvider({ billId, ...props }) {
|
||||
enabled: !!billId,
|
||||
});
|
||||
|
||||
// Handle fetch bill payment transaction.
|
||||
const {
|
||||
isLoading: isPaymentTransactionsLoading,
|
||||
isFetching: isPaymentTransactionFetching,
|
||||
data: paymentTransactions,
|
||||
} = useBillPaymentTransactions(billId, {
|
||||
enabled: !!billId,
|
||||
});
|
||||
|
||||
//provider.
|
||||
const provider = {
|
||||
transactions,
|
||||
billId,
|
||||
data,
|
||||
bill,
|
||||
paymentTransactions,
|
||||
isPaymentTransactionsLoading,
|
||||
isPaymentTransactionFetching,
|
||||
};
|
||||
|
||||
const loading = isLandedCostLoading || isTransactionLoading || isBillLoading;
|
||||
const loading =
|
||||
isLandedCostLoading ||
|
||||
isTransactionLoading ||
|
||||
isPaymentTransactionsLoading ||
|
||||
isBillLoading;
|
||||
|
||||
return (
|
||||
<DrawerLoading loading={loading}>
|
||||
|
||||
Reference in New Issue
Block a user