aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
AgeCommit message (Collapse)Author
2018-03-26Refs #6218; Limit accessible exports for workgroupsZog
2018-03-22Remove maps code. Refs #6296Alban Peignier
2018-03-18Refs #6210 Remove status value attribue from Chouette::VehicleJourney and ↵6210-remove-attributes-from-modelscedricnjanga
section status fron Chouette::JourneyPattern
2018-03-16Fix stop_area state for filter and display. Update reflex sync to use ↵Luc Donnet
confirmed_at. Refs #6141
2018-03-15Routes: 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-15Merge pull request #372 from af83/6146-line-statesLuc Donnet
6146 Line state update
2018-03-15Ignore undefined CustomFields in extra headers for ↵Alban Peignier
VehicleJourneysController. Refs #6143
2018-03-15Add StopArea#status in stop_areas#_form. Refs #60336033-stop-area-statesAlban Peignier
2018-03-15Refs #6033 Fix stop areas spec featurecedricnjanga
2018-03-15Refs #6033 Changes for StopArea#index and StopArea#showcedricnjanga
2018-03-14Fix access for import ressources Refs #6133 @3Luc Donnet
2018-03-14Refs #6146; Fix "activated/deactivated" filterZog
2018-03-12Refs #5146 Line state updatecedricnjanga
2018-03-12Refs #6133; Fix specsZog
2018-03-12Refs #6135; ExportsController#upload endpointZog
With token-based authentication
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; Add options on the Exports, and forward them tu the UXZog
2018-03-12refs #6133; Add some basic specsZog
2018-03-12Refs #6133; First Crud for exportsZog
2018-03-12Refs #6133; Fix specsZog
2018-03-07AutocompleteLines: Sanitize `:q` param in `LIKE` operatorTeddy Wing
Johan made a number of good points here: > * I think this belongs in the model > * I would rather use a named parameter here > `.where('lines.number LIKE :q OR lines.names LIKE :q ...', q: > "%#{params[:q]}%")` > * You should defiitely escape the params before passing it to your db. > `sanitize_sql_like` seems like the best choice here I wasn't thinking about sanitisation at all and just assumed the `?`s in the prepared statement would take care of it for me. But obviously, we're passing `%`s in the param, so users can of course do the same thing. Protect against this using the `ActiveRecord::Sanitization#sanitize_sql_like` method. This is a private class method, so in order to use it we have to call it from inside the `Chouette::Line` model. And of course the named parameters are a no-brainer. At the time, I had seen that `Array` splat somewhere else in the codebase and just blindly copied the format, forgetting that named parameters even existed. Refs #5889
2018-03-07AutocompleteLinesController: Move filter SQL string inside queryTeddy Wing
Get rid of the heredoc to allow us to put the string inside the argument to the function directly and thus make the query more readable by putting it in context. Refs #5889
2018-03-07AutocompleteLinesController: Include company name in filterTeddy Wing
The `#display_name` used in the drop-down on `ReferentialVehicleJourneys#index` includes the line's company name. Include this as a field to filter lines by. Additionally, use `%query%` filtering everywhere. It's going to be slower, but will produce the same behaviour for all fields for consistency and is easier for searching by company name when you might want to filter by a term in the middle of the name. 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-04Refs #3562 Small change in controller to match routescedricnjanga
2018-03-02Refs #3562 Take review into account and clean a little bitcedricnjanga
2018-03-02Refs Refs #3562 Add workbench CCSET affectationcedricnjanga
2018-03-02Merge pull request #295 from af83/5865-validate-referential-cloningLuc Donnet
5865 Ensure user is allowed to duplicate a referential
2018-03-01Refs #5940; Add missing flash after Calendar creationZog
2018-03-01Refs #6056 Add pagination to ComplianceCheckSet#indexcedricnjanga
2018-02-27Merge pull request #339 from af83/5878-fix-ComplianceChecksController-showLuc Donnet
5878 Add ComplianceCheck#show
2018-02-27Fix prerequisite access for compliance_check and compliance_control Refs ↵Luc Donnet
#5878 @1
2018-02-27Refs #5878; Refactor ComplianceChecksControllerZog
Use InheritedResources helpers
2018-02-27Merge pull request #321 from af83/5979_change_export_csv_filenamesLuc Donnet
Refs #5979 Change export CSV filenames to have a readable date in it
2018-02-27Don't use all compliance_control_set from stif organisation. We will use ↵5950_allow_user_to_see_ccset_from_other_organisationLuc Donnet
later compliance_control_set selected by stif organisatoon Refs #5950 @2
2018-02-23Refs #5950 Fix 404 error when user wants to see CCSet from other organisation :cedricnjanga
- remove begin_association_chain in controller - Change collecyion to only see user organisayion CCSet and STIF CCSet - add policy for show action
2018-02-23Refs 5878; Add ComplianceCheck#showZog
2018-02-22Return false in has_feature? when no organisation is defined. Refs #6007Alban Peignier
2018-02-21Refs #5865 @1h; Ensure user is allowed to duplicate a referential before ↵Zog
doing so I also changed the way 403 errors are handled, to properly respond with a 403 HTTP code
2018-02-20Refs #5979 Change export CSV filenames to have a readable date in it5979_change_export_csv_filenamescedricnjanga
2018-02-20Refs #5901; Makes TimeTable search accent insensitiveZog
2018-02-20Merge pull request #308 from ↵Alban Peignier
af83/5911-stops-filter-on-referential-journeys-index Better stops filters on ReferentialVJs#index. Refs #5911
2018-02-20Merge pull request #294 from af83/5863-use-shallow-urls-for-referentialsLuc Donnet
5863 Remove workbench id from the querystring
2018-02-20Refs #5863 @6h; Remove workbench id from the querystringZog
Infer it when possible, and use a nested otherwise
2018-02-20Replace current_workgroup by referential.workgroup. Refs #5867Alban Peignier
2018-02-19Search VehicleJourneys with one StopArea or two ordered StopAreas. Refs #5911Alban Peignier
2018-02-19Refs #5911 @2h; Better stops filters on ReferentialVJs#indexZog
2018-02-19Merge pull request #303 from af83/5899-use-waiting-time-in-schedulesAlban Peignier
Use waiting_time in schedules computation. Refs #5899
2018-02-19Merge pull request #309 from af83/5919-make-coluns-sortableAlban Peignier
Make ReferentialVJs#index sortable. Refs #5919