diff --git a/app/views/assessor_interface/suitability_records/archive.html.erb b/app/views/assessor_interface/suitability_records/archive.html.erb index 1c87a41b5..8abaac2a3 100644 --- a/app/views/assessor_interface/suitability_records/archive.html.erb +++ b/app/views/assessor_interface/suitability_records/archive.html.erb @@ -1,7 +1,7 @@ <% title = "Archive suitability record for #{@suitability_record.name}" %> <% content_for :page_title, title %> -<% content_for :back_link_url, assessor_interface_suitability_records_path %> +<% content_for :back_link_url, edit_assessor_interface_suitability_record_path %> <%= form_with model: @form, url: [:assessor_interface, @suitability_record], method: :delete do |f| %> <%= f.govuk_error_summary %> @@ -11,6 +11,6 @@ <%= f.govuk_text_area :note %> <%= f.govuk_submit "Archive record" do %> - <%= govuk_link_to "Cancel", %i[assessor_interface suitability_records] %> + <%= govuk_link_to "Cancel", edit_assessor_interface_suitability_record_path %> <% end %> <% end %> diff --git a/app/views/assessor_interface/suitability_records/edit.html.erb b/app/views/assessor_interface/suitability_records/edit.html.erb index d4b2ce44d..c85ec3204 100644 --- a/app/views/assessor_interface/suitability_records/edit.html.erb +++ b/app/views/assessor_interface/suitability_records/edit.html.erb @@ -16,17 +16,17 @@ row.with_value { @suitability_record.name } end - @suitability_record.aliases.each do |name_alias| + if (aliases = @suitability_record.aliases).present? summary_list.with_row do |row| - row.with_key { "Alias" } - row.with_value { name_alias } + row.with_key { "Aliases" } + row.with_value { aliases.join("
").html_safe } end end - @suitability_record.emails.map(&:value).each do |email| + if (emails = @suitability_record.emails.map(&:value)).present? summary_list.with_row do |row| - row.with_key { "Email address" } - row.with_value { email } + row.with_key { "Email addresses" } + row.with_value { emails.join("
").html_safe } end end @@ -40,10 +40,10 @@ row.with_value { @suitability_record.date_of_birth.to_fs } end - @suitability_record.application_forms.pluck(:reference).sort.each do |reference| + if (references = @suitability_record.application_forms.pluck(:reference).map(&:to_s).sort).present? summary_list.with_row do |row| - row.with_key { "Application reference" } - row.with_value { reference.to_s } + row.with_key { "Application references" } + row.with_value { references.join("
").html_safe } end end @@ -59,13 +59,13 @@ summary_list.with_row do |row| row.with_key { "Date added" } - row.with_value { @suitability_record.created_at.to_fs } + row.with_value { @suitability_record.created_at.localtime.to_fs } end if @suitability_record.updated_at != @suitability_record.created_at summary_list.with_row do |row| row.with_key { "Date last updated" } - row.with_value { @suitability_record.updated_at.to_fs } + row.with_value { @suitability_record.updated_at.localtime.to_fs } end end @@ -83,7 +83,9 @@ end %> <% if @suitability_record.archived? %> - <%= f.govuk_submit "Set to active", secondary: true %> + <%= f.govuk_submit "Set to active" do %> + <%= govuk_link_to "Cancel", %i[assessor_interface suitability_records] %> + <% end %> <% else %>

Update record

diff --git a/app/views/assessor_interface/suitability_records/index.html.erb b/app/views/assessor_interface/suitability_records/index.html.erb index 0fdd36d92..fcb7225a3 100644 --- a/app/views/assessor_interface/suitability_records/index.html.erb +++ b/app/views/assessor_interface/suitability_records/index.html.erb @@ -25,13 +25,13 @@ <%= govuk_summary_list(actions: false) do |summary_list| summary_list.with_row do |row| row.with_key { "Date added" } - row.with_value { suitability_record.created_at.to_fs } + row.with_value { suitability_record.created_at.localtime.to_fs } end if suitability_record.updated_at != suitability_record.created_at summary_list.with_row do |row| row.with_key { "Date last updated" } - row.with_value { suitability_record.updated_at.to_fs } + row.with_value { suitability_record.updated_at.localtime.to_fs } end end diff --git a/config/locales/assessor_interface.en.yml b/config/locales/assessor_interface.en.yml index c97a84c9f..eccf1cd3f 100644 --- a/config/locales/assessor_interface.en.yml +++ b/config/locales/assessor_interface.en.yml @@ -414,11 +414,11 @@ en: assessor_interface/suitability_record_form: attributes: name: - blank: Enter a name + blank: Enter the name location: - blank: Enter a country trained in + blank: Enter the country trained in date_of_birth: - blank: Enter a date of birth + blank: Enter the date of birth note: blank: Briefly explain why you have created this suitability record assessor_interface/upload_unsigned_consent_document_form: