{"size": 2473, "ext": "js", "max_stars_repo_path": "src/pbc-client/src/components/calculation_results.js", "max_stars_repo_name": "fernandozamoraj/benefits_calc", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/pbc-client/src/components/calculation_results.js", "max_issues_repo_name": "fernandozamoraj/benefits_calc", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/pbc-client/src/components/calculation_results.js", "max_forks_repo_name": "fernandozamoraj/benefits_calc", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 33.4189189189, "max_line_length": 90, "alphanum_fraction": 0.5236554792}
import React, {Component} from 'react';
import {
    Table,
    TableBody,
    TableRow,
    TableRowColumn,
  } from 'material-ui/Table';

import './styles/calculation_results.css';

/**
 * CalculationResults - This is the component to display
 * the CalculationResults
 */
class CalculationResults extends Component{

    constructor(props) {
        super(props);
        this.state = {open: false};
    }

    handleToggle = () => this.setState({open: !this.state.open});

    render(){
        const results = this.props.results;
        return (
            <Table selectable={false}>
                <TableBody displayRowCheckbox={false}>
                    <TableRow>
                        <TableRowColumn>Name:</TableRowColumn>
                        <TableRowColumn>{results.EmployeeName}</TableRowColumn>
                    </TableRow>
                    <TableRow>
                        <TableRowColumn>Family Size:</TableRowColumn>
                        <TableRowColumn> {results.FamilyMembers}</TableRowColumn>
                    </TableRow>
                    <TableRow>
                        <TableRowColumn>Salary:</TableRowColumn>
                        <TableRowColumn>{results.AnnualSalary}</TableRowColumn>
                    </TableRow>
                    <TableRow>
                        <TableRowColumn>Annual Costs:</TableRowColumn>
                        <TableRowColumn>{results.AnnualCosts}</TableRowColumn>
                     </TableRow>
                    <TableRow>
                        <TableRowColumn>Discount:</TableRowColumn>
                        <TableRowColumn>{results.EmployerDiscounts}</TableRowColumn>
                    </TableRow>
                    <TableRow>
                    <TableRowColumn>Bi-weekly Costs</TableRowColumn>
                        <TableRowColumn>{results.PerPeriodCosts}</TableRowColumn>
                    </TableRow>
                    <TableRow>
                        <TableRowColumn>Bi-weekly Pay</TableRowColumn>
                        <TableRowColumn>{results.AdjustedPeriodPayAmount}</TableRowColumn>
                    </TableRow>
                </TableBody>
            </Table>
        );
    }
}

CalculationResults.defaultProps = {
    results: {
        EmployeeName: '',
        AnnualSalary: 0.0,
        AnnualCosts: 0.0,
        AdjustPeriodAmount: 0.0,
        EmployerDiscounts: 0.0,
        FamilySize: 0
    }
}

export default CalculationResults;