mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat: Calculate the total pending when matching.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useMatchingTransactions } from '@/hooks/query/bank-rules';
|
||||
import { defaultTo } from 'lodash';
|
||||
import React, { createContext } from 'react';
|
||||
import { useMatchingTransactions } from '@/hooks/query/bank-rules';
|
||||
|
||||
interface MatchingTransactionBootValues {
|
||||
isMatchingTransactionsLoading: boolean;
|
||||
@@ -29,9 +30,9 @@ function MatchingTransactionBoot({
|
||||
|
||||
const provider = {
|
||||
isMatchingTransactionsLoading,
|
||||
possibleMatches: matchingTransactions?.possibleMatches,
|
||||
perfectMatchesCount: 2,
|
||||
perfectMatches: matchingTransactions?.perfectMatches,
|
||||
possibleMatches: defaultTo(matchingTransactions?.possibleMatches, []),
|
||||
perfectMatchesCount: matchingTransactions?.perfectMatches?.length || 0,
|
||||
perfectMatches: defaultTo(matchingTransactions?.perfectMatches, []),
|
||||
} as MatchingTransactionBootValues;
|
||||
|
||||
return <RuleFormBootContext.Provider value={provider} {...props} />;
|
||||
|
||||
Reference in New Issue
Block a user