Move redux files into store directory
parent
62d5eeffa6
commit
7bc2f1db68
|
@ -24,7 +24,7 @@ import { ServiceWorker } from './components/ServiceWorker'
|
|||
import { DarkModeProvider } from './contexts/DarkModeContext'
|
||||
import { Message } from './design-system'
|
||||
import * as safeLocalStorage from './storage/safeLocalStorage'
|
||||
import { store } from './store'
|
||||
import { store } from './store/store'
|
||||
import { inIframe } from './utils'
|
||||
|
||||
type SiteName = 'mon-entreprise' | 'infrance' | 'publicodes'
|
||||
|
|
|
@ -4,7 +4,7 @@ import { useSelector } from 'react-redux'
|
|||
import { Message } from '@/design-system'
|
||||
import { Emoji } from '@/design-system/emoji'
|
||||
import { SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { firstStepCompletedSelector } from '@/selectors/simulationSelectors'
|
||||
import { firstStepCompletedSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import { FadeIn } from './ui/animate'
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@ import { Trans, useTranslation } from 'react-i18next'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { batchUpdateSituation } from '@/actions/actions'
|
||||
import { Switch } from '@/design-system/switch'
|
||||
import { situationSelector } from '@/selectors/simulationSelectors'
|
||||
import { batchUpdateSituation } from '@/store/actions/actions'
|
||||
import { situationSelector } from '@/store/selectors/simulationSelectors'
|
||||
import { catchDivideByZeroError } from '@/utils'
|
||||
|
||||
import { Condition, WhenApplicable } from './EngineValue'
|
||||
|
|
|
@ -3,7 +3,7 @@ import { useContext } from 'react'
|
|||
import { useSelector } from 'react-redux'
|
||||
|
||||
import { EngineContext, useEngine } from '@/components/utils/EngineContext'
|
||||
import { targetUnitSelector } from '@/selectors/simulationSelectors'
|
||||
import { targetUnitSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import BarChartBranch from './BarChart'
|
||||
|
||||
|
|
|
@ -4,12 +4,12 @@ import { Trans, useTranslation } from 'react-i18next'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { hideNotification } from '@/actions/actions'
|
||||
import { useEngine, useInversionFail } from '@/components/utils/EngineContext'
|
||||
import { Message } from '@/design-system'
|
||||
import { CloseButton } from '@/design-system/buttons'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { hideNotification } from '@/store/actions/actions'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
|
||||
import RuleLink from './RuleLink'
|
||||
import { Appear } from './ui/animate'
|
||||
|
|
|
@ -13,7 +13,7 @@ import { Spacing } from '@/design-system/layout'
|
|||
import { H1 } from '@/design-system/typography/heading'
|
||||
import { Intro } from '@/design-system/typography/paragraphs'
|
||||
import { useCurrentSimulatorData } from '@/hooks/useCurrentSimulatorData'
|
||||
import { situationSelector } from '@/selectors/simulationSelectors'
|
||||
import { situationSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import { NextSteps } from '../pages/Simulateurs/NextSteps'
|
||||
import { TrackChapter } from './ATInternetTracking'
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import { updateUnit } from '@/actions/actions'
|
||||
import { Radio, ToggleGroup } from '@/design-system/field'
|
||||
import { targetUnitSelector } from '@/selectors/simulationSelectors'
|
||||
import { updateUnit } from '@/store/actions/actions'
|
||||
import { targetUnitSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
export default function PeriodSwitch() {
|
||||
const dispatch = useDispatch()
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import { loadPreviousSimulation } from '@/actions/actions'
|
||||
import { Link } from '@/design-system/typography/link'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { firstStepCompletedSelector } from '@/selectors/simulationSelectors'
|
||||
import { loadPreviousSimulation } from '@/store/actions/actions'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
import { firstStepCompletedSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import Banner from './Banner'
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@ import { Trans, useTranslation } from 'react-i18next'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { goToQuestion } from '@/actions/actions'
|
||||
import { Spacing } from '@/design-system/layout'
|
||||
import { Link } from '@/design-system/typography/link'
|
||||
import { SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { goToQuestion } from '@/store/actions/actions'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
import {
|
||||
answeredQuestionsSelector,
|
||||
currentQuestionSelector,
|
||||
} from '@/selectors/simulationSelectors'
|
||||
} from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import { useNextQuestions } from './utils/useNextQuestion'
|
||||
|
||||
|
|
|
@ -2,11 +2,6 @@ import { useState } from 'react'
|
|||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import styled, { css } from 'styled-components'
|
||||
|
||||
import {
|
||||
defineDirectorStatus,
|
||||
isAutoentrepreneur,
|
||||
useDispatchAndGoToNextQuestion,
|
||||
} from '@/actions/companyStatusActions'
|
||||
import revenusSVG from '@/assets/images/revenus.svg'
|
||||
import { Message } from '@/design-system'
|
||||
import AnswerGroup from '@/design-system/answer-group'
|
||||
|
@ -16,6 +11,11 @@ import { Grid, Spacing } from '@/design-system/layout'
|
|||
import { H2, H3 } from '@/design-system/typography/heading'
|
||||
import { Intro } from '@/design-system/typography/paragraphs'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import {
|
||||
defineDirectorStatus,
|
||||
isAutoentrepreneur,
|
||||
useDispatchAndGoToNextQuestion,
|
||||
} from '@/store/actions/companyStatusActions'
|
||||
|
||||
type SchemeComparaisonProps = {
|
||||
hideAutoEntrepreneur?: boolean
|
||||
|
|
|
@ -4,10 +4,10 @@ import { Trans } from 'react-i18next'
|
|||
import { useDispatch } from 'react-redux'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { updateSituation } from '@/actions/actions'
|
||||
import Banner from '@/components/Banner'
|
||||
import { EngineContext } from '@/components/utils/EngineContext'
|
||||
import { Link as DesignSystemLink } from '@/design-system/typography/link'
|
||||
import { updateSituation } from '@/store/actions/actions'
|
||||
|
||||
const Bold = styled.span<{ bold: boolean }>`
|
||||
${({ bold }) => (bold ? 'font-weight: bold;' : '')}
|
||||
|
|
|
@ -11,7 +11,7 @@ import { useCurrentSimulatorData } from '@/hooks/useCurrentSimulatorData'
|
|||
import {
|
||||
companySituationSelector,
|
||||
situationSelector,
|
||||
} from '@/selectors/simulationSelectors'
|
||||
} from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import { TrackingContext } from '../ATInternetTracking'
|
||||
import { PlaceDesEntreprisesButton } from '../PlaceDesEntreprises'
|
||||
|
|
|
@ -4,12 +4,12 @@ import React, { useCallback, useState } from 'react'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { updateSituation } from '@/actions/actions'
|
||||
import { ForceThemeProvider } from '@/contexts/DarkModeContext'
|
||||
import { Grid } from '@/design-system/layout'
|
||||
import { Strong } from '@/design-system/typography'
|
||||
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { targetUnitSelector } from '@/selectors/simulationSelectors'
|
||||
import { updateSituation } from '@/store/actions/actions'
|
||||
import { targetUnitSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import RuleLink from '../RuleLink'
|
||||
import { ExplicableRule } from '../conversation/Explicable'
|
||||
|
|
|
@ -7,7 +7,7 @@ import { ForceThemeProvider } from '@/contexts/DarkModeContext'
|
|||
import { Grid } from '@/design-system/layout'
|
||||
import { Link } from '@/design-system/typography/link'
|
||||
import { SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { firstStepCompletedSelector } from '@/selectors/simulationSelectors'
|
||||
import { firstStepCompletedSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import { Logo } from '../Logo'
|
||||
import { WatchInitialRender } from '../utils/useInitialRender'
|
||||
|
|
|
@ -13,7 +13,7 @@ import { Link } from '@/design-system/typography/link'
|
|||
import {
|
||||
companySituationSelector,
|
||||
firstStepCompletedSelector,
|
||||
} from '@/selectors/simulationSelectors'
|
||||
} from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import { TrackPage } from '../ATInternetTracking'
|
||||
import Banner from '../Banner'
|
||||
|
|
|
@ -8,7 +8,7 @@ import styled from 'styled-components'
|
|||
|
||||
import RuleLink from '@/components/RuleLink'
|
||||
import useDisplayOnIntersecting from '@/components/utils/useDisplayOnIntersecting'
|
||||
import { targetUnitSelector } from '@/selectors/simulationSelectors'
|
||||
import { targetUnitSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import { DisableAnimationContext } from './utils/DisableAnimationContext'
|
||||
import { useEngine } from './utils/EngineContext'
|
||||
|
|
|
@ -5,8 +5,6 @@ import { Trans, useTranslation } from 'react-i18next'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { answerQuestion, resetSimulation } from '@/actions/actions'
|
||||
import { resetCompany } from '@/actions/companyActions'
|
||||
import { EvaluatedRule, useEngine } from '@/components/utils/EngineContext'
|
||||
import { useNextQuestions } from '@/components/utils/useNextQuestion'
|
||||
import { Message, PopoverWithTrigger } from '@/design-system'
|
||||
|
@ -19,12 +17,14 @@ import { H2, H3 } from '@/design-system/typography/heading'
|
|||
import { Link } from '@/design-system/typography/link'
|
||||
import { Body, Intro } from '@/design-system/typography/paragraphs'
|
||||
import { useCurrentSimulatorData } from '@/hooks/useCurrentSimulatorData'
|
||||
import { isCompanyDottedName } from '@/reducers/companySituationReducer'
|
||||
import { answerQuestion, resetSimulation } from '@/store/actions/actions'
|
||||
import { resetCompany } from '@/store/actions/companyActions'
|
||||
import { isCompanyDottedName } from '@/store/reducers/companySituationReducer'
|
||||
import {
|
||||
answeredQuestionsSelector,
|
||||
companySituationSelector,
|
||||
situationSelector,
|
||||
} from '@/selectors/simulationSelectors'
|
||||
} from '@/store/selectors/simulationSelectors'
|
||||
import { evaluateQuestion } from '@/utils'
|
||||
|
||||
import Value from '../EngineValue'
|
||||
|
|
|
@ -4,7 +4,6 @@ import React from 'react'
|
|||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import { answerQuestion } from '@/actions/actions'
|
||||
import Notifications from '@/components/Notifications'
|
||||
import QuickLinks from '@/components/QuickLinks'
|
||||
import RuleInput from '@/components/conversation/RuleInput'
|
||||
|
@ -15,10 +14,11 @@ import { Grid, Spacing } from '@/design-system/layout'
|
|||
import { H3 } from '@/design-system/typography/heading'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { useCurrentSimulatorData } from '@/hooks/useCurrentSimulatorData'
|
||||
import { answerQuestion } from '@/store/actions/actions'
|
||||
import {
|
||||
answeredQuestionsSelector,
|
||||
situationSelector,
|
||||
} from '@/selectors/simulationSelectors'
|
||||
} from '@/store/selectors/simulationSelectors'
|
||||
import { evaluateQuestion } from '@/utils'
|
||||
|
||||
import { TrackPage } from '../ATInternetTracking'
|
||||
|
|
|
@ -3,18 +3,18 @@ import Engine from 'publicodes'
|
|||
import { useEffect } from 'react'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import { useEngine } from '@/components/utils/EngineContext'
|
||||
import { useNextQuestions } from '@/components/utils/useNextQuestion'
|
||||
import {
|
||||
goToQuestion,
|
||||
stepAction,
|
||||
updateShouldFocusField,
|
||||
} from '@/actions/actions'
|
||||
import { useEngine } from '@/components/utils/EngineContext'
|
||||
import { useNextQuestions } from '@/components/utils/useNextQuestion'
|
||||
} from '@/store/actions/actions'
|
||||
import {
|
||||
answeredQuestionsSelector,
|
||||
currentQuestionSelector,
|
||||
useMissingVariables,
|
||||
} from '@/selectors/simulationSelectors'
|
||||
} from '@/store/selectors/simulationSelectors'
|
||||
|
||||
export function useNavigateQuestions(engines?: Array<Engine<DottedName>>) {
|
||||
const dispatch = useDispatch()
|
||||
|
|
|
@ -22,7 +22,7 @@ import { Strong } from '@/design-system/typography'
|
|||
import { H3 } from '@/design-system/typography/heading'
|
||||
import { Li, Ul } from '@/design-system/typography/list'
|
||||
import { SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { targetUnitSelector } from '@/selectors/simulationSelectors'
|
||||
import { targetUnitSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import CotisationsForfaitaires from './IndépendantCotisationsForfaitaires'
|
||||
import CotisationsRégularisation from './IndépendantCotisationsRégularisation'
|
||||
|
|
|
@ -19,7 +19,7 @@ import { Emoji } from '@/design-system/emoji'
|
|||
import { Grid } from '@/design-system/layout'
|
||||
import { H2, H3 } from '@/design-system/typography/heading'
|
||||
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { targetUnitSelector } from '@/selectors/simulationSelectors'
|
||||
import { targetUnitSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import * as logosSrc from './logos'
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'
|
|||
import { useSelector } from 'react-redux'
|
||||
import styled, { keyframes } from 'styled-components'
|
||||
|
||||
import { targetUnitSelector } from '@/selectors/simulationSelectors'
|
||||
import { targetUnitSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
type AnimatedTargetValueProps = {
|
||||
value?: number
|
||||
|
|
|
@ -9,12 +9,12 @@ import Engine, {
|
|||
import { createContext, useContext, useMemo } from 'react'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import { deleteFromSituation } from '@/actions/actions'
|
||||
import { deleteFromSituation } from '@/store/actions/actions'
|
||||
import {
|
||||
companySituationSelector,
|
||||
configSituationSelector,
|
||||
situationSelector,
|
||||
} from '@/selectors/simulationSelectors'
|
||||
} from '@/store/selectors/simulationSelectors'
|
||||
import { omit } from '@/utils'
|
||||
|
||||
import i18n from '../../locales/i18n'
|
||||
|
|
|
@ -3,12 +3,12 @@ import Engine from 'publicodes'
|
|||
import { useMemo } from 'react'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
||||
import { SimulationConfig } from '@/reducers/rootReducer'
|
||||
import { SimulationConfig } from '@/store/reducers/rootReducer'
|
||||
import {
|
||||
answeredQuestionsSelector,
|
||||
configSelector,
|
||||
useMissingVariables,
|
||||
} from '@/selectors/simulationSelectors'
|
||||
} from '@/store/selectors/simulationSelectors'
|
||||
import { ImmutableType } from '@/types/utils'
|
||||
|
||||
import { useEngine } from './EngineContext'
|
||||
|
|
|
@ -4,10 +4,10 @@ import { useEffect, useMemo, useState } from 'react'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { useSearchParams } from 'react-router-dom'
|
||||
|
||||
import { batchUpdateSituation, setActiveTarget } from '@/actions/actions'
|
||||
import { useEngine } from '@/components/utils/EngineContext'
|
||||
import { Situation } from '@/reducers/rootReducer'
|
||||
import { configObjectifsSelector } from '@/selectors/simulationSelectors'
|
||||
import { batchUpdateSituation, setActiveTarget } from '@/store/actions/actions'
|
||||
import { Situation } from '@/store/reducers/rootReducer'
|
||||
import { configObjectifsSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
type ShortName = string
|
||||
type ParamName = DottedName | ShortName
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
import { useEffect, useLayoutEffect } from 'react'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import { loadPreviousSimulation, setSimulationConfig } from '@/actions/actions'
|
||||
import { SimulationConfig } from '@/reducers/rootReducer'
|
||||
import { configSelector } from '@/selectors/simulationSelectors'
|
||||
import {
|
||||
loadPreviousSimulation,
|
||||
setSimulationConfig,
|
||||
} from '@/store/actions/actions'
|
||||
import { SimulationConfig } from '@/store/reducers/rootReducer'
|
||||
import { configSelector } from '@/store/selectors/simulationSelectors'
|
||||
import { ImmutableType } from '@/types/utils'
|
||||
|
||||
export default function useSimulationConfig({
|
||||
|
|
|
@ -2,10 +2,10 @@ import { DottedName } from 'modele-social'
|
|||
import { PublicodesExpression, RuleNode } from 'publicodes'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import { stepAction, updateSituation } from '@/actions/actions'
|
||||
import { useEngine } from '@/components/utils/EngineContext'
|
||||
import { useNextQuestions } from '@/components/utils/useNextQuestion'
|
||||
import { answeredQuestionsSelector } from '@/selectors/simulationSelectors'
|
||||
import { stepAction, updateSituation } from '@/store/actions/actions'
|
||||
import { answeredQuestionsSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
export function useQuestionList(): [
|
||||
questions: Array<RuleNode & { dottedName: DottedName }>,
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { useDispatch } from 'react-redux'
|
||||
|
||||
import fetchBénéfice from '@/api/activité-vers-bénéfice'
|
||||
import { fetchCommuneDetails } from '@/api/commune'
|
||||
import { FabriqueSocialEntreprise } from '@/api/fabrique-social'
|
||||
import {
|
||||
addCommuneDetails,
|
||||
setBénéficeType,
|
||||
setCompany,
|
||||
} from '@/actions/companyActions'
|
||||
import fetchBénéfice from '@/api/activité-vers-bénéfice'
|
||||
import { fetchCommuneDetails } from '@/api/commune'
|
||||
import { FabriqueSocialEntreprise } from '@/api/fabrique-social'
|
||||
} from '@/store/actions/companyActions'
|
||||
|
||||
export function useSetEntreprise() {
|
||||
const dispatch = useDispatch()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { useEffect } from 'react'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import { updateShouldFocusField } from '@/actions/actions'
|
||||
import { shouldFocusFieldSelector } from '@/selectors/simulationSelectors'
|
||||
import { updateShouldFocusField } from '@/store/actions/actions'
|
||||
import { shouldFocusFieldSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
export const useShouldFocusField = () => {
|
||||
const dispatch = useDispatch()
|
||||
|
|
|
@ -8,8 +8,8 @@ import { ScrollToTop } from '@/components/utils/Scroll'
|
|||
import { H1, H2 } from '@/design-system/typography/heading'
|
||||
import { Link } from '@/design-system/typography/link'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
|
||||
import siret from './siret.jpg'
|
||||
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch, useSelector } from 'react-redux'
|
||||
|
||||
import {
|
||||
checkCompanyCreationItem,
|
||||
initializeCompanyCreationChecklist,
|
||||
} from '@/actions/companyCreationChecklistActions'
|
||||
import { resetCompanyStatusChoice } from '@/actions/companyStatusActions'
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import { CheckItem, Checklist } from '@/components/ui/Checklist'
|
||||
import { FromBottom } from '@/components/ui/animate'
|
||||
|
@ -19,9 +14,14 @@ import { H1, H2 } from '@/design-system/typography/heading'
|
|||
import { Link } from '@/design-system/typography/link'
|
||||
import { Li, Ul } from '@/design-system/typography/list'
|
||||
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { LegalStatus } from '@/selectors/companyStatusSelectors'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import {
|
||||
checkCompanyCreationItem,
|
||||
initializeCompanyCreationChecklist,
|
||||
} from '@/store/actions/companyCreationChecklistActions'
|
||||
import { resetCompanyStatusChoice } from '@/store/actions/companyStatusActions'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
import { LegalStatus } from '@/store/selectors/companyStatusSelectors'
|
||||
|
||||
import StatutDescription from './StatutDescription'
|
||||
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
||||
import {
|
||||
directorIsInAMinority,
|
||||
useDispatchAndGoToNextQuestion,
|
||||
} from '@/actions/companyStatusActions'
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import DefaultHelmet from '@/components/utils/DefaultHelmet'
|
||||
import AnswerGroup from '@/design-system/answer-group'
|
||||
|
@ -11,6 +7,10 @@ import { Button } from '@/design-system/buttons'
|
|||
import { H2 } from '@/design-system/typography/heading'
|
||||
import { Li, Ul } from '@/design-system/typography/list'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import {
|
||||
directorIsInAMinority,
|
||||
useDispatchAndGoToNextQuestion,
|
||||
} from '@/store/actions/companyStatusActions'
|
||||
|
||||
export default function MinorityDirector() {
|
||||
const { t } = useTranslation()
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
||||
import {
|
||||
companyHasMultipleAssociates,
|
||||
useDispatchAndGoToNextQuestion,
|
||||
} from '@/actions/companyStatusActions'
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import DefaultHelmet from '@/components/utils/DefaultHelmet'
|
||||
import AnswerGroup from '@/design-system/answer-group'
|
||||
import { Button } from '@/design-system/buttons'
|
||||
import { H2 } from '@/design-system/typography/heading'
|
||||
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import {
|
||||
companyHasMultipleAssociates,
|
||||
useDispatchAndGoToNextQuestion,
|
||||
} from '@/store/actions/companyStatusActions'
|
||||
|
||||
export default function NumberOfAssociates() {
|
||||
const dispatch = useDispatchAndGoToNextQuestion()
|
||||
|
|
|
@ -7,11 +7,11 @@ import DefaultHelmet from '@/components/utils/DefaultHelmet'
|
|||
import { Button } from '@/design-system/buttons'
|
||||
import { H2, H3 } from '@/design-system/typography/heading'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import {
|
||||
LegalStatus,
|
||||
possibleStatusSelector,
|
||||
} from '@/selectors/companyStatusSelectors'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
} from '@/store/selectors/companyStatusSelectors'
|
||||
|
||||
import StatutDescription from '../StatutDescription'
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@ import { useSelector } from 'react-redux'
|
|||
import styled from 'styled-components'
|
||||
|
||||
import { Link } from '@/design-system/typography/link'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
import { LegalStatusRequirements } from '@/types/companyTypes'
|
||||
|
||||
interface RequirementToTextType {
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
import { Trans, useTranslation } from 'react-i18next'
|
||||
|
||||
import {
|
||||
isSoleProprietorship,
|
||||
useDispatchAndGoToNextQuestion,
|
||||
} from '@/actions/companyStatusActions'
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import DefaultHelmet from '@/components/utils/DefaultHelmet'
|
||||
import AnswerGroup from '@/design-system/answer-group'
|
||||
|
@ -11,6 +7,10 @@ import { Button } from '@/design-system/buttons'
|
|||
import { H2 } from '@/design-system/typography/heading'
|
||||
import { Li, Ul } from '@/design-system/typography/list'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import {
|
||||
isSoleProprietorship,
|
||||
useDispatchAndGoToNextQuestion,
|
||||
} from '@/store/actions/companyStatusActions'
|
||||
|
||||
export default function SoleProprietorship() {
|
||||
const dispatch = useDispatchAndGoToNextQuestion()
|
||||
|
|
|
@ -3,13 +3,13 @@ import { Trans } from 'react-i18next'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { Navigate, Route, Routes, useLocation } from 'react-router-dom'
|
||||
|
||||
import { resetCompanyStatusChoice } from '@/actions/companyStatusActions'
|
||||
import { TrackChapter } from '@/components/ATInternetTracking'
|
||||
import { FromBottom } from '@/components/ui/animate'
|
||||
import { H1 } from '@/design-system/typography/heading'
|
||||
import { Link } from '@/design-system/typography/link'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { resetCompanyStatusChoice } from '@/store/actions/companyStatusActions'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
|
||||
import AutoEntrepreneur from './AutoEntrepreneur'
|
||||
import DirectorStatus from './DirectorStatus'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Trans } from 'react-i18next'
|
||||
|
||||
import { LegalStatus } from '@/selectors/companyStatusSelectors'
|
||||
import { LegalStatus } from '@/store/selectors/companyStatusSelectors'
|
||||
|
||||
type Props = {
|
||||
statut: LegalStatus
|
||||
|
|
|
@ -11,9 +11,9 @@ import { Grid, Spacing } from '@/design-system/layout'
|
|||
import { H2 } from '@/design-system/typography/heading'
|
||||
import { Intro, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import useSimulatorsData from '@/hooks/useSimulatorsData'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { useNextQuestionUrl } from '@/selectors/companyStatusSelectors'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
import { useNextQuestionUrl } from '@/store/selectors/companyStatusSelectors'
|
||||
|
||||
import { SimulateurCard } from '../../Simulateurs/Home'
|
||||
import créerSvg from './créer.svg'
|
||||
|
|
|
@ -28,8 +28,8 @@ import { H1, H2, H3, H4, H5 } from '@/design-system/typography/heading'
|
|||
import { Link, StyledLink } from '@/design-system/typography/link'
|
||||
import { Li, Ul } from '@/design-system/typography/list'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
|
||||
import { TrackPage } from '../components/ATInternetTracking'
|
||||
import RuleLink from '../components/RuleLink'
|
||||
|
|
|
@ -3,7 +3,6 @@ import { Trans, useTranslation } from 'react-i18next'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import { generatePath, useNavigate } from 'react-router-dom'
|
||||
|
||||
import { resetCompany } from '@/actions/companyActions'
|
||||
import {
|
||||
FabriqueSocialEntreprise,
|
||||
searchDenominationOrSiren,
|
||||
|
@ -20,9 +19,10 @@ import PopoverConfirm from '@/design-system/popover/PopoverConfirm'
|
|||
import { H3 } from '@/design-system/typography/heading'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { useSetEntreprise } from '@/hooks/useSetEntreprise'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { getCookieValue } from '@/storage/readCookie'
|
||||
import { resetCompany } from '@/store/actions/companyActions'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
|
||||
export default function SearchOrCreate() {
|
||||
const { absoluteSitePaths } = useSitePaths()
|
||||
|
|
|
@ -5,7 +5,6 @@ import { useDispatch } from 'react-redux'
|
|||
import styled from 'styled-components'
|
||||
|
||||
import { DottedName } from '@/../../modele-social'
|
||||
import { answerQuestion } from '@/actions/actions'
|
||||
import Value from '@/components/EngineValue'
|
||||
import { SwitchInput } from '@/components/conversation/ChoicesInput'
|
||||
import { ExplicableRule } from '@/components/conversation/Explicable'
|
||||
|
@ -22,6 +21,7 @@ import { Strong } from '@/design-system/typography'
|
|||
import { H1, H4, H5 } from '@/design-system/typography/heading'
|
||||
import { Link, StyledLink } from '@/design-system/typography/link'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { answerQuestion } from '@/store/actions/actions'
|
||||
|
||||
import { useCasParticuliers } from '../contexts/CasParticuliers'
|
||||
import { StatusTagIcon } from './StatusCard'
|
||||
|
|
|
@ -4,7 +4,6 @@ import { Trans, useTranslation } from 'react-i18next'
|
|||
import { useDispatch } from 'react-redux'
|
||||
import { ThemeContext } from 'styled-components'
|
||||
|
||||
import { updateSituation } from '@/actions/actions'
|
||||
import { Condition } from '@/components/EngineValue'
|
||||
import Notifications from '@/components/Notifications'
|
||||
import Simulation, {
|
||||
|
@ -17,6 +16,7 @@ import { useEngine } from '@/components/utils/EngineContext'
|
|||
import { Radio, ToggleGroup } from '@/design-system/field'
|
||||
import { H2 } from '@/design-system/typography/heading'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { updateSituation } from '@/store/actions/actions'
|
||||
|
||||
export default function DividendesSimulation() {
|
||||
return (
|
||||
|
|
|
@ -2,7 +2,6 @@ import { Trans } from 'react-i18next'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { updateSituation } from '@/actions/actions'
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import Value from '@/components/EngineValue'
|
||||
import Notifications from '@/components/Notifications'
|
||||
|
@ -12,7 +11,8 @@ import Warning from '@/components/ui/WarningBlock'
|
|||
import { FromTop } from '@/components/ui/animate'
|
||||
import { H2 } from '@/design-system/typography/heading'
|
||||
import { Body, Intro } from '@/design-system/typography/paragraphs'
|
||||
import { situationSelector } from '@/selectors/simulationSelectors'
|
||||
import { updateSituation } from '@/store/actions/actions'
|
||||
import { situationSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
export default function ISSimulation() {
|
||||
return (
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { Trans } from 'react-i18next'
|
||||
import { useDispatch } from 'react-redux'
|
||||
|
||||
import { updateSituation } from '@/actions/actions'
|
||||
import ChiffreAffairesActivitéMixte from '@/components/ChiffreAffairesActivitéMixte'
|
||||
import { Condition } from '@/components/EngineValue'
|
||||
import PeriodSwitch from '@/components/PeriodSwitch'
|
||||
|
@ -18,6 +17,7 @@ import { Message } from '@/design-system'
|
|||
import { Emoji } from '@/design-system/emoji'
|
||||
import { H2 } from '@/design-system/typography/heading'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { updateSituation } from '@/store/actions/actions'
|
||||
|
||||
export function IndépendantPLSimulation() {
|
||||
return (
|
||||
|
|
|
@ -27,8 +27,8 @@ import { H2 } from '@/design-system/typography/heading'
|
|||
import { Link } from '@/design-system/typography/link'
|
||||
import { Li, Ul } from '@/design-system/typography/list'
|
||||
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { targetUnitSelector } from '@/selectors/simulationSelectors'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { targetUnitSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import urlIllustrationNetBrutEn from './illustration-net-brut-en.png'
|
||||
import urlIllustrationNetBrut from './illustration-net-brut.png'
|
||||
|
|
|
@ -6,7 +6,6 @@ import { useTranslation } from 'react-i18next'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { updateSituation } from '@/actions/actions'
|
||||
import { ExplicableRule } from '@/components/conversation/Explicable'
|
||||
import RuleInput from '@/components/conversation/RuleInput'
|
||||
import { FadeIn } from '@/components/ui/animate'
|
||||
|
@ -16,10 +15,11 @@ import { useNextQuestions } from '@/components/utils/useNextQuestion'
|
|||
import { Spacing } from '@/design-system/layout'
|
||||
import { H3 } from '@/design-system/typography/heading'
|
||||
import { Intro, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { updateSituation } from '@/store/actions/actions'
|
||||
import {
|
||||
situationSelector,
|
||||
targetUnitSelector,
|
||||
} from '@/selectors/simulationSelectors'
|
||||
} from '@/store/selectors/simulationSelectors'
|
||||
import { evaluateQuestion, getMeta } from '@/utils'
|
||||
|
||||
type SubSectionProp = {
|
||||
|
|
|
@ -5,7 +5,6 @@ import { Trans, useTranslation } from 'react-i18next'
|
|||
import { useDispatch, useSelector } from 'react-redux'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { updateSituation } from '@/actions/actions'
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import { Condition, WhenAlreadyDefined } from '@/components/EngineValue'
|
||||
import PageHeader from '@/components/PageHeader'
|
||||
|
@ -19,9 +18,10 @@ import { Strong } from '@/design-system/typography'
|
|||
import { H2, H3 } from '@/design-system/typography/heading'
|
||||
import { Li, Ul } from '@/design-system/typography/list'
|
||||
import { Body, Intro, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { SimulationConfig } from '@/reducers/rootReducer'
|
||||
import { situationSelector } from '@/selectors/simulationSelectors'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { updateSituation } from '@/store/actions/actions'
|
||||
import { SimulationConfig } from '@/store/reducers/rootReducer'
|
||||
import { situationSelector } from '@/store/selectors/simulationSelectors'
|
||||
|
||||
import { SimpleField, SubSection } from '../components/Fields'
|
||||
import { ExplicationsResultatFiscal } from './components/ExplicationResultatFiscal'
|
||||
|
|
|
@ -5,7 +5,6 @@ import { useTranslation } from 'react-i18next'
|
|||
import { useDispatch } from 'react-redux'
|
||||
import styled, { css } from 'styled-components'
|
||||
|
||||
import { updateSituation } from '@/actions/actions'
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import Value, { Condition } from '@/components/EngineValue'
|
||||
import ShareOrSaveSimulationBanner from '@/components/ShareSimulationBanner'
|
||||
|
@ -20,6 +19,7 @@ import { Strong } from '@/design-system/typography'
|
|||
import { H2, H3, H4 } from '@/design-system/typography/heading'
|
||||
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { updateSituation } from '@/store/actions/actions'
|
||||
import { getMeta } from '@/utils'
|
||||
|
||||
import { SimpleField } from '../../components/Fields'
|
||||
|
|
|
@ -3,7 +3,6 @@ import { Trans } from 'react-i18next'
|
|||
import { useDispatch } from 'react-redux'
|
||||
import styled, { css } from 'styled-components'
|
||||
|
||||
import { updateSituation } from '@/actions/actions'
|
||||
import { useEngine } from '@/components/utils/EngineContext'
|
||||
import { Message } from '@/design-system'
|
||||
import { Spacing } from '@/design-system/layout'
|
||||
|
@ -12,6 +11,7 @@ import { Strong } from '@/design-system/typography'
|
|||
import { H3 } from '@/design-system/typography/heading'
|
||||
import { Body, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { useOrdinal } from '@/hooks/useOrdinal'
|
||||
import { updateSituation } from '@/store/actions/actions'
|
||||
|
||||
export default function ModeAccompagnement() {
|
||||
const engine = useEngine()
|
||||
|
|
|
@ -2,8 +2,6 @@ import { DottedName } from 'modele-social'
|
|||
import { Trans } from 'react-i18next'
|
||||
import { useDispatch } from 'react-redux'
|
||||
|
||||
import { resetSimulation } from '@/actions/actions'
|
||||
import { resetCompany } from '@/actions/companyActions'
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import {
|
||||
Condition,
|
||||
|
@ -28,6 +26,8 @@ import { Li, Ul } from '@/design-system/typography/list'
|
|||
import { Body, Intro } from '@/design-system/typography/paragraphs'
|
||||
import { useSetEntreprise } from '@/hooks/useSetEntreprise'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { resetSimulation } from '@/store/actions/actions'
|
||||
import { resetCompany } from '@/store/actions/companyActions'
|
||||
|
||||
import { SimpleField } from '../components/Fields'
|
||||
import Exceptions from './components/Exceptions'
|
||||
|
|
|
@ -5,7 +5,6 @@ import { useCallback } from 'react'
|
|||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDispatch } from 'react-redux'
|
||||
|
||||
import { updateSituation } from '@/actions/actions'
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import {
|
||||
Condition,
|
||||
|
@ -26,6 +25,7 @@ import { H2, H3, H5 } from '@/design-system/typography/heading'
|
|||
import { Link } from '@/design-system/typography/link'
|
||||
import { Body, Intro, SmallBody } from '@/design-system/typography/paragraphs'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { updateSituation } from '@/store/actions/actions'
|
||||
import { getMeta } from '@/utils'
|
||||
|
||||
import { SimpleField } from '../components/Fields'
|
||||
|
|
|
@ -9,8 +9,8 @@ import { useSimulationProgress } from '@/components/utils/useNextQuestion'
|
|||
import useSimulationConfig from '@/components/utils/useSimulationConfig'
|
||||
import { Step, Stepper } from '@/design-system'
|
||||
import { Spacing } from '@/design-system/layout'
|
||||
import { SimulationConfig } from '@/reducers/rootReducer'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { SimulationConfig } from '@/store/reducers/rootReducer'
|
||||
import { omit } from '@/utils'
|
||||
|
||||
import { useProgress } from './components/hooks'
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { connect, useSelector } from 'react-redux'
|
||||
|
||||
import {
|
||||
checkHiringItem,
|
||||
initializeHiringChecklist,
|
||||
} from '@/actions/hiringChecklistAction'
|
||||
import { TrackPage } from '@/components/ATInternetTracking'
|
||||
import { CheckItem, Checklist, ChecklistProps } from '@/components/ui/Checklist'
|
||||
import { FromBottom } from '@/components/ui/animate'
|
||||
|
@ -13,7 +9,11 @@ import { H1, H2, H3 } from '@/design-system/typography/heading'
|
|||
import { Link } from '@/design-system/typography/link'
|
||||
import { Li, Ul } from '@/design-system/typography/list'
|
||||
import { Body } from '@/design-system/typography/paragraphs'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import {
|
||||
checkHiringItem,
|
||||
initializeHiringChecklist,
|
||||
} from '@/store/actions/hiringChecklistAction'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
|
||||
import { SimulatorRessourceCard } from '../Simulateurs/cards/SimulatorRessourceCard'
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ import {
|
|||
} from 'react-router-dom'
|
||||
import styled from 'styled-components'
|
||||
|
||||
import { resetCompany } from '@/actions/companyActions'
|
||||
import {
|
||||
FabriqueSocialEntreprise,
|
||||
searchDenominationOrSiren,
|
||||
|
@ -48,8 +47,9 @@ import { Body, Intro } from '@/design-system/typography/paragraphs'
|
|||
import { useQuestionList } from '@/hooks/useQuestionList'
|
||||
import { useSetEntreprise } from '@/hooks/useSetEntreprise'
|
||||
import useSimulatorsData, { SimulatorData } from '@/hooks/useSimulatorsData'
|
||||
import { companySituationSelector } from '@/selectors/simulationSelectors'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
import { resetCompany } from '@/store/actions/companyActions'
|
||||
import { companySituationSelector } from '@/store/selectors/simulationSelectors'
|
||||
import { evaluateQuestion } from '@/utils'
|
||||
|
||||
import { SimulateurCard } from '../Simulateurs/Home'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { MetadataSrc } from '@/pages/Simulateurs/metadata-src'
|
||||
import { LegalStatus } from '@/selectors/companyStatusSelectors'
|
||||
import { LegalStatus } from '@/store/selectors/companyStatusSelectors'
|
||||
|
||||
export const LANDING_LEGAL_STATUS_LIST: Array<LegalStatus> = [
|
||||
'EI',
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Store } from 'redux'
|
||||
|
||||
import { Action } from '@/actions/actions'
|
||||
import { ChoixStatutJuridiqueState } from '@/reducers/choixStatutJuridiqueReducer'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { Action } from '@/store/actions/actions'
|
||||
import { ChoixStatutJuridiqueState } from '@/store/reducers/choixStatutJuridiqueReducer'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
|
||||
import { debounce } from '../utils'
|
||||
import * as safeLocalStorage from './safeLocalStorage'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Store } from 'redux'
|
||||
|
||||
import { Action } from '@/actions/actions'
|
||||
import { RootState, Situation } from '@/reducers/rootReducer'
|
||||
import { Action } from '@/store/actions/actions'
|
||||
import { RootState, Situation } from '@/store/reducers/rootReducer'
|
||||
|
||||
import { debounce } from '../utils'
|
||||
import * as safeLocalStorage from './safeLocalStorage'
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Store } from 'redux'
|
||||
|
||||
import { Action } from '@/actions/actions'
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { PreviousSimulation } from '@/selectors/previousSimulationSelectors'
|
||||
import { Action } from '@/store/actions/actions'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
import { PreviousSimulation } from '@/store/selectors/previousSimulationSelectors'
|
||||
|
||||
import { debounce } from '../utils'
|
||||
import * as safeLocalStorage from './safeLocalStorage'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { currentSimulationSelector } from '@/selectors/previousSimulationSelectors'
|
||||
import { currentSimulationSelector } from '@/store/selectors/previousSimulationSelectors'
|
||||
|
||||
export const serialize = (
|
||||
...args: Parameters<typeof currentSimulationSelector>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { DottedName } from 'modele-social'
|
||||
import Engine, { PublicodesExpression } from 'publicodes'
|
||||
|
||||
import { SimulationConfig } from '@/reducers/rootReducer'
|
||||
import { SimulationConfig } from '@/store/reducers/rootReducer'
|
||||
import { ImmutableType } from '@/types/utils'
|
||||
import { buildSituationFromObject } from '@/utils'
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { LegalStatus } from '@/selectors/companyStatusSelectors'
|
||||
import { LegalStatus } from '@/store/selectors/companyStatusSelectors'
|
||||
|
||||
export type CompanyCreationAction = ReturnType<
|
||||
typeof initializeCompanyCreationChecklist | typeof checkCompanyCreationItem
|
|
@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'
|
|||
import { useDispatch } from 'react-redux'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
import { useNextQuestionUrl } from '@/selectors/companyStatusSelectors'
|
||||
import { useNextQuestionUrl } from '@/store/selectors/companyStatusSelectors'
|
||||
import { LegalStatusRequirements } from '@/types/companyTypes'
|
||||
|
||||
import { Action } from './actions'
|
|
@ -1,10 +1,9 @@
|
|||
import { combineReducers } from 'redux'
|
||||
|
||||
import { Action } from '@/actions/actions'
|
||||
import { LegalStatus } from '@/selectors/companyStatusSelectors'
|
||||
import { Action } from '@/store/actions/actions'
|
||||
import { LegalStatus } from '@/store/selectors/companyStatusSelectors'
|
||||
import { LegalStatusRequirements } from '@/types/companyTypes'
|
||||
|
||||
import { omit } from '../utils'
|
||||
import { omit } from '@/utils'
|
||||
|
||||
function companyLegalStatus(
|
||||
state: LegalStatusRequirements = {},
|
|
@ -1,7 +1,7 @@
|
|||
import { DottedName } from 'modele-social'
|
||||
|
||||
import { Action } from '@/actions/actions'
|
||||
import { FabriqueSocialEntreprise } from '@/api/fabrique-social'
|
||||
import { Action } from '@/store/actions/actions'
|
||||
import { buildSituationFromObject, omit } from '@/utils'
|
||||
|
||||
import { Situation } from './rootReducer'
|
|
@ -1,7 +1,7 @@
|
|||
import { Action } from '@/actions/actions'
|
||||
import { Simulation } from '@/reducers/rootReducer'
|
||||
import { retrievePersistedSimulation } from '@/storage/persistSimulation'
|
||||
import { Action } from '@/store/actions/actions'
|
||||
import { Simulation } from '@/store/reducers/rootReducer'
|
||||
|
||||
import { retrievePersistedSimulation } from '../storage/persistSimulation'
|
||||
import { RootState } from './rootReducer'
|
||||
|
||||
export const createStateFromPreviousSimulation = (
|
|
@ -2,9 +2,9 @@ import { DottedName } from 'modele-social'
|
|||
import reduceReducers from 'reduce-reducers'
|
||||
import { Reducer, combineReducers } from 'redux'
|
||||
|
||||
import { Action } from '@/actions/actions'
|
||||
import { SimulationConfig, Situation } from '@/pages/Simulateurs/configs/types'
|
||||
import { PreviousSimulation } from '@/selectors/previousSimulationSelectors'
|
||||
import { Action } from '@/store/actions/actions'
|
||||
import { PreviousSimulation } from '@/store/selectors/previousSimulationSelectors'
|
||||
import { ImmutableType } from '@/types/utils'
|
||||
import { objectTransform, omit } from '@/utils'
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
import { useSelector } from 'react-redux'
|
||||
|
||||
import { RootState } from '@/reducers/rootReducer'
|
||||
import { useSitePaths } from '@/sitePaths'
|
||||
|
||||
import { LegalStatusRequirements, State } from '../types/companyTypes'
|
||||
import { RootState } from '@/store/reducers/rootReducer'
|
||||
import { LegalStatusRequirements, State } from '@/types/companyTypes'
|
||||
|
||||
const LEGAL_STATUS_DETAILS = {
|
||||
'auto-entrepreneur': {
|
|
@ -1,6 +1,6 @@
|
|||
import { DottedName } from 'modele-social'
|
||||
|
||||
import { RootState, Simulation } from '@/reducers/rootReducer'
|
||||
import { RootState, Simulation } from '@/store/reducers/rootReducer'
|
||||
|
||||
export type PreviousSimulation = {
|
||||
situation: Simulation['situation']
|
|
@ -4,7 +4,7 @@ import { useSelector } from 'react-redux'
|
|||
import { createSelector } from 'reselect'
|
||||
|
||||
import { useEngine } from '@/components/utils/EngineContext'
|
||||
import { RootState, Situation } from '@/reducers/rootReducer'
|
||||
import { RootState, Situation } from '@/store/reducers/rootReducer'
|
||||
|
||||
export const configSelector = (state: RootState) =>
|
||||
state.simulation?.config ?? {}
|
|
@ -2,17 +2,17 @@ import { composeWithDevToolsDevelopmentOnly } from '@redux-devtools/extension'
|
|||
import { createReduxEnhancer } from '@sentry/react'
|
||||
import { StoreEnhancer, applyMiddleware, createStore } from 'redux'
|
||||
|
||||
import reducers from '@/reducers/rootReducer'
|
||||
import reducers from '@/store/reducers/rootReducer'
|
||||
|
||||
import {
|
||||
retrievePersistedChoixStatutJuridique,
|
||||
setupChoixStatutJuridiquePersistence,
|
||||
} from './storage/persistChoixStatutJuridique'
|
||||
} from '../storage/persistChoixStatutJuridique'
|
||||
import {
|
||||
retrievePersistedCompanySituation,
|
||||
setupCompanySituationPersistence,
|
||||
} from './storage/persistCompanySituation'
|
||||
import { setupSimulationPersistence } from './storage/persistSimulation'
|
||||
} from '../storage/persistCompanySituation'
|
||||
import { setupSimulationPersistence } from '../storage/persistSimulation'
|
||||
|
||||
const initialStore = {
|
||||
choixStatutJuridique: retrievePersistedChoixStatutJuridique(),
|
|
@ -1,4 +1,4 @@
|
|||
import { LegalStatus } from '@/selectors/companyStatusSelectors'
|
||||
import { LegalStatus } from '@/store/selectors/companyStatusSelectors'
|
||||
|
||||
export type IsSoleProprietorshipAction = {
|
||||
type: 'COMPANY_IS_SOLE_PROPRIETORSHIP'
|
||||
|
|
|
@ -7,7 +7,7 @@ import Engine, {
|
|||
isPublicodesError,
|
||||
} from 'publicodes'
|
||||
|
||||
import { Situation } from './reducers/rootReducer'
|
||||
import { Situation } from '@/store/reducers/rootReducer'
|
||||
|
||||
export function capitalise0(name: undefined): undefined
|
||||
export function capitalise0(name: string): string
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { nextQuestionSelector } from '@/selectors/companyStatusSelectors'
|
||||
import { nextQuestionSelector } from '@/store/selectors/companyStatusSelectors'
|
||||
|
||||
const state = (companyLegalStatus) => ({
|
||||
choixStatutJuridique: {
|
||||
|
|
|
@ -3,17 +3,17 @@ import { DottedName } from 'modele-social'
|
|||
import { createStore } from 'redux'
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
import { setupSimulationPersistence } from '@/storage/persistSimulation'
|
||||
import * as safeLocalStorage from '@/storage/safeLocalStorage'
|
||||
import {
|
||||
loadPreviousSimulation,
|
||||
setSimulationConfig,
|
||||
updateSituation,
|
||||
} from '../source/actions/actions'
|
||||
} from '@/store/actions/actions'
|
||||
import reducers, {
|
||||
Simulation,
|
||||
SimulationConfig,
|
||||
} from '../source/reducers/rootReducer'
|
||||
import { setupSimulationPersistence } from '../source/storage/persistSimulation'
|
||||
import * as safeLocalStorage from '../source/storage/safeLocalStorage'
|
||||
} from '@/store/reducers/rootReducer'
|
||||
|
||||
function delay(ms: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms))
|
||||
|
|
|
@ -8,8 +8,8 @@ import rules, { DottedName } from 'modele-social'
|
|||
import { EvaluatedNode, Evaluation } from 'publicodes'
|
||||
import { expect } from 'vitest'
|
||||
|
||||
import { engineFactory } from '../../source/components/utils/EngineContext'
|
||||
import { Simulation } from '../../source/reducers/rootReducer'
|
||||
import { engineFactory } from '@/components/utils/EngineContext'
|
||||
import { Simulation } from '@/store/reducers/rootReducer'
|
||||
|
||||
type SituationsSpecs = Record<string, Simulation['situation'][]>
|
||||
|
||||
|
|
Loading…
Reference in New Issue