Harmonisation des URL de /règle
parent
26c331d679
commit
2aef3d0fad
|
@ -62,8 +62,10 @@ export class SearchBar extends React.Component {
|
|||
let { selectedOption } = this.state
|
||||
|
||||
if (selectedOption != null) {
|
||||
this.props.finally()
|
||||
return <Redirect to={'/règle/' + selectedOption.dottedName} />
|
||||
this.props.finally && this.props.finally()
|
||||
return (
|
||||
<Redirect to={'/règle/' + encodeRuleName(selectedOption.dottedName)} />
|
||||
)
|
||||
}
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -45,11 +45,11 @@ export class Node extends React.Component {
|
|||
}
|
||||
|
||||
// Un élément du graphe de calcul qui a une valeur interprétée (à afficher)
|
||||
export let Leaf = ({ classes, name, value }) => (
|
||||
export let Leaf = ({ classes, dottedName, name, value }) => (
|
||||
<span className={classNames(classes, 'leaf')}>
|
||||
{name && (
|
||||
{dottedName && (
|
||||
<span className="nodeHead">
|
||||
<Link to={'/règle/' + encodeRuleName(name)}>
|
||||
<Link to={'/règle/' + encodeRuleName(dottedName)}>
|
||||
<span className="name">
|
||||
{capitalise0(name)}
|
||||
<NodeValuePointer data={value} />
|
||||
|
|
|
@ -183,7 +183,12 @@ let fillVariableNode = (rules, rule, filter) => parseResult => {
|
|||
dottedName = disambiguateRuleReference(rules, rule, variablePartialName)
|
||||
|
||||
let jsx = nodeValue => (
|
||||
<Leaf classes="variable" name={fragments.join(' . ')} value={nodeValue} />
|
||||
<Leaf
|
||||
classes="variable"
|
||||
name={fragments.join(' . ')}
|
||||
dottedName={dottedName}
|
||||
value={nodeValue}
|
||||
/>
|
||||
)
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue