fix(go): align adults cell class names with Python; un-underline Pay buttons
All checks were successful
Deploy to K8s / deploy (push) Successful in 10s
All checks were successful
Deploy to K8s / deploy (push) Successful in 10s
- Map unpaid|partial → cell-unpaid (or cell-unpaid-current for current month) and surplus → cell-overridden, matching Python's Jinja logic; avoids emitting non-existent cell-partial/cell-surplus classes that caused Pay buttons to escape the table. - Add text-decoration: none to .pay-btn so anchor-based Pay links don't show the default underline. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
<td class="member-name">{{$row.Name}}</td>
|
||||
{{range $i, $cell := $row.Months}}
|
||||
<td data-month-idx="{{$i}}" title="{{$cell.Tooltip}}"
|
||||
class="cell-{{$cell.Status}}{{if and (or (eq $cell.Status "unpaid") (eq $cell.Status "partial")) (ge $cell.RawMonth $.Data.CurrentMonth)}} cell-unpaid-current{{end}}{{if $cell.Overridden}} cell-overridden{{end}}">
|
||||
class="{{if eq $cell.Status "empty"}}cell-empty{{else if and (or (eq $cell.Status "unpaid") (eq $cell.Status "partial")) (ge $cell.RawMonth $.Data.CurrentMonth)}}cell-unpaid-current{{else if or (eq $cell.Status "unpaid") (eq $cell.Status "partial")}}cell-unpaid{{else if eq $cell.Status "ok"}}cell-ok{{end}}{{if $cell.Overridden}} cell-overridden{{end}}">
|
||||
{{$cell.Text}}
|
||||
{{if and (or (eq $cell.Status "unpaid") (eq $cell.Status "partial")) (lt $cell.RawMonth $.Data.CurrentMonth)}}
|
||||
<a class="pay-btn" href="{{qrHref $.Data.BankAccount $cell.Amount $row.Name $cell.RawMonth}}">Pay</a>
|
||||
@@ -77,7 +77,7 @@
|
||||
<tr class="totals-row" style="font-weight: bold; background-color: #111; border-top: 2px solid #333;">
|
||||
<td style="text-align: left; padding: 6px 8px;">TOTAL</td>
|
||||
{{range $i, $t := .Data.Totals}}
|
||||
<td data-month-idx="{{$i}}" data-raw-month="{{index $.Data.RawMonths $i}}" class="cell-{{$t.Status}}" style="padding-top: 4px; padding-bottom: 4px;">
|
||||
<td data-month-idx="{{$i}}" data-raw-month="{{index $.Data.RawMonths $i}}" class="{{if eq $t.Status "ok"}}cell-ok{{else if eq $t.Status "unpaid"}}cell-unpaid{{else if eq $t.Status "surplus"}}cell-overridden{{end}}" style="padding-top: 4px; padding-bottom: 4px;">
|
||||
<span style="font-size: 0.6em; font-weight: normal; color: #666; text-transform: lowercase; display: block; margin-bottom: 2px;">received / expected</span>
|
||||
{{$t.Text}}
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user