Calculate treatment cadence by year

This commit is contained in:
Eli Ribble 2025-11-21 17:26:49 +00:00
parent 689cc0319d
commit 009dc29e5d
No known key found for this signature in database
3 changed files with 200 additions and 69 deletions

View file

@ -250,7 +250,24 @@
<div class="card mb-4">
<div class="card-body">
<div class="table-responsive">
<p>Estimated Treatment Cadence: {{.TreatmentCadence|timeInterval}}</p>
<table class="table table-striped">
<tbody>
<tr>
<th>Year</th>
<th>Start</th>
<th>End</th>
<th>Interval</th>
</tr>
{{ range .TreatmentModels }}
<tr>
<td>{{.Year}}</td>
<td>{{.SeasonStart|timeAsRelativeDate}}</td>
<td>{{.SeasonEnd|timeAsRelativeDate}}</td>
<td>{{.Interval|timeInterval}}</td>
</tr>
{{ end }}
</tbody>
</table>
<table class="table table-striped table-hover">
<thead>
<tr>
@ -316,7 +333,7 @@
<tbody>
<tr>
<td class="info-label">Trap ID:</td>
<td>{{ .ID }}</td>
<td><a href="/trap/{{.ID}}">{{ .ID }}</a></td>
</tr>
<tr>
<td class="info-label">Distance</td>