aboutsummaryrefslogtreecommitdiffstats
path: root/app
AgeCommit message (Collapse)Author
2017-05-16Refs #3377: updating maps layout on routes#showjpl
2017-05-16Refs #3400: removing color_filter, adding tag_filterjpl
2017-05-16Lines#show filter routes by waybackXinhui
Refs #3398
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-15Calendar #convert_to_time_tabletXinhui
Refs #3372
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.with_stops: Fix SQL styleTeddy Wing
Match the style from the `joins` call above, quoting the table and column name, for consistency.
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_table disjoinXinhui
Refs #3303
2017-05-12VehicleJourneys#index Temp disable filter by departure timeXinhui
Refs #3358
2017-05-12Fix sort line transport mode alphabeticallyXinhui
Refs #3109
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-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-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>
2017-05-09Refs #3325: adding oid on tt#indexjpl
2017-05-09Refs #3323: using I18n correctly on refs#showjpl
2017-05-06removed left over commentRobert
2017-05-05Hotfix for old Ruby VersionRobert
2017-05-05Refs #3297Robert
Nullification of foreign keys in delete route moved from an `after_destroy' to a `before_destroy' hook. (Motivation: Seemed like a good idea)
2017-05-05Refs: #3297 removed patch of inherited_resources in RoutesControllerRobert
2017-05-05Refs: #3297Robert
- fix of RouteObserver#after_destroy (dead code right now, but see below) - change specs to use Route#destroy in order to trigger `dependent: :destroy' in stop_points (#delete does not work as stop_points is used in `has_many :stop_areas, through:', no doc found on this behavior, but #destroy is the advocated method to be used)
2017-05-05Refs # 3297; behavior specedRobert
2017-05-05Refs #3159: updating styles on stop_areas listsjpl
2017-05-05Js gardening in timetable actions & action specsThomas Haddad
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
2017-05-05Refs #3287: adding time to date of sync, to sync pagesjpl
2017-05-04_vj_collection.sass: Remove z-index from .has-error:beforeTeddy Wing
When an error occurred when modifying a time in a journey pattern, it would be surrounded by a red box. The trouble is, you wouldn't be able to click inside that box to focus the inputs and change times once the box was added. The problem happens on this page: http://stif-boiv.dev:3000/referentials/4/lines/158/routes/1/vehicle_journeys This was due to the z-index placing the box on a layer closer to the front than the inputs, eating click events and preventing them from being clicked on. Originally I thought about using `pointer-events: none;` but according to http://caniuse.com/#search=pointer-events it isn't supported in IE < 11. Eliminated the `z-index` instead which has the same effect and doesn't appear to cause any visual problems, at least on the page I mentioned. Only tested in Opera TBH. Refs #3301
2017-05-04VehicleJourneysCtl#collection: Use VehicleJourney.with_stopsTeddy Wing
Use the class method to get the vehicle journeys in the proper order of departure time ascending. The `.with_stops` method replicates this same SQL sequence of joins and order. Refs #3268