mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-10 20:56:50 +00:00
50 lines
1 KiB
Text
50 lines
1 KiB
Text
package view
|
|
|
|
import "github.com/rjNemo/rentease/internal/view/layout"
|
|
|
|
templ ListBookings(bookings []*ListBookingsViewModel) {
|
|
@layout.BaseLayout() {
|
|
<hgroup>
|
|
<h1>Bookings </h1>
|
|
<h2>Overview of the activity</h2>
|
|
</hgroup>
|
|
<div class="overflow-auto">
|
|
<table class="striped">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">ID</th>
|
|
<th scope="col">Name</th>
|
|
<th scope="col">Total (€)</th>
|
|
<th scope="col">From</th>
|
|
<th scope="col">To</th>
|
|
<th scope="col">Platform</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
for _, b := range bookings {
|
|
<tr>
|
|
<th scope="row">
|
|
<a href={ b.Url }>
|
|
{ b.Id }
|
|
</a>
|
|
</th>
|
|
<td>
|
|
<span
|
|
if b.Canceled {
|
|
style="text-decoration: line-through;"
|
|
}
|
|
>
|
|
{ b.Name }
|
|
</span>
|
|
</td>
|
|
<td>{ b.Total }</td>
|
|
<td>{ b.From }</td>
|
|
<td>{ b.To }</td>
|
|
<td>{ b.Platform }</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
}
|
|
}
|