mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
fix: retrieve the excluded transactions count
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// @ts-nocheck
|
||||
import { useMemo } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { ContentTabs } from '@/components/ContentTabs/ContentTabs';
|
||||
import { useAccountTransactionsContext } from './AccountTransactionsProvider';
|
||||
@@ -8,15 +9,19 @@ const AccountContentTabs = styled(ContentTabs)`
|
||||
`;
|
||||
|
||||
export function AccountTransactionsFilterTabs() {
|
||||
const { filterTab, setFilterTab, currentAccount } =
|
||||
const { filterTab, setFilterTab, bankAccountMetaSummary, currentAccount } =
|
||||
useAccountTransactionsContext();
|
||||
|
||||
const handleChange = (value) => {
|
||||
setFilterTab(value);
|
||||
};
|
||||
|
||||
const hasUncategorizedTransx = Boolean(
|
||||
currentAccount.uncategorized_transactions,
|
||||
// Detarmines whether show the uncategorized transactions tab.
|
||||
const hasUncategorizedTransx = useMemo(
|
||||
() =>
|
||||
bankAccountMetaSummary?.totalUncategorizedTransactions > 0 ||
|
||||
bankAccountMetaSummary?.totalExcludedTransactions > 0,
|
||||
[bankAccountMetaSummary],
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user