import BankAccountBalancePanel from "@/components/features/BankReconciliation/BankBalance" import BankPicker from "@/components/features/BankReconciliation/BankPicker" import BankRecDateFilter from "@/components/features/BankReconciliation/BankRecDateFilter" import BankTransactionUnreconcileModal from "@/components/features/BankReconciliation/BankTransactionUnreconcileModal" import CompanySelector from "@/components/features/BankReconciliation/CompanySelector" import MatchAndReconcile from "@/components/features/BankReconciliation/MatchAndReconcile" import Settings from "@/components/features/Settings/Settings" import ActionLog from "@/components/features/ActionLog/ActionLog" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import { TooltipProvider } from "@/components/ui/tooltip" import _ from "@/lib/translate" import { lazy, Suspense } from "react" import { AlertTriangleIcon, CheckCircleIcon, HomeIcon, LandmarkIcon, ListIcon, Loader2Icon, ScrollTextIcon, ShuffleIcon } from "lucide-react" import { Breadcrumb, BreadcrumbItem, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "@/components/ui/breadcrumb" import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from "@/components/ui/empty" import { Button } from "@/components/ui/button" import { useAtomValue } from "jotai" import { selectedBankAccountAtom } from "@/components/features/BankReconciliation/bankRecAtoms" const BankReconciliationStatement = lazy(() => import('@/components/features/BankReconciliation/BankReconciliationStatement')) const BankTransactions = lazy(() => import('@/components/features/BankReconciliation/BankTransactionList')) const BankClearanceSummary = lazy(() => import('@/components/features/BankReconciliation/BankClearanceSummary')) const IncorrectlyClearedEntries = lazy(() => import('@/components/features/BankReconciliation/IncorrectlyClearedEntries')) const BankReconciliation = () => { return (
{/* The page owns the viewport height and the tabs/lists below fill what's left, so the virtualizers size themselves from layout instead of a measured pixel value. */}
{_("Banking")}
{_("Banking")} {_("This screen is not supported on mobile devices.")}
) } const BankRecWorkspace = () => { const selectedBankAccount = useAtomValue(selectedBankAccountAtom) return {/* Picker + tab strip stack on the left, balance panel beside them - the tab strip fills height the panel needs anyway, so it costs no row of its own. The picker scrolls horizontally (`min-w-0` lets it shrink so its overflow-x engages) while the panel stays put, so the figures never scroll away. */} {/* No gap here: the panel's own `border-s ps-4` supplies the separation, and a gap would leave dead space the picker's edge fade can't reach. */}
{selectedBankAccount && {_("Match and Reconcile")} {_("Reconciliation Statement")} {_("Transactions")} {_("Clearance Summary")} {_("Incorrectly Cleared")} }
{selectedBankAccount && }
{selectedBankAccount && <> }> }
} export default BankReconciliation