import React, { Component } from 'react' import { Trans, translate } from 'react-i18next' import formValueTypes from 'Components/conversation/formValueTypes' import { rules, findRuleByName } from 'Engine/rules' import { propEq, contains, without, curry, append, ifElse } 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 { buildValidationFunction } from './conversation/FormDecorator' export let salaries = ['salaire total', 'salaire de base', 'salaire net'] export let popularTargetNames = [...salaries, 'aides employeur'] @translate() @reduxForm({ form: 'conversation' }) @connect( state => ({ getTargetValue: dottedName => formValueSelector('conversation')(state, dottedName), targets: state.analysis ? state.analysis.targets : [], flatRules: state.flatRules conversationTargetNames: state.conversationTargetNames }), dispatch => ({ setFormValue: (field, name) => dispatch(change('conversation', field, name)), setConversationTargets: (targetNames, fromScratch = false) => dispatch({ type: 'SET_CONVERSATION_TARGETS', targetNames, fromScratch }) }) ) export default class TargetSelection extends Component { state = { activeInput: null } render() { let { targets, conversationTargetNames, colours } = this.props this.firstEstimationComplete = this.state.activeInput && targets.length > 0 return (
Cochez ce que vous voulez affiner
) ) : ( <>
Estimation approximative
pour une situation par
défaut (CDI non cadre).
{s['résumé']}