trying to fix price
This commit is contained in:
parent
7feee7f8a3
commit
8194cea85e
10 changed files with 145 additions and 54 deletions
|
|
@ -47,14 +47,13 @@ templ OrdersMain(first, last string, orders []models.Order) {
|
|||
<span class="material-symbols-outlined">payments</span>
|
||||
Przychód (szac.)
|
||||
</span>
|
||||
<span class="metric-value">{ strconv.Itoa(estimateRevenue(orders)) } PLN</span>
|
||||
<span class="metric-value">{ estimateRevenue(orders).String() } PLN</span>
|
||||
<span class="metric-change positive">
|
||||
<span class="material-symbols-outlined">trending_up</span>
|
||||
W bieżącym miesiącu
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="card">
|
||||
<div class="card-header">
|
||||
<h2>
|
||||
|
|
@ -65,11 +64,11 @@ templ OrdersMain(first, last string, orders []models.Order) {
|
|||
<form hx-get="/orders/search" hx-target="#results-table" hx-trigger="keyup delay:500ms, change" style="display:flex;align-items:center;gap:8px">
|
||||
<div class="form-group" style="flex-direction:row;align-items:center;gap:4px">
|
||||
<label style="font-size:11px;white-space:nowrap">Od</label>
|
||||
<input class="form-input" style="width:140px" type="date" value={ first } name="from">
|
||||
<input class="form-input" style="width:140px" type="date" value={ first } name="from"/>
|
||||
</div>
|
||||
<div class="form-group" style="flex-direction:row;align-items:center;gap:4px">
|
||||
<label style="font-size:11px;white-space:nowrap">Do</label>
|
||||
<input class="form-input" style="width:140px" type="date" value={ last } name="to">
|
||||
<input class="form-input" style="width:140px" type="date" value={ last } name="to"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
@ -97,7 +96,7 @@ templ OrdersTable(orders []models.Order) {
|
|||
for _, o := range orders {
|
||||
<tr>
|
||||
<td><a href={ templ.URL("/order/" + strconv.Itoa(o.ID)) } class="order-id">#{ strconv.Itoa(o.ID) }</a></td>
|
||||
<td class="customer-name">{ o.Surname } { o.Name }<br /><span class="text-on-surface-variant" style="font-size:11px;font-weight:400">{ o.Phone }</span></td>
|
||||
<td class="customer-name">{ o.Surname } { o.Name }<br/><span class="text-on-surface-variant" style="font-size:11px;font-weight:400">{ o.Phone }</span></td>
|
||||
<td class="text-on-surface-variant">{ o.Date.Format("2006-01-02 15:04") }</td>
|
||||
<td>
|
||||
<span class="truncate" title={ cakeItemsDesc(o.Cakes) }>
|
||||
|
|
@ -109,7 +108,7 @@ templ OrdersTable(orders []models.Order) {
|
|||
}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-right" style="font-weight:700">{ strconv.Itoa(o.Total()) } PLN</td>
|
||||
<td class="text-right" style="font-weight:700">{ o.Total().String() } PLN</td>
|
||||
<td class="text-center">
|
||||
<span class={ "status-chip " + o.Status }>
|
||||
if o.Status == "accepted" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue