• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

inclusion-numerique / coop-mediation-numerique / 63ed3aef-04ec-416c-af7d-d56de15ebe3e

17 Mar 2026 03:48PM UTC coverage: 10.613% (-0.2%) from 10.79%
63ed3aef-04ec-416c-af7d-d56de15ebe3e

Pull #437

circleci

web-flow
Merge pull request #458 from inclusion-numerique/fix/admin-stats-min-date

fix(admin): allow filtering statistics from January 2020
Pull Request #437: release

685 of 10426 branches covered (6.57%)

Branch coverage included in aggregate %.

34 of 590 new or added lines in 86 files covered. (5.76%)

23 existing lines in 20 files now uncovered.

2130 of 16099 relevant lines covered (13.23%)

2.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/apps/web/src/components/structure/fields/InformationsGeneralesFields.tsx
1
import CheckboxFormField from '@app/ui/components/Form/CheckboxFormField'
2
import InputFormField from '@app/ui/components/Form/InputFormField'
3
import MultipleSelectFormField from '@app/ui/components/Form/MultipleSelectFormField'
4
import RequiredFieldsDisclaimer from '@app/ui/components/Form/RequiredFieldsDisclaimer'
5
import { optionsWithEmptyValue } from '@app/ui/components/Form/utils/options'
6
import AdresseBanFormField, {
7
  type AdressBanFormFieldOption,
8
} from '@app/web/components/form/AdresseBanFormField'
9
import { InformationsGeneralesData } from '@app/web/features/structures/InformationsGeneralesValidation'
10
import RnaInputInfo from '@app/web/features/structures/rna/RnaInputInfo'
11
import SiretInputInfo from '@app/web/features/structures/siret/SiretInputInfo'
12
import { typologieStructureOptions } from '@app/web/features/structures/typologieStructure'
13
import Notice from '@codegouvfr/react-dsfr/Notice'
14
import { UseFormReturn } from 'react-hook-form'
15

16
export const InformationsGeneralesFields = <
×
17
  T extends Omit<InformationsGeneralesData, 'id'>,
18
>({
19
  nom,
20
  form,
21
  className,
22
  initialAdresseBanOptions,
23
  adresseBanDefaultValue,
24
  hasActiveEmployees,
25
}: {
26
  nom?: string
27
  form: UseFormReturn<T>
28
  className?: string
29
  initialAdresseBanOptions?: AdressBanFormFieldOption[]
30
  adresseBanDefaultValue?: AdressBanFormFieldOption
31
  hasActiveEmployees?: boolean
32
}) => {
33
  const { control, formState } =
34
    form as unknown as UseFormReturn<InformationsGeneralesData>
×
35

NEW
36
  const protectedFieldsDisabled = hasActiveEmployees || formState.isSubmitting
×
37

38
  return (
39
    <div className={className}>
40
      <RequiredFieldsDisclaimer className="fr-mb-4v" />
41
      {hasActiveEmployees && (
×
42
        <Notice
43
          className="fr-notice--flex fr-align-items-center fr-mb-4v"
44
          title={
45
            <span className="fr-text--sm fr-text--regular fr-text-default--grey">
46
              Cette structure emploie des médiateurs. Le nom, l'adresse et le
47
              SIRET ne peuvent pas être modifiés.
48
            </span>
49
          }
50
        />
51
      )}
52
      <InputFormField
53
        asterisk
54
        path="nom"
55
        label="Nom de la structure"
56
        control={control}
57
        disabled={protectedFieldsDisabled}
58
      />
59
      <AdresseBanFormField
60
        asterisk
61
        path="adresseBan"
62
        label="Adresse"
63
        placeholder="Rechercher l'adresse"
64
        control={control}
65
        disabled={protectedFieldsDisabled}
66
        defaultOptions={initialAdresseBanOptions}
67
        defaultValue={adresseBanDefaultValue}
68
      />
69
      <CheckboxFormField
70
        className="fr-mt-6v fr-mb-2v"
71
        path="lieuItinerant"
72
        label="Lieu d’activité itinérant (exemple : bus)"
73
        control={control}
74
        disabled={formState.isSubmitting}
75
      />
76
      <InputFormField
77
        path="complementAdresse"
78
        label="Complément d’adresse"
79
        control={control}
80
        disabled={formState.isSubmitting}
81
      />
82
      <MultipleSelectFormField
83
        asterisk
84
        control={control}
85
        disabled={formState.isSubmitting}
86
        path="typologies"
87
        label="Typologies de la structure"
88
        options={optionsWithEmptyValue(typologieStructureOptions)}
89
      />
90
      <InputFormField
91
        path="siret"
92
        label="SIRET structure (ou RNA)"
93
        control={control}
94
        disabled={protectedFieldsDisabled}
95
        className="fr-mb-0"
96
        info={
97
          <>
98
            <SiretInputInfo className="fr-mb-0" searchTerm={nom} />
99
            <RnaInputInfo />
100
          </>
101
        }
102
      />
103
    </div>
104
  )
105
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc