Skip to content

front: add error messages for missing path steps in new itinerary modal#15995

Open
Akctarus wants to merge 1 commit intodevfrom
tmn/front/fix-error-message-in-new-itinerary-modal
Open

front: add error messages for missing path steps in new itinerary modal#15995
Akctarus wants to merge 1 commit intodevfrom
tmn/front/fix-error-message-in-new-itinerary-modal

Conversation

@Akctarus
Copy link
Copy Markdown
Contributor

@Akctarus Akctarus commented Mar 30, 2026

Closes #15950.

The translation keys are duplicated, but either that or modify the keyPrefix and editing all the translation calls in the file.

We don't handle train composition because it should be possible to add a train without selecting a rolling stock.

@Akctarus Akctarus requested a review from a team as a code owner March 30, 2026 09:56
@github-actions github-actions bot added the area:front Work on Standard OSRD Interface modules label Mar 30, 2026
@Akctarus Akctarus force-pushed the tmn/front/fix-error-message-in-new-itinerary-modal branch 2 times, most recently from f80ad6f to 1e8a55a Compare March 30, 2026 10:05
Signed-off-by: Theo Macron <theo.macron0315@gmail.com>
@Akctarus Akctarus force-pushed the tmn/front/fix-error-message-in-new-itinerary-modal branch from 36e189b to 182869d Compare March 30, 2026 10:07
@Akctarus Akctarus requested review from Math-R and RomainValls March 30, 2026 11:33
Copy link
Copy Markdown
Contributor

@RomainValls RomainValls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR !

Overall it seems great, but here are two things :

  • if I add an invalid pathStep, for example "toto" in the destination, I have an error "destination is not defined". -> Do we want to keep this message, as we do have a destination, but it just is invalid ? @maelysLeratRosso do you have an idea ?

  • if I have a valid origin, and that I delete the input value of this pathstep, the error message is "At least two path steps are required to define an itinerary". It is correct, but maybe we should rater display a "missing origin" message.

@maelysLeratRosso
Copy link
Copy Markdown

Thanks for the PR !

Overall it seems great, but here are two things :

  • if I add an invalid pathStep, for example "toto" in the destination, I have an error "destination is not defined". -> Do we want to keep this message, as we do have a destination, but it just is invalid ? @maelysLeratRosso do you have an idea ?

Maybe if the destination is invalid we should instead have the message we use for invalid path steps

  • if I have a valid origin, and that I delete the input value of this pathstep, the error message is "At least two path steps are required to define an itinerary". It is correct, but maybe we should rater display a "missing origin" message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:front Work on Standard OSRD Interface modules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Itinerary modal: no error message is displayed when submitting with only the train name

3 participants