Fix: call generatePlan() from within updateAll() so referral plan preview populates on every change
This commit is contained in:
@@ -1892,6 +1892,9 @@ function updateAll() {
|
|||||||
}
|
}
|
||||||
document.getElementById('comparisonBody').innerHTML = cRows;
|
document.getElementById('comparisonBody').innerHTML = cRows;
|
||||||
|
|
||||||
|
// Update the referral plan preview
|
||||||
|
generatePlan();
|
||||||
|
|
||||||
const ctx3 = document.getElementById('compareChart').getContext('2d');
|
const ctx3 = document.getElementById('compareChart').getContext('2d');
|
||||||
const compareLabels = SCENARIOS.map(s => s.label.replace('$', '').replace('(', '').replace(')', ''));
|
const compareLabels = SCENARIOS.map(s => s.label.replace('$', '').replace('(', '').replace(')', ''));
|
||||||
const compareData = SCENARIOS.map(s => Math.round(s.yr1 * mult * numPeople));
|
const compareData = SCENARIOS.map(s => Math.round(s.yr1 * mult * numPeople));
|
||||||
|
|||||||
Reference in New Issue
Block a user