FIX: warnings
This commit is contained in:
parent
67807992bc
commit
c32ecbff8f
57 changed files with 1898 additions and 21 deletions
51
internal/server/templates/orders.gohtml
Normal file
51
internal/server/templates/orders.gohtml
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
|
||||
{{define "title"}}
|
||||
Orders
|
||||
{{end}}
|
||||
{{define "main"}}
|
||||
<main>
|
||||
<form class="search-container" hx-get="/orders/search" hx-target="#results-table", hx-trigger="keyup delay:500ms, change">
|
||||
<input type="search" name="q" placeholder="Search orders...">
|
||||
|
||||
<label for="from">form</label>
|
||||
<input type="date" value="{{.Today}}" id="from" name="from">
|
||||
<label for="from">to</label>
|
||||
<input type="date" value="{{.Today}}" id="to" name="to">
|
||||
|
||||
<div class="htmx-indicator">
|
||||
Searching...
|
||||
</div>
|
||||
|
||||
<div id="results-table">
|
||||
{{template "orders-table" .Orders}}
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
{{end}}
|
||||
|
||||
{{define "orders-table"}}
|
||||
<table id="orders_table">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th>Surname</th>
|
||||
<th>Phone</th>
|
||||
<th>Location</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
<th>Total</th>
|
||||
</tr>
|
||||
{{range .}}
|
||||
<tr>
|
||||
<th><a href="/order/{{.ID}}">edit</a></th>
|
||||
<th>{{.Name}}</th>
|
||||
<th>{{.Surname}}</th>
|
||||
<th>{{.Phone}}</th>
|
||||
<th>{{.Location}}</th>
|
||||
<th>{{.Date.Format "2006-01-02"}}</th>
|
||||
<th>{{.Status}}</th>
|
||||
<th>{{.Total}}</th>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
{{end}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue