import withColours from 'Components/utils/withColours' import React, { Component } from 'react' import { Trans } from 'react-i18next' import { connect } from 'react-redux' import { Link } from 'react-router-dom' import { animated, Spring } from 'react-spring' import { blockingInputControlsSelector, nextStepsSelector, noUserInputSelector } from 'Selectors/analyseSelectors' import * as Animate from 'Ui/animate' import Conversation from './conversation/Conversation' import Distribution from './Distribution' import PaySlip from './PaySlip' import QuickLink from './QuickLink' import './Simu.css' import TargetSelection from './TargetSelection' @withColours @connect( state => ({ noUserInput: noUserInputSelector(state), blockingInputControls: blockingInputControlsSelector(state), conversationStarted: state.conversationStarted, nextSteps: state.conversationStarted && nextStepsSelector(state) }), { startConversation: () => ({ type: 'START_CONVERSATION' }) } ) export default class Simu extends Component { render() { let { colours, conversationStarted, noUserInput, nextSteps, startConversation, blockingInputControls } = this.props const firstValidInputEntered = !conversationStarted && !blockingInputControls && !noUserInput const displayConversation = conversationStarted && !blockingInputControls const simulationCompleted = !blockingInputControls && conversationStarted && !nextSteps.length return ( <>
{styles => ( )} {conversationStarted && !nextSteps.length && ( <>

No more questions left!

You have reached the most accurate estimate. You can now turn your hiring project into reality.

See the procedures
)}
{displayConversation && ( <> )}
{conversationStarted && !simulationCompleted && (
Go to the hiring process
)} {simulationCompleted && (

Detailed payslip

)}
{firstValidInputEntered && (

What's included in my contributions?

Estimate my real costs

This is a rough estimate based on a pre-made generic contract. French legislation provides for a multitude of special cases, and specific rules that can considerably change hiring costs.

)} ) } }