From 4a05e13b3aecfdb0704f85d33201add150f992ed Mon Sep 17 00:00:00 2001 From: Ryan Wold Date: Thu, 9 Nov 2023 16:34:08 -0800 Subject: [PATCH 1/7] download .csv rather than render the .csv as text * download all ServiceProviders, and still be able to filter out inactive HISPs --- app/controllers/admin/reporting_controller.rb | 10 +++++----- app/models/service_provider.rb | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/admin/reporting_controller.rb b/app/controllers/admin/reporting_controller.rb index a5e86e2f2..c28c350a7 100644 --- a/app/controllers/admin/reporting_controller.rb +++ b/app/controllers/admin/reporting_controller.rb @@ -5,7 +5,7 @@ class ReportingController < AdminController def index; end def hisps - render plain: ServiceProvider.to_csv + send_data ServiceProvider.to_csv, filename: "touchpoints-service-providers-#{Date.today}.csv" end def hisp_services @@ -35,7 +35,7 @@ def hisp_services row << header_fields.join(',') - ServiceProvider.all.includes(:organization).order('organizations.name', :name).each do |service_provider| + ServiceProviderall..all.includes(:organization).order('organizations.name', :name).each do |service_provider| service_provider.services.order(:name).each do |service| service.omb_cx_reporting_collections.includes(:service, :collection).order('collections.year', 'collections.quarter', 'services.name').each do |omb_cx_reporting_collection| row_fields = [ @@ -363,18 +363,18 @@ def no_submissions def service_surveys @services = Service.includes(:organization, :forms).all.order('organizations.name, services.name') end - + def users @users_who_need_accounts = [] Website.where("site_owner_email IS NOT NULL OR contact_email IS NOT NULL").all.each do |website| - + if website.site_owner_email.present? user = User.find_by_email(website.site_owner_email) if user.nil? @users_who_need_accounts << website.site_owner_email end end - + if website.contact_email.present? user2 = User.find_by_email(website.contact_email) if user2.nil? diff --git a/app/models/service_provider.rb b/app/models/service_provider.rb index d573c6f14..63702c395 100644 --- a/app/models/service_provider.rb +++ b/app/models/service_provider.rb @@ -42,7 +42,7 @@ def self.to_csv portfolio_manager_email ] - ServiceProvider.active + ServiceProvider .includes(:organization) .order('organizations.name', :name).each do |provider| csv << [ From 9a23071eed2ae3f40de6c2f942b412355aa87374 Mon Sep 17 00:00:00 2001 From: kewitham Date: Tue, 14 Nov 2023 11:18:57 -0600 Subject: [PATCH 2/7] add aria label to feedback modal dialog --- app/views/components/widget/_modal.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/components/widget/_modal.html.erb b/app/views/components/widget/_modal.html.erb index d4b0a78bc..658785680 100644 --- a/app/views/components/widget/_modal.html.erb +++ b/app/views/components/widget/_modal.html.erb @@ -1,6 +1,7 @@