Skip to content

Commit

Permalink
Re-add monthly and eternity variables (#756)
Browse files Browse the repository at this point in the history
* Re-add monthly and eternity variables

* Lint
  • Loading branch information
nikhilwoodruff authored Oct 20, 2023
1 parent e678524 commit 71c8c5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/pages/household/input/VariableEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export function addVariable(householdInput, variable, entityPlural) {
let possibleEntities = null;

// If the variable is defined as occurring over a year...
if (variable.definitionPeriod === "year") {
if (["year", "eternity"].includes(variable.definitionPeriod)) {
// If plural entity term is in household situation...
if (entityPlural in householdInput) {
// Pull all individual entities stored within the umbrella entity
Expand Down
3 changes: 1 addition & 2 deletions src/pages/household/output/EarningsVariation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ export default function EarningsVariation(props) {

useEffect(() => {
let householdData = JSON.parse(JSON.stringify(householdInput));
console.log(householdInput);
householdData.people.you.employment_income["2023"] = null;
householdData.people.you["employment_income"] = { 2023: null };
const currentEarnings = getValueFromHousehold(
"employment_income",
"2023",
Expand Down

0 comments on commit 71c8c5c

Please sign in to comment.