Indication du salaire équivalent temps plein sur la question nb heures
parent
999296264e
commit
ca39277492
|
@ -0,0 +1,20 @@
|
|||
import { React } from 'Components'
|
||||
import { analysisWithDefaultsSelector } from 'Selectors/analyseSelectors'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
export default connect(state => ({
|
||||
analysis: analysisWithDefaultsSelector(state)
|
||||
}))(({ analysis }) => {
|
||||
let cache = analysis.cache
|
||||
let salaire = cache['contrat salarié . salaire . brut de base'],
|
||||
quotité = cache['contrat salarié . quotité de travail'],
|
||||
équivalentTempsPlein = Math.round(salaire.nodeValue / quotité.nodeValue)
|
||||
if (quotité.nodeValue === 1) return null
|
||||
return (
|
||||
<div
|
||||
id="indication"
|
||||
style={{ fontStyle: 'italic', textAlign: 'right', margin: '0.6em 0 0' }}>
|
||||
Soit {équivalentTempsPlein} € bruts par mois en équivalent temps plein
|
||||
</div>
|
||||
)
|
||||
})
|
|
@ -9,6 +9,7 @@ import InputSuggestions from './InputSuggestions'
|
|||
import SendButton from './SendButton'
|
||||
import { connect } from 'react-redux'
|
||||
import { formValueSelector } from 'redux-form'
|
||||
import IndicationSalaireEquivalentTempsPlein from 'Components/conversation/IndicationSalaireEquivalentTempsPlein'
|
||||
|
||||
export default compose(
|
||||
FormDecorator('input'),
|
||||
|
@ -81,6 +82,11 @@ export default compose(
|
|||
rulePeriod={this.props.rulePeriod}
|
||||
/>
|
||||
{inputError && <span className="step-input-error">{error}</span>}
|
||||
{dottedName ===
|
||||
'contrat salarié . temps partiel . heures par semaine' && (
|
||||
<IndicationSalaireEquivalentTempsPlein />
|
||||
// If the need for this kind of computed indication to help the user answer the question correctly is encountered for other kind of questions, it should be abstracted in the engine
|
||||
)}
|
||||
</span>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue