| Age | Commit message (Collapse) | Author | 
 | 
 | 
 | 
 | 
 | 
Refs #3398
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
Refs #3372
 | 
 | 
This section is a little dense. Comment what it is to make it more
obvious.
Refs #3370
 | 
 | 
This method is superseded by
`VehicleJourney.where_departure_time_between`.
Refs #3370
 | 
 | 
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
 | 
 | 
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
 | 
 | 
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
 | 
 | 
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
 | 
 | 
Match the style from the `joins` call above, quoting the table and
column name, for consistency.
 | 
 | 
 | 
 | 
Refs #3356
 | 
 | 
Refs #3303
 | 
 | 
Refs #3358
 | 
 | 
Refs #3109
 | 
 | 
Refs #3358
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Signed-off-by: Jean Pual Lescouzères <jpl-laboulette@af83.com>
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
Refs #3353
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
Ref #3347
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
Refs #3329
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
 | 
Nullification of foreign keys in delete route moved from an `after_destroy' to a `before_destroy' hook.
   (Motivation: Seemed like a good idea)
 | 
 | 
 | 
 | 
- 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)
 | 
 | 
 | 
 | 
 | 
 | 
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
 | 
 | 
 | 
 | 
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
 | 
 | 
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
 |