Change positions fields

This commit is contained in:
2022-11-02 18:24:56 +00:00
parent 8ee56b0e37
commit 396d838416
2 changed files with 10 additions and 6 deletions

View File

@@ -16,9 +16,9 @@
{% if item.unrealized_pl > 0 %}has-background-success-light
{% elif item.unrealized_pl < 0 %}has-background-danger-light
{% endif %}">
<td>{{ item.account_id }}</td>
<td>{{ item.account }}</td>
<td>{{ item.symbol }}</td>
<td>{{ item.current_price }}</td>
<td>{{ item.price }}</td>
<td>{{ item.qty }}</td>
<td>{{ item.market_value }}</td>
<td>{{ item.unrealized_pl }}</td>
@@ -51,7 +51,7 @@
</span>
</button>
{% if type == 'page' %}
<a href="{% url 'position_action' type=type account_id=item.account_id asset_id=item.asset_id %}">
<a href="{% url 'position_action' type=type account_id=item.account_id symbol=item.symbol %}">
<button
class="button is-success">
<span class="icon-text">
@@ -64,7 +64,7 @@
{% else %}
<button
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'
hx-get="{% url 'position_action' type=type account_id=item.account_id asset_id=item.asset_id %}"
hx-get="{% url 'position_action' type=type account_id=item.account_id symbol=item.symbol %}"
hx-trigger="click"
hx-target="#{{ type }}s-here"
hx-swap="innerHTML"