import React, { Component } from 'react' import { Trans, translate } from 'react-i18next' import { findRuleByName } from 'Engine/rules' import { propEq, curry } from 'ramda' import './TargetSelection.css' import BlueButton from './BlueButton' import { Field, reduxForm, formValueSelector, change } from 'redux-form' import { Link } from 'react-router-dom' import { connect } from 'react-redux' import { RuleValue } from './rule/RuleValueVignette' import classNames from 'classnames' import ProgressCircle from './ProgressCircle/ProgressCircle' import withLanguage from './withLanguage' import InputSuggestions from 'Components/conversation/InputSuggestions' import CurrencyInput from './CurrencyInput/CurrencyInput' export let salaries = ['salaire total', 'salaire de base', 'salaire net'] export let popularTargetNames = [...salaries, 'aides employeur'] @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 (