From 10e5c5f40d586e3f0bb653e0c405e5fe46b5c9c2 Mon Sep 17 00:00:00 2001 From: Egor Berezovskiy Date: Thu, 7 Nov 2024 10:27:05 +0100 Subject: [PATCH] front: stdcm max speed consist errors Signed-off-by: Egor Berezovskiy --- front/public/locales/en/stdcm.json | 3 +++ front/public/locales/fr/stdcm.json | 3 +++ .../components/StdcmForm/StdcmConfig.tsx | 6 ++++- .../components/StdcmForm/StdcmConsist.tsx | 24 ++++++++++++++++--- .../stdcm/utils/consistValidation.ts | 12 ++++++++++ 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/front/public/locales/en/stdcm.json b/front/public/locales/en/stdcm.json index e6df28d4e96..abbc60b9458 100644 --- a/front/public/locales/en/stdcm.json +++ b/front/public/locales/en/stdcm.json @@ -19,6 +19,9 @@ "negative": "Must be positive.", "lowerThanTractionEngine": "Must not be less than engine length.", "lowerThanConsist": "Must not be less than consist length." + }, + "maxSpeed": { + "negative": "Must be positive." } } }, diff --git a/front/public/locales/fr/stdcm.json b/front/public/locales/fr/stdcm.json index a251b9926dd..593bc3faf90 100644 --- a/front/public/locales/fr/stdcm.json +++ b/front/public/locales/fr/stdcm.json @@ -19,6 +19,9 @@ "negative": "Doit être positif.", "lowerThanTractionEngine": "Ne doit pas être inférieur à la longueur de l'engin de traction.", "lowerThanConsist": "Ne doit pas être inférieur à la longueur du convoi." + }, + "maxSpeed": { + "negative": "Doit être positif." } } }, diff --git a/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx b/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx index ae7101e954b..7b3e5230241 100644 --- a/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx +++ b/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx @@ -179,7 +179,11 @@ const StdcmConfig = ({