diff --git a/finsvg.svg b/finsvg.svg index cf25a7981..4cd26a235 100644 --- a/finsvg.svg +++ b/finsvg.svg @@ -15,7 +15,10 @@ id="svg2" version="1.1" inkscape:version="0.91 r13725" - sodipodi:docname="finsvg.svg"> + sodipodi:docname="finsvg.svg" + inkscape:export-filename="/home/mama/dev/sgmap/actifs/syso/source/images/fin.png" + inkscape:export-xdpi="39.68" + inkscape:export-ydpi="39.68"> @@ -44,7 +47,7 @@ image/svg+xml - + @@ -53,35 +56,47 @@ inkscape:groupmode="layer" id="layer1"> + y="308.07648" + inkscape:export-filename="/home/mama/dev/sgmap/actifs/syso/source/images/fin.png" + inkscape:export-xdpi="39.68" + inkscape:export-ydpi="39.68" /> + sodipodi:nodetypes="ccc" + inkscape:export-filename="/home/mama/dev/sgmap/actifs/syso/source/images/fin.png" + inkscape:export-xdpi="39.68" + inkscape:export-ydpi="39.68" /> + r="23.963387" + inkscape:export-filename="/home/mama/dev/sgmap/actifs/syso/source/images/fin.png" + inkscape:export-xdpi="39.68" + inkscape:export-ydpi="39.68" /> FIN + x="202.85715" + y="555.21936" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:200px;font-family:msbm10;-inkscape-font-specification:msbm10;fill:#ffffff;fill-opacity:0.94117647;fill-rule:nonzero">FIN diff --git a/source/components/CDD.css b/source/components/CDD.css index dc626c318..de8484eb2 100644 --- a/source/components/CDD.css +++ b/source/components/CDD.css @@ -26,29 +26,22 @@ p { max-width: 90%; } + +#fin { + margin: 6em auto; + width: 20em; + display: block; + text-align: center; + font-style: italic; +} + + #questions-answers { min-width: 60%; transition: width 1s; } -.dependency-of { -} -.dependency-of ul { - display: inline; -} - -.dependency-of li { - font-size: 80%; - background: #333350; - color: white; - display: inline-block; - padding: .1em .6em; - margin: 0 .6em; - border-radius: 3px; -} - - #sim #results { padding: .1em; @@ -63,98 +56,3 @@ p { height: 12em; text-align: center; } - -#results #results-titles { - color: white; - width: 18%; - display: inline-block; - float: left; - line-height: 1.2em; - margin: 0; - margin-left: .5em; - padding: .5em; - font-weight: 400; - font-size: 120%; -} -#results #results-titles h2 { - font-size: 210%; -} -#results #results-titles div { - font-style: italic; -} - - -#results ul { - display: inline-flex; - justify-content: space-around; - height: 100%; - width: 80%; - list-style: none; - padding-left: 0; -} - -#results li { - margin: .2em 1em; - text-align: center; -} -#results li a { - text-decoration: none; -} -#results .rule-box { - padding: 0 1em; - color: #333350; - background: white; - border-radius: 3px; - white-space: nowrap; - color: #333350; -} -#results li.irrelevant .rule-box { - background: rgba(255, 255, 255, 0.65); -} -#results li .pointer { - font-size: 300%; - line-height: .6em; - visibility: hidden; -} -#results li.pointedOut .pointer { - visibility: visible; -} -#results li.number .rule-box { - border: 5px solid #4A89DC; -} - -#results .rule-type { - background: #333350; - color: white; - border: none; - font-size: 75%; - line-height: 2em; - font-weight: 800; - margin: .6em 0 .1em; -} - -#results .rule-name { - font-size: 150%; - text-transform: capitalize; -} - -#results li p { - margin: 0; - padding: 1em 0; - font-size: 120%; - color: inherit; -} - -#results li.unsatisfied p { - font-style: italic; -} -#results li.irrelevant p { - font-weight: 600; -} -#results li p .figure { - font-size: 200%; -} - -#results .understand:hover i { - opacity: 1 -} diff --git a/source/components/CDD.js b/source/components/CDD.js index 94d02563e..fd4eca6be 100644 --- a/source/components/CDD.js +++ b/source/components/CDD.js @@ -12,51 +12,77 @@ let situationSelector = formValueSelector('conversation') @reduxForm({form: 'conversation', destroyOnUnmount: false}) @connect( - state => ({ - situation: variableName => situationSelector(state, variableName), - foldedSteps: state.foldedSteps, - unfoldedSteps: state.unfoldedSteps, - themeColours: state.themeColours, - analysedSituation: state.analysedSituation, - }), - dispatch => ({ - startConversation: () => dispatch({type: START_CONVERSATION}), - }), + state => ({ + situation: variableName => situationSelector(state, variableName), + foldedSteps: state.foldedSteps, + unfoldedSteps: state.unfoldedSteps, + themeColours: state.themeColours, + analysedSituation: state.analysedSituation, +}), + dispatch => ({ + startConversation: () => dispatch({type: START_CONVERSATION}), +}), ) export default class CDD extends Component { componentDidMount() { - // C'est ici que la génération du formulaire, et donc la traversée des variables commence + // C'est ici que la génération du formulaire, et donc la traversée des variables commence this.props.startConversation() } render() { let {foldedSteps, unfoldedSteps, situation} = this.props - let conversation = foldedSteps.map(step => - ).concat(unfoldedSteps.map(step => - )) - + let conversation = foldedSteps + .map(step => ( + + )) + .concat( + unfoldedSteps.map(step => ( + + )), + ) return ( -
- -

