fix(go): show "Expected: ?" in junior tooltip for unknown fees

A junior month with one session has an unknown expected fee. When such
a month had a payment, the Go tooltip printed "Expected: 0" where
Python prints "Expected: ?", which made make parity fail on
/api/juniors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 12:37:03 +02:00
co-authored by Claude Opus 5.5
parent d5da993690
commit 294c40fa42
+6 -1
View File
@@ -242,7 +242,12 @@ func buildJuniorMemberRow(
tooltip := "" tooltip := ""
if (!md.IsUnknown && md.Expected > 0) || paid > 0 { if (!md.IsUnknown && md.Expected > 0) || paid > 0 {
tooltip = fmt.Sprintf("Received: %d, Expected: %d", paid, md.Expected) // Unknown expected (one session, manual review) shows as "?", as in Python.
expectedText := strconv.Itoa(md.Expected)
if md.IsUnknown {
expectedText = "?"
}
tooltip = fmt.Sprintf("Received: %d, Expected: %s", paid, expectedText)
} }
row.Months = append(row.Months, MonthCell{ row.Months = append(row.Months, MonthCell{