From d43b2b2197728466f894b64503675ff0286af969 Mon Sep 17 00:00:00 2001 From: Toby Privett Date: Wed, 27 Nov 2024 12:31:57 +0000 Subject: [PATCH] Group cancellation fields and titleize headers --- app/services/moves/exporter.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/services/moves/exporter.rb b/app/services/moves/exporter.rb index cb77996a7..79912ff6a 100644 --- a/app/services/moves/exporter.rb +++ b/app/services/moves/exporter.rb @@ -18,7 +18,6 @@ class Exporter 'To location code', 'Additional information', 'Date of travel', - 'Cancelled at', 'PNC number', 'Prison number', 'Last name', @@ -55,12 +54,13 @@ class Exporter 'Not to be released details', 'Requires special vehicle', 'Requires special vehicle details', - 'cancellation_reason', - 'cancellation_reason_comment', - 'cancelled_by', - 'journey_billable', - 'difference', - 'journey_supplier', + 'Cancelled at', + 'Cancelled by', + 'Cancellation reason', + 'cancellation reason comment', + 'Journey billable', + 'Difference', + 'Supplier', ].freeze def initialize(moves) @@ -101,7 +101,6 @@ def attributes_row(move) move.to_location&.nomis_agency_id, # To location code move.additional_information, # Additional information move.date&.strftime('%Y-%m-%d'), # Date of travel - cancellation_event&.occurred_at, # Cancelled at person&.police_national_computer, # PNC number person&.prison_number, # Prison number person&.last_name, # Last name @@ -124,9 +123,10 @@ def attributes_row(move) answer_details(answers, 'interpreter'), # Sign or other language interpreter details answer_details(answers, 'not_to_be_released'), # Not to be released details answer_details(answers, 'special_vehicle'), # Requires special vehicle details, + cancellation_event&.occurred_at, # Cancelled at + cancellation_event&.created_by, move.cancellation_reason, move.cancellation_reason_comment, - cancellation_event&.created_by, move.billable?, cancellation_difference(move, cancellation_event), move.supplier&.name,