Skip to content

A local-first personal finance app

Add options on Import transactions screen to mark transactions as cleared/uncleared (#1451)

Khanh Nguyena9d34dfcc89b
diff --git a/packages/desktop-client/src/components/modals/ImportTransactions.js b/packages/desktop-client/src/components/modals/ImportTransactions.js
index 88af52fe27..6ff4ea5b7c 100644
--- a/packages/desktop-client/src/components/modals/ImportTransactions.js
+++ b/packages/desktop-client/src/components/modals/ImportTransactions.js
@@ -584,6 +584,8 @@ export default function ImportTransactions({ modalProps, options }) {
let [parseDateFormat, setParseDateFormat] = useState(null);
+ let [clearOnImport, setClearOnImport] = useState(true);
+
async function parse(filename, options) {
setLoadingState('parsing');
@@ -741,6 +743,7 @@ export default function ImportTransactions({ modalProps, options }) {
...finalTransaction,
date,
amount: amountToInteger(amount),
+ cleared: clearOnImport,
});
}
@@ -943,6 +946,15 @@ export default function ImportTransactions({ modalProps, options }) {
>
File has header row
</CheckboxOption>
+ <CheckboxOption
+ id="clear_on_import"
+ checked={clearOnImport}
+ onChange={() => {
+ setClearOnImport(!clearOnImport);
+ }}
+ >
+ Clear transactions on import
+ </CheckboxOption>
</View>
)}
diff --git a/packages/desktop-client/src/icons/v2/Eye.js b/packages/desktop-client/src/icons/v2/Eye.js
index df51a71481..aeff6467ee 100644
--- a/packages/desktop-client/src/icons/v2/Eye.js
+++ b/packages/desktop-client/src/icons/v2/Eye.js
@@ -47,4 +47,4 @@ const SvgEye = props => (
/>
</svg>
);
-export default SvgEye;
\ No newline at end of file
+export default SvgEye;
diff --git a/upcoming-release-notes/1451.md b/upcoming-release-notes/1451.md
new file mode 100644
index 0000000000..9a3baea531
--- /dev/null
+++ b/upcoming-release-notes/1451.md
@@ -0,0 +1,6 @@
+---
+category: Enhancements
+authors: [kstockk]
+---
+
+Add option on import transactions screen to mark the transactions as cleared/uncleared