Recount-Server/web/templates/new_transaction_pane.templ

39 lines
1.5 KiB
Text

package templates
import "nickiel.net/recount_server/types"
import "strconv"
templ NewTransactionPane(entry_types *[]types.QuickTransactionType, acnts *[]types.Account) {
<div id="new-transaction-pane" style="opacity: 0;" class="cr-all c-base d-flex-col">
<div class="my-2 d-flex">
<h2 class="ms-5">New Transaction</h2>
<button class="ms-auto me-4 my-auto exit-btn" id="close-transaction-pane">
<i class="my-auto" data-feather="x"></i>
</button>
</div>
<div class="d-flex ms-5" style="overflow-x: scroll;">
for _, value := range *entry_types {
<button class="borderless-btn btn-sm mx-3">
{value.DisplayName}
</button>
}
</div>
<div class="c-mantle cr-all m-5 d-flex" style="height:85%">
<div class="p-5 mx-auto">
<label for="acnt-selection" id="acnt-selection-label">Account: </label>
<select class="ms-2 select light border" id="acnt-selection" value="">
for _, value := range *acnts {
<option value={strconv.Itoa(value.Id)}>{value.DisplayName.String}</option>
}
</select>
</div>
<div class="p-5 mx-auto">
<label for="acnt-date" id="data-selection-label">Date: </label>
<input id="acnt-date" type="date" />
</div>
</div>
</div>
}