Amelioration des messages guides
parent
37d014d8f1
commit
edd8f87fcd
|
@ -33,13 +33,9 @@ export default class ProgressTip extends Component {
|
|||
<div className="tip">
|
||||
{nbQuestions != 0 && (
|
||||
<p>
|
||||
{nbQuestions === 1 ? (
|
||||
<Trans i18nKey="lastQ">Une dernière question !</Trans>
|
||||
) : (
|
||||
<Trans i18nKey="questionsLeft" count={nbQuestions}>
|
||||
Il reste moins de {{ nbQuestions }} questions.
|
||||
</Trans>
|
||||
)}
|
||||
{nbQuestions === 1
|
||||
? 'Une dernière question !'
|
||||
: `Moins de ${nbQuestions} questions`}
|
||||
<Line
|
||||
percent={
|
||||
100 * foldedSteps.length / (foldedSteps.length + nbQuestions)
|
||||
|
|
|
@ -60,11 +60,13 @@ export default class TargetSelection extends Component {
|
|||
{this.renderOutputList()}
|
||||
</section>
|
||||
|
||||
{this.state.activeInput ? (
|
||||
{!this.state.activeInput || !this.props.targets.length ? (
|
||||
<h1>Entrez un salaire mensuel</h1>
|
||||
) : (
|
||||
<div id="action">
|
||||
{this.props.selectingTargets ? (
|
||||
!this.props.conversationVisible && (
|
||||
<p>Cochez un ou plusieurs objectifs</p>
|
||||
<p>Que voulez-vous affiner ?</p>
|
||||
)
|
||||
) : (
|
||||
<>
|
||||
|
@ -79,8 +81,6 @@ export default class TargetSelection extends Component {
|
|||
</>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<h1>Entrez un salaire mensuel</h1>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
|
|
|
@ -58,7 +58,6 @@ export default class Conversation extends Component {
|
|||
reinitialise,
|
||||
textColourOnWhite
|
||||
} = this.props
|
||||
console.log(this.props)
|
||||
return (
|
||||
<>
|
||||
{!isEmpty(foldedSteps) && (
|
||||
|
|
|
@ -24,7 +24,7 @@ export let RuleValue = ({ value }) =>
|
|||
let unsatisfied = value == null,
|
||||
irrelevant = value == 0
|
||||
let [className, text] = irrelevant
|
||||
? ['irrelevant', 'Non applicable']
|
||||
? ['irrelevant', '0']
|
||||
: unsatisfied
|
||||
? ['unsatisfied', '']
|
||||
: ['figure', humanFigure(0)(value) + ' €']
|
||||
|
|
|
@ -473,7 +473,7 @@ export let treatRuleRoot = (rules, rule) => {
|
|||
: anyNull([e['non applicable si'], e['applicable si']])
|
||||
? null
|
||||
: !val(e['non applicable si']) &&
|
||||
undefOrTrue(val(e['applicable si']))
|
||||
undefOrTrue(val(e['applicable si']))
|
||||
},
|
||||
nodeValue = computeRuleValue(formuleValue, isApplicable)
|
||||
|
||||
|
@ -596,16 +596,17 @@ export let getTargets = (target, rules) => {
|
|||
let multiSimulation = path(['simulateur', 'objectifs'])(target)
|
||||
let targets = multiSimulation
|
||||
? // On a un simulateur qui définit une liste d'objectifs
|
||||
multiSimulation
|
||||
multiSimulation
|
||||
.map(n => disambiguateRuleReference(rules, target, n))
|
||||
.map(n => findRuleByDottedName(rules, n))
|
||||
: // Sinon on est dans le cas d'une simple variable d'objectif
|
||||
[target]
|
||||
[target]
|
||||
|
||||
return targets
|
||||
}
|
||||
|
||||
export let parseAll = flatRules => {
|
||||
console.log('parseall')
|
||||
let treatOne = rule => treatRuleRoot(flatRules, rule)
|
||||
return map(treatOne, flatRules)
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ let initialStore = {
|
|||
|
||||
let enhancer = compose(
|
||||
applyMiddleware(debounceFormChangeActions()),
|
||||
DevTools.instrument()
|
||||
DevTools.instrument({ maxAge: 10 })
|
||||
)
|
||||
|
||||
let initialRules = lang == 'en' ? rules : rulesFr
|
||||
|
|
Loading…
Reference in New Issue