Fix: sponsor columns now properly hide when 'Show referral earnings' is off

- Added .referral-col class to overview body <td>s (10% and cumulative columns)
- Added .referral-col class to timeline body <td>s (commission and cumulative)
- Added .referral-col class to 'Sponsor's Cumulative' header in both overview and timeline tables
- All sponsor columns now hide/show together via the checkbox toggle
This commit is contained in:
Marty Bostick
2026-07-30 21:39:16 +00:00
parent bc002de22e
commit 8178b72df2
+6 -6
View File
@@ -1297,7 +1297,7 @@
<th class="num">Their Gross Payout</th>
<th class="num">Their Net Profit</th>
<th class="num referral-col" id="headerYourCut">Sponsor's 10%</th>
<th class="num" id="headerCumulative">Sponsor's Cumulative</th>
<th class="num referral-col" id="headerCumulative">Sponsor's Cumulative</th>
</tr></thead><tbody id="overviewBody"></tbody></table>
</div>
</div>
@@ -1313,7 +1313,7 @@
<th>Month</th><th>Active Phase</th>
<th class="num">Their Profit This Month</th>
<th class="num referral-col" id="headerTimelineComm">Sponsor's Commission/Month</th>
<th class="num" id="headerTimelineCum">Sponsor's Cumulative</th>
<th class="num referral-col" id="headerTimelineCum">Sponsor's Cumulative</th>
</tr></thead><tbody id="timelineBody"></tbody></table>
</div>
</div>
@@ -1751,8 +1751,8 @@ ${numPeople > 0 ? `
<td>${k === '3xL7' ? 'ongoing' : `~${p.months} months`}</td>
<td class="num">$${p.payout.toFixed(2)}</td>
<td class="num">$${p.profit.toFixed(2)}</td>
<td class="num green-text">$${yourCut.toFixed(2)}</td>
<td class="num">$${cumRunning.toFixed(2)}</td>
<td class="num green-text referral-col">$${yourCut.toFixed(2)}</td>
<td class="num referral-col">$${cumRunning.toFixed(2)}</td>
</tr>`;
}
document.getElementById('overviewBody').innerHTML = rows;
@@ -1841,8 +1841,8 @@ ${numPeople > 0 ? `
<td>Month ${m.m}</td>
<td>${m.phase}</td>
<td class="num">$${m.prof.toLocaleString()}</td>
<td class="num green-text">$${(m.comm * actualPeople).toLocaleString()}</td>
<td class="num">$${runningCum.toLocaleString()}</td>
<td class="num green-text referral-col">$${(m.comm * actualPeople).toLocaleString()}</td>
<td class="num referral-col">$${runningCum.toLocaleString()}</td>
</tr>`;
}
document.getElementById('timelineBody').innerHTML = tRows;