aboutsummaryrefslogtreecommitdiffstats
path: root/app/javascript/journey_patterns
AgeCommit message (Collapse)Author
2018-05-06Refs #6550; Fix CustomFields edition for JourneyPatternsZog
2018-04-26Refs #6486; Fix bumpy frontZog
2018-04-16Refs #6551; Add CustomFields to JourneyPatterns6551-add_custom_field_values_to_journey_patternsZog
2018-04-11Make ReactJS views IE-compliant :firework:ie-fixesZog
2018-04-04Refs #6213; Fix JourneyPattern editor6213-fix-journey-pattern-editorZog
Fix a bug when a Route uses the same stop multiple times
2018-03-29Merge pull request #418 from af83/6156-journey_pattern-translationscedricnjanga
Refs #6156 Update english journey pattern translations
2018-03-29Prevent multiple concurent queries for routes costsZog
2018-03-29Refs #6248 Get journey pattern total distance and kms in first rendercedricnjanga
2018-03-27Refs #6156 Update english journey pattern translationscedricnjanga
2018-03-15JourneyPatternsCollection#show: Fallback to route costsTeddy Wing
When editing a `JourneyPattern`, you can edit the distance & time costs between stops. We want to pre-fill these cost values (in the input fields) if they haven't already been set by a user. This way, they get an existing estimate of the cost and don't have to enter a value manually unless the default doesn't work. The pre-filled values come from `Route#costs`, which get calculated ahead of time via the TomTom API. Add a new `fetchRouteCosts` function that will fetch the costs for the current route from the API. This function also caches the value on `actions` so we don't keep making requests since the data isn't going to change. Put the cached fetch in a `requestAnimationFrame` as a sort of timeout to prevent a warning from React complaining about doing this during a `render()` call. Update `getTimeAndDistanceBetweenStops` to use the cost value from the route costs instead of the journey pattern costs if it doesn't exist. The `totalDistance` and `totalTime` we moved into `componentWillUpdate` instead of `render()` because we thought that might be the cause of the `render()` warning I mentioned above. Decided to leave this part in even though it doesn't have anything to do with the goal of the changes here, because it seemed like an okay change. The `RECEIVE_ROUTE_COSTS` reducer will update the state with route costs. We need the default distance:0 time:0 to avoid infinitely fetching the costs API if a cost with the given key can't be found. Put the route cost API URL in `window.routeCostsUrl` to allow us to get it from the Rails URL helper. Huge thanks to Johan for pairing with me on this code and walking me through the setup for integrating the route costs JSON response into the frontend interface. Refs #6203
2018-03-15Hide full_journey_time/commercial_journey_time labels when ↵Alban Peignier
costs_in_journey_patterns feature is not present. Refs #6102
2018-03-12Refs #6102; Add label in JourneyPattern Editor header6102-commercial-missionsZog
Refs #6104; Add commercial-only journey time in JourneyPattern Editor
2018-01-31Refs #5796: Add some legroom in the JourneyPatterns editorZog
2018-01-25Refs #5598; Enable button to view a JourneyPattern when the user is not ↵Zog
allowed to edit it
2018-01-12Refs #5529 @0.5h; Refactor buttons5529-prevent-double-submitting-of-react-formsZog
2018-01-12Refs #5529 @0.5h; Prevent double submitting of react formsZog
2018-01-11Fixes icons and order of total. Refs #55565556-total-time-on-j-editorAlban Peignier
2018-01-11Refs #5556 @0.25h; Show total time and distance in JP editorZog
2018-01-11Refs #5536; Fix JourneyPattern creationZog
2018-01-10Refs #5437 @1h; Refactor codeZog
2018-01-10Refs #5437 @0.5h; Propagate behaviour to the JourneyPatterns editorZog
2018-01-10Refs #5437 @2h; Update Rect to v16Zog
Because it is needed to test the components. Major issue: Proptype now lives in a separate package, hence the huge diff
2018-01-08Rebase master5455-store-costs-between-stopsZog
2018-01-08Refs #45455 @1h; CR updates #1Zog
2018-01-08Refs #5455; Fix JourneyPattern editorZog
2018-01-08Refs #5455 @6h; Add time and distance between stops in Journey PatternsZog
- Adds a `JSON` attribute in the model - Adds the fields in the editor
2018-01-05Display checksum for vehicle journeys -m RefsXinhui
Templating display checksum Refs #5460
2018-01-04Display checksum for journey patterns -m RefsXinhui
2017-11-27Refs #4941 Fix objectid short version Display on viewscedricnjanga
2017-10-30Refs #4792cedricnjanga
UX changes on JourneyPattern view - add the possibility to view JP infos in show mode
2017-10-16add jest for js test, fix js test errors, remove unused config in ↵Guillaume
config/environement
2017-10-06Add webpacker gem and migrate the React appscedricnjanga