<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chouette-core/app/views/journey_patterns_collections, branch master</title>
<subtitle>Chouette manage transport static data</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/'/>
<entry>
<title>Refs #6551; Add CustomFields to JourneyPatterns</title>
<updated>2018-04-16T08:40:23+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2018-04-16T08:40:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=a0592079dd01b7bc37da91606243de446847ba28'/>
<id>a0592079dd01b7bc37da91606243de446847ba28</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>JourneyPatternsCollection#show: Fallback to route costs</title>
<updated>2018-03-15T16:44:22+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-03-15T15:19:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=fa0fdbe92d441e1a226a56c792c014a032fd46e9'/>
<id>fa0fdbe92d441e1a226a56c792c014a032fd46e9</id>
<content type='text'>
When editing a `JourneyPattern`, you can edit the distance &amp; 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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When editing a `JourneyPattern`, you can edit the distance &amp; 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
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixes JS features list in journey_patterns_collections#show. Refs #5407</title>
<updated>2017-12-28T06:55:28+00:00</updated>
<author>
<name>Alban Peignier</name>
</author>
<published>2017-12-28T06:55:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=e903a6439271cdab44d809dda1d8babee356524e'/>
<id>e903a6439271cdab44d809dda1d8babee356524e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Refs #5407 @4h; First UI implementation</title>
<updated>2017-12-27T11:08:07+00:00</updated>
<author>
<name>Zog</name>
</author>
<published>2017-12-27T08:10:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=78e2d256f895c1014a3def5f2ef6509086755215'/>
<id>78e2d256f895c1014a3def5f2ef6509086755215</id>
<content type='text'>
- Add most of the react code
- And the specs where possible

Still remains:

- Link PurchaseWindows to VehicleJourneys in the model
- Add an autocompletion endpoint
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Add most of the react code
- And the specs where possible

Still remains:

- Link PurchaseWindows to VehicleJourneys in the model
- Add an autocompletion endpoint
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix override page header title call multiple time, using flush option</title>
<updated>2017-12-01T16:20:05+00:00</updated>
<author>
<name>Xinhui</name>
</author>
<published>2017-12-01T16:20:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=3ae77ab3cdf27a740ffd7feb46b69455cd95bee8'/>
<id>3ae77ab3cdf27a740ffd7feb46b69455cd95bee8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix conflit with page header title &amp; breadcrumb title on journey_patterns_collections#show</title>
<updated>2017-12-01T15:07:18+00:00</updated>
<author>
<name>Xinhui</name>
</author>
<published>2017-12-01T15:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=bb53d563786da23c1194d0716c2cc2597fd1f82d'/>
<id>bb53d563786da23c1194d0716c2cc2597fd1f82d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix page title on journey_patterns_collection#show</title>
<updated>2017-12-01T14:52:45+00:00</updated>
<author>
<name>Xinhui</name>
</author>
<published>2017-12-01T14:52:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=9a77e70223a9aebb278ee8ace6fc79a021c3aa95'/>
<id>9a77e70223a9aebb278ee8ace6fc79a021c3aa95</id>
<content type='text'>
Refs #5152
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refs #5152
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactoring move render pageheader into layout</title>
<updated>2017-11-28T11:23:38+00:00</updated>
<author>
<name>Xinhui</name>
</author>
<published>2017-11-24T15:52:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=c4919718286758b4a34ad31f4c8b682fcce25d23'/>
<id>c4919718286758b4a34ad31f4c8b682fcce25d23</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace pageheader by render partial</title>
<updated>2017-11-28T11:21:33+00:00</updated>
<author>
<name>Xinhui</name>
</author>
<published>2017-11-23T13:14:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=6820faf7849ff704c55cde29c8b2efc320ff63d7'/>
<id>6820faf7849ff704c55cde29c8b2efc320ff63d7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Breadcrumb for journey_patterns</title>
<updated>2017-10-20T13:05:08+00:00</updated>
<author>
<name>Xinhui</name>
</author>
<published>2017-10-20T13:02:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/fork/chouette-core/commit/?id=fccf690adb8769dc5050fa231a961b5e48146848'/>
<id>fccf690adb8769dc5050fa231a961b5e48146848</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
