package templates import ( "fmt" "portfolio-tracker/internal/model" "portfolio-tracker/internal/web/templates/components" ) templ PortfolioDetailContent(portfolio model.Portfolio) {
| Wertpapier | Anzahl | Ø Einkaufspreis | Aktueller Wert | +/- Gesamt | |
|---|---|---|---|---|---|
| Position calculation will be implemented here | |||||
| Keine Positionen vorhanden. Fügen Sie Ihre erste Transaktion hinzu. | |||||
| Datum | Typ | Wertpapier | Anzahl | Preis | Preis ({ portfolio.BaseCurrency }) | Gesamt | Gesamt ({ portfolio.BaseCurrency }) | |
|---|---|---|---|---|---|---|---|---|
| { activity.Date.Format("02.01.2006") } | if activity.Type == "BUY" { Kauf } else if activity.Type == "SELL" { Verkauf } else if activity.Type == "DIVIDEND" { Dividende } else { { string(activity.Type) } } | { activity.Stock } | { fmt.Sprintf("%.3f", activity.Amount) } | { fmt.Sprintf("%.2f %s", activity.Price, activity.Currency) } | if activity.Currency != portfolio.BaseCurrency { { getConvertedPrice(activity, portfolio.BaseCurrency) } } else { - } | { fmt.Sprintf("%.2f %s", activity.Amount * activity.Price, activity.Currency) } | if activity.Currency != portfolio.BaseCurrency { { getConvertedTotalWithFallbackInfo(activity, portfolio.BaseCurrency) } } else { - } |
|
| Keine Transaktionen vorhanden | ||||||||
Allokations-Chart wird hier implementiert