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:
@@ -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{
|
||||||
|
|||||||
Reference in New Issue
Block a user