From 5764cfba878e267b13018b30d99cd15c2de06960 Mon Sep 17 00:00:00 2001 From: knod Date: Sun, 25 Nov 2018 21:29:24 -0500 Subject: [PATCH] Finishes cleaning in /output --- src/forms/output/Summary.js | 28 ++++++++++++++++------------ src/forms/output/zoom.js | 18 +++++++++--------- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/forms/output/Summary.js b/src/forms/output/Summary.js index 331586af..44e0ea7c 100644 --- a/src/forms/output/Summary.js +++ b/src/forms/output/Summary.js @@ -1,6 +1,11 @@ +/** @module */ + // REACT COMPONENTS import React from 'react'; -import { Header, Button } from 'semantic-ui-react'; +import { + Header, + Button, +} from 'semantic-ui-react'; // DATA // Colors and text for parts of the chart @@ -14,7 +19,7 @@ import { toMoneyStr } from '../../utils/prettifiers'; import { applyAndPushBenefits } from '../../programs/applyAndPushBenefits'; -let EARNED_MONTHLY_INCREMENT_AMOUNT = 50; // About a 25 cent raise in monthly amount for 40hrs/week? +const EARNED_MONTHLY_INCREMENT_AMOUNT = 50; // About a 25 cent raise in monthly amount for 40hrs/week? /** Rounds money values, turns them into money-formatted @@ -210,6 +215,7 @@ let getBenefitData = function(client, resourceKeys) { clientToChange: clone, timeframe: `current`, }; + let currentCalcData = defaultProps; applyAndPushBenefits(currentCalcData); let futureCalcData = { ...defaultProps, timeframe: `future` }; @@ -220,8 +226,8 @@ let getBenefitData = function(client, resourceKeys) { // Fill earned values for both current and future earned objects result.current = fillInMoneyValues(resourceKeys, accumulated, 0); result.future = fillInMoneyValues(resourceKeys, accumulated, 1); - let resultCurr = result.current, - resultFutr = result.future; + let resultCurr = result.current, + resultFutr = result.future; // 3. Get difference between totals, partly to // see if we need to get cliff info. @@ -245,7 +251,7 @@ let getBenefitData = function(client, resourceKeys) { result.recovery.total = recoveryAmount; result.recovery.earned = earned[ earned.length - 1 ]; - } // ends if hit dramatic cliff + } // ends if hit dramatic cliff (implicit taxes > 100%) return result; }; // Ends getBenefitData() @@ -328,7 +334,7 @@ const Summary = function ({ client, openFeedback, translations }) { fBenefit = future.benefits[ benefiti ]; benefitList.push( -
  • +
  • {cBenefit.label} {translations.i_from} {translations.i_beforeMoneyWithTime}{round$(cBenefit.amount)} {` `} {translations.i_to} {translations.i_beforeMoneyWithTime}{round$(fBenefit.amount)} {translations.i_eachTimeInterval}{translations.i_period}
  • @@ -340,9 +346,7 @@ const Summary = function ({ client, openFeedback, translations }) { // that the tool is still a prototype let feedbackAsk = (

    - - { translations.i_feedbackAsk } - + { translations.i_feedbackAsk }