From faa8147f1678812bab82c631f23ec352fc79f57f Mon Sep 17 00:00:00 2001 From: Samuel Duhaime-Morissette Date: Tue, 17 Dec 2024 15:24:27 -0500 Subject: [PATCH] Add an error for calculating accessibility map Fixes #1063 --- locales/en/main.json | 3 ++- locales/fr/main.json | 3 ++- .../forms/accessibilityMap/AccessibilityMapForm.tsx | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/locales/en/main.json b/locales/en/main.json index 21365b2e..ce2b2550 100644 --- a/locales/en/main.json +++ b/locales/en/main.json @@ -133,7 +133,8 @@ "ShowExceptionForCopy": "If you want to report an issue, you may copy-paste the exception below", "Exception": "Exception", "RoutingModeNotEnabled": "Routing mode '{{mode}}' is not enabled", - "InvalidFormFields": "Some fields are invalid" + "InvalidFormFields": "Some fields are invalid", + "ErrorCalculatingAccessibilityMap": "Error calculating accessibility map. Try to reduce the maximum total travel time." }, "places": { "categories": { diff --git a/locales/fr/main.json b/locales/fr/main.json index c46d2cb2..98a2c7a0 100644 --- a/locales/fr/main.json +++ b/locales/fr/main.json @@ -133,7 +133,8 @@ "ShowExceptionForCopy": "Si vous voulez rapporter un problème, vous pouvez copier/coller l'exception ci-dessous", "Exception": "Exception", "RoutingModeNotEnabled": "Mode de calcul '{{mode}}' n'est pas activé", - "InvalidFormFields": "Certains champs sont invalides" + "InvalidFormFields": "Certains champs sont invalides", + "ErrorCalculatingAccessibilityMap": "Erreur lors du calcul de la carte d'accessibilité. Essayez de réduire le temps de parcours maximal." }, "places": { "categories": { diff --git a/packages/transition-frontend/src/components/forms/accessibilityMap/AccessibilityMapForm.tsx b/packages/transition-frontend/src/components/forms/accessibilityMap/AccessibilityMapForm.tsx index 973b2391..400dc3c3 100644 --- a/packages/transition-frontend/src/components/forms/accessibilityMap/AccessibilityMapForm.tsx +++ b/packages/transition-frontend/src/components/forms/accessibilityMap/AccessibilityMapForm.tsx @@ -136,7 +136,9 @@ class AccessibilityMapForm extends ChangeEventsForm {this.hasInvalidFields() && } + + {this.state.routingErrors && } +