import React, { Component } from 'react'
import { Trans, translate } from 'react-i18next'
import { connect } from 'react-redux'
import { rules, findRuleByName } from 'Engine/rules'
import {
reject,
propEq,
curry,
pipe,
equals,
filter,
contains,
length,
without,
append,
ifElse
} from 'ramda'
import { Link } from 'react-router-dom'
import './TargetSelection.css'
import BlueButton from './BlueButton'
import { Field, reduxForm, formValueSelector } from 'redux-form'
import { connect } from 'react-redux'
import { RuleValue } from './rule/RuleValueVignette'
export let salaries = ['salaire net', 'salaire de base', 'salaire total']
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
targetNames: state.targetNames
}),
dispatch => ({
startConversation: (targetNames, fromScratch = false) =>
dispatch({ type: 'START_CONVERSATION', targetNames, fromScratch })
})
)
export default class TargetSelection extends Component {
state = {
activeInput: null,
affinage: false
}
componentWillMount() {
this.props.startConversation(popularTargetNames)
}
render() {
if (this.props.targets.length == 0) return null
return (
Cochez un ou plusieurs objectifs
Entrez un salaire mensuel
)}
{s['résumé']}