aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
AgeCommit message (Collapse)Author
2018-03-26Refs #6218; Fix exports filtersZog
2018-03-26Refs #6218; Limit accessible exports for workgroupsZog
2018-03-26Refs #6218; Add link to exports viewZog
2018-03-26Refs #6218; Link exports to referentialsZog
2018-03-23Fix i18n enhancements on titles @3Luc Donnet
2018-03-23Remove maps code. Refs #6296Alban Peignier
2018-03-23Refs #6256 Fix compliance check set breadcrumbcedricnjanga
2018-03-23Refs #6210 Remove status value attribue from Chouette::VehicleJourney and ↵cedricnjanga
section status fron Chouette::JourneyPattern
2018-03-23Refs #6240 Fix ComplianceCheckSet#index bug on filters labelcedricnjanga
2018-03-23Use new helper in page headerZog
2018-03-23Use current locale to pluralize Chouette::Network. Refs #6035Alban Peignier
2018-03-23Rename `RouteWayCostJSONSerializer` to `RouteWayCostUnitConverter`Teddy Wing
Because we need to pass a Ruby hash to Rabl instead of a JSON string, get rid of our serialiser and instead turn it into a function that just converts the distance & time units. Fix a bug in the test that had the `'1-2'` key as a symbol instead of a string which was caused by a copy-paste from JSON and not being thorough enough in search-and-replace. Refs #6203
2018-03-23Add `RouteWayCostJSONSerializer`Teddy Wing
This serialiser will take `Route#costs` and convert the distance and time fields from meters to kilometres and seconds to minutes respectively. We need this because the frontend uses kilometre and minute units while the TomTom API gives us the others (and we store the data we get from TomTom without treatment). Unfortunately, due to the way that Rabl works, this doesn't quite work just yet. The serializer returns a string, and Rabl just puts this string into the JSON output instead of a real JSON hash. Looks like I'm going to have to convert my serializer into a generic converter. Refs #6203
2018-03-23JourneyPatternsCollection#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-23Routes: Add `/costs` routeTeddy Wing
Render the `costs` field of a `Chouette::Route` as JSON. This lives at: http://stif-boiv.dev:3000/referentials/4/lines/1857/routes/7/costs.json I want this in order to get the distance & time costs of a route so that I can merge them with `JourneyPattern#costs` on the frontend on `JourneyPatternsCollection#show`. Refs #6203
2018-03-23Small fixes for i18n state Refs #6146 @1Luc Donnet
2018-03-23Refs #6146; Fix display in tablesZog
2018-03-23Refs #6146; Fix typoZog
2018-03-23Refs #5146 Line state updatecedricnjanga
2018-03-16Refs #6218; UI for exportsZog
2018-03-15Merge pull request #370 from af83/6102-commercial-missionsAlban Peignier
Add label in JourneyPattern Editor header. Refs #6102
2018-03-15Ignore undefined CustomFields in extra headers for ↵Alban Peignier
VehicleJourneysController. Refs #6143
2018-03-15Refs #6143; Configurable extra headers on VJs editorZog
2018-03-15Add StopArea#status in stop_areas#_form. Refs #60336033-stop-area-statesAlban Peignier
2018-03-15Refs #6033 Changes for StopArea#index and StopArea#showcedricnjanga
2018-03-14Merge pull request #367 from af83/6042-detailed_purchase_windowsAlban Peignier
Add detailed view for purchase windows. Refs #6042
2018-03-14Refs #5972 @1h; Automatic registration_number generationZog
2018-03-14Merge pull request #378 from af83/6187-dashboard-calendar-link-fixLuc Donnet
Refs #6187 Fix Dashboard Calendar#show link
2018-03-14Delete @dashboard call to create link for calendar Refs #61876187-dashboard-calendar-link-fixLuc Donnet
2018-03-13Refs #6158 Fix display error when CC doesnt have transport submode6158-compliance-check-transport-submode-displaycedricnjanga
2018-03-13Refs #6187 Fix Dashboard Calendar#show linkcedricnjanga
2018-03-12Refs #6133; Fix specsZog
2018-03-12Refs #6133; Full UX for exportsZog
Also added a *dumb* `WorkgroupExport` for testing purposes.
2018-03-12Refs #6133: Async exportsZog
2018-03-12Refs #6133; Sample SimpeImporter ImplementationZog
Still needs to be made asynchronous
2018-03-12Refs #6133; Add options on the Exports, and forward them tu the UXZog
2018-03-12Refs #6133; First Crud for exportsZog
2018-03-12Refs #6133; Fix specsZog
2018-03-12Refs #6102; Add label in JourneyPattern Editor header6102-commercial-missionsZog
Refs #6104; Add commercial-only journey time in JourneyPattern Editor
2018-03-09Refs #6042; Add detailed view for purchazse windows6042-detailed_purchase_windowsZog
2018-03-07Change route to AutocompleteLinesControllerTeddy Wing
Johan recommended not putting it in a separate `/autocomplete...` route, but instead to use `/referentials/4/lines/autocomplete` to be more RESTful. Makes perfect sense. Refs #5889
2018-03-07ReferentialVehicleJourneys#index: Make lines filter asynchronousTeddy Wing
Instead of doing a complex query to get the lines available to filter on, just get all the lines in the current referential. We then filter those by what was typed into the select2 box and asynchronously respond with line options in a new JSON autocomplete controller. Here we're only providing the option to filter by `number` and `name` field on the line. I'd like to filter by everything in the `#display_name`. I don't think the objectid is going to be easy to integrate into the SQL query but I'd like to add the company part. It's possible we could do the objectid filter in Ruby instead of the database query. Refs #5889
2018-03-05Use Workbench#calendars in STIF::Dashboard. Refs #6064Alban Peignier
2018-03-05Use Workbench#calendars in dashboard. Refs #6064Alban Peignier
2018-03-02Refs #3562 Take review into account and clean a little bitcedricnjanga
2018-03-02Refs Refs #3562 Add workbench CCSET affectationcedricnjanga
2018-03-02Refs #3562 add workbench edit button on workbench#showcedricnjanga
2018-03-02Merge pull request #357 from af83/6064-inconsistency-in-dashboardLuc Donnet
6064 Use same logic to load calendars in dashboard and in controller
2018-03-02Merge pull request #336 from af83/enhance-map-with-several-routesLuc Donnet
Enhance map with several routes
2018-03-01Refs #5990; Add a button to clear lines selection in Referential#newZog