@@ -176,8 +178,7 @@ const RessourceUnitWrapper = styled.div`
const FormGroupFixed = styled.div`
display: flex;
- flex-direction: row;
- height: 52px;
+ flex-direction: column;
width: 100%;
:not(:last-child) {
diff --git a/frontend/src/features/missions/MissionForm/GeneralInformationsForm.tsx b/frontend/src/features/missions/MissionForm/GeneralInformationsForm.tsx
index 28ee19daa9..8db1247cbd 100644
--- a/frontend/src/features/missions/MissionForm/GeneralInformationsForm.tsx
+++ b/frontend/src/features/missions/MissionForm/GeneralInformationsForm.tsx
@@ -86,20 +86,24 @@ export function GeneralInformationsForm() {
{errors.endDateTimeUtc && {errors.endDateTimeUtc}}
-
-
- {(missionSourceField.value === MissionSourceEnum.MONITORFISH ||
- missionSourceField.value === MissionSourceEnum.POSEIDON_CNSP) && (
-
- )}
-
+
+
+
+
+ {(missionSourceField.value === MissionSourceEnum.MONITORFISH ||
+ missionSourceField.value === MissionSourceEnum.POSEIDON_CNSP) && (
+
+ )}
+
+ {errors.missionTypes && {errors.missionTypes}}
+
{(missionSourceField.value === MissionSourceEnum.MONITORFISH ||
missionSourceField.value === MissionSourceEnum.POSEIDON_CNSP) && (
val && !_.isEmpty(val?.coordinates)
})
@@ -66,7 +66,7 @@ export const getClosedEnvActionControlSchema = (ctx: any): Yup.SchemaOf = Yup.object().shape({
protectedSpecies: Yup.array().of(Yup.string().optional()).nullable().optional(),
- subThemes: Yup.array()
- .of(Yup.string().required())
- .ensure()
- .required()
- .min(1, 'Sélectionnez au moins une sous thématique'),
- theme: Yup.string().nullable().required('Sélectionnez un thème')
+ subThemes: Yup.array().of(Yup.string().required()).ensure().required().min(1, 'Sous-thématique requise'),
+ theme: Yup.string().nullable().required('Thème requis')
})
diff --git a/frontend/src/features/missions/MissionForm/Schemas/index.ts b/frontend/src/features/missions/MissionForm/Schemas/index.ts
index 8eb76a520b..bea338d65a 100644
--- a/frontend/src/features/missions/MissionForm/Schemas/index.ts
+++ b/frontend/src/features/missions/MissionForm/Schemas/index.ts
@@ -19,7 +19,7 @@ const shouldUseAlternateValidationInTestEnvironment = process.env.NODE_ENV === '
const MissionTypesSchema = Yup.array()
.of(Yup.mixed().oneOf(Object.values(MissionTypeEnum)).required())
.ensure()
- .min(1, 'Requis')
+ .min(1, 'Type de mission requis')
const ControlResourceSchema: Yup.SchemaOf = Yup.object()
.shape({
@@ -30,7 +30,7 @@ const ControlResourceSchema: Yup.SchemaOf = Yup
const ControlUnitSchema: Yup.SchemaOf = Yup.object()
.shape({
- administration: Yup.string().required(),
+ administration: Yup.string().required('Administration requise'),
contact: Yup.string()
.nullable()
.test({
@@ -45,7 +45,7 @@ const ControlUnitSchema: Yup.SchemaOf = Yup.object()
}
}),
id: Yup.number().required(),
- name: Yup.string().required(),
+ name: Yup.string().required('Unité requise'),
resources: Yup.array().ensure().of(ControlResourceSchema).required()
})
.defined()
@@ -119,7 +119,7 @@ const NewMissionSchema: Yup.SchemaOf = Yup.object()
.min(3, 'le Trigramme doit comporter 3 lettres')
.max(3, 'le Trigramme doit comporter 3 lettres')
.nullable()
- .required('Trigramme requis'),
+ .required("Trigramme d'ouverture requis"),
startDateTimeUtc: Yup.date().required('Date de début requise')
})
.required()
@@ -129,7 +129,7 @@ const ClosedMissionSchema = NewMissionSchema.shape({
.min(3, 'Minimum 3 lettres pour le Trigramme')
.max(3, 'Maximum 3 lettres pour le Trigramme')
.nullable()
- .required('Trigramme requis'),
+ .required('Trigramme de clôture requis'),
controlUnits: Yup.array().of(ClosedControlUnitSchema).ensure().defined().min(1),
envActions: Yup.array()
.of(ClosedEnvActionSchema as any)
diff --git a/frontend/src/features/missions/MultiPointPicker.tsx b/frontend/src/features/missions/MultiPointPicker.tsx
index 223e5393ca..604eb7accc 100644
--- a/frontend/src/features/missions/MultiPointPicker.tsx
+++ b/frontend/src/features/missions/MultiPointPicker.tsx
@@ -90,7 +90,7 @@ export function MultiPointPicker({ addButtonLabel, label = undefined, name }: Mu
>
{addButtonLabel}
- {!!meta.error && Veuillez définir un point de contrôle}
+ {!!meta.error && {meta.error}}
<>
{points.map((coordinates, index) => (