Simulateur CDD

-
-
- {conversation} -
- -
- -
+
+ +

Simulateur CDD

+
+
+ {conversation} + {unfoldedSteps.length == 0 && +
+ +

+ Nous n'avons plus de questions : votre simulation est terminée. +

+ Une remarque ?   + + Écrivez-nous + + {' '} + + {' '} + ! +

+
} +
+ +
+ +
) } } diff --git a/source/components/Results.css b/source/components/Results.css new file mode 100644 index 000000000..f9a3cb55c --- /dev/null +++ b/source/components/Results.css @@ -0,0 +1,95 @@ + +#results #results-titles { + color: white; + width: 18%; + display: inline-block; + float: left; + line-height: 1.2em; + margin: 0; + margin-left: .5em; + padding: .5em; + font-weight: 400; + font-size: 120%; +} +#results #results-titles h2 { + font-size: 210%; +} +#results #results-titles div { + font-style: italic; +} + + +#results ul { + display: inline-flex; + justify-content: space-around; + height: 100%; + width: 80%; + list-style: none; + padding-left: 0; +} + +#results li { + margin: .2em 1em; + text-align: center; +} +#results li a { + text-decoration: none; +} +#results .rule-box { + padding: 0 1em; + color: #333350; + background: white; + border-radius: 3px; + white-space: nowrap; + color: #333350; +} +#results li.irrelevant .rule-box { + background: rgba(255, 255, 255, 0.65); +} +#results li .pointer { + font-size: 300%; + line-height: .6em; + visibility: hidden; +} +#results li.pointedOut .pointer { + visibility: visible; +} +#results li.number .rule-box { + border: 5px solid #4A89DC; +} + +#results .rule-type { + background: #333350; + color: white; + border: none; + font-size: 75%; + line-height: 2em; + font-weight: 800; + margin: .6em 0 .1em; +} + +#results .rule-name { + font-size: 150%; + text-transform: capitalize; +} + +#results li p { + margin: 0; + padding: 1em 0; + font-size: 120%; + color: inherit; +} + +#results li.unsatisfied p { + font-style: italic; +} +#results li.irrelevant p { + font-weight: 600; +} +#results li p .figure { + font-size: 200%; +} + +#results .understand:hover i { + opacity: 1 +} diff --git a/source/components/Results.js b/source/components/Results.js index a1dbc6a96..285fcb90f 100644 --- a/source/components/Results.js +++ b/source/components/Results.js @@ -3,6 +3,7 @@ import classNames from 'classnames' import {Link} from 'react-router' import {connect} from 'react-redux' import R from 'ramda' +import './Results.css' let fmt = new Intl.NumberFormat('fr-FR').format let humanFigure = decimalDigits => value => fmt(value.toFixed(decimalDigits)) diff --git a/source/engine/traverse.js b/source/engine/traverse.js index 202b34246..67c4b02b1 100644 --- a/source/engine/traverse.js +++ b/source/engine/traverse.js @@ -599,7 +599,7 @@ let treatRuleRoot = (situationGate, rule) => R.pipe( - do they need variables that are not present in the user situation ? - if not, do they have a computed value or are they non applicable ? */ -export let analyseSituation = situationGate => console.log('analyseSituation' + Math.random()) || +export let analyseSituation = situationGate => //TODO l'objectif devrait être spécifié par la page qui lance un simulateur treatRuleRoot( diff --git a/source/images/fin.png b/source/images/fin.png new file mode 100644 index 000000000..2b46dd962 Binary files /dev/null and b/source/images/fin.png differ