From 1cbc931df7b99e7810f05f8b06c3f440919ae7d4 Mon Sep 17 00:00:00 2001 From: Mael Date: Fri, 7 Sep 2018 16:56:36 +0200 Subject: [PATCH] =?UTF-8?q?:gear:=20Explication=20simple=20du=20m=C3=A9can?= =?UTF-8?q?isme=20synchronisation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/engine/mecanismViews/common.js | 8 ++++++++ source/engine/mecanisms.js | 11 ++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/source/engine/mecanismViews/common.js b/source/engine/mecanismViews/common.js index f308da928..c9ee0c59a 100644 --- a/source/engine/mecanismViews/common.js +++ b/source/engine/mecanismViews/common.js @@ -79,3 +79,11 @@ export class Leaf extends Component { ) } } + +export function SimpleRuleLink({ rule: { dottedName, title, name } }) { + return ( + + {title || capitalise0(name)} + + ) +} diff --git a/source/engine/mecanisms.js b/source/engine/mecanisms.js index 2bb6a768d..fe8cbac70 100644 --- a/source/engine/mecanisms.js +++ b/source/engine/mecanisms.js @@ -1,6 +1,5 @@ import { reduce, - reduced, path, mergeWith, objOf, @@ -33,7 +32,7 @@ import { import React from 'react' import { Trans } from 'react-i18next' import { anyNull, val } from './traverse-common-functions' -import { Node } from './mecanismViews/common' +import { Node, SimpleRuleLink } from './mecanismViews/common' import { makeJsx, evaluateNode, @@ -992,7 +991,13 @@ export let mecanismSynchronisation = (recurse, k, v) => { return { explanation: { ...v, API: recurse(v.API) }, evaluate, - jsx: (nodeValue, explanation) => {nodeValue}, + jsx: function Synchronisation(nodeValue, explanation) { + return ( +

+ Obtenu à partir de la saisie +

+ ) + }, category: 'mecanism', name: 'synchronisation' }