diff --git a/invest/templates/invest/dashboard.html b/invest/templates/invest/dashboard.html index a8f78a0..3bbc0c5 100644 --- a/invest/templates/invest/dashboard.html +++ b/invest/templates/invest/dashboard.html @@ -16,59 +16,59 @@
-
+

Total Value

{% if overview.this_week_total is not None %} -

${{ overview.this_week_total|floatformat:0 }}

+

${{ overview.this_week_total|floatformat:0 }}

{% else %} -

+

{% endif %} -

+

Across {{ overview.portfolio_count }} portfolio{{ overview.portfolio_count|pluralize }}

-
+

This Week

{% if overview.week_gain is not None %} -

+

{% if overview.week_gain >= 0 %}+{% endif %}${{ overview.week_gain|floatformat:0 }}

-

+

{% if overview.week_gain >= 0 %}+{% endif %}{{ overview.week_change_pct|floatformat:2 }}% vs last week

{% else %} -

-

No prior snapshot

+

+

No prior snapshot

{% endif %}
-
+

Week Change

{% if overview.week_change_pct is not None %} -

+

{% if overview.week_change_pct >= 0 %}+{% endif %}{{ overview.week_change_pct|floatformat:2 }}%

{% if overview.last_week_date %} -

Last: {{ overview.last_week_date|date:"M j" }}

+

Last: {{ overview.last_week_date|date:"M j" }}

{% endif %} {% else %} -

-

Need 2+ snapshots

+

+

Need 2+ snapshots

{% endif %}
-
+

Last Snapshot

{% if overview.this_week_date %} -

{{ overview.this_week_date|date:"M j" }}

-

{{ overview.this_week_date|date:"l, Y" }}

+

{{ overview.this_week_date|date:"M j" }}

+

{{ overview.this_week_date|date:"l, Y" }}

{% else %} -

-

No snapshots yet

+

+

No snapshots yet

{% endif %}
@@ -80,7 +80,7 @@

Performance vs Benchmarks

- +
{% endif %} @@ -120,29 +120,30 @@
+
- - - - - + + + + + {% for stock in group.holdings %} - - - + - - {% endfor %}
TickerQtyPriceWeek ChangeMkt ValueTickerWeek ChangeMkt Value
+ {{ stock.stock_code }} {{ stock.quantity|floatformat:0 }} + + {% if stock.value_change is not None %} {% if stock.value_change >= 0 %}+{% endif %}${{ stock.value_change|floatformat:0 }} ({% if stock.price_change_pct >= 0 %}+{% endif %}{{ stock.price_change_pct|floatformat:1 }}%) @@ -151,13 +152,14 @@ {% endif %} + {% if stock.current_value %}${{ stock.current_value|floatformat:0 }}{% else %}{% endif %}
+
{% endfor %}
@@ -168,34 +170,36 @@

Transaction History

+
- - - - - + + + + + {% for tx in recent_transactions %} - - - + + - - + + {% endfor %}
DatePortfolioActionTickerQtyDateActionTickerQty
{{ tx.date|date:"j M Y" }}{{ tx.portfolio.name }} + {{ tx.date|date:"j M Y" }} {% if tx.action == 'BUY' %} BUY {% else %} SELL {% endif %} {{ tx.stock_code }}{{ tx.quantity|floatformat:0 }}{{ tx.stock_code }}{{ tx.quantity|floatformat:0 }}
+
{% endif %} @@ -217,6 +221,7 @@ data: raw, options: { responsive: true, + aspectRatio: window.innerWidth < 640 ? 1.5 : 3.5, interaction: { mode: 'index', intersect: false }, plugins: { legend: {