mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-06 02:36:49 +00:00
35 lines
744 B
Text
35 lines
744 B
Text
package view
|
|
|
|
templ ItemList(itemList ItemListViewModel) {
|
|
<tbody id="line-items">
|
|
for _, item := range itemList.Items {
|
|
@LineItem(&item)
|
|
}
|
|
</tbody>
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th></th>
|
|
<th>Price (€)</th>
|
|
<th>Payment Method</th>
|
|
<th>Sub-total (€)</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
if len(itemList.Payments) >0 {
|
|
for _,payment := range itemList.Payments {
|
|
<tr class="hover">
|
|
<td></td>
|
|
<td></td>
|
|
<td>- { payment.Amount }</td>
|
|
<td>{ payment.PaymentMethod }</td>
|
|
<td></td>
|
|
<td class="flex gap-2">
|
|
<button class="btn btn-sm btn-outline" hx-get={ payment.PaymentUrl } hx-target="closest tr" hx-swap="outerHTML">Edit</button>
|
|
</td>
|
|
</tr>
|
|
}
|
|
}
|
|
</tbody>
|
|
}
|