dashboard: scaffold portfolio edit-mode markup
This commit is contained in:
parent
30e565909f
commit
9ed78f2758
1 changed files with 51 additions and 0 deletions
|
|
@ -48,8 +48,58 @@
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
<span class="title">Portfolio</span>
|
<span class="title">Portfolio</span>
|
||||||
<span class="meta">held locally · prices via /api/universe</span>
|
<span class="meta">held locally · prices via /api/universe</span>
|
||||||
|
<button type="button" id="pf-edit-btn" class="pf-edit-btn"
|
||||||
|
title="Add or remove positions" aria-pressed="false">
|
||||||
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none"
|
||||||
|
stroke="currentColor" stroke-width="2" aria-hidden="true">
|
||||||
|
<path d="M12 20h9"/>
|
||||||
|
<path d="M16.5 3.5a2.121 2.121 0 1 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/>
|
||||||
|
</svg>
|
||||||
|
<span class="pf-edit-btn__label">Edit</span>
|
||||||
|
</button>
|
||||||
|
<button type="button" id="pf-done-btn" class="pf-done-btn" hidden>Done</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
<div id="pf-add-form" class="pf-add-form" hidden>
|
||||||
|
<div class="pf-add-row">
|
||||||
|
<label class="pf-add-field">
|
||||||
|
<span class="pf-add-label">Ticker</span>
|
||||||
|
<input type="text" id="pf-add-ticker" autocomplete="off"
|
||||||
|
spellcheck="false" maxlength="32" placeholder="AAPL">
|
||||||
|
<span id="pf-add-ticker-status" class="pf-add-status"></span>
|
||||||
|
</label>
|
||||||
|
<label class="pf-add-field">
|
||||||
|
<span class="pf-add-label">Quantity</span>
|
||||||
|
<input type="number" id="pf-add-qty" min="0" step="any" placeholder="100">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="pf-add-row pf-add-cost-mode">
|
||||||
|
<label class="pf-add-radio">
|
||||||
|
<input type="radio" name="pf-cost-mode" value="avg" checked>
|
||||||
|
Avg cost per share
|
||||||
|
</label>
|
||||||
|
<label class="pf-add-radio">
|
||||||
|
<input type="radio" name="pf-cost-mode" value="date">
|
||||||
|
Bought on date
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="pf-add-row">
|
||||||
|
<label class="pf-add-field" id="pf-add-date-field" hidden>
|
||||||
|
<span class="pf-add-label">Acquisition date</span>
|
||||||
|
<input type="date" id="pf-add-date">
|
||||||
|
<span id="pf-add-date-status" class="pf-add-status"></span>
|
||||||
|
</label>
|
||||||
|
<label class="pf-add-field">
|
||||||
|
<span class="pf-add-label">Cost per share</span>
|
||||||
|
<input type="number" id="pf-add-cost" min="0" step="any" placeholder="150.25">
|
||||||
|
<span id="pf-add-cost-currency" class="pf-add-currency"></span>
|
||||||
|
</label>
|
||||||
|
<button type="button" id="pf-add-submit" class="pf-add-submit" disabled>
|
||||||
|
+ Add
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div id="pf-add-warning" class="pf-add-warning" hidden></div>
|
||||||
|
</div>
|
||||||
<div id="pf-mount">
|
<div id="pf-mount">
|
||||||
<div class="empty">loading…</div>
|
<div class="empty">loading…</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -57,6 +107,7 @@
|
||||||
</section>
|
</section>
|
||||||
<script src="{{ url_for('static', path='/js/portfolio-sync.js') }}" defer></script>
|
<script src="{{ url_for('static', path='/js/portfolio-sync.js') }}" defer></script>
|
||||||
<script src="{{ url_for('static', path='/js/portfolio.js') }}" defer></script>
|
<script src="{{ url_for('static', path='/js/portfolio.js') }}" defer></script>
|
||||||
|
<script src="{{ url_for('static', path='/js/portfolio_edit.js') }}" defer></script>
|
||||||
|
|
||||||
<section id="log-panel" class="panel">
|
<section id="log-panel" class="panel">
|
||||||
<div class="panel-header">
|
<div class="panel-header">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue