diff --git a/source/components/inFranceApp/Steps/Create/MainStatus.js b/source/components/inFranceApp/Steps/Create/MainStatus.js new file mode 100644 index 000000000..f744c8ee4 --- /dev/null +++ b/source/components/inFranceApp/Steps/Create/MainStatus.js @@ -0,0 +1,167 @@ +/* @flow */ +import React from 'react'; +import { connect } from 'react-redux'; +import { defineDirectorStatus } from '../../actions'; +import * as Animate from '../../animate'; +import { SkipButton } from '../../ui/Button'; +import type { RouterHistory } from 'react-router' +import type { DirectorStatus , CompanyLegalSetup } from '../../types' +type Props = { + history: RouterHistory, + defineDirectorStatus: DirectorStatus => void +} + +const goToNextStep = (history: RouterHistory) => { + history.push('/create-my-company/declare-my-business') +} + +const LEGAL_STATUS: {[status: string]: {legalSetup: CompanyLegalSetup, legalEntity: DirectorStatus}} = { + EI: { legalSetup: 'SOLE_PROPRIETORSHIP', legalEntity: 'SELF_EMPLOYED'}, + EURL: { legalSetup: 'LIMITED_LIABILITY', legalEntity: ''}, + EIRL: { legalSetup: 'LIMITED_LIABILITY', legalEntity: 'SELF_EMPLOYED'}, + SARL: { legalSetup: 'SOLE_PROPRIETORSHIP', legalEntity: 'SELF_EMPLOYED'}, + SAS: { legalSetup: 'SOLE_PROPRIETORSHIP', legalEntity: 'SALARIED'}, + SA: { legalSetup: 'SOLE_PROPRIETORSHIP', legalEntity: 'SELF_EMPLOYED'}, + SNC: { legalSetup: 'SOLE_PROPRIETORSHIP', legalEntity: 'SELF_EMPLOYED'}, + SASU: { legalSetup: 'SOLE_PROPRIETORSHIP', legalEntity: 'SELF_EMPLOYED'} +} + type LegalStatus = $Keys + + const possibleStatus: PossibleLegalStatus = { + EI: true, + EURL: true, + EIRL: true, + SARL: true, + SAS: true, + SA: true, + SNC: true, + SASU: true +} + +const possibleStatusSelector = state => state.inFrance. + +const StatusButton = ({ + status, + history +}: { + status: LegalStatus, + history: RouterHistory +}) => ( + +) + +const SetMainStatus = ({ history }: Props) => ( + +

Set the legal status

+

To carry out your activity, you must choose a legal status.

+

+ The choice of a legal form of practice depends on several factors: the way + you wish to practice (alone or in a company), the possibility to separate + personal and professional wealth, the tax status linked to the envisaged + legal framework... +

+

+ This choice is important because it conditions your social protection. The + company regime of the executive depends on the legal structure chosen and + his function within it. +

+

+ Based on your previous answers, we narrowed it down for you to the + following possibilities: +

+ +
+ {/* $FlowFixMe */} + {(Object.entries(possibleStatus): Array<[LegalStatus, boolean]>) + .filter(([, statusIsVisible]) => statusIsVisible) + .map(([status]) => ( + + ))} + goToNextStep(history)} /> +
+
+) + +export default connect( + null, + { defineDirectorStatus } +)(SetMainStatus)