<commit_before>import React, { Component } from 'react';
import {
  Container,
  Responsive
} from 'semantic-ui-react';
import {
  Redirect,
  Prompt,
} from 'react-router-dom';

// Object Manipulation
import { setNestedProperty } from '../utils/setNestedProperty';
import { cloneDeep } from 'lodash';

// Data
import { clientList } from '../config/dummyClients';
import { CLIENT_DEFAULTS } from '../utils/CLIENT_DEFAULTS';

// Our Components
// import AlertSidebar from '../AlertSidebar'
import { CurrentIncomeStep } from '../forms/currentIncome';
import { CurrentExpensesStep } from '../forms/currentExpenses';
import { PredictionsStep } from '../forms/Predictions';
import { HouseholdStep } from '../forms/Household';
import { CurrentBenefitsStep } from '../forms/current-benefits';
import StepBar from '../components/StepBar';
import ResultsGraph from '../ResultsGraph';

class VisitPage extends Component {
  constructor(props) {
    super(props);

    const clientInfo = clientList.find( client => {
      return client.clientId === parseInt(this.props.match.params.clientId, 10);
    });

    this.state = {
        clientInfo: clientInfo,
        visitId: this.props.match.params.visitId,
        currentStep: 1,
        isBlocking: true,
        redirect: false,
        client : {
          ...CLIENT_DEFAULTS,
          snapAlert: 'good',
          housingAlert: 'good',
        },
        userChanged: {}
    };  // end this.state {}

    this.steps = [
      { title: 'Current Benefits', form: CurrentBenefitsStep, },
      { title: 'Household', form: HouseholdStep },
      { title: 'Income', form: CurrentIncomeStep },
      { title: 'Expenses', form: CurrentExpensesStep },
      { title: 'Predictions', form: PredictionsStep },
      { title: 'Results', form: ResultsGraph }
    ];  // end this.steps {}
  };  // End constructor()




  changeClient = (evnt, { route, name, value, checked, time }) => {

    route = route || name;
<commit_msg>Cleans up sidebar alert properties<commit_after>import React, { Component } from 'react';
import {
  Container,
  Responsive
} from 'semantic-ui-react';
import {
  Redirect,
  Prompt,
} from 'react-router-dom';

// Object Manipulation
import { setNestedProperty } from '../utils/setNestedProperty';
import { cloneDeep } from 'lodash';

// Data
import { clientList } from '../config/dummyClients';
import { CLIENT_DEFAULTS } from '../utils/CLIENT_DEFAULTS';

// Our Components
// import AlertSidebar from '../AlertSidebar'
import { CurrentIncomeStep } from '../forms/currentIncome';
import { CurrentExpensesStep } from '../forms/currentExpenses';
import { PredictionsStep } from '../forms/Predictions';
import { HouseholdStep } from '../forms/Household';
import { CurrentBenefitsStep } from '../forms/current-benefits';
import StepBar from '../components/StepBar';
import ResultsGraph from '../ResultsGraph';

class VisitPage extends Component {
  constructor(props) {
    super(props);

    const clientInfo = clientList.find( client => {
      return client.clientId === parseInt(this.props.match.params.clientId, 10);
    });

    this.state = {
        clientInfo: clientInfo,
        visitId: this.props.match.params.visitId,
        currentStep: 1,
        isBlocking: true,
        redirect: false,
        client : { ...CLIENT_DEFAULTS },
        userChanged: {}
    };  // end this.state {}

    this.steps = [
      { title: 'Current Benefits', form: CurrentBenefitsStep, },
      { title: 'Household', form: HouseholdStep },
      { title: 'Income', form: CurrentIncomeStep },
      { title: 'Expenses', form: CurrentExpensesStep },
      { title: 'Predictions', form: PredictionsStep },
      { title: 'Results', form: ResultsGraph }
    ];  // end this.steps {}
  };  // End constructor()

  changeClient = (evnt, { route, name, value, checked, time }) => {

    route = route || name;

{'fraction_non_alphanumeric': 0.14385692068429237, 'fraction_numerical': 0.0015552099533437014, 'mean_word_length': 3.1316916488222697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3280350', 'n_tokens_mistral': 1141, 'n_tokens_neox': 1117, 'n_words': 284}