From 7e5fe860c7d724861c20d5fdca87e8f7cd4a00bc Mon Sep 17 00:00:00 2001
From: Ryan Wold
Date: Thu, 31 Mar 2022 15:49:23 -0700
Subject: [PATCH] remove bureau_abbreviation; fron old cx reporting
* fix website step indicator
* update admin stats table layout
---
.../admin/service_providers_controller.rb | 1 -
app/controllers/admin/services_controller.rb | 1 -
.../api/v1/collections_controller.rb | 2 +-
...omb_cx_reporting_collections_controller.rb | 2 +-
.../api/v1/organizations_controller.rb | 2 +-
app/controllers/api/v1/services_controller.rb | 2 +-
.../service_provider_serializer.rb | 1 -
app/serializers/service_serializer.rb | 1 -
.../admin/service_providers/show.html.erb | 5 -
app/views/admin/services/_form.html.erb | 5 -
app/views/admin/services/show.html.erb | 5 -
.../admin/websites/_step_indicator.html.erb | 2 +-
app/views/admin/websites/show.html.erb | 28 ++-
app/views/components/_footer.html.erb | 2 +-
app/views/components/_weekly_metrics.html.erb | 213 ++++++++++--------
db/seeds.rb | 5 -
16 files changed, 137 insertions(+), 140 deletions(-)
diff --git a/app/controllers/admin/service_providers_controller.rb b/app/controllers/admin/service_providers_controller.rb
index 05f9ee26e..ce9cb4bc1 100644
--- a/app/controllers/admin/service_providers_controller.rb
+++ b/app/controllers/admin/service_providers_controller.rb
@@ -109,7 +109,6 @@ def service_provider_params
:department,
:department_abbreviation,
:bureau,
- :bureau_abbreviation,
:inactive,
:new,
:tag_list,
diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb
index f72abf82b..d0ba2bde6 100644
--- a/app/controllers/admin/services_controller.rb
+++ b/app/controllers/admin/services_controller.rb
@@ -219,7 +219,6 @@ def service_params
:service_owner_id,
:service_provider_id,
:bureau,
- :bureau_abbreviation,
:department,
:description,
:hisp,
diff --git a/app/controllers/api/v1/collections_controller.rb b/app/controllers/api/v1/collections_controller.rb
index d54454288..1a6988254 100644
--- a/app/controllers/api/v1/collections_controller.rb
+++ b/app/controllers/api/v1/collections_controller.rb
@@ -2,7 +2,7 @@ class Api::V1::CollectionsController < ::ApiController
def index
respond_to do |format|
format.json {
- render json: Collection.all, each_serializer: CollectionSerializer
+ render json: Collection.all.order(:id), each_serializer: CollectionSerializer
}
end
end
diff --git a/app/controllers/api/v1/omb_cx_reporting_collections_controller.rb b/app/controllers/api/v1/omb_cx_reporting_collections_controller.rb
index 20d7c02b5..ebfa2089e 100644
--- a/app/controllers/api/v1/omb_cx_reporting_collections_controller.rb
+++ b/app/controllers/api/v1/omb_cx_reporting_collections_controller.rb
@@ -2,7 +2,7 @@ class Api::V1::OmbCxReportingCollectionsController < ::ApiController
def index
respond_to do |format|
format.json {
- render json: OmbCxReportingCollection.all, each_serializer: OmbCxReportingCollectionSerializer
+ render json: OmbCxReportingCollection.all.order(:id), each_serializer: OmbCxReportingCollectionSerializer
}
end
end
diff --git a/app/controllers/api/v1/organizations_controller.rb b/app/controllers/api/v1/organizations_controller.rb
index 248b31398..fa81d9797 100644
--- a/app/controllers/api/v1/organizations_controller.rb
+++ b/app/controllers/api/v1/organizations_controller.rb
@@ -2,7 +2,7 @@ class Api::V1::OrganizationsController < ::ApiController
def index
respond_to do |format|
format.json {
- render json: Organization.all, each_serializer: OrganizationSerializer
+ render json: Organization.all.order(:id), each_serializer: OrganizationSerializer
}
end
end
diff --git a/app/controllers/api/v1/services_controller.rb b/app/controllers/api/v1/services_controller.rb
index 60067507d..0d5e6940d 100644
--- a/app/controllers/api/v1/services_controller.rb
+++ b/app/controllers/api/v1/services_controller.rb
@@ -2,7 +2,7 @@ class Api::V1::ServicesController < ::ApiController
def index
respond_to do |format|
format.json {
- render json: Service.all, each_serializer: ServiceSerializer
+ render json: Service.all.order(:id), each_serializer: ServiceSerializer
}
end
end
diff --git a/app/serializers/service_provider_serializer.rb b/app/serializers/service_provider_serializer.rb
index 97f02bcf8..5676f4b37 100644
--- a/app/serializers/service_provider_serializer.rb
+++ b/app/serializers/service_provider_serializer.rb
@@ -10,7 +10,6 @@ class ServiceProviderSerializer < ActiveModel::Serializer
:department,
:department_abbreviation,
:bureau,
- :bureau_abbreviation,
:inactive,
:url,
:new
diff --git a/app/serializers/service_serializer.rb b/app/serializers/service_serializer.rb
index 3be7b1a2e..39a2ed80c 100644
--- a/app/serializers/service_serializer.rb
+++ b/app/serializers/service_serializer.rb
@@ -13,7 +13,6 @@ class ServiceSerializer < ActiveModel::Serializer
:hisp,
:department,
:bureau,
- :bureau_abbreviation,
:service_abbreviation,
:service_slug,
:service_owner_email,
diff --git a/app/views/admin/service_providers/show.html.erb b/app/views/admin/service_providers/show.html.erb
index 06d992429..9c9431ab6 100644
--- a/app/views/admin/service_providers/show.html.erb
+++ b/app/views/admin/service_providers/show.html.erb
@@ -85,11 +85,6 @@
<%= @service_provider.bureau %>
-
- Bureau abbreviation:
- <%= @service_provider.bureau_abbreviation %>
-
-
Slug:
<%= @service_provider.slug %>
diff --git a/app/views/admin/services/_form.html.erb b/app/views/admin/services/_form.html.erb
index 6d1a826ed..900b9ef3b 100644
--- a/app/views/admin/services/_form.html.erb
+++ b/app/views/admin/services/_form.html.erb
@@ -112,11 +112,6 @@
<%= form.text_field :bureau, class: "usa-input", placeholder: "Bureau" %>
-
- <%= form.label :bureau_abbreviation, class: "usa-label" %>
- <%= form.text_field :bureau_abbreviation, class: "usa-input", placeholder: "bureau_abbreviation" %>
-
-
<%= form.label :service_abbreviation, class: "usa-label" %>
<%= form.text_field :service_abbreviation, class: "usa-input", placeholder: "service_abbreviation" %>
diff --git a/app/views/admin/services/show.html.erb b/app/views/admin/services/show.html.erb
index 4b6288cd9..153dfb14e 100644
--- a/app/views/admin/services/show.html.erb
+++ b/app/views/admin/services/show.html.erb
@@ -113,11 +113,6 @@
<%= @service.bureau %>
-
- Bureau abbreviation
-
- <%= @service.bureau_abbreviation %>
-
Service abbreviation
diff --git a/app/views/admin/websites/_step_indicator.html.erb b/app/views/admin/websites/_step_indicator.html.erb
index ef5e99c04..be4275352 100644
--- a/app/views/admin/websites/_step_indicator.html.erb
+++ b/app/views/admin/websites/_step_indicator.html.erb
@@ -55,7 +55,7 @@
<% end %>
-
<%= "usa-step-indicator__segment--current" if website.newly_requested? %>">
+ <%= "usa-step-indicator__segment--current" if website.newly_requested? %>">
Approved
completed
diff --git a/app/views/admin/websites/show.html.erb b/app/views/admin/websites/show.html.erb
index 15e115fef..9b6ae24d1 100644
--- a/app/views/admin/websites/show.html.erb
+++ b/app/views/admin/websites/show.html.erb
@@ -56,22 +56,20 @@
<%= time_ago_in_words(@website.updated_at) %> ago
-
-
+
+
<%= link_to @website.domain, "https://#{@website.domain}", target: "_blank", rel: "noopener" %>
-
-
-
-
+
Website owner emails
@@ -81,6 +79,7 @@
Website managers emails
+
<% if @website.website_managers.present? %>
<% @website.website_managers.each do | manager | %>
@@ -96,22 +95,21 @@
<% end %>
-
+
Office
<%= @website.office %>
-
-
-
+
+
Contact email
<%= @website.contact_email %>
-
+
Sub-office
@@ -142,7 +140,7 @@
-
+
Digital brand category
@@ -158,13 +156,13 @@
-
+
Required by law or policy
<%= @website.required_by_law_or_policy || "no answer" %>
-
+
Notes
<%= @website.notes %>
diff --git a/app/views/components/_footer.html.erb b/app/views/components/_footer.html.erb
index 88dec6a02..6c811f3ff 100644
--- a/app/views/components/_footer.html.erb
+++ b/app/views/components/_footer.html.erb
@@ -9,7 +9,7 @@
- Email for customer support
+ Customer support
diff --git a/app/views/components/_weekly_metrics.html.erb b/app/views/components/_weekly_metrics.html.erb
index 85d8aa9cb..ae516b3f3 100644
--- a/app/views/components/_weekly_metrics.html.erb
+++ b/app/views/components/_weekly_metrics.html.erb
@@ -1,97 +1,120 @@
-
- Weekly Product Metrics
-
-
-
-
- These metrics are reported up to the GSA TTS Data Portfolio on a weekly basis.
-
+
+
+ Weekly Product Metrics
+
+
+
+
+ These metrics are reported up to the GSA TTS Data Portfolio on a weekly basis.
+
+
-
-
-
-
-
- Users
- |
-
- Agencies
- |
-
- Forms
- |
-
- Responses
- |
-
-
-
-
-
- <%= User.count %>
- |
-
- <%= Organization.count %>
- |
-
- <%= Form.non_templates.count %>
- |
-
- <%= Submission.count %>
- |
-
-
-
+
+
+
+
+ Users
+ |
+
+ Agencies
+ |
+
+
+
+
+
+ <%= User.count %>
+ |
+
+ <%= Organization.count %>
+ |
+
+
+
+
+
+
+
+
+ Forms
+ |
+
+ Responses
+ |
+
+
+
+
+
+ <%= Form.non_templates.count %>
+ |
+
+ <%= Submission.count %>
+ |
+
+
+
-
-
-
-
- Service Providers
- |
-
- Services
- |
-
- Data Collections
- |
-
- Service details
- |
-
- Websites
- |
-
- Digital products
- |
-
- Social media accounts
- |
-
-
-
-
-
- <%= ServiceProvider.count %>
- |
-
- <%= Service.count %>
- |
-
- <%= Collection.count %>
- |
-
- <%= OmbCxReportingCollection.count %>
- |
-
- <%= Website.count %>
- |
-
- <%= DigitalProduct.count %>
- |
-
- <%= DigitalServiceAccount.count %>
- |
-
-
-
+
+
+
+
+ Service Providers
+ |
+
+ Services
+ |
+
+ Data Collections
+ |
+
+ Service details
+ |
+
+
+
+
+
+ <%= ServiceProvider.count %>
+ |
+
+ <%= Service.count %>
+ |
+
+ <%= Collection.count %>
+ |
+
+ <%= OmbCxReportingCollection.count %>
+ |
+
+
+
+
+
+
+
+ Websites
+ |
+
+ Digital products
+ |
+
+ Social media accounts
+ |
+
+
+
+
+
+ <%= Website.count %>
+ |
+
+ <%= DigitalProduct.count %>
+ |
+
+ <%= DigitalServiceAccount.count %>
+ |
+
+
+
+
diff --git a/db/seeds.rb b/db/seeds.rb
index 3a84901c6..8ed5f150d 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -334,7 +334,6 @@ def production_suitable_seeds
department: 'Example Department',
department_abbreviation: 'dept',
bureau: 'Example Bureau',
- bureau_abbreviation: 'bureau',
slug: 'example-service1',
new: false,
})
@@ -347,7 +346,6 @@ def production_suitable_seeds
department: 'Example',
department_abbreviation: 'ex',
bureau: 'CX Labs',
- bureau_abbreviation: 'labs',
slug: 'example-service2',
new: false,
})
@@ -360,7 +358,6 @@ def production_suitable_seeds
department: 'General Services Administration',
department_abbreviation: 'gsa',
bureau: 'Technology Transformation Services',
- bureau_abbreviation: 'tts',
slug: 'gsa-usagov',
new: true,
})
@@ -375,7 +372,6 @@ def production_suitable_seeds
description: 'A blurb describing this service. A few hundred words...',
department: 'Department of Commerce',
bureau: 'Patents and Trademarks',
- bureau_abbreviation: 'trademarks',
service_abbreviation: 'uspto',
service_slug: 'doc-trademarks',
url: 'https://uspto.gov/trademarks',
@@ -590,4 +586,3 @@ def production_suitable_seeds
q7_4: rand(1000),
q7_5: rand(1000),
})
-