diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ea878752d..09afa476e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -166,6 +166,11 @@ def format_time(time, timezone) I18n.l time.to_time.in_time_zone(timezone), format: :long end + def timezone_abbreviation(timezone) + zone = ActiveSupport::TimeZone.new(timezone) + zone.now.strftime('%Z') + end + def form_integrity_checksum(form:) data_to_encode = render(partial: 'components/widget/fba', formats: :js, locals: { form: }) Digest::SHA256.base64digest(data_to_encode) diff --git a/app/views/admin/cx_collection_details/_form.html.erb b/app/views/admin/cx_collection_details/_form.html.erb index 35b1266f4..543d399f7 100644 --- a/app/views/admin/cx_collection_details/_form.html.erb +++ b/app/views/admin/cx_collection_details/_form.html.erb @@ -45,7 +45,7 @@
Service | +Survey title | +Stage | Transaction point | Channel | |
---|---|---|---|---|---|
- <%= cx_collection.try(:service).try(:name) %> + <%= cx_collection.survey_title %> + | ++ <% if cx_collection.service_stage %> + <%= cx_collection.service_stage.name %> + <% end %> | <%= link_to cx_collection.transaction_point, admin_cx_collection_detail_path(cx_collection) %> diff --git a/app/views/admin/forms/index.html.erb b/app/views/admin/forms/index.html.erb index c4db58003..22ce9b655 100644 --- a/app/views/admin/forms/index.html.erb +++ b/app/views/admin/forms/index.html.erb @@ -63,10 +63,10 @@ <%= form.questions_count %> | - <%= form.survey_form_activations %> + <%= number_with_delimiter(form.survey_form_activations) %> | - <%= form.response_count %> + <%= number_with_delimiter(form.response_count) %> |
<%= form.completion_rate %>
diff --git a/app/views/admin/forms/show.html.erb b/app/views/admin/forms/show.html.erb
index 8670db986..78025bdb8 100644
--- a/app/views/admin/forms/show.html.erb
+++ b/app/views/admin/forms/show.html.erb
@@ -28,22 +28,25 @@
<% if is_at_least_form_manager?(user: current_user, form: @form) %>
- +
- <%= pluralize @form.response_count, "response" %>
+ <%= pluralize number_with_delimiter(@form.response_count), "response" %>
<% if @form.last_response_created_at.present? %> - Latest response: + + Latest response + <%= time_ago_in_words(@form.last_response_created_at) %> ago at <%= format_time(@form.last_response_created_at, current_user.time_zone) %> + <%= timezone_abbreviation(current_user.time_zone) %> <% end %> - + |