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