diff --git a/source/actions/companyStatusActions.js b/source/actions/companyStatusActions.js
index 75fd15a8e..5089517fa 100644
--- a/source/actions/companyStatusActions.js
+++ b/source/actions/companyStatusActions.js
@@ -9,6 +9,7 @@ import type {
DirectorIsInAMinorityAction,
DefineDirectorStatusAction
} from 'Types/companyTypes'
+import { last } from "ramda";
import type { RouterHistory } from 'react-router'
import { dropWhile } from "ramda";
import { nextQuestionUrlSelector } from 'Selectors/companyStatusSelectors'
@@ -88,3 +89,20 @@ export const resetCompanyStatusChoice = (from: string) => (
}: ResetCompanyStatusAction)
)
}
+
+export const goBackToPreviousQuestion = () => (
+ dispatch: ResetCompanyStatusAction => void,
+ getState: () => any,
+ history: RouterHistory
+) => {
+ const previousQuestion = last(Object.keys(getState().inFranceApp.companyLegalStatus));
+ if (previousQuestion) {
+ dispatch(
+ ({
+ type: 'RESET_COMPANY_STATUS_CHOICE',
+ answersToReset: [previousQuestion],
+ }: ResetCompanyStatusAction)
+ )
+ }
+ history.push(sitePaths().entreprise.statusJuridique[previousQuestion || 'index'])
+}
\ No newline at end of file
diff --git a/source/components/ui/Typography.css b/source/components/ui/Typography.css
index a583d82f9..0a5b0ed31 100644
--- a/source/components/ui/Typography.css
+++ b/source/components/ui/Typography.css
@@ -71,7 +71,7 @@ button {
p,
ul {
line-height: 1.7rem;
- margin: 0 0 1em;
+ margin: 0 0 1rem;
}
p.ui__.lead {
font-size: 1.7rem;
diff --git a/source/components/ui/index.css b/source/components/ui/index.css
index 0246325d7..2d9041b88 100644
--- a/source/components/ui/index.css
+++ b/source/components/ui/index.css
@@ -20,14 +20,15 @@ button {
.ui__.answer-group {
display: flex;
- flex-wrap: wrap;
justify-content: flex-end;
}
@media (max-width: 500px) {
.ui__.answer-group {
- flex-direction: column;
+ flex-wrap: wrap;
}
.ui__.answer-group > * {
+ flex-grow: 1;
+ flex-shrink: 0;
margin-right: 0;
}
}
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/CompanyStatusNavigation.js b/source/sites/mycompanyinfrance.fr/pages/Company/CompanyStatusNavigation.js
new file mode 100644
index 000000000..5dad44545
--- /dev/null
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/CompanyStatusNavigation.js
@@ -0,0 +1,27 @@
+/* @flow */
+
+import { goBackToPreviousQuestion } from 'Actions/companyStatusActions'
+import { T } from 'Components'
+import React from 'react'
+import { connect } from 'react-redux'
+import { SkipButton } from 'Ui/Button'
+type ownProps = {
+ onSkip?: () => void
+}
+
+type Props = ownProps & {
+ goBackToPreviousQuestion: () => void
+}
+export default connect(
+ null,
+ { goBackToPreviousQuestion }
+)(({ goBackToPreviousQuestion, onSkip }: Props) => (
+
+
+ {onSkip && }
+
+))
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/DirectorStatus.js b/source/sites/mycompanyinfrance.fr/pages/Company/DirectorStatus.js
index 1749edcc0..7aa8c9776 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/DirectorStatus.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/DirectorStatus.js
@@ -5,7 +5,7 @@ import { compose } from 'ramda'
import Helmet from 'react-helmet'
import { withI18n } from 'react-i18next'
import { connect } from 'react-redux'
-import { SkipButton } from 'Ui/Button'
+import CompanyStatusNavigation from './CompanyStatusNavigation'
import type { DirectorStatus } from 'Types/companyTypes'
import type { TFunction } from 'react-i18next'
@@ -70,8 +70,8 @@ const DefineDirectorStatus = ({ defineDirectorStatus, t }: Props) => (
}}>
Indépendant
- defineDirectorStatus(null)} />
+ defineDirectorStatus(null)} />
>
)
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/Home.js b/source/sites/mycompanyinfrance.fr/pages/Company/Home.js
index 9820f98f8..f6a022361 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/Home.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/Home.js
@@ -8,7 +8,7 @@ import { connect } from 'react-redux'
import { Link, Redirect } from 'react-router-dom'
import { nextQuestionUrlSelector } from 'Selectors/companyStatusSelectors'
import sitePaths from '../../sitePaths'
-import LegalStatusChoices from './LegalStatusChoice'
+import PreviousAnswers from './PreviousAnswers'
import type { TFunction } from 'react-i18next'
import type { Match, Location } from 'react-router'
@@ -81,7 +81,7 @@ const CreateMyCompany = ({
>
)}
-
+
>
)
}
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/Liability.js b/source/sites/mycompanyinfrance.fr/pages/Company/Liability.js
index c279bb06e..bd142e0e8 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/Liability.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/Liability.js
@@ -5,7 +5,7 @@ import { compose } from 'ramda'
import Helmet from 'react-helmet'
import { withI18n } from 'react-i18next'
import { connect } from 'react-redux'
-import { SkipButton } from 'Ui/Button'
+import CompanyStatusNavigation from './CompanyStatusNavigation'
import type { CompanyLiability } from 'Types/companyTypes'
import type { TFunction } from 'react-i18next'
@@ -108,8 +108,8 @@ const Liability = ({
className="ui__ button">
Responsabilité limitée
- chooseCompanyLiability(null)} />
+ chooseCompanyLiability(null)} />
{/* this is an economic activity conducted by a single natural person, in his own name ; */}
{/* Company : This is an economic activity conducted by a single partner - single member company with limited liability (EURL) - or several partners (limited liability company (SARL), public limited company (SA), simplified joint-stock company (SAS)...). */}
>
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/Microenterprise.js b/source/sites/mycompanyinfrance.fr/pages/Company/Microenterprise.js
index 0383c066e..873a3ec38 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/Microenterprise.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/Microenterprise.js
@@ -5,7 +5,8 @@ import { compose } from 'ramda'
import Helmet from 'react-helmet'
import { withI18n } from 'react-i18next'
import { connect } from 'react-redux'
-import { SkipButton } from 'Ui/Button'
+import CompanyStatusNavigation from './CompanyStatusNavigation'
+
import type { TFunction } from 'react-i18next'
type Props = {
@@ -95,8 +96,8 @@ const Microenterprise = ({ companyIsMicroenterprise, t }: Props) => (
className="ui__ button">
Entreprise Individuelle
- companyIsMicroenterprise(null)} />
+ companyIsMicroenterprise(null)}/>
>
)
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/MinorityDirector.js b/source/sites/mycompanyinfrance.fr/pages/Company/MinorityDirector.js
index 6938800fc..328d453ba 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/MinorityDirector.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/MinorityDirector.js
@@ -5,7 +5,7 @@ import { compose } from 'ramda'
import Helmet from 'react-helmet'
import { withI18n } from 'react-i18next'
import { connect } from 'react-redux'
-import { SkipButton } from 'Ui/Button'
+import CompanyStatusNavigation from './CompanyStatusNavigation'
import type { TFunction } from 'react-i18next'
type Props = {
@@ -66,8 +66,8 @@ const MinorityDirector = ({ directorIsInAMinority, t }: Props) => (
className="ui__ button">
Gérant minoritaire
- directorIsInAMinority(null)} />
+ directorIsInAMinority(null)} />
>
)
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/NumberOfAssociate.js b/source/sites/mycompanyinfrance.fr/pages/Company/NumberOfAssociate.js
index d51fa67d9..08a199a76 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/NumberOfAssociate.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/NumberOfAssociate.js
@@ -6,7 +6,7 @@ import { compose } from 'ramda'
import Helmet from 'react-helmet'
import { withI18n } from 'react-i18next'
import { connect } from 'react-redux'
-import { SkipButton } from 'Ui/Button'
+import CompanyStatusNavigation from './CompanyStatusNavigation'
import type { TFunction } from 'react-i18next'
type Props = {
@@ -64,8 +64,10 @@ const NumberOfAssociates = ({ companyHasMultipleAssociates, t }: Props) => (
className="ui__ button">
Plusieurs associés
- companyHasMultipleAssociates(null)} />
+ companyHasMultipleAssociates(null)}
+ />
>
)
diff --git a/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js b/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js
index 0d45e9802..e5ae8abc6 100644
--- a/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js
+++ b/source/sites/mycompanyinfrance.fr/pages/Company/PickLegalStatus.js
@@ -13,12 +13,12 @@ import withLanguage from 'Components/utils/withLanguage'
import type { TFunction } from 'react-i18next'
import sitePaths from '../../sitePaths';
-import { goToCompanyStatusChoice } from 'Actions/companyStatusActions'
+import { goBackToPreviousQuestion } from 'Actions/companyStatusActions'
type Props = {
history: RouterHistory,
possibleStatus: { [LegalStatus]: boolean },
- onStartAgain: () => void,
+ goBackToPreviousQuestion: () => void,
setMainStatus: LegalStatus => void,
language: string,
t: TFunction
@@ -32,7 +32,7 @@ const StatusButton = withI18n()(
)
)
-const SetMainStatus = ({ history, possibleStatus, onStartAgain, t, language }: Props) => {
+const SetMainStatus = ({ history, possibleStatus, goBackToPreviousQuestion, t, language }: Props) => {
return (
<>
@@ -161,8 +161,8 @@ const SetMainStatus = ({ history, possibleStatus, onStartAgain, t, language }: P
justifyContent: 'space-between'
}}
>
-