import classNames from 'classnames' import InputSuggestions from 'Components/conversation/InputSuggestions' import { findRuleByDottedName } from 'Engine/rules' import { propEq } from 'ramda' import React, { Component } from 'react' import { Trans, translate } from 'react-i18next' import { connect } from 'react-redux' import { Link } from 'react-router-dom' import { change, Field, formValueSelector, reduxForm } from 'redux-form' import BlueButton from './BlueButton' import CurrencyInput from './CurrencyInput/CurrencyInput' import ProgressCircle from './ProgressCircle/ProgressCircle' import { RuleValue } from './rule/RuleValueVignette' import './TargetSelection.css' import withLanguage from './withLanguage' let salaries = [ 'contrat salarié . salaire . total', 'contrat salarié . salaire . brut de base', 'contrat salarié . salaire . net à payer' ] let displayedTargetNames = [...salaries, 'contrat salarié . aides employeur'] export let popularTargetNames = [ ...displayedTargetNames, 'contrat salarié . salaire . net imposable' ] @translate() @reduxForm({ form: 'conversation', destroyOnUnmount: false }) @connect( state => ({ getTargetValue: dottedName => formValueSelector('conversation')(state, dottedName), targets: state.analysis ? state.analysis.targets : [], flatRules: state.flatRules, conversationStarted: state.conversationStarted, activeInput: state.activeTargetInput }), dispatch => ({ setFormValue: (field, name) => dispatch(change('conversation', field, name)), startConversation: () => dispatch({ type: 'START_CONVERSATION' }), setActiveInput: name => dispatch({ type: 'SET_ACTIVE_TARGET_INPUT', name }) }) ) export default class TargetSelection extends Component { render() { let { targets, conversationStarted, colours, activeInput } = this.props this.firstEstimationComplete = activeInput && targets.length > 0 return (
{target['résumé']}
} ) } let CurrencyField = props => { return (