From 4aef5db8cbc3e21347d93a56587a27ccb0dd1727 Mon Sep 17 00:00:00 2001 From: Mael Thomas Date: Mon, 27 Mar 2017 15:32:03 +0200 Subject: [PATCH] =?UTF-8?q?[cdd]=20ajout=20d'une=20ic=C3=B4ne=20de=20fin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- finsvg.svg | 49 +++++++++----- source/components/CDD.css | 122 +++------------------------------- source/components/CDD.js | 96 ++++++++++++++++---------- source/components/Results.css | 95 ++++++++++++++++++++++++++ source/components/Results.js | 1 + source/engine/traverse.js | 2 +- source/images/fin.png | Bin 0 -> 7342 bytes 7 files changed, 200 insertions(+), 165 deletions(-) create mode 100644 source/components/Results.css create mode 100644 source/images/fin.png 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 0000000000000000000000000000000000000000..2b46dd9624b705ac1237ba447d4a4a0ab44415a5 GIT binary patch literal 7342 zcmdUUg;$er+&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