import React from 'react' import { flatRulesSelector, analysisWithDefaultsSelector } from 'Selectors/analyseSelectors' import { connect } from 'react-redux' import './ComparativeTargets.css' import withColours from 'Components/utils/withColours' import { Link } from 'react-router-dom' import emoji from 'react-easy-emoji' import { compose } from 'ramda' import simulationConfig from './simulateur-rémunération-dirigeant.yaml' import AnimatedTargetValue from './AnimatedTargetValue' import PeriodSwitch from 'Components/PeriodSwitch' import { findRuleByDottedName } from 'Engine/rules' import { formValueSelector } from 'redux-form' export default compose( connect( state => ({ target: findRuleByDottedName( flatRulesSelector(state), simulationConfig.objectif ), analyses: analysisWithDefaultsSelector(state, simulationConfig), chiffreAffaires: formValueSelector('conversation')( state, "entreprise . chiffre d'affaires" ) }), dispatch => ({ setSituationBranch: id => dispatch({ type: 'SET_SITUATION_BRANCH', id }) }) ), withColours )( class ComparativeTargets extends React.Component { render() { let { colours, analyses, target, setSituationBranch, chiffreAffaires } = this.props return (
{microNotApplicable.message}
) : ( <>