Fix audit findings: budget editing, dead code, logging, multi-currency
- Add budget editing: updateBudget() API, edit button on budget cards, BudgetFormModal adapted for create/update (category locked on edit) - Remove permanently-broken POST /auth/totp/verify stub and its unused TOTPVerifyRequest schema - Wire getHoldingTransactions() to AssetDetail page — transaction history table now shows above the candlestick chart, sorted newest-first - Fix multi-currency net worth in account_service: account balances are now converted to base_currency via ExchangeRate table before summing - Replace silent bare pass exception handlers with logger.warning() in transactions.py (OCR/AI pipeline) and price_feed_service.py (search) — ValueError in date/number regex parsing left silent (control flow) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
312594f3d2
commit
8ef3bb2965
9 changed files with 181 additions and 64 deletions
|
|
@ -60,6 +60,21 @@ export async function createBudget(data: BudgetCreate): Promise<Budget> {
|
|||
return r.data;
|
||||
}
|
||||
|
||||
export interface BudgetUpdate {
|
||||
name?: string;
|
||||
amount?: number;
|
||||
period?: "weekly" | "monthly" | "quarterly" | "yearly";
|
||||
end_date?: string | null;
|
||||
rollover?: boolean;
|
||||
alert_threshold?: number;
|
||||
is_active?: boolean;
|
||||
}
|
||||
|
||||
export async function updateBudget(id: string, data: BudgetUpdate): Promise<Budget> {
|
||||
const r = await api.put(`/budgets/${id}`, data);
|
||||
return r.data;
|
||||
}
|
||||
|
||||
export async function deleteBudget(id: string): Promise<void> {
|
||||
await api.delete(`/budgets/${id}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue