Can create movements from UI
This commit is contained in:
@ -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>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user