diff --git a/app/controllers/web/admin/career_member_users_controller.rb b/app/controllers/web/admin/career_member_users_controller.rb index 90618dd0..3a184ebf 100644 --- a/app/controllers/web/admin/career_member_users_controller.rb +++ b/app/controllers/web/admin/career_member_users_controller.rb @@ -138,16 +138,18 @@ def prepare_data(career_members) end def export_users(scope, file_prefix: '') - headers = %i[full_name email career_name current_step progress last_step_finished_at state] + headers = %i[full_name email career_name start_date finished_date current_step progress last_step_finished_or_active_at state] send_file_headers!(filename: "#{file_prefix}-#{Time.zone.today}.csv") self.response_body = generate_csv(scope, headers) do |member| [ member.user.full_name, member.user.email, member.career.name, + member.created_at, + member.finished_at, member.current_item&.career_step&.name, member.progress_by_finished_steps, - member.career_step_members.active.order(created_at: :asc).last&.created_at, + member.career_step_members.finished.order(created_at: :asc).last&.created_at || member.career_step_members.active.order(created_at: :asc).last&.created_at, member.aasm(:state).human_state ] end