diff --git a/frontend/src/api/portfolio.ts b/frontend/src/api/portfolio.ts index 9724278..edc011b 100644 --- a/frontend/src/api/portfolio.ts +++ b/frontend/src/api/portfolio.ts @@ -132,30 +132,47 @@ export type WealthDiagnostic = { action: string reason_code: string prominent: boolean } export type ModelledValueQuality = 'confirmed' | 'modelled' | 'carried' | 'incomplete' | 'unavailable' +export type WealthChartPeriod = '1m' | '3m' | 'ytd' | '1y' | 'all' +export type WealthComponentKey = 'postfinance' | 'truewealth' | 'crypto' | 'bank_cash' | 'other_assets' +export type ModelledWealthPoint = { + date: string + value_chf: string + quality: ModelledValueQuality + has_confirmed_anchor: boolean + has_modelled_value: boolean + excluded_account_count: number + components: Array<{ key: WealthComponentKey; label: string; value_chf: string | null; quality: ModelledValueQuality; source_date: string | null }> + event?: string | null + event_label?: string | null + correction_event?: string | null + events?: string[] +} +export type PortfolioAnalysisStatus = 'complete' | 'partial' | 'unavailable' +export type PortfolioAnalysis = { + status: PortfolioAnalysisStatus + allocation: Array<{ key: string; label: string; current_value_chf: string | null; current_pct: string | null; target_pct: string | null; lower_pct: string | null; upper_pct: string | null; deviation_pp: string | null; deviation_chf: string | null; status: string }> + concentrations: { top1_pct: string | null; top5_pct: string | null; top10_pct: string | null } + dimensions: Partial }>> + contributions: Array<{ key: string; label: string; value_chf: string | null; status?: string | null }> + hints: Array +} export type ModelledWealthDevelopment = { status: 'available' | 'unavailable' - period: { preset: 'since_anchor' | '1m' | '3m' | '1y' | 'all'; from: string; to: string } + period: { preset: 'since_anchor' | WealthChartPeriod; from: string; to: string } + last_confirmed_anchor_date?: string | null anchor: { date: string; value_chf: string; quality: ModelledValueQuality } | null baseline: { date: string; value_chf: string; quality: ModelledValueQuality } | null current: { date: string; value_chf: string; quality: ModelledValueQuality } | null change_chf: string | null change_pct: string | null chart_visible: boolean - points: Array<{ - date: string - value_chf: string - quality: ModelledValueQuality - has_confirmed_anchor: boolean - has_modelled_value: boolean - excluded_account_count: number - components: Array<{ key: 'postfinance' | 'truewealth' | 'crypto' | 'bank_cash'; label: string; value_chf: string | null; quality: ModelledValueQuality; source_date: string | null }> - }> - components: Array<{ key: 'postfinance' | 'truewealth' | 'crypto' | 'bank_cash'; label: string; current_value_chf: string | null; change_chf: string | null; change_pct: string | null; quality: ModelledValueQuality; as_of: string | null; unknown_account_count: number }> - correction_markers: Array<{ date: string; source_key: 'postfinance' | 'truewealth'; confirmed_value_chf: string; predecessor_model_value_chf: string; difference_chf: string }> + points: ModelledWealthPoint[] + components: Array<{ key: WealthComponentKey; label: string; current_value_chf: string | null; change_chf: string | null; change_pct: string | null; quality: ModelledValueQuality; as_of: string | null; unknown_account_count: number }> + correction_markers: Array<{ date: string; source_key: 'postfinance' | 'truewealth' | 'bank_cash'; confirmed_value_chf: string; predecessor_model_value_chf: string; difference_chf: string }> unknown_accounts: Array<{ key: string; label: string; reason_code: string }> method: 'modelled_wealth_daily_v1' disclaimer: string } export type VerifiedPerformanceSummary = { @@ -170,10 +187,11 @@ export type WealthCockpit = { scope_label: string not_net_worth: boolean period: { preset: 'since_anchor' | '1m' | '3m' | '1y' | 'ytd' | 'previous_year' | '12m' | 'all'; from: string; to: string } data_cutoff: string modelled_development: ModelledWealthDevelopment + portfolio_analysis?: PortfolioAnalysis | null verified_performance: VerifiedPerformanceSummary kpis: Array<{ key: string; label: string; value_chf?: string | null; value_pct?: string | null; value_date?: string | null; status: string }> totals: { captured_wealth_chf: string; investments_chf: string; bank_cash_chf: string; complete: boolean } history: { status: string; points: Array<{ at: string; value_chf: string }>; household_cashflow_events: Array<{ at: string; kind: string; amount_chf: string }>; investment_cashflow_events: Array<{ at: string; kind: string; amount: string }>; reason: string } distribution: Array<{ key: string; label: string; value_chf: string | null }> diff --git a/frontend/src/components/wealth/WealthCockpitPanel.vue b/frontend/src/components/wealth/WealthCockpitPanel.vue index 61d9841..fdddcec 100644 --- a/frontend/src/components/wealth/WealthCockpitPanel.vue +++ b/frontend/src/components/wealth/WealthCockpitPanel.vue @@ -5,19 +5,11 @@

Vermögen

Modellierte Wertentwicklung

Geschätzte Entwicklung aus bestätigten Ankern, gespeicherten Tagesbewertungen und fortgeschriebenen bekannten Kontoständen. Keine verifizierte TTWROR oder XIRR.

- +