Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the maximum duration for accessibilityMap #1163

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion locales/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 0 additions & 1 deletion locales/en/transit.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@
"DeltaIntervalMustBeAMultipleOfDelta": "The delta interval must be a multiple of the delta.",
"MaxTotalTravelTimeSecondsIsMissing": "Total duration is missing.",
"MaxTotalTravelTimeSecondsIsInvalid": "Total duration is invalid.",
"MaxTotalTravelTimeSecondsIsTooLarge": "Total duration is too high (maximum 60 minutes).",
"NumberOfPolygonsIsMissing": "The number of polygons is missing.",
"NumberOfPolygonsIsInvalid": "The number of polygons is invalid.",
"NumberOfPolygonsIsTooLarge": "The number of polygons is too high (must be lower or equal to the total duration).",
Expand Down
3 changes: 2 additions & 1 deletion locales/fr/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
1 change: 0 additions & 1 deletion locales/fr/transit.json
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@
"DeltaIntervalMustBeAMultipleOfDelta": "L'intervalle du delta doit être un multiple du delta.",
"MaxTotalTravelTimeSecondsIsMissing": "La durée totale de parcours est requise.",
"MaxTotalTravelTimeSecondsIsInvalid": "La durée totale de parcours est invalide.",
"MaxTotalTravelTimeSecondsIsTooLarge": "La durée totale de parcours est trop élevé (maximum 60 minutes).",
"NumberOfPolygonsIsMissing": "Le nombre de polygones est requis.",
"NumberOfPolygonsIsInvalid": "Le nombre de polygones est invalide.",
"NumberOfPolygonsIsTooLarge": "Le nombre de polygones est trop élevée (doit être plus petit ou égal à la durée totale de parcours).",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ class TransitAccessibilityMapRouting extends ObjectWithHistory<AccessibilityMapA
if (isNaN(maxTravelTime)) {
this._isValid = false;
this.errors.push('transit:transitRouting:errors:MaxTotalTravelTimeSecondsIsInvalid');
} else if (maxTravelTime > 3600) {
this._isValid = false;
this.errors.push('transit:transitRouting:errors:MaxTotalTravelTimeSecondsIsTooLarge');
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ class AccessibilityMapForm extends ChangeEventsForm<AccessibilityMapFormProps, T
}
this.polygonCalculated(currentResult);
} catch (error) {
// TODO: Handle error
this.setState({
routingErrors: ['main:errors:ErrorCalculatingAccessibilityMap']
});
} finally {
serviceLocator.eventManager.emit('progress', { name: 'CalculateAccessibilityMap', progress: 1.0 });
this.setState({ loading: false });
Expand Down Expand Up @@ -370,6 +372,9 @@ class AccessibilityMapForm extends ChangeEventsForm<AccessibilityMapFormProps, T
</Collapsible>

{this.hasInvalidFields() && <FormErrors errors={['main:errors:InvalidFormFields']} />}

{this.state.routingErrors && <FormErrors errors={this.state.routingErrors} />}

<FormErrors errors={routing.errors} />

<div>
Expand Down
Loading