diff --git a/source/engine/mecanismViews/Allègement.js b/source/engine/mecanismViews/Allègement.js new file mode 100644 index 000000000..6ba8e9597 --- /dev/null +++ b/source/engine/mecanismViews/Allègement.js @@ -0,0 +1,60 @@ +import React from 'react' +import { Node } from './common' +import { makeJsx } from '../evaluation' +import { mapObjIndexed, values } from 'ramda' + +export default (nodeValue, explanation) => ( +
+ +
  • + assiette: + {makeJsx(explanation.assiette)} +
  • + {explanation.franchise && ( +
  • + franchise: + {makeJsx(explanation.franchise)} +
  • + )} + {explanation.décote && ( +
  • + décote: + + + +
  • + )} + {explanation.abattement && ( +
  • + abattement: + {makeJsx(explanation.abattement)} +
  • + )} + + } + /> +
    +) + +let ObjectView = ({ data }) => + console.log('data', data) || ( + + ) diff --git a/source/engine/mecanisms.js b/source/engine/mecanisms.js index 0e77c4ca1..fd0159cbf 100644 --- a/source/engine/mecanisms.js +++ b/source/engine/mecanisms.js @@ -50,6 +50,7 @@ import { import 'react-virtualized/styles.css' import Somme from './mecanismViews/Somme' +import Allègement from './mecanismViews/Allègement' import buildSelectionView from './mecanismViews/Selection' import uniroot from './uniroot' @@ -575,7 +576,7 @@ export let mecanismReduction = (recurse, k, v) => { return { evaluate, - jsx: (nodeValue, explanation) =>
    Allègement
    , + jsx: Allègement, explanation, category: 'mecanism', name: 'allègement',