From b11983e198bf2cbf2a81ce582a6a6e949939db5d Mon Sep 17 00:00:00 2001 From: Alban Peignier Date: Thu, 22 Feb 2018 11:14:46 +0100 Subject: Use local time in ReferentialVJs#index. Enable sort on times in ReferentialVehicleJourneys#index. Refs #5996. Refs #5852 --- app/views/referential_vehicle_journeys/index.html.slim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/referential_vehicle_journeys/index.html.slim b/app/views/referential_vehicle_journeys/index.html.slim index 1adcfae36..00f63cb65 100644 --- a/app/views/referential_vehicle_journeys/index.html.slim +++ b/app/views/referential_vehicle_journeys/index.html.slim @@ -39,20 +39,20 @@ ), \ TableBuilderHelper::Column.new( \ key: :departure_time, \ - attribute: Proc.new {|v| v.vehicle_journey_at_stops.first&.departure }, \ - sortable: false \ + attribute: Proc.new {|v| v.vehicle_journey_at_stops.first&.departure_local }, \ + sortable: true \ ), \ [@starting_stop, @ending_stop].compact.map{|stop| \ TableBuilderHelper::Column.new( \ - attribute: Proc.new {|v| v.vehicle_journey_at_stops.where("stop_points.stop_area_id" => stop.id).last.arrival }, \ + attribute: Proc.new {|v| v.vehicle_journey_at_stops.where("stop_points.stop_area_id" => stop.id).last&.arrival_local }, \ sortable: false, \ name: stop.name \ )\ }, \ TableBuilderHelper::Column.new( \ key: :arrival_time, \ - attribute: Proc.new {|v| v.vehicle_journey_at_stops.last&.arrival }, \ - sortable: false, \ + attribute: Proc.new {|v| v.vehicle_journey_at_stops.last&.arrival_local }, \ + sortable: true, \ ), \ ].flatten.compact, cls: 'table has-filter has-search' -- cgit v1.2.3