mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-11 05:06:52 +00:00
54 lines
1 KiB
Text
54 lines
1 KiB
Text
package view
|
|
|
|
import (
|
|
"github.com/rjNemo/rentease/internal/view/layout"
|
|
)
|
|
|
|
type ListBookingsViewModel struct {
|
|
Id string
|
|
Url templ.SafeURL
|
|
From string
|
|
To string
|
|
Total string
|
|
Name string
|
|
Platform string
|
|
}
|
|
|
|
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>{ b.Name }</td>
|
|
<td>{ b.Total }</td>
|
|
<td>{ b.From }</td>
|
|
<td>{ b.To }</td>
|
|
<td>{ b.Platform }</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
}
|
|
}
|