aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-05-16Refs #3377: updating maps layout on routes#showjpl
2017-05-16Merge branch 'master' of github.com:af83/stif-boivRobert
2017-05-16Refs #3400: removing color_filter, adding tag_filterjpl
2017-05-16Merge branch 'master' of github.com:af83/stif-boivRobert
2017-05-16Lines#show filter routes by waybackXinhui
Refs #3398
2017-05-16Merge branch 'master' of github.com:af83/stif-boivRobert
2017-05-16allow disabling RCOV for faster local tests: NO_RCOV=1 bundle exec rake specRobert
2017-05-16Refs #3377: Add special layer for edges (and own styles)Thomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-16Refs #3377: Remove arrow func for sake of the buildThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-16Refs #3377: Fix let statement not being allowedThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-16Refs #3377: add defaultStyles for ol map pointsThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-16Refs #3377: Add openlayers map in routes#showThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-15Merge branch 'master' of github.com:af83/stif-boivRobert
2017-05-15Calendar #convert_to_time_tabletXinhui
Refs #3372
2017-05-12Revert "Fix broken filters vj spec (queries were modified)"Teddy Wing
This reverts commit 012a2e5cdcf62d60325a951929850b4e08b24530. Now that we've fixed the departure time filter on VehicleJourneysController#index (7bf94bc6e6ce6558252252e68419e89a23213573) and re-enabled the supporting JavaScript (36ebc58343bc82c08672f019b1102c3f49e244fb), this temporary test fix can be reverted.
2017-05-12VehicleJourneysController: Add a comment on departure time filterTeddy Wing
This section is a little dense. Comment what it is to make it more obvious. Refs #3370
2017-05-12VehicleJourneysController: Remove `#ransack_periode_filter`Teddy Wing
This method is superseded by `VehicleJourney.where_departure_time_between`. Refs #3370
2017-05-12VehicleJourneysController#collection: Restore departure time filterTeddy Wing
Handle temporary fixes from 972500267f28f233d5670277c02d43fae5ad8e7b and 1f6fb9c73206f3984d2f942d5d16fb9c094b2164. Restore the JavaScript because that should function the same way now. Remove the Ransack call as we've moved this departure time filter outside of Ransack and into our own custom method in order to eliminate a duplicated "JOIN" call on "vehicle_journey_at_stops" collision between the `.with_stops` query and Ransack. The new filter lives in `VehicleJourney.where_departure_time_between`. Refs #3370
2017-05-12VehicleJourneysController: When filtering departure_time allow nil stopsTeddy Wing
There's a `params[:q][:vehicle_journey_without_departure_time]` parameter coming in from the frontend that's supposed to allow it to decide whether or not to include vehicle journeys that have nil stops. Allow this parameter to function for the `VehicleJourney.where_departure_time_between` method by conditionally checking an input parameter to determine whether to add the "OR" condition onto the "WHERE" filter. Refs #3370
2017-05-12VehicleJourneysController#collection: Integrate .departure_time_betweenTeddy Wing
Add our custom departure time range filter to the query. We pass the times sent from the frontend into the query in order to get the correct vehicle journeys back. Copied the `if params[:q]` check from `#ransack_periode_filter`, but added an additional condition on the existence of `:vehicle_journey_at_stops_departure_time_lteq` instead of blatantly assuming it's there just because its `..._gteq` counterpart is. Adding the filter necessitated some modifications to the `VehicleJourneys.departure_time_between` method. We needed to remove the `SELECT DISTINCT` and join parts of the query, reducing it to a simple "where" condition. These removals were due to the nature of the combination of this method with `VehicleJourneys.with_stops`. The `.with_stops` method already does a join on `vehicle_journey_at_stops`, and there's already a `SELECT DISTINCT` applied to the controller's query. Made the decision to limit this method's use to this specific use-case, and thus expect DISTINCT and the necessary join to already be defined on the `ActiveRecord` query object. We modify the test to implement this requirement. Finally, rename `.departure_time_between` to `.where_departure_time_between` to further indicate that this is a simple `where` condition, without the required extras. Refs #3370
2017-05-12VehicleJourney: Add `.departure_time_between` filterTeddy Wing
A new class method that allows a vehicle journey collection to be filtered by a departure time range. This will eventually replace the `VehicleJourneysController#ransack_periode_filter` method, moving the filter out of Ransack and into this custom code. The reason we're doing this is because when trying to filter, Ransack inserts a duplicate `LEFT OUTER JOIN` on "vehicle_journey_at_stops" from `VehicleJourneysController#collection`. (`route.vehicle_journeys.with_stops` + the filter causes the duplicate column error.) For the moment, this method lives on its own. It needs more work to be integrated such that we can chain it with the `.with_stops` method. In particular, we still have the duplicate join problem. Refs #3370
2017-05-12VehicleJourney factory: Move departure & arrival time to transient attrsTeddy Wing
Instead of hard-coding the departure and arrival times of the associated `VehicleJourneyAtStop`s, put the times in transient attributes so that they can be changed for tests that need different stop times. Refs #3370
2017-05-12VehicleJourney.with_stops: Fix SQL styleTeddy Wing
Match the style from the `joins` call above, quoting the table and column name, for consistency.
2017-05-12vehicle_journey_spec.rb: Fix whitespaceTeddy Wing
2017-05-12Refs #3356: clean VJ dummy management (headlined class)jpl
2017-05-12Edit vehicle_journeys/show json formatXinhui
Refs #3356
2017-05-12Refactoring spec time_tables intersectXinhui
2017-05-12Refactoring spec time_table disjoinXinhui
Refs #3303
2017-05-12Fix broken filters vj spec (queries were modified)Thomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-12VehicleJourneys#index Temp disable filter by departure timeXinhui
Refs #3358
2017-05-12Fix sort line transport mode alphabeticallyXinhui
Refs #3109
2017-05-12Merge branch 'master' of github.com:af83/stif-boivRobert
2017-05-11VehicleJourneys#index disable ransack periode filterXinhui
Refs #3358
2017-05-11Disable turbolinks for reactux rendered viewsThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com> Signed-off-by: Jean Pual Lescouzères <jpl-laboulette@af83.com>
2017-05-11Refs #3336: Fix validate button being moved out of react rendering scopeThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-11Remove duplicate line_spec fileXinhui
2017-05-11Fix Line display_name should display short name aka number..Xinhui
Refs #3353
2017-05-11Refs #3357: remove delete stoppoint id when update stopareaThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-10Fix error 500 on workbench filter by lineXinhui
Ref #3347
2017-05-10Refs #3245: Fix stoppoints_id order being preserved for submitThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-10Refs #3339: Disabled start_time input when multiple vj are selected in duplicateThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-10Fix time_table duplicate should also duplicate tagsXinhui
Refs #3329
2017-05-10Refs #3311: Disable turbolinks in header link to vehicle journeysThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-10Fix exceptions not being shown active when reloadingThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-09Refs #3324: fixing ref#show filters on transport_modejpl
2017-05-09Merge branch 'master' of github.com:af83/stif-boivRobert
2017-05-09TimeTables convert continuous dates to periodsXinhui
2017-05-09Refs #3328: updating objectid with shorten version on VJ and JPjpl
2017-05-09Wip group continuous timetable dates into periodesXinhui
2017-05-09Refs #3327: Fix no data attr for turbolinks not usedThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>