⚙️ Explication simple du mécanisme synchronisation
parent
3489fa7b34
commit
1cbc931df7
|
@ -79,3 +79,11 @@ export class Leaf extends Component {
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
export function SimpleRuleLink({ rule: { dottedName, title, name } }) {
|
||||
return (
|
||||
<Link to={'../règle/' + encodeRuleName(dottedName)}>
|
||||
<span className="name">{title || capitalise0(name)}</span>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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) => <span>{nodeValue}</span>,
|
||||
jsx: function Synchronisation(nodeValue, explanation) {
|
||||
return (
|
||||
<p>
|
||||
Obtenu à partir de la saisie <SimpleRuleLink rule={explanation.API} />
|
||||
</p>
|
||||
)
|
||||
},
|
||||
category: 'mecanism',
|
||||
name: 'synchronisation'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue