diff --git a/Gemfile b/Gemfile index 55d5f09b8..353a37318 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,7 @@ gem "sprockets-rails" gem "pg", "~> 1.3" # Use the Puma web server [https://github.com/puma/puma] -gem "puma", "~> 5.6" +gem "puma" # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] gem "importmap-rails", ">= 1.2.0" diff --git a/Gemfile.lock b/Gemfile.lock index 04a328cb4..2f45f1da3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,9 @@ GIT remote: https://github.com/18F/omniauth_login_dot_gov.git - revision: 73843e3742dbd595b2d081e33c04a65eb89d9cde + revision: a9a8b1c2e8000762c39fc68f172dc82f1481debb branch: main specs: - omniauth_login_dot_gov (1.0.0) + omniauth_login_dot_gov (2.0.0) faraday (~> 0.17) json-jwt (~> 1.11) jwt (~> 2.2) @@ -96,15 +96,15 @@ GEM aes_key_wrap (1.1.0) ast (2.4.2) aws-eventstream (1.2.0) - aws-partitions (1.835.0) - aws-record (2.12.0) + aws-partitions (1.838.0) + aws-record (2.13.0) aws-sdk-dynamodb (~> 1, >= 1.85.0) aws-sdk-core (3.185.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) jmespath (~> 1, >= 1.6.1) - aws-sdk-dynamodb (1.95.0) + aws-sdk-dynamodb (1.96.0) aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) aws-sdk-rails (3.9.0) @@ -118,10 +118,10 @@ GEM aws-sdk-ses (1.56.0) aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) - aws-sdk-sesv2 (1.40.0) + aws-sdk-sesv2 (1.41.0) aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) - aws-sdk-sqs (1.63.0) + aws-sdk-sqs (1.64.0) aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) aws-sessionstore-dynamodb (2.1.0) @@ -276,7 +276,7 @@ GEM method_source (1.0.0) mime-types (3.5.1) mime-types-data (~> 3.2015) - mime-types-data (3.2023.0808) + mime-types-data (3.2023.1003) mini_magick (4.12.0) mini_mime (1.1.5) mini_portile2 (2.8.4) @@ -285,7 +285,7 @@ GEM multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) - net-imap (0.4.0) + net-imap (0.4.1) date net-protocol net-pop (0.1.2) @@ -331,11 +331,11 @@ GEM coderay (~> 1.1) method_source (~> 1.0) public_suffix (5.0.3) - puma (5.6.7) + puma (6.4.0) nio4r (~> 2.0) racc (1.7.1) rack (2.2.8) - rack-cors (1.1.1) + rack-cors (2.0.1) rack (>= 2.0.0) rack-protection (3.1.0) rack (~> 2.2, >= 2.2.4) @@ -442,7 +442,7 @@ GEM ruby-graphviz (1.2.5) rexml ruby-progressbar (1.13.0) - ruby-vips (2.1.4) + ruby-vips (2.2.0) ffi (~> 1.12) rubyzip (1.3.0) sass-rails (6.0.0) @@ -482,7 +482,7 @@ GEM ssrf_filter (1.1.2) stimulus-rails (1.3.0) railties (>= 6.0.0) - thor (1.2.2) + thor (1.3.0) tilt (2.3.0) timeout (0.4.0) turbo-rails (1.5.0) @@ -556,7 +556,7 @@ DEPENDENCIES paper_trail pg (~> 1.3) pry - puma (~> 5.6) + puma rack-cors (>= 1.1.1) rails (~> 7.0.6) rails-controller-testing diff --git a/app/controllers/admin/forms_controller.rb b/app/controllers/admin/forms_controller.rb index f61bac08e..83635072a 100644 --- a/app/controllers/admin/forms_controller.rb +++ b/app/controllers/admin/forms_controller.rb @@ -365,7 +365,7 @@ def export_submissions send_data csv_content end format.json do - ExportJob.perform_later(params[:uuid], @form.short_uuid, start_date.to_s, end_date.to_s, "touchpoints-form-responses-#{timestamp_string}.csv") + ExportJob.perform_later(params[:uuid], @form.short_uuid, start_date.to_s, end_date.to_s, "touchpoints-form-#{@form.short_uuid}-responses-#{timestamp_string}.csv") render json: { result: :ok } end end diff --git a/app/controllers/admin/service_providers_controller.rb b/app/controllers/admin/service_providers_controller.rb index 7ae89175c..6bac9ae62 100644 --- a/app/controllers/admin/service_providers_controller.rb +++ b/app/controllers/admin/service_providers_controller.rb @@ -119,6 +119,7 @@ def service_provider_params :tag_list, :cx_maturity_mapping_value, :impact_mapping_value, + :year_designated ) end end diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index ff670f41e..6d9f2e01d 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -257,6 +257,7 @@ def service_params :description, :short_description, :year_designated, + :previously_reported, :digital_service, :estimated_annual_volume_of_customers, :hisp, diff --git a/app/controllers/admin/submissions_controller.rb b/app/controllers/admin/submissions_controller.rb index eeba72513..4ba6eecd7 100644 --- a/app/controllers/admin/submissions_controller.rb +++ b/app/controllers/admin/submissions_controller.rb @@ -44,7 +44,7 @@ def update def search @all_submissions = @form.submissions - @all_submissions = @all_submissions.where(":tags = ANY (submission_tags)", tags: params[:tag]) if params[:tag] + @all_submissions = @all_submissions.where(":tags = ANY (tags)", tags: params[:tag]) if params[:tag] if params[:archived] @submissions = @all_submissions.order('submissions.created_at DESC').page params[:page] else @@ -65,18 +65,18 @@ def unflag def add_tag tag = tag_params[:tag] - if !tag.strip.empty? && !@submission.submission_tags.include?(tag) - @submission.submission_tags << tag.strip.downcase + if !tag.strip.empty? && !@submission.tags.include?(tag) + @submission.tags << tag.strip.downcase @submission.save! - @submission.form.update_submission_tags!(@submission.submission_tags) + @submission.form.update_submission_tags!(@submission.tags) end end def remove_tag tag = tag_params[:tag] - if @submission.submission_tags.include?(tag) - @submission.submission_tags -= [tag] + if @submission.tags.include?(tag) + @submission.tags -= [tag] @submission.save! end end @@ -108,7 +108,7 @@ def performance_gov def submissions_table @show_archived = true if params[:archived] all_submissions = @form.submissions - all_submissions = all_submissions.where(":tags = ANY (submission_tags)", tags: params[:tag]) if params[:tag] + all_submissions = all_submissions.where(":tags = ANY (tags)", tags: params[:tag]) if params[:tag] if params[:archived] @submissions = all_submissions.order('submissions.created_at DESC').page params[:page] else diff --git a/app/models/form.rb b/app/models/form.rb index 9b9eb0418..0d8855c4b 100644 --- a/app/models/form.rb +++ b/app/models/form.rb @@ -502,7 +502,7 @@ def hashed_fields_for_export end ordered_hash.merge!({ - tag_list: 'Tags', + tags: 'Tags', }) ordered_hash diff --git a/app/models/submission.rb b/app/models/submission.rb index 08d8083dc..f3d6a1cd1 100644 --- a/app/models/submission.rb +++ b/app/models/submission.rb @@ -1,9 +1,6 @@ # frozen_string_literal: true class Submission < ApplicationRecord - # TODO: remove acts-as-taggable, in favor of .submission_tags - # TODO: then, rename submission_tags to tags - acts_as_taggable_on :tags include AASM belongs_to :form, counter_cache: :response_count diff --git a/app/serializers/service_provider_serializer.rb b/app/serializers/service_provider_serializer.rb index ae1808671..8b9ce1fd6 100644 --- a/app/serializers/service_provider_serializer.rb +++ b/app/serializers/service_provider_serializer.rb @@ -7,6 +7,7 @@ class ServiceProviderSerializer < ActiveModel::Serializer :organization_name, :name, :slug, + :year_designated, :description, :notes, :department, diff --git a/app/serializers/service_serializer.rb b/app/serializers/service_serializer.rb index 4e116d9ae..8de965232 100644 --- a/app/serializers/service_serializer.rb +++ b/app/serializers/service_serializer.rb @@ -13,6 +13,7 @@ class ServiceSerializer < ActiveModel::Serializer :short_description, :justification_text, :year_designated, + :previously_reported, :contact_center, :kind, :transactional, diff --git a/app/serializers/submission_serializer.rb b/app/serializers/submission_serializer.rb index 6eb3b1832..ffce138ec 100644 --- a/app/serializers/submission_serializer.rb +++ b/app/serializers/submission_serializer.rb @@ -36,11 +36,5 @@ class SubmissionSerializer < ActiveModel::Serializer :aasm_state, :language, :uuid, - :tag_list - - # override tag_list provided by acts-as-taggable - # but keep an array of tags - def tag_list - object.submission_tags - end + :tags end diff --git a/app/views/admin/cx_collections/_form.html.erb b/app/views/admin/cx_collections/_form.html.erb index 1af0ee9a4..3acb103de 100644 --- a/app/views/admin/cx_collections/_form.html.erb +++ b/app/views/admin/cx_collections/_form.html.erb @@ -125,8 +125,8 @@
+ Year designated
+
+ <%= @service_provider.year_designated %>
+
Service provider managers
@@ -181,4 +187,3 @@
<% end %>