setFormData({ ...formData, eori: e.target.value })}
- className="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-blue-500 focus:outline-none"
- />
+ {/* ── Autres ── */}
+
-
-
setFormData({ ...formData, contact_phone: e.target.value })}
- className="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-blue-500 focus:outline-none"
- />
+ {/* Erreur globale */}
+ {formError && (
+
+ {formError}
+ )}
-
-
- setFormData({ ...formData, contact_email: e.target.value })}
- className="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-blue-500 focus:outline-none"
- />
-
-
-
-
-
- setFormData({
- ...formData,
- address: { ...formData.address, street: e.target.value },
- })
- }
- className="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-blue-500 focus:outline-none"
- />
-
-
-
-
-
- setFormData({
- ...formData,
- address: { ...formData.address, city: e.target.value },
- })
- }
- className="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-blue-500 focus:outline-none"
- />
-
-
-
-
-
- setFormData({
- ...formData,
- address: { ...formData.address, postalCode: e.target.value },
- })
- }
- className="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-blue-500 focus:outline-none"
- />
-
-
-
-
-
- setFormData({
- ...formData,
- address: { ...formData.address, state: e.target.value },
- })
- }
- className="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-blue-500 focus:outline-none"
- />
-
-
-
-
-
- setFormData({
- ...formData,
- address: { ...formData.address, country: e.target.value.toUpperCase() },
- })
- }
- className="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-blue-500 focus:outline-none"
- />
-
-
-
-
- setFormData({ ...formData, logoUrl: e.target.value })}
- className="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-blue-500 focus:outline-none"
- />
-
-
+
diff --git a/apps/frontend/messages/en.json b/apps/frontend/messages/en.json
index d45183e..d88e432 100644
--- a/apps/frontend/messages/en.json
+++ b/apps/frontend/messages/en.json
@@ -1200,24 +1200,46 @@
"modal": {
"createTitle": "Create New Organization",
"editTitle": "Edit Organization",
- "name": "Organization Name *",
- "type": "Type *",
- "scacLabel": "SCAC Code *",
+ "sectionGeneral": "General information",
+ "sectionLegal": "Legal identifiers",
+ "sectionContact": "Contact",
+ "sectionAddress": "Address",
+ "sectionOther": "Other",
+ "name": "Organization name",
+ "type": "Type",
+ "typeReadOnly": "Cannot be changed after creation",
+ "scacLabel": "SCAC code",
+ "scacHint": "4 uppercase letters (e.g. MAEU). Required for carriers.",
"sirenLabel": "SIREN",
- "siretLabel": "SIRET (14 digits)",
+ "sirenHint": "9 digits — optional",
+ "siretLabel": "SIRET",
+ "siretHint": "14 digits — optional",
"siretPlaceholder": "12345678901234",
"eoriLabel": "EORI",
- "contactPhone": "Contact Phone",
- "contactEmail": "Contact Email",
- "street": "Street Address *",
- "city": "City *",
- "postalCode": "Postal Code *",
+ "eoriHint": "EU EORI number (e.g. FR123456789) — optional",
+ "contactEmail": "Contact email",
+ "contactPhone": "Contact phone",
+ "street": "Street address",
+ "city": "City",
+ "postalCode": "Postal code",
"state": "State / Region",
- "country": "Country *",
+ "country": "Country",
+ "countryHint": "2-letter ISO code (e.g. FR, DE, US)",
"logoUrl": "Logo URL",
+ "isActive": "Active organization",
"cancel": "Cancel",
"create": "Create",
- "update": "Update"
+ "update": "Update",
+ "saving": "Saving..."
+ },
+ "validation": {
+ "required": "This field is required",
+ "nameTooShort": "Name must be at least 2 characters",
+ "scacRequired": "SCAC code is required for carriers",
+ "scacFormat": "SCAC must be exactly 4 uppercase letters (e.g. MAEU)",
+ "sirenFormat": "SIREN must be exactly 9 digits",
+ "siretFormat": "SIRET must be exactly 14 digits",
+ "countryFormat": "Country must be a 2-letter ISO code (e.g. FR)"
}
},
"users": {
diff --git a/apps/frontend/messages/fr.json b/apps/frontend/messages/fr.json
index 0220c2e..81a92d8 100644
--- a/apps/frontend/messages/fr.json
+++ b/apps/frontend/messages/fr.json
@@ -1200,24 +1200,46 @@
"modal": {
"createTitle": "Créer une nouvelle organisation",
"editTitle": "Modifier l'organisation",
- "name": "Nom de l'organisation *",
- "type": "Type *",
- "scacLabel": "Code SCAC *",
+ "sectionGeneral": "Informations générales",
+ "sectionLegal": "Identifiants légaux",
+ "sectionContact": "Contact",
+ "sectionAddress": "Adresse",
+ "sectionOther": "Autres",
+ "name": "Nom de l'organisation",
+ "type": "Type",
+ "typeReadOnly": "Non modifiable après création",
+ "scacLabel": "Code SCAC",
+ "scacHint": "4 lettres majuscules (ex. MAEU). Obligatoire pour les transporteurs.",
"sirenLabel": "SIREN",
- "siretLabel": "SIRET (14 chiffres)",
+ "sirenHint": "9 chiffres — facultatif",
+ "siretLabel": "SIRET",
+ "siretHint": "14 chiffres — facultatif",
"siretPlaceholder": "12345678901234",
"eoriLabel": "EORI",
- "contactPhone": "Téléphone de contact",
+ "eoriHint": "Numéro EORI européen (ex. FR123456789) — facultatif",
"contactEmail": "Email de contact",
- "street": "Rue *",
- "city": "Ville *",
- "postalCode": "Code postal *",
+ "contactPhone": "Téléphone de contact",
+ "street": "Rue",
+ "city": "Ville",
+ "postalCode": "Code postal",
"state": "État / Région",
- "country": "Pays *",
+ "country": "Pays",
+ "countryHint": "Code ISO 2 lettres majuscules (ex. FR, DE, US)",
"logoUrl": "URL du logo",
+ "isActive": "Organisation active",
"cancel": "Annuler",
"create": "Créer",
- "update": "Mettre à jour"
+ "update": "Mettre à jour",
+ "saving": "Enregistrement..."
+ },
+ "validation": {
+ "required": "Ce champ est obligatoire",
+ "nameTooShort": "Le nom doit comporter au moins 2 caractères",
+ "scacRequired": "Le code SCAC est obligatoire pour les transporteurs",
+ "scacFormat": "Le code SCAC doit comporter exactement 4 lettres majuscules (ex. MAEU)",
+ "sirenFormat": "Le SIREN doit comporter exactement 9 chiffres",
+ "siretFormat": "Le SIRET doit comporter exactement 14 chiffres",
+ "countryFormat": "Le pays doit être un code ISO à 2 lettres majuscules (ex. FR)"
}
},
"users": {
diff --git a/apps/frontend/src/types/api.ts b/apps/frontend/src/types/api.ts
index 7726daa..d658af9 100644
--- a/apps/frontend/src/types/api.ts
+++ b/apps/frontend/src/types/api.ts
@@ -124,7 +124,7 @@ export interface CreateOrganizationRequest {
scac?: string;
contact_email?: string;
contact_phone?: string;
- logo_url?: string;
+ logoUrl?: string;
}
export interface UpdateOrganizationRequest {