Add ability to edit payees

This commit is contained in:
2021-12-28 20:40:53 +00:00
parent 5018e5b973
commit 1a4267186a
5 changed files with 55 additions and 25 deletions

View File

@ -36,11 +36,17 @@
<select name="category_id" class="form-control">
<option value="" {{if not $.Transaction.CategoryID.Valid}}selected{{end}}>-- none --</option>
{{range .Categories}}
<option
value="{{.ID}}"
{{if and $.Transaction.CategoryID.Valid (eq .ID $.Transaction.CategoryID.UUID)}}selected{{end}}
>{{.Group}} : {{.Name}}</option>
{{end}}
<option value="{{.ID}}" {{if and $.Transaction.CategoryID.Valid (eq .ID $.Transaction.CategoryID.UUID)}}selected{{end}}>{{.Group}} : {{.Name}}</option>
{{- end}}
</select>
</div>
<div class="form-group">
<label for="payee_id">Payee</label>
<select name="payee_id" class="form-control">
<option value="" {{if not $.Transaction.PayeeID.Valid}}selected{{end}}>-- none --</option>
{{range .Payees}}
<option value="{{.ID}}" {{if and $.Transaction.PayeeID.Valid (eq .ID $.Transaction.PayeeID.UUID)}}selected{{end}}>{{.Name}}</option>
{{- end}}
</select>
</div>
<div class="form-group">