diff --git a/package.json b/package.json index 79dfe4198..b80e0864f 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "react-scroll": "^1.5.4", "react-select": "^1.0.0-rc.10", "react-select-fast-filter-options": "^0.2.3", + "react-virtualized": "^9.10.1", "react-virtualized-select": "^3.1.0", "reduce-reducers": "^0.1.2", "redux": "^3.6.0", diff --git a/source/engine/mecanisms.js b/source/engine/mecanisms.js index 92c0ed99d..add880c3a 100644 --- a/source/engine/mecanisms.js +++ b/source/engine/mecanisms.js @@ -5,6 +5,10 @@ import {Node, Leaf} from './traverse-common-jsx' import {makeJsx, evaluateNode, rewriteNode, evaluateArray, evaluateArrayWithFilter, evaluateObject, parseObject, collectNodeMissing} from './evaluation' import {findRuleByName} from './rules' +import 'react-virtualized/styles.css' +import {Table, Column} from 'react-virtualized' +import taux_versement_transport from 'Règles/rémunération-travail/cotisations/ok/taux.json' + let constantNode = constant => ({nodeValue: constant, jsx: nodeValue => {nodeValue}}) let decompose = (recurse, k, v) => { @@ -154,7 +158,7 @@ export let mecanismOneOf = (recurse, k, v) => { let evaluate = (situationGate, parsedRules, node) => { let evaluateOne = child => evaluateNode(situationGate, parsedRules, child), - explanation = R.map(evaluateOne, node.explanation), + explanation = R.map(evaluateOne, node.explanation), values = R.pluck("nodeValue",explanation), nodeValue = R.any(R.equals(true),values) ? true : (R.any(R.equals(null),values) ? null : false) @@ -643,8 +647,38 @@ export let mecanismSelection = (recurse,k,v) => { name="sélection" value={nodeValue} child={ - explanation.category === 'variable' ?