Compare commits
	
		
			2 Commits
		
	
	
		
			308505a588
			...
			73ea4b4040
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 73ea4b4040 | |||
| 07e19bd89f | 
							
								
								
									
										185
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										185
									
								
								main.go
									
									
									
									
									
								
							@@ -412,6 +412,7 @@ const htmlTemplate = `
 | 
			
		||||
	<meta charset="UTF-8">
 | 
			
		||||
	<title>Abgabe-Berechnung</title>
 | 
			
		||||
	<link href="/static/css/bootstrap.min.css" rel="stylesheet">
 | 
			
		||||
	<script src="/static/js/bootstrap.bundle.min.js"></script>
 | 
			
		||||
</head>
 | 
			
		||||
<body class="bg-light">
 | 
			
		||||
	<div class="container mt-5">
 | 
			
		||||
@@ -426,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>
 | 
			
		||||
 | 
			
		||||
@@ -467,27 +468,6 @@ const htmlTemplate = `
 | 
			
		||||
		</form>
 | 
			
		||||
		{{end}}
 | 
			
		||||
 | 
			
		||||
		<h4 class="mt-4">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>
 | 
			
		||||
 | 
			
		||||
		<hr />
 | 
			
		||||
 | 
			
		||||
		<h2 class="mb-3">Gespeicherte Einträge</h2>
 | 
			
		||||
		<table class="table table-striped table-bordered">
 | 
			
		||||
@@ -543,62 +523,113 @@ const htmlTemplate = `
 | 
			
		||||
 | 
			
		||||
		<hr />
 | 
			
		||||
 | 
			
		||||
		<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 entgültige Entscheidung über die Verteilung obliegt der Orga-Leitung.			
 | 
			
		||||
		<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>
 | 
			
		||||
 | 
			
		||||
			<!-- 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>
 | 
			
		||||
 | 
			
		||||
			<!-- 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>
 | 
			
		||||
 | 
			
		||||
		<h4 class="mt-4">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>
 | 
			
		||||
 | 
			
		||||
		<h4 class="mt-4">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>
 | 
			
		||||
		
 | 
			
		||||
		{{if .LoggedIn}}
 | 
			
		||||
		<form action="/reset" method="POST" onsubmit="return confirm('Alle Einträge wirklich löschen?')">
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								static/js/bootstrap.bundle.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								static/js/bootstrap.bundle.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Reference in New Issue
	
	Block a user