mirror of
https://github.com/betagouv/mon-entreprise
synced 2025-02-09 04:05:01 +00:00
27357ec394
Limitations : - Nous nous arrêtons quand la variable n'est pas trouvée, il faudrait utiliser l'API actuel - En fonction de la situation du state (variables d'input), il faut évaluer les conditions à la traversée du graphe pour éliminer les variables non appelables : rendre la traversée fainéante. Sinon : Introduction du mot clef 'exception' dans maladie pour le cas de l'Aslace Moselle agricole
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
import React from 'react'
|
|
import {connect} from 'react-redux'
|
|
import TagNavigation from '../components/TagNavigation'
|
|
import Variables from '../components/Variables'
|
|
import * as actions from '../actions'
|
|
import {bindActionCreators} from 'redux'
|
|
import {tagsToSelectSelector, variablesSelector} from '../selectors/selectors'
|
|
|
|
|
|
class Explorer extends React.Component {
|
|
render() {
|
|
let {variables, selectedTags, selectedVariable, tagsToSelect, actions: {selectTag, resetTags, selectVariable}} = this.props
|
|
return (
|
|
<div>
|
|
<h1>Les prélèvements sociaux sur les salaires</h1>
|
|
<TagNavigation selectedTags={selectedTags} tagsToSelect={tagsToSelect} selectTag={selectTag} resetTags={resetTags}/>
|
|
<Variables variables={variables}
|
|
selectedTags={selectedTags} selectedVariable={selectedVariable}
|
|
selectVariable={selectVariable}/>
|
|
</div>
|
|
)
|
|
}
|
|
}
|
|
|
|
|
|
const mapStateToProps = state => (
|
|
{
|
|
selectedTags: state.selectedTags,
|
|
tagsToSelect: tagsToSelectSelector(state),
|
|
variables: variablesSelector(state),
|
|
selectedVariable: state.selectedVariable
|
|
}
|
|
)
|
|
|
|
const actionsToProps = dispatch => ({
|
|
actions: bindActionCreators(actions, dispatch)
|
|
})
|
|
|
|
const VariableExplorer = connect(mapStateToProps, actionsToProps)(Explorer)
|
|
|
|
export default VariableExplorer
|