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

core, editoast: add zones to path properties #9205

Merged
merged 3 commits into from
Oct 9, 2024
Merged

Conversation

emersion
Copy link
Member

@emersion emersion commented Oct 4, 2024

This will be useful to display conflicts on the space time chart. Conflicts are represented as a list of zones and time ranges, the frontend needs to translate the zone names into space ranges.

Hack patch to test
  • Apply patch
  • Open the form to create a new train
  • Run a pathfinding request
  • Use the browser devtools to inspect the /path_properties response
diff --git a/front/src/modules/pathfinding/hooks/usePathfinding.ts b/front/src/modules/pathfinding/hooks/usePathfinding.ts
index 6444535a55d4..f2e14239bf4d 100644
--- a/front/src/modules/pathfinding/hooks/usePathfinding.ts
+++ b/front/src/modules/pathfinding/hooks/usePathfinding.ts
@@ -237,7 +237,7 @@ export const usePathfinding = (
 
             const pathPropertiesParams: PostInfraByInfraIdPathPropertiesApiArg = {
               infraId,
-              props: ['electrifications', 'geometry', 'operational_points'],
+              props: ['electrifications', 'geometry', 'operational_points', 'zones'],
               pathPropertiesInput: {
                 track_section_ranges: pathResult.track_section_ranges,
               },

Closes: #8682

@emersion emersion requested review from a team as code owners October 4, 2024 14:23
@emersion emersion requested a review from eckter October 4, 2024 14:23
@emersion emersion force-pushed the emr/path-props-zones branch from f8817a1 to deed5d5 Compare October 4, 2024 14:27
@github-actions github-actions bot added the area:editoast Work on Editoast Service label Oct 4, 2024
Copy link
Contributor

@eckter eckter left a comment

Choose a reason for hiding this comment

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

LGTM for core

@emersion emersion force-pushed the emr/path-props-zones branch from deed5d5 to a6d2829 Compare October 4, 2024 15:09
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

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

LGTM.

Exposes zone IDs as a DistanceRangeMap, will be used in next
commit.

Signed-off-by: Simon Ser <[email protected]>
@emersion emersion force-pushed the emr/path-props-zones branch from a6d2829 to 01ac8c0 Compare October 7, 2024 13:15
@emersion emersion added this pull request to the merge queue Oct 9, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 9, 2024
@emersion emersion added this pull request to the merge queue Oct 9, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 9, 2024
@Khoyo Khoyo added this pull request to the merge queue Oct 9, 2024
Merged via the queue into dev with commit b3d7d35 Oct 9, 2024
25 checks passed
@Khoyo Khoyo deleted the emr/path-props-zones branch October 9, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:editoast Work on Editoast Service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core, editoast: add new project_conflicts endpoint
5 participants