mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-06 02:36:49 +00:00
53 lines
1.1 KiB
Text
53 lines
1.1 KiB
Text
package views
|
|
|
|
type ReportViewModel struct {
|
|
Id string
|
|
Url templ.SafeURL
|
|
Total string
|
|
CustomerName string
|
|
From string
|
|
To string
|
|
Platform string
|
|
PlatformFees string
|
|
}
|
|
|
|
templ ReportSection(report []*ReportViewModel) {
|
|
<div class="grid">
|
|
<h2>Your report </h2>
|
|
<div>
|
|
<button class="outline">Create PDF</button>
|
|
</div>
|
|
</div>
|
|
<div class="overflow-auto">
|
|
<table role="grid">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">ID</th>
|
|
<th scope="col">Name</th>
|
|
<th scope="col">From</th>
|
|
<th scope="col">To</th>
|
|
<th scope="col">Total (€)</th>
|
|
<th scope="col">Platform</th>
|
|
<th scope="col">Platform Fees</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
for _, row := range report {
|
|
<tr>
|
|
<th scope="row">
|
|
<a href={ row.Url }>
|
|
{ row.Id }
|
|
</a>
|
|
</th>
|
|
<td>{ row.CustomerName }</td>
|
|
<td>{ row.From }</td>
|
|
<td>{ row.To }</td>
|
|
<td>{ row.Total }</td>
|
|
<td>{ row.Platform }</td>
|
|
<td>{ row.PlatformFees }</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
}
|