fisk/core/templates/partials/profit-list.html

33 lines
858 B
HTML
Raw Normal View History

{% include 'partials/notify.html' %}
<table
class="table is-fullwidth is-hoverable"
hx-target="#{{ context_object_name }}-table"
id="{{ context_object_name }}-table"
hx-swap="outerHTML"
hx-trigger="{{ context_object_name_singular }}Event from:body, every 3s"
hx-get="{{ list_url }}">
<thead>
<th>id</th>
<th>name</th>
<th>P/L</th>
2022-12-08 07:20:46 +00:00
<th>trade</th>
<th>balance</th>
<th>currency</th>
</thead>
{% for item in object_list %}
2022-11-29 07:20:39 +00:00
<tr class="
{% if item.pl > 0 %}has-background-success-light
{% elif item.pl < 0 %}has-background-danger-light
{% endif %}">
<td>{{ item.account.id }}</td>
<td>{{ item.account.name }}</td>
<td>{{ item.pl }}</td>
2022-12-08 07:20:46 +00:00
<td>{{ item.unrealizedPL }}</td>
<td>{{ item.balance }}</td>
<td>{{ item.currency }}</td>
</tr>
{% endfor %}
</table>