🎨 Déplacement du résultat de calcul sur /regle
parent
e5a2a20533
commit
463b1df05f
|
@ -26,6 +26,15 @@
|
|||
#rule-rules section > div {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
|
||||
#rule-rules #ruleValue {
|
||||
font-weight: 400;
|
||||
font-size: 160%;
|
||||
margin: 2em 0 1em;
|
||||
}
|
||||
|
||||
|
||||
.node {
|
||||
padding-left: 1em;
|
||||
color: #4B4B66
|
||||
|
@ -201,8 +210,6 @@
|
|||
color: #3498db;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#rule-content {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import {AttachDictionary} from '../AttachDictionary'
|
|||
import knownMecanisms from 'Engine/known-mecanisms.yaml'
|
||||
import {makeJsx} from 'Engine/evaluation'
|
||||
import './Algorithm.css'
|
||||
import { humanFigure } from "./RuleValueVignette"
|
||||
|
||||
let RuleWithoutFormula = () => [
|
||||
<p>
|
||||
|
@ -46,6 +47,15 @@ export default class Algorithm extends React.Component {
|
|||
: makeJsx(rule['formule'])
|
||||
}
|
||||
</section>
|
||||
<section
|
||||
id="ruleValue"
|
||||
style={{ display: showValues ? "block" : "none" }} >
|
||||
<i className="fa fa-calculator" aria-hidden="true"></i>{' '}{rule.nodeValue == 0
|
||||
? "Règle non applicable"
|
||||
: rule.nodeValue == null
|
||||
? "Situation incomplète"
|
||||
: humanFigure(2)(rule.nodeValue) + " €"}
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -114,14 +114,6 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
#ruleValue {
|
||||
margin-left: 3em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#reportError {
|
||||
background: #c0392b;
|
||||
color: white;
|
||||
|
|
|
@ -11,7 +11,6 @@ import References from "./References"
|
|||
import Algorithm from "./Algorithm"
|
||||
import Examples from "./Examples"
|
||||
import Helmet from "react-helmet"
|
||||
import { humanFigure } from "./RuleValueVignette"
|
||||
import {createMarkdownDiv} from 'Engine/marked'
|
||||
|
||||
@connect(
|
||||
|
@ -57,8 +56,7 @@ export default class Rule extends Component {
|
|||
|
||||
let { type, name, titre, description, question } = this.rule,
|
||||
situationOrExampleRule =
|
||||
R.path(["example", "rule"])(this.state) || this.rule,
|
||||
ruleValue = situationOrExampleRule.nodeValue
|
||||
R.path(["example", "rule"])(this.state) || this.rule
|
||||
|
||||
return (
|
||||
<div id="rule">
|
||||
|
@ -77,19 +75,6 @@ export default class Rule extends Component {
|
|||
{this.renderDestinataire(R.path([type, "destinataire"])(this.rule))}
|
||||
</div>
|
||||
</section>
|
||||
<div
|
||||
id="ruleValue"
|
||||
style={{ display: situationExists ? "block" : "none" }}
|
||||
>
|
||||
<h2>Résultat</h2>
|
||||
<p>
|
||||
{ruleValue == 0
|
||||
? "Règle non applicable"
|
||||
: ruleValue == null
|
||||
? "Situation incomplète"
|
||||
: humanFigure(2)(ruleValue) + " €"}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<section id="rule-content">
|
||||
<Algorithm
|
||||
|
|
Loading…
Reference in New Issue