🐛 Rétablissement des contrôles
Pourquoi le contrôle complémentaire santé apparait-il ? Cacher le contrôle plafond micro pour cacher la case mico + explicationbarème-continu
parent
db4bdf76f9
commit
96d5c933f0
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import { connect } from 'react-redux'
|
||||
import { isEmpty, compose } from 'ramda'
|
||||
import { isEmpty, compose, chain, uniqBy } from 'ramda'
|
||||
import Answers from 'Components/AnswerList'
|
||||
import Conversation from 'Components/conversation/Conversation'
|
||||
import withColours from 'Components/utils/withColours'
|
||||
|
@ -19,7 +19,7 @@ export default compose(
|
|||
connect(state => ({
|
||||
previousAnswers: state.conversationSteps.foldedSteps,
|
||||
noNextSteps: nextStepsSelector(state, simulationConfig).length == 0,
|
||||
analysis: analysisWithDefaultsSelector(state, simulationConfig)
|
||||
analyses: analysisWithDefaultsSelector(state, simulationConfig)
|
||||
}))
|
||||
)(
|
||||
class extends React.Component {
|
||||
|
@ -27,12 +27,12 @@ export default compose(
|
|||
displayAnswers: false
|
||||
}
|
||||
render() {
|
||||
let {
|
||||
colours,
|
||||
noNextSteps,
|
||||
previousAnswers,
|
||||
analysis: { controls }
|
||||
} = this.props
|
||||
let { colours, noNextSteps, previousAnswers, analyses } = this.props
|
||||
let controls = uniqBy(
|
||||
({ test, dottedName }) => test + dottedName,
|
||||
chain(({ controls }) => controls, analyses)
|
||||
)
|
||||
|
||||
return (
|
||||
<div id="ComparativeSimulation" className="ui__ container">
|
||||
<header>{createMarkdownDiv(simulationConfig.titre)}</header>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
import React from 'react'
|
||||
import { analysisWithDefaultsSelector } from 'Selectors/analyseSelectors'
|
||||
import {
|
||||
flatRulesSelector,
|
||||
analysisWithDefaultsSelector
|
||||
} from 'Selectors/analyseSelectors'
|
||||
import { connect } from 'react-redux'
|
||||
import './ComparativeTargets.css'
|
||||
import withColours from 'Components/utils/withColours'
|
||||
|
@ -9,23 +12,29 @@ 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'
|
||||
|
||||
export default compose(
|
||||
connect(state => ({
|
||||
target: findRuleByDottedName(
|
||||
flatRulesSelector(state),
|
||||
simulationConfig.objectif
|
||||
),
|
||||
analyses: analysisWithDefaultsSelector(state, simulationConfig)
|
||||
})),
|
||||
withColours
|
||||
)(
|
||||
class ComparativeTargets extends React.Component {
|
||||
render() {
|
||||
let { colours, analyses } = this.props
|
||||
let { colours, analyses, target } = this.props
|
||||
return (
|
||||
<div id="targets">
|
||||
<h3>{analyses[0].targets[0].title}</h3>
|
||||
<h3>{target.title}</h3>
|
||||
<PeriodSwitch />
|
||||
<ul>
|
||||
{analyses.map((analysis, i) => {
|
||||
let { title, nodeValue, dottedName } = analysis.targets[0],
|
||||
if (!analysis.targets) return null
|
||||
let { nodeValue, dottedName } = analysis.targets[0],
|
||||
name = simulationConfig.branches[i].nom
|
||||
return (
|
||||
<li
|
||||
|
|
|
@ -18,6 +18,7 @@ function Controls({
|
|||
hiddenControls,
|
||||
language
|
||||
}) {
|
||||
console.log('C', controls)
|
||||
if (!controls?.length) return null
|
||||
/* TODO controls are not translated yet, since our translation system doesn't handle nested yaml properties of base.yaml */
|
||||
if (language === 'en') return null
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
titre: |
|
||||
Calcul du **revenu du travailleur indépendant ou dirigeant d'entreprise**, en fonction de son choix de régime social.
|
||||
|
||||
L'impôt est calculé pour un célibataire sans enfants et sans autre revenu. Version beta, améliorations à venir !
|
||||
Tout le chiffre d'affaire sert à payer le dirigeant. L'impôt est calculé pour un célibataire sans enfants et sans autre revenu. Version beta, améliorations à venir !
|
||||
objectif: revenu net d'impôt
|
||||
questions:
|
||||
- entreprise . chiffre d'affaires
|
||||
- entreprise . catégorie d'activité
|
||||
|
|
Loading…
Reference in New Issue