Repository navigation
Fares V2 Network UI improvements - #1071
Open
josh-willis-arcadis wants to merge 13 commits into
Open
josh-willis-arcadis wants to merge 13 commits into
josh-willis-arcadis wants to merge 13 commits into
Conversation
miles-grant-ibigroup
requested changes
Oct 9, 2026
miles-grant-ibigroup
left a comment
Contributor
There was a problem hiding this comment.
Looks good overall, but I'm confused as to why we're introducing a new pattern for adding new entries. There's also some opportunities for cleanup!
| const [availableOptions, setOptions] = useState(options.map(o => createOption(o)) || []) | ||
|
|
||
| return ( | ||
| <Creatable |
Contributor
There was a problem hiding this comment.
This is cool, but why are we doing this instead of following the pattern we already have for creating new entries?
| ) | ||
| case 'NETWORK_SELECTOR': | ||
| let availableNetworks = getTableById(tableData, 'network').map(network => ({ | ||
| label: `${network.network_id}`, |
Contributor
There was a problem hiding this comment.
Suggested change
| label: `${network.network_id}`, | |
| label: network.network_id, |
Why not this?
| value: network.network_id | ||
| })) | ||
| if (availableNetworks.length === 0) { | ||
| const uniqueNetworks = [...new Set(getTableById(tableData, 'route').map(r => r.network_id).filter(Boolean))] |
Contributor
There was a problem hiding this comment.
Why not do this on line 582, then you only need to convert to the label/value format once!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
devbefore they can be merged tomaster)Description
Adds new dropdown to the editor for routes, fare_leg_rule, fare_leg_join_rules. Also adds validation to enforce the conditionally forbidden networks.txt file.