import React, { Component } from 'react' import './SelectedVariable.css' import TagMap from './TagMap' import R from 'ramda' export default class SelectedVariable extends Component { render() { let { variable: { name, first: { description }, tags, calculable }, selectedTags } = this.props, tagsList = R.pluck('tags', calculable), commonTags = R.tail(tagsList).reduce( (result, next) => R.intersection(result, R.toPairs(next)), R.toPairs(R.head(tagsList)) ), itemsWithUniqueTags = R.map(item => [item, R.fromPairs(R.difference(R.toPairs(item.tags), commonTags))], calculable) return (

{name}

{description}

{/* */}
) } } class Items extends Component { render() { let {itemsWithUniqueTags} = this.props return ( ) } } let Item = ({item: {linear, marginalRateTaxScale}, tags}) =>
  • { linear && || marginalRateTaxScale && }
  • let Linear = ({data: { base, limit, historique }}) =>

    Calcul linéaire

    base
    {base}
    Taux
    { historique[(Object.keys(historique).sort()[0])] }
    { limit != null &&
    dans la limite de : {limit}
    }
    let TaxScale = ({data}) =>

    Règle de calcul: barème

    {JSON.stringify(data)}