fix drone and sqlc generation
Some checks failed
continuous-integration/drone/push Build was killed

This commit is contained in:
2026-01-13 19:49:13 +11:00
parent ea1eeb5c21
commit a81613a8c2
28 changed files with 3718 additions and 288 deletions

View File

@@ -0,0 +1,47 @@
package views
import (
"vctp/components/core"
)
type SnapshotEntry struct {
Label string
Link string
}
templ SnapshotHourlyList(entries []SnapshotEntry) {
@SnapshotListPage("Hourly Inventory Snapshots", "inventory snapshots captured hourly", entries)
}
templ SnapshotDailyList(entries []SnapshotEntry) {
@SnapshotListPage("Daily Inventory Snapshots", "daily summaries of hourly inventory snapshots", entries)
}
templ SnapshotMonthlyList(entries []SnapshotEntry) {
@SnapshotListPage("Monthly Inventory Snapshots", "monthly summary aggregated from daily snapshots", entries)
}
templ SnapshotListPage(title string, subtitle string, entries []SnapshotEntry) {
<!DOCTYPE html>
<html lang="en">
@core.Header()
<body class="flex flex-col min-h-screen">
<main class="flex-grow">
<div>
<h1 class="text-4xl font-bold">{title}</h1>
<p class="mt-2 text-gray-600">{subtitle}</p>
<ul class="mt-6 space-y-2">
for _, entry := range entries {
<li>
<a class="text-blue-600 hover:underline" href={entry.Link}>
{entry.Label}
</a>
</li>
}
</ul>
</div>
</main>
</body>
@core.Footer()
</html>
}