From b276c1cb1c6148277c1d587a417e84e291c99a1d Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Tue, 26 Jun 2018 17:00:54 +0200 Subject: [PATCH] wip --- .../inFranceApp/Steps/Create/MainStatus.js | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 source/components/inFranceApp/Steps/Create/MainStatus.js 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: +

+
    + {possibleStatus.EI && ( +
  • + EI - Entreprise individuelle (Individual business): + Also called company in own name or company in a personal name. No + capital contribution is necessary. Private wealth and corporate wealth + are one. +
  • + )} + {possibleStatus.EIRL && ( +
  • + + EIRL - Entrepreneur individuel à responsabilité limitée (Individual + entrepreneur with limited liability) + + Protects your property by assigning to your business a professional + heritage necessary for the activity. +
  • + )} + {possibleStatus.EURL && ( +
  • + + EURL - Entreprise unipersonnelle à responsabilité limitée (Limited + personal company):{' '} + + Company with only one partner. Liability is limited to the amount of + its contribution to the capital. +
  • + )} + {possibleStatus.SARL && ( +
  • + + SARL - Société à responsabilité limitée (Limited corporation):{' '} + + Composed of at least 2 partners whose financial responsibility is + limited to the amounts of contributions in the capital. The minimum + capital is freely fixed in the statutes. +
  • + )} + {possibleStatus.SAS && ( +
  • + + SAS - Société par action simplifiée (Simplified joint stock + company):{' '} + Composed of at least 2 associates. The financial + responsibility of the partners is limited to the amounts of + contributions in the capital. The minimum capital is freely fixed in + the statutes. +
  • + )} + {possibleStatus.SASU && ( +
  • + + SASU - Société par action simplifiée unitaire (Simplified personal + joint stock company):{' '} + Composed of only one associate. The financial responsibility + is limited to the amounts of contributions in the capital. The minimum + capital is freely fixed in the statutes. +
  • + )} + {possibleStatus.SA && ( +
  • + SASU - Société anonyme (Anonymous company):Company + composed of at least 2 shareholders if it is not listed. +
  • + )} + {possibleStatus.SNC && ( +
  • + SNC - Société en nom collectif (Partnership):The + partners are liable indefinitely and severally for the debts of the + company. +
  • + )} +
+
+ {/* $FlowFixMe */} + {(Object.entries(possibleStatus): Array<[LegalStatus, boolean]>) + .filter(([, statusIsVisible]) => statusIsVisible) + .map(([status]) => ( + + ))} + goToNextStep(history)} /> +
+
+) + +export default connect( + null, + { defineDirectorStatus } +)(SetMainStatus)