Affichage de la valeur par défaut sur /règle

pull/337/head
Mael 2018-09-07 17:26:11 +02:00
parent a93d3a1b34
commit c33d2471ee
2 changed files with 13 additions and 1 deletions

View File

@ -34,3 +34,8 @@ h2 small {
margin-bottom: 1em;
margin-top: 0.4em;
}
#rule #ruleDefault {
text-align: center;
opacity: 0.75;
}

View File

@ -75,7 +75,7 @@ export default class Rule extends Component {
/>
<section id="rule-content">
{showValues && displayedRule.nodeValue ? (
{displayedRule.nodeValue ? (
<div id="ruleValue">
<i className="fa fa-calculator" aria-hidden="true" />{' '}
{Intl.NumberFormat(language, {
@ -85,6 +85,13 @@ export default class Rule extends Component {
</div>
) : null}
{displayedRule.defaultValue != null &&
typeof displayedRule.defaultValue !== 'object' ? (
<div id="ruleDefault">
Valeur par défaut : {displayedRule.defaultValue}
</div>
) : null}
{flatRule.question && <UserInput {...{ flatRules, dottedName }} />}
{flatRule.ns && (
<Algorithm rule={displayedRule} showValues={showValues} />