Skip to content

Commit

Permalink
Merge pull request #293 from ORNL-AMO/issue-285-b
Browse files Browse the repository at this point in the history
Issue 285 - changing year recap messaging
  • Loading branch information
rhernandez-intertech authored Mar 22, 2024
2 parents f4b8812 + 0455687 commit deec34a
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions src/components/YearRecap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export class YearRecap extends React.Component<YearRecapProps, { inView }> {
let mutableStats: TrackedStats = { ...initialCurrentYearStats };
let mutableCapitalFundingState: CapitalFundingState = { ...this.props.capitalFundingState };
let recapResults: YearRecapResults = this.buildRecapCardsAndResults(this.props, initialCurrentYearStats, mutableStats, mutableCapitalFundingState);
const gameSettings: GameSettings = JSON.parse(localStorage.getItem('gameSettings'));
const noDecimalsFormatter = Intl.NumberFormat('en-US', {
minimumFractionDigits: 0,
maximumFractionDigits: 0,
Expand Down Expand Up @@ -176,20 +175,31 @@ export class YearRecap extends React.Component<YearRecapProps, { inView }> {
}
/>
</ListItem>
{gameSettings.allowBudgetCarryover === 'yes' ?
{this.props.allowBudgetCarryover === 'yes' ?
<ListItem >
<ListItemIcon>
<InfoIcon />
</ListItemIcon>
<ListItemText
primary={
<Typography variant={'h5'}>
This will be added to your budget for the next period, as well as the{' '}
<Emphasis>${unspentBudgetFormatted}</Emphasis> of your budget
that was not yet spent.
</Typography>
}
/>

{this.props.costSavingsCarryoverYears == 'oneYear' &&
<ListItemText
primary={
<Typography variant={'h5'}>
You will receive half the energy cost savings from any implemented Energy Efficiency projects, as well as
all cost savings from any implemented renewable projects.
</Typography>
}
/>
}
{this.props.costSavingsCarryoverYears == 'never' &&
<ListItemText
primary={
<Typography variant={'h5'}>
You will receive cost savings from any implemented renewable projects
</Typography>
}
/>
}
</ListItem>
:
<ListItem >
Expand Down

0 comments on commit deec34a

Please sign in to comment.