refactor(site): Renomme le dossier et les composants de 'company' en 'entreprise'

feat/1633-ajout-recherche-entreprise-simulateurs
Alice Dahan 2024-07-22 18:27:56 +02:00
parent cf40b0192c
commit 6a7e92c57a
11 changed files with 18 additions and 18 deletions

View File

@ -1,7 +1,7 @@
import { useEffect } from 'react'
import { useDispatch } from 'react-redux'
import { EntrepriseSearchField } from '@/components/company/SearchField'
import { EntrepriseSearchField } from '@/components/entreprise/EntrepriseSearchField'
import { useEngine } from '@/components/utils/EngineContext'
import { Spacing } from '@/design-system/layout'
import { Entreprise } from '@/domain/Entreprise'
@ -10,7 +10,7 @@ import { useSetEntreprise } from '@/hooks/useSetEntreprise'
import { getCookieValue } from '@/storage/readCookie'
import { resetCompany } from '@/store/actions/companyActions'
import SelectedEntrepriseDetails from '../company/SelectedEntrepriseDetails'
import SelectedEntrepriseDetails from '../entreprise/SelectedEntrepriseDetails'
export default function EntrepriseInput() {
const companySIREN = useEngine().evaluate('entreprise . SIREN').nodeValue

View File

@ -19,7 +19,7 @@ const StyledH4 = styled(H4)`
}
`
export function CompanyDetails({
export function EntrepriseDetails({
showSituation = false,
headingTag = 'h3',
}: {

View File

@ -24,11 +24,11 @@ export function EntrepriseSearchField(props: {
...props,
label:
!props.selectedValue &&
t('CompanySearchField.label', "Nom de l'entreprise, SIREN ou SIRET"),
t('EntrepriseSearchField.label', "Nom de l'entreprise, SIREN ou SIRET"),
description:
!props.selectedValue &&
t(
'CompanySearchField.description',
'EntrepriseSearchField.description',
'Le numéro Siret est un numéro de 14 chiffres unique pour chaque entreprise. Exemple : 40123778000127'
),
onSubmit() {
@ -39,7 +39,7 @@ export function EntrepriseSearchField(props: {
props.onClear?.()
},
placeholder: t(
'CompanySearchField.placeholder',
'EntrepriseSearchField.placeholder',
'Exemple : Café de la gare ou 40123778000127'
),
}

View File

@ -13,7 +13,7 @@ import { Body } from '@/design-system/typography/paragraphs'
import { Entreprise } from '@/domain/Entreprise'
import { FromTop } from '../ui/animate'
import EntrepriseSearchDetails from './SearchDetails'
import EntrepriseSearchDetails from './EntrepriseSearchDetails'
const StyledCard = styled(Card)`
flex-direction: row; // for Safari <= 13

View File

@ -72,7 +72,7 @@ Comment ça marche ? Voir la page explicative sur la page du dépôt github, nou
How does it work? See the explanatory page on the github repository page, new
window
Commune ou code postal: Town or zip code
CompanySearchField:
EntrepriseSearchField:
description: "The Siret number is a 14-digit number unique to each company.
Example: 40123778000127"
label: Company name, SIREN or SIRET

View File

@ -77,7 +77,7 @@ Comment ça marche ? Voir la page explicative sur la page du dépôt github, nou
Comment ça marche ? Voir la page explicative sur la page du dépôt github,
nouvelle fenêtre
Commune ou code postal: Commune ou code postal
CompanySearchField:
EntrepriseSearchField:
description: "Le numéro Siret est un numéro de 14 chiffres unique pour chaque
entreprise. Exemple : 40123778000127"
label: Nom de l'entreprise, SIREN ou SIRET

View File

@ -3,8 +3,8 @@ import { Trans, useTranslation } from 'react-i18next'
import { useDispatch } from 'react-redux'
import { generatePath, useNavigate } from 'react-router-dom'
import { CompanyDetails } from '@/components/company/Details'
import { EntrepriseSearchField } from '@/components/company/SearchField'
import { EntrepriseDetails } from '@/components/entreprise/EntrepriseDetails'
import { EntrepriseSearchField } from '@/components/entreprise/EntrepriseSearchField'
import { useEngine } from '@/components/utils/EngineContext'
import AnswerGroup from '@/design-system/answer-group'
import { Button } from '@/design-system/buttons'
@ -39,7 +39,7 @@ export default function SearchOrCreate() {
{companySIREN ? (
<>
<H3 as="h2">{t('Votre entreprise')}</H3>
<CompanyDetails />
<EntrepriseDetails />
<Spacing md />
<AnswerGroup role="list">
<Button

View File

@ -2,7 +2,7 @@ import { Trans, useTranslation } from 'react-i18next'
import { useDispatch } from 'react-redux'
import { TrackPage } from '@/components/ATInternetTracking'
import { CompanyDetails } from '@/components/company/Details'
import { EntrepriseDetails } from '@/components/entreprise/EntrepriseDetails'
import PageHeader from '@/components/PageHeader'
import { useEngine } from '@/components/utils/EngineContext'
import { Message } from '@/design-system'
@ -79,7 +79,7 @@ export default function AccueilChoixStatut() {
</Body>
</Trans>
</Message>
<CompanyDetails />
<EntrepriseDetails />
<PopoverConfirm
trigger={(buttonProps) => (
<Button

View File

@ -15,11 +15,11 @@ import {
import { styled } from 'styled-components'
import { TrackPage } from '@/components/ATInternetTracking'
import { CompanyDetails } from '@/components/company/Details'
import { ConseillersEntreprisesButton } from '@/components/ConseillersEntreprisesButton'
import RuleInput from '@/components/conversation/RuleInput'
import { CurrentSimulatorCard } from '@/components/CurrentSimulatorCard'
import { Condition } from '@/components/EngineValue/Condition'
import { EntrepriseDetails } from '@/components/entreprise/EntrepriseDetails'
import PageHeader from '@/components/PageHeader'
import { SimulateurCard } from '@/components/SimulateurCard'
import { FromTop } from '@/components/ui/animate'
@ -242,7 +242,7 @@ function PourMonEntreprise() {
)
}
const configCompanyDetails: SimulationConfig = {
const configEntrepriseDetails: SimulationConfig = {
questions: {
'liste noire': ['entreprise . imposition . régime'] as DottedName[],
},
@ -269,7 +269,7 @@ const AskCompanyMissingDetails = () => {
const { absoluteSitePaths } = useSitePaths()
useSimulationConfig({
key: absoluteSitePaths.assistants.index,
config: configCompanyDetails,
config: configEntrepriseDetails,
})
const [questions, onQuestionAnswered] = useQuestionList()
@ -277,7 +277,7 @@ const AskCompanyMissingDetails = () => {
return (
<>
<CompanyDetails showSituation headingTag="h2" />
<EntrepriseDetails showSituation headingTag="h2" />
{!!questions.length && (
<>
<Body