Browse Source

feat: update datetime format in csv services

pull/1954/head
natdeanlewissoftwire 3 years ago
parent
commit
750c267436
  1. 2
      app/services/csv/lettings_log_csv_service.rb
  2. 2
      app/services/csv/sales_log_csv_service.rb

2
app/services/csv/lettings_log_csv_service.rb

@ -156,7 +156,7 @@ module Csv
value = log.public_send(attribute)
get_label(value, attribute, log)
elsif DATE_FIELDS.include? attribute
log.public_send(attribute)&.iso8601
log.public_send(attribute)&.strftime("%F")
elsif PERSON_DETAILS.any? { |key, _value| key == attribute } && person_details_not_known?(log, attribute)
case @export_type
when "codes"

2
app/services/csv/sales_log_csv_service.rb

@ -74,7 +74,7 @@ module Csv
value = log.send(attribute)
get_label(value, attribute, log)
elsif DATE_FIELDS.include? attribute
log.send(attribute)&.iso8601
log.public_send(attribute)&.strftime("%F")
else
value = log.public_send(attribute)
case @export_type

Loading…
Cancel
Save