05/31 Phase 5

This commit is contained in:
2026-05-31 16:49:18 -04:00
parent 9c846159ef
commit b3d495e57c
9 changed files with 793 additions and 2 deletions
+6 -1
View File
@@ -6,6 +6,7 @@ from app.models.account import Account
from app.models.transaction import Transaction
from app.models.category import Category
from app.services.fx_service import get_today_rate, get_rate_history
from app.services.ai_service import get_latest_daily_insight
from app.services.account_service import get_total_assets, get_total_liabilities
from datetime import date, datetime, timedelta
import calendar
@@ -127,6 +128,9 @@ def index():
'rates': [float(r.usd_to_vnd) for r in fx_history],
}
# ── AI insight ──────────────────────────────────────
ai_insight = get_latest_daily_insight()
return render_template('dashboard/index.html',
period=period,
period_label=period_label,
@@ -145,7 +149,8 @@ def index():
chart_expense=chart_expense,
recent_txns=recent_txns,
fx=fx,
fx_history_data=fx_history_data)
fx_history_data=fx_history_data,
ai_insight=ai_insight)
@dashboard_bp.route('/api/fx-history')