feat(go): M6.4 — Go-native /payments page (grouped-by-person ledger)
All checks were successful
Deploy to K8s / deploy (push) Successful in 6s
All checks were successful
Deploy to K8s / deploy (push) Successful in 6s
- Extract AssemblePayments(ctx) from ServePayments in api/handler.go, mirroring the AssembleAdults/AssembleJuniors pattern - Add PaymentsPageData view-model wrapper in render.go - Rewire html_handler.go ServePayments to call AssemblePayments and render with PaymentsPageData - Replace payments.tmpl placeholder with real grouped-by-person ledger: alphabetical member blocks, txn-table (Date/Amount/Purpose/Message), newest-first rows, Unmatched/Unknown bucket - Append ledger CSS classes to app.css (.ledger-container, .member-block, .txn-table, .txn-date/amount/purpose/message, tr:hover) - Add TestPaymentsPage markup test Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,38 @@
|
||||
{{define "title"}}Payments Ledger{{end}}
|
||||
{{define "content"}}
|
||||
<h1>Payments Ledger</h1>
|
||||
<p class="description">Coming in M6.4</p>
|
||||
<p class="description">
|
||||
All bank transactions from the
|
||||
<a href="{{.Data.PaymentsURL}}" target="_blank">payments sheet</a>,
|
||||
grouped by member. Names are matched against the
|
||||
<a href="{{.Data.AttendanceURL}}" target="_blank">attendance sheet</a>.
|
||||
</p>
|
||||
{{if .Error}}<p class="error">{{.Error}}</p>{{end}}
|
||||
<div class="ledger-container">
|
||||
{{range $person := .Data.SortedPeople}}
|
||||
<div class="member-block">
|
||||
<h2>{{$person}}</h2>
|
||||
<table class="txn-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="txn-date">Date</th>
|
||||
<th class="txn-amount">Amount</th>
|
||||
<th class="txn-purpose">Purpose</th>
|
||||
<th class="txn-message">Bank Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range $tx := index $.Data.GroupedPayments $person}}
|
||||
<tr>
|
||||
<td class="txn-date">{{$tx.Date}}</td>
|
||||
<td class="txn-amount">{{printf "%.0f" $tx.Amount}} CZK</td>
|
||||
<td class="txn-purpose">{{$tx.Purpose}}</td>
|
||||
<td class="txn-message">{{$tx.Message}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user