feat: add transaction deduplication feature and enhance filtering options in settings and transactions pages

This commit is contained in:
Julien Froidefond
2025-11-30 13:02:03 +01:00
parent e087143675
commit d5aa00a885
9 changed files with 616 additions and 26 deletions

View File

@@ -89,6 +89,24 @@ export default function SettingsPage() {
}
};
const deduplicateTransactions = async () => {
try {
const response = await fetch(
"/api/banking/transactions/deduplicate",
{
method: "POST",
}
);
if (!response.ok) throw new Error("Erreur");
const result = await response.json();
refresh();
return result;
} catch (error) {
console.error(error);
throw error;
}
};
const categorizedCount = data.transactions.filter((t) => t.categoryId).length;
return (
@@ -114,6 +132,7 @@ export default function SettingsPage() {
categorizedCount={categorizedCount}
onClearCategories={clearAllCategories}
onResetData={resetData}
onDeduplicate={deduplicateTransactions}
/>
<OFXInfoCard />