Umstellung auf Tab-Container
All checks were successful
release-tag / release-image (push) Successful in 2m13s

This commit is contained in:
2025-07-23 22:59:29 +02:00
parent 07e19bd89f
commit 73ea4b4040

208
main.go
View File

@@ -427,7 +427,7 @@ const htmlTemplate = `
</div>
<h1 class="mb-4">Beitrag zur Community vom Mitglied der Trading-Staffel ({{.Member}})</h1>
<div class="alert alert-light">
<div class="alert alert-info">
<strong>Folgender Wert wurde erwirtschaftet und wird bald zur Verfügung gestellt:</strong> {{formatNumber .OffeneSumme}} UEC
</div>
@@ -523,117 +523,111 @@ const htmlTemplate = `
<hr />
<div class="mt-4">
<p>
<a class="btn btn-outline-secondary" data-bs-toggle="collapse" href="#monatsUebersicht" role="button" aria-expanded="false" aria-controls="monatsUebersicht">
Monatliche Übersicht anzeigen
</a>
</p>
<div class="collapse" id="monatsUebersicht">
<div class="card card-body">
<h4 class="mb-3">Monatliche Übersicht</h4>
<table class="table table-bordered">
<thead>
<tr>
<th>Monat</th>
<th>Abgaben verteilt</th>
<th>Abgaben offen</th>
</tr>
</thead>
<tbody>
{{range .Monatsstatistik}}
<tr>
<td>{{.Monat}}</td>
<td>{{formatNumber .Summe}} UEC</td>
<td>{{formatNumber .SummeOffen}} UEC</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<h4 class="mt-5">Auswertungen</h4>
<ul class="nav nav-tabs" id="auswertungTabs" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="monat-tab" data-bs-toggle="tab" data-bs-target="#monat" type="button" role="tab" aria-controls="monat" aria-selected="true">
Monatliche Übersicht
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="abteilung-tab" data-bs-toggle="tab" data-bs-target="#abteilung" type="button" role="tab" aria-controls="abteilung" aria-selected="false">
Verteilung auf Abteilungen
</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="items-tab" data-bs-toggle="tab" data-bs-target="#items" type="button" role="tab" aria-controls="items" aria-selected="false">
Gegenwert in Items
</button>
</li>
</ul>
<div class="tab-content border border-top-0 p-4 bg-white" id="auswertungTabsContent">
<!-- Monatliche Übersicht -->
<div class="tab-pane fade show active" id="monat" role="tabpanel" aria-labelledby="monat-tab">
<h5 class="mb-3">Monatliche Übersicht</h5>
<table class="table table-bordered">
<thead>
<tr>
<th>Monat</th>
<th>Abgaben verteilt</th>
<th>Abgaben offen</th>
</tr>
</thead>
<tbody>
{{range .Monatsstatistik}}
<tr>
<td>{{.Monat}}</td>
<td>{{formatNumber .Summe}} UEC</td>
<td>{{formatNumber .SummeOffen}} UEC</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
<hr />
<div class="mt-4">
<p>
<a class="btn btn-outline-secondary" data-bs-toggle="collapse" href="#verteilungAbteilungen" role="button" aria-expanded="false" aria-controls="verteilungAbteilungen">
Verteilung auf Abteilungen anzeigen
</a>
</p>
<div class="collapse" id="verteilungAbteilungen">
<div class="card card-body">
<div class="alert alert-info">
<strong>Die tatsächlichen Werte können abweichen.</strong> Die dargestellten Werte sind meine Vorstellung einer sinnvollen Verteilung.<br>
Die Summe wird an die Orga-Leitung entrichtet. Die endgültige Entscheidung über die Verteilung obliegt der Orga-Leitung.
</div>
<h4 class="mb-3">Verteilung auf Abteilungen:</h4>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Abteilung</th>
<th>Verteilungsschlüssel</th>
<th>Summe verteilt</th>
<th>Summe offen</th>
</tr>
</thead>
<tbody>
{{range .Abteilungen}}
<tr>
<td>{{.Name}}</td>
<td>{{formatNumber .Anteil}}%</td>
<td>{{formatNumber .Wert}} UEC</td>
<td>{{formatNumber .WertOffen}} UEC</td>
</tr>
{{end}}
</tbody>
</table>
<!-- Verteilung auf Abteilungen -->
<div class="tab-pane fade" id="abteilung" role="tabpanel" aria-labelledby="abteilung-tab">
<div class="alert alert-info">
<strong>Die tatsächlichen Werte können abweichen.</strong> Die dargestellten Werte sind meine Vorstellung einer sinnvollen Verteilung.<br>
Die Summe wird an die Orga-Leitung entrichtet. Die endgültige Entscheidung über die Verteilung obliegt der Orga-Leitung.
</div>
<h5 class="mb-3">Verteilung auf Abteilungen:</h5>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Abteilung</th>
<th>Verteilungsschlüssel</th>
<th>Summe verteilt</th>
<th>Summe offen</th>
</tr>
</thead>
<tbody>
{{range .Abteilungen}}
<tr>
<td>{{.Name}}</td>
<td>{{formatNumber .Anteil}}%</td>
<td>{{formatNumber .Wert}} UEC</td>
<td>{{formatNumber .WertOffen}} UEC</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
<div class="mt-4">
<p>
<a class="btn btn-outline-secondary" data-bs-toggle="collapse" href="#gegenwertItems" role="button" aria-expanded="false" aria-controls="gegenwertItems">
Gegenwert in Items anzeigen
</a>
</p>
<div class="collapse" id="gegenwertItems">
<div class="card card-body">
<h4 class="mb-3">Gegenwert in Items:</h4>
<table class="table table-bordered">
<thead>
<tr>
<th>Abteilung</th>
<th>Beispiel</th>
<th>Wert pro Item</th>
<th>Summe verteilt</th>
<th>Menge</th>
</tr>
</thead>
<tbody>
{{range .Abteilungen}}
<tr>
<td>{{.Name}}</td>
<td>{{.Beispiel}}</td>
<td>{{formatNumber .WertItem}} UEC</td>
<td>{{formatNumber .Wert}} UEC</td>
<td>
{{if gt .WertItem 0.0}}
{{formatNumber (div .Wert .WertItem)}}
{{else}}
-
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<!-- Gegenwert in Items -->
<div class="tab-pane fade" id="items" role="tabpanel" aria-labelledby="items-tab">
<h5 class="mb-3">Gegenwert in Items:</h5>
<table class="table table-bordered">
<thead>
<tr>
<th>Abteilung</th>
<th>Beispiel</th>
<th>Wert pro Item</th>
<th>Summe verteilt</th>
<th>Menge</th>
</tr>
</thead>
<tbody>
{{range .Abteilungen}}
<tr>
<td>{{.Name}}</td>
<td>{{.Beispiel}}</td>
<td>{{formatNumber .WertItem}} UEC</td>
<td>{{formatNumber .Wert}} UEC</td>
<td>
{{if gt .WertItem 0.0}}
{{formatNumber (div .Wert .WertItem)}}
{{else}}
-
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>