-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIndividualResult.js
133 lines (125 loc) · 3.68 KB
/
IndividualResult.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<div className="results">
<div className="middle-box">
<h2>Your <strong>Current</strong> Cost Per Household</h2>
</div>
<div className="total-box">
<p>${addCommas(Math.floor(currentCosts))}/mo</p>
<p>(${addCommas(currentCosts*12)}/yr)</p>
</div>
<div className="middle-box new-cost">
<h2 >Your <strong>New</strong> Projected Cost Per Household</h2>
</div>
<div className="total-box total-new-cost">
<p>
$
{ sizeOfHousehold < 2 ?
addCommas(Math.floor(totalPersonalContribution / MONTH))
:
addCommas(Math.floor(
(parseInt(capitalGainsContribution, 10) +
parseInt(income, 10) +
parseInt(premium, 10) *
parseInt(numberOfAdults, 10)) / 12
))
}
/mo
</p>
<p>
($
{ sizeOfHousehold < 2 ?
addCommas(totalPersonalContribution)
:
addCommas(Math.floor(
parseInt(capitalGainsContribution, 10) +
parseInt(income, 10) +
parseInt(premium, 10) *
parseInt(numberOfAdults, 10)
))
}
/yr)
</p>
</div>
<div className="middle-box">
<h2>PROJECTED CONTRIBUTIONS</h2>
</div>
<div className="contributions-box">
<div className="contributions-row">
<p className="contributions-row-heading">
<a
href="https://i1600-wholewashington.nationbuilder.com/income_tax_contribution"
target="_blank"
rel="noopener noreferrer"
>
Income Tax Contribution
</a>
</p>
<p className="contributions-row-result">
${addCommas(Math.floor(income / MONTH))}/mo
</p>
</div>
<div className="contributions-row">
<p className="contributions-row-heading">
<a
href="https://i1600-wholewashington.nationbuilder.com/investment_profit_contribution"
target="_blank"
rel="noopener noreferrer">
Investment Profit Contribution
</a>
</p>
<p className="contributions-row-result">
${addCommas(Math.floor(capitalGainsContribution / MONTH))}/mo
</p>
</div>
{
sizeOfHousehold > 2 &&
parseInt(sizeOfHousehold, 10) -
parseInt(numberOfAdults, 10) >
0 &&
(
<div className="contributions-row">
<p className="contributions-row-heading">Per Child Monthly Premium</p>
<p className="contributions-row-result">
FREE x{" "}
{parseInt(sizeOfHousehold, 10) -
parseInt(numberOfAdults, 10)}
</p>
</div>
)
}
<div className="contributions-row">
<p className="contributions-row-heading">
<a href="https://i1600-wholewashington.nationbuilder.com/monthly_premium" target="_blank" rel="noopener noreferrer">Per Adult Monthly Premium</a><sup>*</sup>
</p>
<p className="contributions-row-result">
$
{
addCommas(Math.floor(premium / MONTH))
}
/mo {
sizeOfHousehold > 2 &&
`x${numberOfAdults}`
}
</p>
</div>
<p className="premium-disclaimer">
<sup>*</sup> Employers may choose to pay the Monthly Premium as part of their benefits.
</p>
</div>
<div
className={`middle-box ${savings > 0 ? 'new-cost' :''}`}
key="savings-label"
>
<h2>
{savings > 0 ? 'TOTAL SAVINGS' : 'YOUR BENEFIT'}
</h2>
</div>
{savings > 0 ?
<div className="total-box total-new-cost" key="savings-value">
<p>${addCommas(Math.floor(savings / MONTH))}/mo</p>
<p>(${savings}/yr)</p>
</div> : ''
}
<MessageBox key="ind-nosavings-result"/>
<DonateButton />
<CalculationDocs/>
</div>