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

Refacto: Improve CH code suggestions management. #10401

Open
5 tasks
SarahBellaha opened this issue Jan 16, 2025 · 0 comments
Open
5 tasks

Refacto: Improve CH code suggestions management. #10401

SarahBellaha opened this issue Jan 16, 2025 · 0 comments
Assignees
Labels
area:front Work on Standard OSRD Interface modules kind:refacto-task Task related to Refactorization Epic module:stdcm Short-Term DCM

Comments

@SarahBellaha
Copy link
Contributor

Description

To improve the efficiency and accuracy of updating operational points and their suggestions, we need to refactor the current implementation. The following changes are proposed:

  • Add availableSecondaryCodes in StdcmPathStep location.
  • Update availableSecondaryCodes in StdcmOperationalPoint when changing the ci.
  • Build chSuggestions from availableSecondaryCodes.
  • Update availableSecondaryCodes when selecting an op in linked train:
    • This can be done either by using already available secondary codes or by fetching them with searchOperationalPoints.
  • (Optional, if needed above): Refactor useSearchOperationalPoint hook:
    • Extract the state-setting logic from the searchOperationalPoints function.
    • Modify the function so that it returns its results and takes the query as an argument.

Acceptance Criteria:

  • Add availableSecondaryCodes field to StdcmPathStep location.
  • Update availableSecondaryCodes in StdcmOperationalPoint when ci changes.
  • Ensure chSuggestions are built from availableSecondaryCodes.
  • Update availableSecondaryCodes when an op is selected in linked trains.
  • (Optional) Refactor useSearchOperationalPoint hook to return results and accept a query argument.
@SarahBellaha SarahBellaha added area:front Work on Standard OSRD Interface modules kind:refacto-task Task related to Refactorization Epic module:stdcm Short-Term DCM labels Jan 16, 2025
@SarahBellaha SarahBellaha self-assigned this Jan 16, 2025
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 kind:refacto-task Task related to Refactorization Epic module:stdcm Short-Term DCM
Projects
None yet
Development

No branches or pull requests

1 participant