mirror of
https://github.com/betagouv/mon-entreprise
synced 2025-02-10 13:55:03 +00:00
feat(pam): ajout d'un bouton réinitialiser à l'assistant PAM
This commit is contained in:
parent
7b6c7d17a9
commit
4cd0bba9e4
3 changed files with 31 additions and 12 deletions
|
@ -28,6 +28,14 @@ describe(
|
|||
cy.contains('Quelle est votre profession ?').should('be.visible')
|
||||
})
|
||||
|
||||
it('devrait effacer les réponses en cliquant sur réinitialiser', function () {
|
||||
cy.contains('Sage-femme').click()
|
||||
|
||||
cy.contains('Réinitialiser').click()
|
||||
|
||||
cy.contains('Recettes brutes totales').should('not.exist')
|
||||
})
|
||||
|
||||
it('devrait demander le statut', function () {
|
||||
cy.contains(
|
||||
'Quel était votre statut d’exercice au 1er janvier ou à votre date de début d’activité ?'
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { Trans } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { styled } from 'styled-components'
|
||||
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import Warning from '@/components/ui/WarningBlock'
|
||||
import { Message } from '@/design-system'
|
||||
import { Button } from '@/design-system/buttons'
|
||||
import { Spacing } from '@/design-system/layout'
|
||||
import { Strong } from '@/design-system/typography'
|
||||
import { Link } from '@/design-system/typography/link'
|
||||
|
@ -12,6 +13,7 @@ import { Li, Ul } from '@/design-system/typography/list'
|
|||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import useSimulationConfig from '@/hooks/useSimulationConfig'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { resetSimulation } from '@/store/actions/actions'
|
||||
import { situationSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import Formulaire from './components/Formulaire'
|
||||
|
@ -26,6 +28,7 @@ export default function DéclarationRevenusPAMC() {
|
|||
autoloadLastSimulation: true,
|
||||
})
|
||||
const situation = useSelector(situationSelector)
|
||||
const dispatch = useDispatch()
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -88,21 +91,27 @@ export default function DéclarationRevenusPAMC() {
|
|||
</Warning>
|
||||
|
||||
<Message type="secondary" icon>
|
||||
<Body>
|
||||
Afin de faciliter le remplissage, préparez :
|
||||
<Ul>
|
||||
<Li>l’ensemble des recettes encaissées,</Li>
|
||||
<Li>le détail des cotisations versées à l’Urssaf,</Li>
|
||||
<Li>
|
||||
le détail des cotisations versées à votre caisse de retraite.
|
||||
</Li>
|
||||
</Ul>
|
||||
</Body>
|
||||
<Body>Afin de faciliter le remplissage, préparez :</Body>
|
||||
<Ul>
|
||||
<Li>l’ensemble des recettes encaissées,</Li>
|
||||
<Li>le détail des cotisations versées à l’Urssaf,</Li>
|
||||
<Li>le détail des cotisations versées à votre caisse de retraite.</Li>
|
||||
</Ul>
|
||||
</Message>
|
||||
|
||||
<Formulaire />
|
||||
|
||||
<Spacing xxxl />
|
||||
<Spacing lg />
|
||||
|
||||
<Button
|
||||
onPress={() => {
|
||||
dispatch(resetSimulation())
|
||||
}}
|
||||
>
|
||||
Réinitialiser
|
||||
</Button>
|
||||
|
||||
<Spacing xxl />
|
||||
|
||||
<Résultats />
|
||||
</>
|
||||
|
|
|
@ -54,6 +54,7 @@ export function simulationReducer(
|
|||
...state,
|
||||
hiddenNotifications: [...state.hiddenNotifications, action.id],
|
||||
}
|
||||
|
||||
case 'RESET_SIMULATION':
|
||||
return {
|
||||
...state,
|
||||
|
@ -137,6 +138,7 @@ export function simulationReducer(
|
|||
|
||||
return newState
|
||||
}
|
||||
|
||||
case 'RETOURNE_À_LA_QUESTION_PRÉCÉDENTE': {
|
||||
if (state.questionsRépondues.length === 0) {
|
||||
return state
|
||||
|
|
Loading…
Add table
Reference in a new issue