-
Notifications
You must be signed in to change notification settings - Fork 44
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
Filter TowedRollingStocks to include only allowed values #10227
base: dev
Are you sure you want to change the base?
Conversation
…lues Signed-off-by: Achraf Mohyeddine <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## dev #10227 +/- ##
=======================================
Coverage 81.42% 81.43%
=======================================
Files 1057 1058 +1
Lines 104204 104263 +59
Branches 720 723 +3
=======================================
+ Hits 84849 84906 +57
- Misses 19313 19315 +2
Partials 42 42
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, it would be nice to have this list at the same place as FREIGHT_ROLLING_STOCKS
in assets/rollingStock
const allTowedRollingStocks = useMemo( | ||
() => | ||
fetchedTowedRollingStocks.filter((stock) => | ||
ALLOWED_TOWED_ROLLING_STOCKS.includes(stock.name) | ||
), | ||
[fetchedTowedRollingStocks] | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only an optional AC but in StdcmConfig
, we have access to isDebugMode
.
We could pass it to StdcmConsist
and then to this hook so we can still have access to the full list of towed rs when we are in debug mode.
Closes #10120