Can create movements from UI

This commit is contained in:
2025-04-21 15:29:00 +02:00
parent 18bed77c7b
commit 09e44da46e
8 changed files with 189 additions and 15 deletions

View File

@ -5,6 +5,7 @@ import { NotFoundRoute } from "./NotFound";
import { AccountWidget } from "../widgets/AccountWidget";
import { AmountWidget } from "../widgets/AmountWidget";
import { Typography } from "@mui/material";
import { NewMovementWidget } from "../widgets/NewMovementWidget";
export function AccountRoute(): React.ReactElement {
const { accountId } = useParams();
@ -12,6 +13,10 @@ export function AccountRoute(): React.ReactElement {
const accounts = useAccounts();
const account = accounts.get(Number(accountId));
const reload = async () => {
accounts.reloadBalances();
};
if (account === null) return <NotFoundRoute />;
return (
@ -30,6 +35,7 @@ export function AccountRoute(): React.ReactElement {
}
>
TODO : table
<NewMovementWidget account={account} onCreated={reload} />
</MoneyMgrWebRouteContainer>
);
}