feat(banking): PDF statement importer and overriding column mapping (backport #55559) (#55993)

This commit is contained in:
mergify[bot]
2026-06-16 21:08:43 +05:30
committed by GitHub
parent 78b7da1a44
commit 125bda95ed
19 changed files with 2238 additions and 420 deletions

View File

@@ -9,12 +9,13 @@ import { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react'
import { Link, useParams } from 'react-router'
const CSVImport = lazy(() => import('@/components/features/BankStatementImporter/CSV/CSVImport'))
const PDFImport = lazy(() => import('@/components/features/BankStatementImporter/PDF/PDFImport'))
const ViewBankStatementImportLog = () => {
const { id } = useParams<{ id: string }>()
const { data, isLoading, error } = useGetStatementDetails(id ?? "")
const { data, isLoading, error, mutate } = useGetStatementDetails(id ?? "")
useFrappeDocumentEventListener("Bank Statement Import Log", id ?? "", () => {
})
@@ -42,7 +43,13 @@ const ViewBankStatementImportLog = () => {
<ErrorBanner error={error} />
</div>
}
return <CSVImport data={data} />
const isPdf = data.message.doc.file?.toLowerCase().endsWith('.pdf')
if (isPdf) {
return <PDFImport data={data} mutate={mutate} />
}
return <CSVImport data={data} mutate={mutate} />
}
export default ViewBankStatementImportLog