diff --git a/packages/desktop-client/src/components/modals/ImportTransactions.js b/packages/desktop-client/src/components/modals/ImportTransactions.js index 88af52fe27ef7274d015d1c2a37912d8f4e456c6..6ff4ea5b7c5b7a4ef6afa63dc6e5c352551cdd23 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 df51a71481d92d4b5b658d3e265d1a62f09771c6..aeff6467ee02e262053735ad9c085fa96b565bc1 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 0000000000000000000000000000000000000000..9a3baea531432e57841fa0f8cec4c91305d8d2c2 --- /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