🐛 fix la question du CA qui ne se posait plus

pull/439/head
Johan Girod 2019-02-04 10:22:24 +01:00
parent d7d5833a54
commit 190c8307f9
8 changed files with 66 additions and 46 deletions

View File

@ -1,18 +1,18 @@
import SetCSSColour from 'Components/utils/SetCssColour';
import { ThemeColoursProvider } from 'Components/utils/withColours';
import { SitePathProvider } from 'Components/utils/withSitePaths';
import { TrackerProvider } from 'Components/utils/withTracker';
import createHistory from 'history/createBrowserHistory';
import i18next from 'i18next';
import React, { PureComponent } from 'react';
import { I18nextProvider } from 'react-i18next';
import { Provider } from 'react-redux';
import { Router } from 'react-router-dom';
import reducers from 'Reducers/rootReducer';
import { applyMiddleware, compose, createStore } from 'redux';
import { enableBatching } from 'redux-batched-actions';
import thunk from 'redux-thunk';
import { getIframeOption, inIframe } from './utils';
import SetCSSColour from 'Components/utils/SetCssColour'
import { ThemeColoursProvider } from 'Components/utils/withColours'
import { SitePathProvider } from 'Components/utils/withSitePaths'
import { TrackerProvider } from 'Components/utils/withTracker'
import createHistory from 'history/createBrowserHistory'
import i18next from 'i18next'
import React, { PureComponent } from 'react'
import { I18nextProvider } from 'react-i18next'
import { Provider as ReduxProvider } from 'react-redux'
import { Router } from 'react-router-dom'
import reducers from 'Reducers/rootReducer'
import { applyMiddleware, compose, createStore } from 'redux'
import { enableBatching } from 'redux-batched-actions'
import thunk from 'redux-thunk'
import { getIframeOption, inIframe } from './utils'
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
@ -33,7 +33,7 @@ if (
})
}
export default class Layout extends PureComponent {
export default class Provider extends PureComponent {
constructor(props) {
super(props)
this.history = createHistory({
@ -56,27 +56,26 @@ export default class Layout extends PureComponent {
enableBatching(reducers),
this.props.initialStore,
storeEnhancer
)
console.log(this.props.initialStore, this.store.getState())
)
this.props.onStoreCreated && this.props.onStoreCreated(this.store)
}
render() {
return (
// If IE < 11 display nothing
<Provider store={this.store}>
<ThemeColoursProvider colour={getIframeOption('couleur')}>
<TrackerProvider value={this.props.tracker}>
<SitePathProvider value={this.props.sitePaths}>
<SetCSSColour />
<I18nextProvider i18n={i18next}>
<Router history={this.history}>
<>{this.props.children}</>
</Router>
</I18nextProvider>
</SitePathProvider>
</TrackerProvider>
<ReduxProvider store={this.store}>
<ThemeColoursProvider colour={getIframeOption('couleur')}>
<TrackerProvider value={this.props.tracker}>
<SitePathProvider value={this.props.sitePaths}>
<SetCSSColour />
<I18nextProvider i18n={i18next}>
<Router history={this.history}>
<>{this.props.children}</>
</Router>
</I18nextProvider>
</SitePathProvider>
</TrackerProvider>
</ThemeColoursProvider>
</Provider>
</ReduxProvider>
)
}
}

View File

@ -9,7 +9,7 @@ questions à l'affiche:
Charges: entreprise . charges
situation:
auto-entrepreneur: non
autoentrepreneur: non
indépendant: non
contrat salarié: oui
contrat salarié . assimilé salarié: oui

View File

@ -11,7 +11,7 @@ questions à l'affiche:
Commerçant, artisan, ou libéral ?: entreprise . catégorie d'activité
situation:
auto-entrepreneur: oui
autoentrepreneur: oui
indépendant: non
contrat salarié: non
période: année

View File

@ -12,6 +12,6 @@ questions à l'affiche:
situation:
indépendant: oui
auto-entrepreneur: non
autoentrepreneur: non
contrat salarié: non
période: année

View File

@ -16,17 +16,17 @@ situation:
branches:
- nom: Auto-entrepreneur
situation:
auto-entrepreneur: oui
autoentrepreneur: oui
indépendant: non
contrat salarié: non
- nom: Indépendant
situation:
indépendant: oui
auto-entrepreneur: non
autoentrepreneur: non
contrat salarié: non
- nom: Assimilé salarié
situation:
auto-entrepreneur: non
autoentrepreneur: non
indépendant: non
contrat salarié: oui
contrat salarié . assimilé salarié: oui

View File

@ -14,5 +14,5 @@ situation:
contrat salarié: oui
contrat salarié . assimilé salarié: non
indépendant: non
auto-entrepreneur: non
autoentrepreneur: non
période: mois

View File

@ -1,11 +1,31 @@
import formValueTypes from 'Components/conversation/formValueTypes';
import Input from 'Components/conversation/Input';
import Question from 'Components/conversation/Question';
import SelectGéo from 'Components/conversation/select/SelectGéo';
import SelectAtmp from 'Components/conversation/select/SelectTauxRisque';
import { add, countBy, descend, flatten, fromPairs, head, identity, is, keys, map, mergeWith, pair, pick, prop, reduce, sortWith, toPairs, unless, values } from 'ramda';
import React from 'react';
import { findRuleByDottedName, queryRule } from './rules';
import formValueTypes from 'Components/conversation/formValueTypes'
import Input from 'Components/conversation/Input'
import Question from 'Components/conversation/Question'
import SelectGéo from 'Components/conversation/select/SelectGéo'
import SelectAtmp from 'Components/conversation/select/SelectTauxRisque'
import {
add,
countBy,
descend,
flatten,
fromPairs,
head,
identity,
is,
keys,
map,
mergeWith,
pair,
pick,
prop,
reduce,
sortWith,
toPairs,
unless,
values
} from 'ramda'
import React from 'react'
import { findRuleByDottedName, queryRule } from './rules'
/*
COLLECTE DES VARIABLES MANQUANTES

View File

@ -246,6 +246,7 @@ export let nextStepsSelector = createSelector(
],
(mv, questions) => {
let nextSteps = getNextSteps(mv)
console.log(nextSteps, questions)
if (questions && questions.blacklist) {
return difference(nextSteps, questions.blacklist)