diff --git a/moneymgr_web/src/dialogs/SelectAccountDialog.tsx b/moneymgr_web/src/dialogs/SelectAccountDialog.tsx index 51a362d..cd2c1a8 100644 --- a/moneymgr_web/src/dialogs/SelectAccountDialog.tsx +++ b/moneymgr_web/src/dialogs/SelectAccountDialog.tsx @@ -30,13 +30,13 @@ export function SelectAccountDialog(p: { const accounts = useAccounts(); const [choice, setChoice] = React.useState(null); - console.log(choice); + const submit = () => { if (choice) p.onSelected(choice); }; return ( - + p.onClose()}> {p.title} {p.description} @@ -72,7 +72,7 @@ export function SelectAccountDialog(p: { - + diff --git a/moneymgr_web/src/routes/AccountRoute.tsx b/moneymgr_web/src/routes/AccountRoute.tsx index f083b19..dac2341 100644 --- a/moneymgr_web/src/routes/AccountRoute.tsx +++ b/moneymgr_web/src/routes/AccountRoute.tsx @@ -107,17 +107,17 @@ function MovementsTable(p: { // Change account of movement const handleMoveClick = async (movement: Movement) => { - const target = await chooseAccount( - "Transfer movement", + const targetAccount = await chooseAccount( + "Transfer movementd", `Please select the target account that will receive the movement: ${movement.label} (${movement.amount} €)`, "Transfer movement", [accounts.get(movement.account_id)!] ); - if (!target) return; + if (!targetAccount) return; try { - movement.account_id = target.id; + movement.account_id = targetAccount.id; await MovementApi.Update(movement);