🐛 Permettre d'accéder aux pages règles depuis des variables qualifiées
parent
98cd9db2ce
commit
61e2ebb385
|
@ -4,7 +4,7 @@ import {connect} from 'react-redux'
|
|||
import {formValueSelector} from 'redux-form'
|
||||
import R from 'ramda'
|
||||
import './Rule.css'
|
||||
import {rules, decodeRuleName} from 'Engine/rules.js'
|
||||
import {rules, decodeRuleName, nameLeaf} from 'Engine/rules.js'
|
||||
import mockSituation from 'Engine/mockSituation.yaml'
|
||||
import {analyseSituation} from 'Engine/traverse'
|
||||
import {START_CONVERSATION} from '../../actions'
|
||||
|
@ -36,7 +36,7 @@ export default class Rule extends Component {
|
|||
}
|
||||
}
|
||||
setRule(name){
|
||||
this.rule = analyseSituation(rules, decodeRuleName(name))(this.props.situationGate)
|
||||
this.rule = analyseSituation(rules, nameLeaf(decodeRuleName(name)))(this.props.situationGate)
|
||||
}
|
||||
componentWillMount(){
|
||||
let {
|
||||
|
|
|
@ -449,6 +449,8 @@ export let analyseTopDown = (rules, rootVariable) => situationGate => {
|
|||
|
||||
//On fait ainsi pour chaque règle de la base.
|
||||
parsedRules = R.map(treatOne,rules),
|
||||
// TODO: we should really make use of namespaces at this level, in particular
|
||||
// setRule in Rule.js needs to get smarter and pass dottedName
|
||||
rootRule = findRuleByName(parsedRules, rootVariable),
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue