From dcd56e6ccd126f72722f8ca305372891886cb45b Mon Sep 17 00:00:00 2001 From: Joe Haig Date: Fri, 12 Jan 2024 17:00:29 +0000 Subject: [PATCH 1/9] (wip) Get rep order details from MAAT --- Gemfile | 28 +++++++------- Gemfile.lock | 5 +++ .../case_workers/claims_controller.rb | 5 +++ .../external_users/claims_controller.rb | 5 +++ .../case_workers/defendant_presenter.rb | 7 ++++ .../case_workers/representation_order.rb | 11 ++++++ .../external_users/defendant_presenter.rb | 7 ++++ .../external_users/representation_order.rb | 9 +++++ ...uk_design_system_form_builder_errorable.rb | 2 +- .../supplier_number_sub_model_validator.rb | 2 +- .../admin/allocations/_allocation.html.haml | 2 +- .../allocations/_re_allocation.html.haml | 2 +- .../admin/case_workers/index.html.haml | 2 +- .../claims/_claims_list.html.haml | 2 +- .../admin/external_users/index.html.haml | 2 +- .../_final_claim_cost_summary.html.haml | 2 +- .../claims/_main_claims_list.html.haml | 2 +- .../claims/_summary_fees.html.haml | 4 +- .../claims/disbursements/_summary.html.haml | 2 +- .../claims/expenses/_summary.html.haml | 4 +- .../supporting_documents/_existing.html.haml | 2 +- .../supporting_documents/_new.html.haml | 2 +- app/views/pages/api_release_notes.html.haml | 38 +++++++++---------- .../external_users/index.html.haml | 2 +- .../providers/_providers.html.haml | 2 +- .../shared/_claim_defendant_details.html.haml | 20 +++------- app/views/shared/_claim_defendants.html.haml | 2 +- app/views/shared/_determination.html.haml | 2 +- .../shared/_determinations_form.html.haml | 2 +- .../shared/_determinations_table.html.haml | 2 +- app/views/shared/_evidence_list.html.haml | 2 +- .../_representation_order_details.html.haml | 7 ++++ app/views/shared/_summary_agfs.html.haml | 6 +-- app/views/shared/_summary_lgfs.html.haml | 8 ++-- app/views/shared/_summary_totals.html.haml | 2 +- .../shared/summary/expenses/index.html.haml | 2 +- .../super_admins/offences/index.html.haml | 2 +- app/views/users/index.html.haml | 2 +- config/initializers/inflections.rb | 1 - lib/govuk_component.rb | 2 +- lib/govuk_component/button_helpers.rb | 2 +- lib/govuk_component/detail_helpers.rb | 2 +- lib/govuk_component/inset_text_helpers.rb | 2 +- lib/govuk_component/link_helpers.rb | 2 +- .../notification_banner_helpers.rb | 2 +- lib/govuk_component/panel_helpers.rb | 2 +- lib/govuk_component/phase_banner_helpers.rb | 2 +- lib/govuk_component/railtie.rb | 26 ++++++------- lib/govuk_component/shared_helpers.rb | 2 +- lib/govuk_component/summary_list_helpers.rb | 2 +- lib/govuk_component/table_helpers.rb | 6 +-- lib/govuk_component/tag_helpers.rb | 2 +- lib/govuk_component/warning_text_helpers.rb | 2 +- .../govuk_component/button_helpers_spec.rb | 2 +- .../govuk_component/detail_helpers_spec.rb | 2 +- .../inset_text_helpers_spec.rb | 2 +- spec/lib/govuk_component/link_helpers_spec.rb | 2 +- .../notification_banner_helpers_spec.rb | 2 +- .../lib/govuk_component/panel_helpers_spec.rb | 2 +- .../phase_banner_helpers_spec.rb | 2 +- .../summary_list_helpers_spec.rb | 2 +- .../lib/govuk_component/table_helpers_spec.rb | 6 +-- spec/lib/govuk_component/tag_helpers_spec.rb | 2 +- .../warning_text_helpers_spec.rb | 2 +- spec/support/capybara_extensions.rb | 6 +-- .../govuk_component/matchers.rb | 2 +- 66 files changed, 174 insertions(+), 127 deletions(-) create mode 100644 app/presenters/case_workers/defendant_presenter.rb create mode 100644 app/presenters/case_workers/representation_order.rb create mode 100644 app/presenters/external_users/defendant_presenter.rb create mode 100644 app/presenters/external_users/representation_order.rb create mode 100644 app/views/shared/_representation_order_details.html.haml diff --git a/Gemfile b/Gemfile index 685a414887..7b6a169cfb 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,7 @@ gem 'devise', '~> 4.9.3' gem 'dotenv-rails' gem 'factory_bot_rails', '~> 6.4.3' gem 'faker', '~> 3.2.3' +gem 'govuk-components', '~> 4.1' gem 'govuk_design_system_formbuilder', '~> 5.2' gem 'govuk_notify_rails', '~> 2.2.0' gem 'grape', '~> 2.0.0' @@ -50,7 +51,7 @@ gem 'sprockets-rails', '~> 3.4.2' gem 'state_machines-activerecord' gem 'state_machines-audit_trail' gem 'tzinfo-data' -gem 'zendesk_api' , '~> 3.0' +gem 'zendesk_api' , '1.37.0' gem 'sidekiq', '~> 7.2' gem 'sidekiq-failures', '~> 1.0', '>= 1.0.4' gem 'sidekiq-scheduler', '~> 5.0.3' @@ -58,33 +59,34 @@ gem 'utf8-cleaner', '~> 1.0' gem 'colorize' gem 'shell-spinner', '~> 1.0', '>= 1.0.4' gem 'ruby-progressbar' -gem 'laa-fee-calculator-client', '~> 2.0' +gem 'laa-fee-calculator-client', '~> 1.4' gem 'active_storage_validations' -gem 'faraday', '~> 2.0' -gem 'faraday-follow_redirects', '~> 0.3' +gem 'faraday', '~> 1.10' +gem 'faraday_middleware', '~> 1.2' gem 'puma' group :development, :test do gem 'annotate' gem 'brakeman', :require => false gem 'better_errors' + gem 'binding_of_caller' gem 'byebug' - gem 'listen', '~> 3.9.0' + gem 'listen', '~> 3.8.0' gem 'meta_request' gem 'parallel_tests' gem 'pry-byebug' gem 'pry-rails' - gem 'rack-livereload', '~> 0.5.2' - gem 'rspec-rails', '~> 6.1.1' + gem 'rack-livereload', '~> 0.5.1' + gem 'rspec-rails', '~> 6.1.0' gem 'rspec-collection_matchers' gem 'rspec_junit_formatter' gem 'net-ssh', '~> 7.2' gem 'net-scp', '~> 4.0' - gem 'rubocop', '~> 1.62' + gem 'rubocop', '~> 1.59' gem 'rubocop-capybara', '~> 2.20' gem 'rubocop-factory_bot', '~> 2.25' - gem 'rubocop-rspec', '~> 2.27' - gem 'rubocop-rails', '~> 2.24' + gem 'rubocop-rspec', '~> 2.26' + gem 'rubocop-rails', '~> 2.23' gem 'rubocop-performance', '~> 1.20' gem 'site_prism', '~> 5.0' end @@ -92,16 +94,16 @@ end group :test do gem 'axe-core-cucumber', '~> 4.8' gem 'capybara-selenium' - gem 'capybara', '~> 3.40' + gem 'capybara', '~> 3.39' gem 'cucumber-rails', '~> 3.0.0', require: false gem 'database_cleaner' gem 'i18n-tasks' gem 'json_spec' - gem 'launchy', '~> 3.0.0' + gem 'launchy', '~> 2.5.2' gem 'rails-controller-testing' gem 'rspec-html-matchers', '~> 0.10.0' gem 'rspec-mocks' - gem 'shoulda-matchers', '~> 6.1' + gem 'shoulda-matchers', '~> 6.0' gem 'simplecov', require: false gem 'timecop' gem 'vcr' diff --git a/Gemfile.lock b/Gemfile.lock index 8136bd648d..80d11dc65b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -258,6 +258,10 @@ GEM raabro (~> 1.4) globalid (1.2.1) activesupport (>= 6.1) + govuk-components (5.0.2) + html-attributes-utils (~> 1.0.0, >= 1.0.0) + pagy (~> 6.0) + view_component (>= 3.9, < 3.10) govuk_design_system_formbuilder (5.2.0) actionview (>= 6.1) activemodel (>= 6.1) @@ -414,6 +418,7 @@ GEM notifications-ruby-client (5.4.0) jwt (>= 1.5, < 3) orm_adapter (0.5.0) + pagy (6.3.0) paper_trail (15.1.0) activerecord (>= 6.1) request_store (~> 1.4) diff --git a/app/controllers/case_workers/claims_controller.rb b/app/controllers/case_workers/claims_controller.rb index 1f3b87f254..597d076676 100644 --- a/app/controllers/case_workers/claims_controller.rb +++ b/app/controllers/case_workers/claims_controller.rb @@ -11,6 +11,7 @@ class ClaimsController < CaseWorkers::ApplicationController # callback order is important (must set claims before filtering and sorting) before_action :set_claims, only: %i[index archived] + before_action :set_presenters before_action :filter_current_claims, only: [:index] before_action :filter_archived_claims, only: [:archived] before_action :sort_claims, only: %i[index archived] @@ -87,6 +88,10 @@ def set_claims @claims = Claims::CaseWorkerClaims.new(current_user:, action: tab, criteria: criteria_params).claims end + def set_presenters + @defendant_presenter = CaseWorkers::DefendantPresenter + end + # Only these 2 actions are handle in this controller. Rest of actions in the admin-namespaced controller. def tab %w[current archived].include?(params[:tab]) ? params[:tab] : 'current' diff --git a/app/controllers/external_users/claims_controller.rb b/app/controllers/external_users/claims_controller.rb index 1235bdb993..e9cb879e0d 100644 --- a/app/controllers/external_users/claims_controller.rb +++ b/app/controllers/external_users/claims_controller.rb @@ -14,6 +14,7 @@ class ResourceClassNotDefined < StandardError; end prepend_before_action :clean_multiparameter_dates, only: %i[create update] before_action :set_user_and_provider + before_action :set_presenters before_action :set_claims_context, only: %i[index archived outstanding authorised] before_action :set_financial_summary, only: %i[index outstanding authorised] @@ -212,6 +213,10 @@ def set_user_and_provider @provider = @external_user.provider end + def set_presenters + @defendant_presenter = ExternalUsers::DefendantPresenter + end + def set_claims_context context = Claims::ContextMapper.new(@external_user, scheme:) @claims_context = context.available_claims diff --git a/app/presenters/case_workers/defendant_presenter.rb b/app/presenters/case_workers/defendant_presenter.rb new file mode 100644 index 0000000000..766b8f49dc --- /dev/null +++ b/app/presenters/case_workers/defendant_presenter.rb @@ -0,0 +1,7 @@ +module CaseWorkers + class DefendantPresenter < BasePresenter + presents :defendant + + def representation_orders = defendant.representation_orders.map { |rep_order| RepresentationOrder.new(rep_order, @view) } + end +end diff --git a/app/presenters/case_workers/representation_order.rb b/app/presenters/case_workers/representation_order.rb new file mode 100644 index 0000000000..80c3091ab1 --- /dev/null +++ b/app/presenters/case_workers/representation_order.rb @@ -0,0 +1,11 @@ +module CaseWorkers + class RepresentationOrder < BasePresenter + presents :representation_order + + def maat_details + connection = Faraday.new('http://localhost:8090/api/internal/v1') + data = JSON.parse(connection.get("assessment/rep-orders/#{representation_order.maat_reference}").body) + { case_number: data['caseId'] } + end + end +end \ No newline at end of file diff --git a/app/presenters/external_users/defendant_presenter.rb b/app/presenters/external_users/defendant_presenter.rb new file mode 100644 index 0000000000..b827664602 --- /dev/null +++ b/app/presenters/external_users/defendant_presenter.rb @@ -0,0 +1,7 @@ +module ExternalUsers + class DefendantPresenter < BasePresenter + presents :defendant + + def representation_orders = defendant.representation_orders.map { |rep_order| RepresentationOrder.new(rep_order, @view) } + end +end diff --git a/app/presenters/external_users/representation_order.rb b/app/presenters/external_users/representation_order.rb new file mode 100644 index 0000000000..c7d57bb62a --- /dev/null +++ b/app/presenters/external_users/representation_order.rb @@ -0,0 +1,9 @@ +module ExternalUsers + class RepresentationOrder < BasePresenter + presents :representation_order + + def maat_details + { case_number: '???' } + end + end +end \ No newline at end of file diff --git a/app/validators/concerns/govuk_design_system_form_builder_errorable.rb b/app/validators/concerns/govuk_design_system_form_builder_errorable.rb index 012c3393e2..4cd88606de 100644 --- a/app/validators/concerns/govuk_design_system_form_builder_errorable.rb +++ b/app/validators/concerns/govuk_design_system_form_builder_errorable.rb @@ -11,7 +11,7 @@ # NOTE: Once all models are using this module then the method(s) # can be promoted to the superclass and this module removed # -module GOVUKDesignSystemFormBuilderErrorable +module GovukDesignSystemFormBuilderErrorable extend ActiveSupport::Concern included do diff --git a/app/validators/supplier_number_sub_model_validator.rb b/app/validators/supplier_number_sub_model_validator.rb index 54c2ce40ce..810db34f31 100644 --- a/app/validators/supplier_number_sub_model_validator.rb +++ b/app/validators/supplier_number_sub_model_validator.rb @@ -1,5 +1,5 @@ class SupplierNumberSubModelValidator < BaseSubModelValidator - include GOVUKDesignSystemFormBuilderErrorable + include GovukDesignSystemFormBuilderErrorable def has_many_association_names [:lgfs_supplier_numbers] diff --git a/app/views/case_workers/admin/allocations/_allocation.html.haml b/app/views/case_workers/admin/allocations/_allocation.html.haml index 4360fe023b..45404934b7 100644 --- a/app/views/case_workers/admin/allocations/_allocation.html.haml +++ b/app/views/case_workers/admin/allocations/_allocation.html.haml @@ -42,7 +42,7 @@ %h2.govuk-heading-m = t('.allocation_queue') - = govuk_table(class: 'app-jq-datatable', style: 'width: 100%') do + = cccd_govuk_table(class: 'app-jq-datatable', style: 'width: 100%') do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.table_summary') diff --git a/app/views/case_workers/admin/allocations/_re_allocation.html.haml b/app/views/case_workers/admin/allocations/_re_allocation.html.haml index 8dec2337e3..8c89923222 100644 --- a/app/views/case_workers/admin/allocations/_re_allocation.html.haml +++ b/app/views/case_workers/admin/allocations/_re_allocation.html.haml @@ -29,7 +29,7 @@ = f.govuk_submit t('.re_allocate'), name: 'tab', value: 'allocated' - if @claims.any? - = govuk_table(class: 'js-checkbox-table') do + = cccd_govuk_table(class: 'js-checkbox-table') do = govuk_table_caption(id: 'allocation-claim-ids-field-error') do .govuk-grid-row .govuk-grid-column-one-half diff --git a/app/views/case_workers/admin/case_workers/index.html.haml b/app/views/case_workers/admin/case_workers/index.html.haml index bbd77e1aa0..fc700b9a86 100644 --- a/app/views/case_workers/admin/case_workers/index.html.haml +++ b/app/views/case_workers/admin/case_workers/index.html.haml @@ -12,7 +12,7 @@ .govuk-grid-row{class: 'govuk-!-margin-top-9'} .govuk-grid-column-full - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.caption') diff --git a/app/views/case_workers/claims/_claims_list.html.haml b/app/views/case_workers/claims/_claims_list.html.haml index b4e85788ab..9031b4b545 100644 --- a/app/views/case_workers/claims/_claims_list.html.haml +++ b/app/views/case_workers/claims/_claims_list.html.haml @@ -4,7 +4,7 @@ = t('.number_of_claims', claim_count: claims.total_count) .govuk-grid-column-full - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = params[:action] == 'archived' ? t('case_workers.table_headings.archived_claims') : t('case_workers.table_headings.your_claims') diff --git a/app/views/external_users/admin/external_users/index.html.haml b/app/views/external_users/admin/external_users/index.html.haml index 7f6e2e4597..0d30b04948 100644 --- a/app/views/external_users/admin/external_users/index.html.haml +++ b/app/views/external_users/admin/external_users/index.html.haml @@ -10,7 +10,7 @@ = render partial: 'shared/search_form', locals: { search_path: external_users_admin_external_users_path(anchor: 'search-button'), hint_text: t('hint.search_users'), button_text: t('search.users') } -= govuk_table do += cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.table_caption', provider_name: "#{current_user.provider.name}") diff --git a/app/views/external_users/claims/_final_claim_cost_summary.html.haml b/app/views/external_users/claims/_final_claim_cost_summary.html.haml index f25df3b87e..faaca9ade3 100644 --- a/app/views/external_users/claims/_final_claim_cost_summary.html.haml +++ b/app/views/external_users/claims/_final_claim_cost_summary.html.haml @@ -1,4 +1,4 @@ -= govuk_table do += cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = 'Cost summary' diff --git a/app/views/external_users/claims/_main_claims_list.html.haml b/app/views/external_users/claims/_main_claims_list.html.haml index a62671ef23..8e18af8e2c 100644 --- a/app/views/external_users/claims/_main_claims_list.html.haml +++ b/app/views/external_users/claims/_main_claims_list.html.haml @@ -1,4 +1,4 @@ -= govuk_table do += cccd_govuk_table do = govuk_table_caption do .govuk-grid-row .govuk-grid-column-one-half diff --git a/app/views/external_users/claims/_summary_fees.html.haml b/app/views/external_users/claims/_summary_fees.html.haml index f201655522..0a54a56fb4 100644 --- a/app/views/external_users/claims/_summary_fees.html.haml +++ b/app/views/external_users/claims/_summary_fees.html.haml @@ -17,7 +17,7 @@ - if local_assigns.has_key?(:fee) - if fee - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.caption') = govuk_table_tbody do @@ -43,7 +43,7 @@ %h3.govuk-heading-m = t('shared.summary.basic_fees') - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.caption') diff --git a/app/views/external_users/claims/disbursements/_summary.html.haml b/app/views/external_users/claims/disbursements/_summary.html.haml index c77b2de7f1..00ba5cf172 100644 --- a/app/views/external_users/claims/disbursements/_summary.html.haml +++ b/app/views/external_users/claims/disbursements/_summary.html.haml @@ -13,7 +13,7 @@ %p = t('shared.summary.no_values.disbursements') - else - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.caption') diff --git a/app/views/external_users/claims/expenses/_summary.html.haml b/app/views/external_users/claims/expenses/_summary.html.haml index 6316196609..ad59234eaa 100644 --- a/app/views/external_users/claims/expenses/_summary.html.haml +++ b/app/views/external_users/claims/expenses/_summary.html.haml @@ -15,7 +15,7 @@ %h2.govuk-heading-m = t('shared.summary.cost_summary') - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.caption') @@ -63,7 +63,7 @@ %h3.govuk-heading-m = t('shared.summary.expenses.travel_details') - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.additional_information') diff --git a/app/views/external_users/claims/supporting_documents/_existing.html.haml b/app/views/external_users/claims/supporting_documents/_existing.html.haml index 13aed431f0..b206b27d4e 100644 --- a/app/views/external_users/claims/supporting_documents/_existing.html.haml +++ b/app/views/external_users/claims/supporting_documents/_existing.html.haml @@ -1,5 +1,5 @@ - if @claim.documents.any?(&:persisted?) - = govuk_table(class: 'files') do + = cccd_govuk_table(class: 'files') do = govuk_table_caption do = t('.previously_uploaded_docs') diff --git a/app/views/external_users/claims/supporting_documents/_new.html.haml b/app/views/external_users/claims/supporting_documents/_new.html.haml index 73af37550c..079e4524cd 100644 --- a/app/views/external_users/claims/supporting_documents/_new.html.haml +++ b/app/views/external_users/claims/supporting_documents/_new.html.haml @@ -16,7 +16,7 @@ label: { text: t('.upload_file') }, multiple: true -= govuk_table(id: 'dropzone-files', class: 'files hidden') do += cccd_govuk_table(id: 'dropzone-files', class: 'files hidden') do = govuk_table_caption do = t('.uploading_docs') diff --git a/app/views/pages/api_release_notes.html.haml b/app/views/pages/api_release_notes.html.haml index 5228b02087..98ce50a604 100644 --- a/app/views/pages/api_release_notes.html.haml +++ b/app/views/pages/api_release_notes.html.haml @@ -32,7 +32,7 @@ %br %br - = govuk_table do + = cccd_govuk_table do = govuk_table_caption do New fee type = govuk_table_thead do @@ -76,7 +76,7 @@ %br %br - = govuk_table do + = cccd_govuk_table do = govuk_table_caption do New fee type = govuk_table_thead do @@ -151,7 +151,7 @@ %br %br - = govuk_table do + = cccd_govuk_table do = govuk_table_caption do New fee types = govuk_table_thead do @@ -302,7 +302,7 @@ %br/ %br/ A list of valid Case Stages (to be used when creating a hardship claim) can be retrieved via: - = govuk_table do + = cccd_govuk_table do = govuk_table_row do = govuk_table_td('data-label': "Api") do = 'GET /api/case_stages' @@ -336,7 +336,7 @@ %a{ href: '#supplementary-fee-types' } updated here %br/ %br/ - = govuk_table do + = cccd_govuk_table do = govuk_table_caption do = 'New supplementary claim miscellaneous fee types.' = govuk_table_thead do @@ -494,7 +494,7 @@ %a{ name: 'supplementary-fee-types'} Please note that only the following miscellaneous fees are claimable via this claim type currently: %br/ - = govuk_table do + = cccd_govuk_table do = govuk_table_thead do = govuk_table_row do = govuk_table_th do @@ -748,7 +748,7 @@ %br/ %br/ - = govuk_table do + = cccd_govuk_table do = govuk_table_thead do = govuk_table_row do = govuk_table_th do @@ -809,7 +809,7 @@ fixed fee case type. However, certain combinations are not applicable and can result in claims be rejected in full or in part. The web interface has been modifed to ensure that only applicable fixed fees can be claimed, based on the case type selected. The table below summarizes the change. %br/ %br/ - = govuk_table do + = cccd_govuk_table do = govuk_table_caption do Eligible fixed fee types = govuk_table_thead do @@ -862,7 +862,7 @@ The following case uplifts are no longer considered eligible for any case type and are to be considered deprecated. %br/ %br/ - = govuk_table do + = cccd_govuk_table do = govuk_table_caption do Deprecated case uplift fixed fee types = govuk_table_thead do @@ -909,7 +909,7 @@ The following fixed fee type has been deprecated and should not be used. %br/ %br/ - = govuk_table do + = cccd_govuk_table do = govuk_table_caption do Deprecated fixed fee types = govuk_table_thead do @@ -1071,7 +1071,7 @@ error. %br/ %br/ - = govuk_table do + = cccd_govuk_table do = govuk_table_thead do = govuk_table_row do = govuk_table_th do @@ -1138,7 +1138,7 @@ submitting a claim in the web application unless their quantity value is matched by an equal number of comma separated, valid format of case numbers. %br/ - = govuk_table do + = cccd_govuk_table do = govuk_table_thead do = govuk_table_row do = govuk_table_th do @@ -1347,7 +1347,7 @@ for further deatils. %p An overview of which endpoints to use for claim submission is as follows: - = govuk_table do + = cccd_govuk_table do = govuk_table_row do = govuk_table_th do = 'Action' @@ -1396,7 +1396,7 @@ %li Disbursements can now be validated and added to a claim via the API via: - = govuk_table do + = cccd_govuk_table do = govuk_table_row do = govuk_table_td('data-label': "Endpoint URL") do = 'POST /api/external_users/disbursements/validate' @@ -1406,21 +1406,21 @@ %li A list of valid Disbursement Types can be retrieved via: - = govuk_table do + = cccd_govuk_table do = govuk_table_row do = govuk_table_td('data-label': "Endpoint URL") do = 'GET /api/disbursement_types' %li A list of valid Transfer Stages (to be used when creating a litigator transfer claim) can be retrieved via: - = govuk_table do + = cccd_govuk_table do = govuk_table_row do = govuk_table_td('data-label': "Endpoint URL") do = 'GET /api/transfer_stages' %li A list of valid Transfer Case Conclusions (to be used when creating a litigator transfer claim) can be retrieved via: - = govuk_table do + = cccd_govuk_table do = govuk_table_row do = govuk_table_td('data-label': "Endpoint URL") do = 'GET /api/transfer_case_conclusions' @@ -1430,7 +1430,7 @@ An attribute 'roles' has been added to the returned structure for the expense types to indicate their validity: The roles attribute is an array and of one or both of the following values: - = govuk_table do + = cccd_govuk_table do = govuk_table_row do = govuk_table_th do = 'Value' @@ -1451,7 +1451,7 @@ An attribute 'roles' has been added to the returned structure for the case types to indicate their validity: The roles attribute is an array and of one or many of the following values: - = govuk_table do + = cccd_govuk_table do = govuk_table_row do = govuk_table_th do = 'Value' diff --git a/app/views/provider_management/external_users/index.html.haml b/app/views/provider_management/external_users/index.html.haml index f58b3e5eee..bb1894319e 100644 --- a/app/views/provider_management/external_users/index.html.haml +++ b/app/views/provider_management/external_users/index.html.haml @@ -8,7 +8,7 @@ - if can? :new, ExternalUser = govuk_link_button(t('.add_provider'), new_provider_management_provider_external_user_path(@provider)) - = govuk_table(class: 'govuk-!-margin-top-9') do + = cccd_govuk_table(class: 'govuk-!-margin-top-9') do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.caption', provider_name: @provider.name) diff --git a/app/views/provider_management/providers/_providers.html.haml b/app/views/provider_management/providers/_providers.html.haml index 640251f1c8..ea49a54e63 100644 --- a/app/views/provider_management/providers/_providers.html.haml +++ b/app/views/provider_management/providers/_providers.html.haml @@ -6,7 +6,7 @@ = t('.no_provider') - else - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.caption') diff --git a/app/views/shared/_claim_defendant_details.html.haml b/app/views/shared/_claim_defendant_details.html.haml index 30c0588018..8bd1261f5a 100644 --- a/app/views/shared/_claim_defendant_details.html.haml +++ b/app/views/shared/_claim_defendant_details.html.haml @@ -11,23 +11,13 @@ - unless @claim.lgfs? && @claim.interim? = govuk_summary_list_row_collection( t('external_users.claims.defendants.defendant_fields.judical_apportionment') ) { defendant.order_for_judicial_apportionment == true ? t('global_yes') : t('global_no') } - - if defendant.representation_orders.any? - = govuk_table do - = govuk_table_caption do - = t('shared.claim.reporders') - - = govuk_table_thead_collection [t('.date'), - t('external_users.claims.defendants.representation_order_fields.maat_reference_number')] - - = govuk_table_tbody do - - defendant.representation_orders.each do | representation_order | - = govuk_table_row do - = govuk_table_td('data-label': t('.date')) do - = representation_order.representation_order_date.strftime(Settings.date_format) rescue '' + %h5.govuk-heading-s + = t('shared.claim.reporders') - = govuk_table_td('data-label': t('external_users.claims.defendants.representation_order_fields.maat_reference_number')) do - = representation_order.maat_reference + = govuk_accordion do |accordion| + - defendant.representation_orders.each do | representation_order | + - accordion.with_section(heading_text: "#{representation_order.representation_order_date.strftime(Settings.date_format)} - #{representation_order.maat_reference}") { render partial: 'shared/representation_order_details', locals: { representation_order: representation_order } } - else = govuk_inset_text(t('.no_reporder')) diff --git a/app/views/shared/_claim_defendants.html.haml b/app/views/shared/_claim_defendants.html.haml index 820c36556a..98b953f231 100644 --- a/app/views/shared/_claim_defendants.html.haml +++ b/app/views/shared/_claim_defendants.html.haml @@ -1,3 +1,3 @@ - defendants.each_with_index do | defendant, index | .govuk-grid-column-one-half - = render partial: 'shared/claim_defendant_details', locals: { defendant: defendant, index: index += 1 } + = render partial: 'shared/claim_defendant_details', locals: { defendant: present(defendant, @defendant_presenter), index: index += 1 } diff --git a/app/views/shared/_determination.html.haml b/app/views/shared/_determination.html.haml index 9f92db6c97..7e0c7dd7c8 100644 --- a/app/views/shared/_determination.html.haml +++ b/app/views/shared/_determination.html.haml @@ -7,7 +7,7 @@ .message-body = determination.event - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.caption') diff --git a/app/views/shared/_determinations_form.html.haml b/app/views/shared/_determinations_form.html.haml index 3883666350..cafc001d0f 100644 --- a/app/views/shared/_determinations_form.html.haml +++ b/app/views/shared/_determinations_form.html.haml @@ -18,7 +18,7 @@ %div = validation_error_message(@error_presenter, :determinations) - = govuk_table( id: 'determinations', class: 'js-cw-claim-assessment', data: { apply_vat: "#{claim.apply_vat}", vat_url: vat_path(format: :json), submitted_date: claim.vat_date(:db), scheme: claim.agfs? ? 'agfs' : 'lgfs' }) do + = cccd_govuk_table( id: 'determinations', class: 'js-cw-claim-assessment', data: { apply_vat: "#{claim.apply_vat}", vat_url: vat_path(format: :json), submitted_date: claim.vat_date(:db), scheme: claim.agfs? ? 'agfs' : 'lgfs' }) do = govuk_table_caption(class: 'govuk-visually-hidden') do %h3.govuk-heading-m = t('.assessment_summary') diff --git a/app/views/shared/_determinations_table.html.haml b/app/views/shared/_determinations_table.html.haml index 8c94e8b89f..1f3da1af79 100644 --- a/app/views/shared/_determinations_table.html.haml +++ b/app/views/shared/_determinations_table.html.haml @@ -4,7 +4,7 @@ = render partial: 'shared/summary_totals', locals: { claim: claim } - = govuk_table(id: 'determinations') do + = cccd_govuk_table(id: 'determinations') do = govuk_table_caption do %h2.govuk-heading-l = t('shared.determinations_form.assessment_summary') diff --git a/app/views/shared/_evidence_list.html.haml b/app/views/shared/_evidence_list.html.haml index 76ccca7466..f845064f9b 100644 --- a/app/views/shared/_evidence_list.html.haml +++ b/app/views/shared/_evidence_list.html.haml @@ -12,7 +12,7 @@ = t('.no_documents_uploaded') - else - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.caption') diff --git a/app/views/shared/_representation_order_details.html.haml b/app/views/shared/_representation_order_details.html.haml new file mode 100644 index 0000000000..b33d8f47d4 --- /dev/null +++ b/app/views/shared/_representation_order_details.html.haml @@ -0,0 +1,7 @@ += govuk_table do |table| + - table.with_caption(size: 's', text: 'Details from MAAT (beta)') + + - table.with_body do |body| + - body.with_row do |row| + - row.with_cell(header: true, text: 'Case number') + - row.with_cell(text: representation_order.maat_details[:case_number]) diff --git a/app/views/shared/_summary_agfs.html.haml b/app/views/shared/_summary_agfs.html.haml index 580dd21e94..3ad94d710f 100644 --- a/app/views/shared/_summary_agfs.html.haml +++ b/app/views/shared/_summary_agfs.html.haml @@ -7,7 +7,7 @@ %p.govuk-body = t('shared.summary.no_values.fees') - else - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.fees.caption') = govuk_table_thead do @@ -74,7 +74,7 @@ = govuk_table_td_numeric('data-label': t('shared.net_amount')) do = fee.amount - = govuk_table do + = cccd_govuk_table do = govuk_table_thead do = govuk_table_row do = govuk_table_th do @@ -102,7 +102,7 @@ - if info.warrant_fee_paid? %h3.govuk-heading-m = t('common.interim_claim_info') - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.fees.caption') = govuk_table_tbody do diff --git a/app/views/shared/_summary_lgfs.html.haml b/app/views/shared/_summary_lgfs.html.haml index 73bd4beeed..8e0d69ea51 100644 --- a/app/views/shared/_summary_lgfs.html.haml +++ b/app/views/shared/_summary_lgfs.html.haml @@ -8,7 +8,7 @@ = t('shared.summary.no_values.fees') - else - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.fees.caption') @@ -81,7 +81,7 @@ %h3.govuk-heading-m = t('common.interim_claim_info') - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.fees.caption') @@ -122,7 +122,7 @@ %h3.govuk-heading-m = t('shared.disbursements_gross') - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.disbursements.caption') @@ -173,7 +173,7 @@ %h3.govuk-heading-m = t('shared.disbursements_no_vat') - = govuk_table do + = cccd_govuk_table do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.disbursements.caption') diff --git a/app/views/shared/_summary_totals.html.haml b/app/views/shared/_summary_totals.html.haml index 5b5c94ea4e..15af35786f 100644 --- a/app/views/shared/_summary_totals.html.haml +++ b/app/views/shared/_summary_totals.html.haml @@ -1,4 +1,4 @@ -= govuk_table do += cccd_govuk_table do = govuk_table_caption do %h2.govuk-heading-l = t('shared.summary_totals') diff --git a/app/views/shared/summary/expenses/index.html.haml b/app/views/shared/summary/expenses/index.html.haml index 71a936f21a..909a00dabe 100644 --- a/app/views/shared/summary/expenses/index.html.haml +++ b/app/views/shared/summary/expenses/index.html.haml @@ -1,7 +1,7 @@ %h3.govuk-heading-m = t(".header_#{vat ? 'with_vat' : 'without_vat'}") -= govuk_table(class: current_user.case_worker? ? 'expenses-data-table' : nil, style: 'width:100%') do += cccd_govuk_table(class: current_user.case_worker? ? 'expenses-data-table' : nil, style: 'width:100%') do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.caption') diff --git a/app/views/super_admins/offences/index.html.haml b/app/views/super_admins/offences/index.html.haml index eddc988892..73df05f046 100644 --- a/app/views/super_admins/offences/index.html.haml +++ b/app/views/super_admins/offences/index.html.haml @@ -3,7 +3,7 @@ = render partial: 'layouts/header', locals: { page_heading: 'Offences' } -= govuk_table do += cccd_govuk_table do = govuk_table_thead do = govuk_table_row do = govuk_table_th do diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml index 41c9c7349e..dfd502d8a8 100644 --- a/app/views/users/index.html.haml +++ b/app/views/users/index.html.haml @@ -5,7 +5,7 @@ .govuk-grid-row .govuk-grid-column-full - = govuk_table(class: 'govuk-!-margin-top-9') do + = cccd_govuk_table(class: 'govuk-!-margin-top-9') do = govuk_table_caption(class: 'govuk-visually-hidden') do = t('.heading') diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 330ae91fe9..c5881dacdf 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -19,7 +19,6 @@ inflect.acronym 'CLI' inflect.acronym 'CPS' inflect.acronym 'GA' - inflect.acronym 'GOVUK' inflect.acronym 'GTM' inflect.acronym 'LF1' inflect.acronym 'LF2' diff --git a/lib/govuk_component.rb b/lib/govuk_component.rb index f90768f0e0..302234be77 100644 --- a/lib/govuk_component.rb +++ b/lib/govuk_component.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent require_relative 'govuk_component/railtie' if defined?(Rails) end diff --git a/lib/govuk_component/button_helpers.rb b/lib/govuk_component/button_helpers.rb index eed3e4379e..c1826c3754 100644 --- a/lib/govuk_component/button_helpers.rb +++ b/lib/govuk_component/button_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent module ButtonHelpers GOVUK_BUTTON_START_SVG_OPTIONS = { class: 'govuk-button__start-icon', diff --git a/lib/govuk_component/detail_helpers.rb b/lib/govuk_component/detail_helpers.rb index 9f73204a7a..ea6b32f9fd 100644 --- a/lib/govuk_component/detail_helpers.rb +++ b/lib/govuk_component/detail_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent module DetailHelpers def govuk_detail(summary_text = nil, tag_options = {}, &) tag_options = prepend_classes('govuk-details', tag_options) diff --git a/lib/govuk_component/inset_text_helpers.rb b/lib/govuk_component/inset_text_helpers.rb index fb5473a95e..afe05a9113 100644 --- a/lib/govuk_component/inset_text_helpers.rb +++ b/lib/govuk_component/inset_text_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent module InsetTextHelpers def govuk_inset_text(tag_options = {}, &) tag_options = prepend_classes('govuk-inset-text', tag_options) diff --git a/lib/govuk_component/link_helpers.rb b/lib/govuk_component/link_helpers.rb index 4729f4372d..ca7f1d9ad4 100644 --- a/lib/govuk_component/link_helpers.rb +++ b/lib/govuk_component/link_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent module LinkHelpers def govuk_back_link_to(body = nil, url = nil, tag_options = {}) tag_options = prepend_classes('govuk-back-link', tag_options) diff --git a/lib/govuk_component/notification_banner_helpers.rb b/lib/govuk_component/notification_banner_helpers.rb index f27299d5fd..aaeac7ba97 100644 --- a/lib/govuk_component/notification_banner_helpers.rb +++ b/lib/govuk_component/notification_banner_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent module NotificationBannerHelpers def govuk_notification_banner(header = nil, content = nil, tag_options = {}, &) govuk_notification_banner_options(tag_options) diff --git a/lib/govuk_component/panel_helpers.rb b/lib/govuk_component/panel_helpers.rb index daf464c906..0d9c9330c2 100644 --- a/lib/govuk_component/panel_helpers.rb +++ b/lib/govuk_component/panel_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent module PanelHelpers def govuk_panel(title = nil, body = nil, tag_options = {}) tag_options = prepend_classes('govuk-panel govuk-panel--confirmation', tag_options) diff --git a/lib/govuk_component/phase_banner_helpers.rb b/lib/govuk_component/phase_banner_helpers.rb index 9d5c393a01..751aa3d97d 100644 --- a/lib/govuk_component/phase_banner_helpers.rb +++ b/lib/govuk_component/phase_banner_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent module PhaseBannerHelpers def govuk_phase_banner(phase = nil, body = nil, tag_options = {}) tag_options = prepend_classes('govuk-phase-banner', tag_options) diff --git a/lib/govuk_component/railtie.rb b/lib/govuk_component/railtie.rb index a7528fc22b..e9858a8189 100644 --- a/lib/govuk_component/railtie.rb +++ b/lib/govuk_component/railtie.rb @@ -2,77 +2,77 @@ require 'rails' -module GOVUKComponent +module GovukComponent class Railtie < Rails::Railtie initializer 'govuk_component.shared_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::SharedHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::SharedHelpers } end end initializer 'govuk_component.button_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::ButtonHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::ButtonHelpers } end end initializer 'govuk_component.detail_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::DetailHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::DetailHelpers } end end initializer 'govuk_component.inset_text_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::InsetTextHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::InsetTextHelpers } end end initializer 'govuk_component.link_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::LinkHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::LinkHelpers } end end initializer 'govuk_component.notification_banner_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::NotificationBannerHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::NotificationBannerHelpers } end end initializer 'govuk_component.panel_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::PanelHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::PanelHelpers } end end initializer 'govuk_component.phase_banner_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::PhaseBannerHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::PhaseBannerHelpers } end end initializer 'govuk_component.summary_list_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::SummaryListHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::SummaryListHelpers } end end initializer 'govuk_component.table_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::TableHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::TableHelpers } end end initializer 'govuk_component.tag_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::TagHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::TagHelpers } end end initializer 'govuk_component.warning_text_helpers' do config.after_initialize do - ActiveSupport.on_load(:action_view) { include GOVUKComponent::WarningTextHelpers } + ActiveSupport.on_load(:action_view) { include GovukComponent::WarningTextHelpers } end end end diff --git a/lib/govuk_component/shared_helpers.rb b/lib/govuk_component/shared_helpers.rb index acfd82415d..e885dd42cd 100644 --- a/lib/govuk_component/shared_helpers.rb +++ b/lib/govuk_component/shared_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent module SharedHelpers private diff --git a/lib/govuk_component/summary_list_helpers.rb b/lib/govuk_component/summary_list_helpers.rb index 10f271a110..198bf0395d 100644 --- a/lib/govuk_component/summary_list_helpers.rb +++ b/lib/govuk_component/summary_list_helpers.rb @@ -2,7 +2,7 @@ # Component Reference: https://design-system.service.gov.uk/components/summary-list/ -module GOVUKComponent +module GovukComponent module SummaryListHelpers def govuk_summary_list(tag_options = {}, &) tag_options = prepend_classes('govuk-summary-list', tag_options) diff --git a/lib/govuk_component/table_helpers.rb b/lib/govuk_component/table_helpers.rb index fe5952762c..234675c464 100644 --- a/lib/govuk_component/table_helpers.rb +++ b/lib/govuk_component/table_helpers.rb @@ -2,9 +2,9 @@ # Component Reference: https://design-system.service.gov.uk/components/table/ -module GOVUKComponent +module GovukComponent module TableHelpers - def govuk_table(tag_options = {}, &) + def cccd_govuk_table(tag_options = {}, &) tag_options = prepend_classes('govuk-table app-table--responsive', tag_options) tag.table(capture(&), **tag_options) @@ -67,7 +67,7 @@ def govuk_table_td_numeric(tag_options = {}, &) end def govuk_table_and_caption(caption = nil, tag_options = {}, &) - govuk_table do + cccd_govuk_table do concat(govuk_table_caption(tag_options) { caption }) concat(capture(&)) end diff --git a/lib/govuk_component/tag_helpers.rb b/lib/govuk_component/tag_helpers.rb index 48540ca318..9a43504e84 100644 --- a/lib/govuk_component/tag_helpers.rb +++ b/lib/govuk_component/tag_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent module TagHelpers def govuk_tag(body = nil, color = nil, **tag_options) tag_options = prepend_classes('govuk-tag--' + color, tag_options) if color.present? diff --git a/lib/govuk_component/warning_text_helpers.rb b/lib/govuk_component/warning_text_helpers.rb index 2316183a55..80bdd13816 100644 --- a/lib/govuk_component/warning_text_helpers.rb +++ b/lib/govuk_component/warning_text_helpers.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module GOVUKComponent +module GovukComponent module WarningTextHelpers def govuk_warning_text(body = nil, assistive_text = t('common.warning'), **tag_options, &) tag_options = prepend_classes('govuk-warning-text', tag_options) diff --git a/spec/lib/govuk_component/button_helpers_spec.rb b/spec/lib/govuk_component/button_helpers_spec.rb index 6a4da7a7c4..6354f08c1d 100644 --- a/spec/lib/govuk_component/button_helpers_spec.rb +++ b/spec/lib/govuk_component/button_helpers_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::ButtonHelpers, type: :helper do +RSpec.describe GovukComponent::ButtonHelpers, type: :helper do include RSpecHtmlMatchers describe '#govuk_button' do diff --git a/spec/lib/govuk_component/detail_helpers_spec.rb b/spec/lib/govuk_component/detail_helpers_spec.rb index 3904515330..137173c2b5 100644 --- a/spec/lib/govuk_component/detail_helpers_spec.rb +++ b/spec/lib/govuk_component/detail_helpers_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::DetailHelpers, type: :helper do +RSpec.describe GovukComponent::DetailHelpers, type: :helper do include RSpecHtmlMatchers describe '#govuk_detail' do diff --git a/spec/lib/govuk_component/inset_text_helpers_spec.rb b/spec/lib/govuk_component/inset_text_helpers_spec.rb index cc0bf33c9d..a215e6961f 100644 --- a/spec/lib/govuk_component/inset_text_helpers_spec.rb +++ b/spec/lib/govuk_component/inset_text_helpers_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::InsetTextHelpers, type: :helper do +RSpec.describe GovukComponent::InsetTextHelpers, type: :helper do include RSpecHtmlMatchers describe '#govuk_inset_text' do diff --git a/spec/lib/govuk_component/link_helpers_spec.rb b/spec/lib/govuk_component/link_helpers_spec.rb index c04ca3a319..d0ffcde8b4 100644 --- a/spec/lib/govuk_component/link_helpers_spec.rb +++ b/spec/lib/govuk_component/link_helpers_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::LinkHelpers, type: :helper do +RSpec.describe GovukComponent::LinkHelpers, type: :helper do include RSpecHtmlMatchers describe '#govuk_back_link_to' do diff --git a/spec/lib/govuk_component/notification_banner_helpers_spec.rb b/spec/lib/govuk_component/notification_banner_helpers_spec.rb index 96dd3a8230..ee47e6b2de 100644 --- a/spec/lib/govuk_component/notification_banner_helpers_spec.rb +++ b/spec/lib/govuk_component/notification_banner_helpers_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::NotificationBannerHelpers, type: :helper do +RSpec.describe GovukComponent::NotificationBannerHelpers, type: :helper do include RSpecHtmlMatchers describe '#govuk_notification_banner' do diff --git a/spec/lib/govuk_component/panel_helpers_spec.rb b/spec/lib/govuk_component/panel_helpers_spec.rb index bae60d9f1d..36904f2651 100644 --- a/spec/lib/govuk_component/panel_helpers_spec.rb +++ b/spec/lib/govuk_component/panel_helpers_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::PanelHelpers, type: :helper do +RSpec.describe GovukComponent::PanelHelpers, type: :helper do include RSpecHtmlMatchers describe '#govuk_panel' do diff --git a/spec/lib/govuk_component/phase_banner_helpers_spec.rb b/spec/lib/govuk_component/phase_banner_helpers_spec.rb index bb71cfe7f4..ab4f024374 100644 --- a/spec/lib/govuk_component/phase_banner_helpers_spec.rb +++ b/spec/lib/govuk_component/phase_banner_helpers_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::PhaseBannerHelpers, type: :helper do +RSpec.describe GovukComponent::PhaseBannerHelpers, type: :helper do include RSpecHtmlMatchers describe '#govuk_phase_banner' do diff --git a/spec/lib/govuk_component/summary_list_helpers_spec.rb b/spec/lib/govuk_component/summary_list_helpers_spec.rb index c2c0272ec3..8a98ae5819 100644 --- a/spec/lib/govuk_component/summary_list_helpers_spec.rb +++ b/spec/lib/govuk_component/summary_list_helpers_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::SummaryListHelpers, type: :helper do +RSpec.describe GovukComponent::SummaryListHelpers, type: :helper do include RSpecHtmlMatchers describe '#govuk_summary_list' do diff --git a/spec/lib/govuk_component/table_helpers_spec.rb b/spec/lib/govuk_component/table_helpers_spec.rb index 5e14ffc5b0..c3eaa1e598 100644 --- a/spec/lib/govuk_component/table_helpers_spec.rb +++ b/spec/lib/govuk_component/table_helpers_spec.rb @@ -1,10 +1,10 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::TableHelpers, type: :helper do +RSpec.describe GovukComponent::TableHelpers, type: :helper do include RSpecHtmlMatchers - describe '#govuk_table' do - subject(:markup) { helper.govuk_table(class: 'my-custom-class') { nil } } + describe '#cccd_govuk_table' do + subject(:markup) { helper.cccd_govuk_table(class: 'my-custom-class') { nil } } it 'adds a govuk table' do is_expected.to have_tag(:table, with: { class: 'govuk-table app-table--responsive my-custom-class' }) diff --git a/spec/lib/govuk_component/tag_helpers_spec.rb b/spec/lib/govuk_component/tag_helpers_spec.rb index 51c9774719..30d19f231f 100644 --- a/spec/lib/govuk_component/tag_helpers_spec.rb +++ b/spec/lib/govuk_component/tag_helpers_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::TagHelpers, type: :helper do +RSpec.describe GovukComponent::TagHelpers, type: :helper do include RSpecHtmlMatchers describe '#govuk_tag' do diff --git a/spec/lib/govuk_component/warning_text_helpers_spec.rb b/spec/lib/govuk_component/warning_text_helpers_spec.rb index 61363760c7..051b2c75f8 100644 --- a/spec/lib/govuk_component/warning_text_helpers_spec.rb +++ b/spec/lib/govuk_component/warning_text_helpers_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -RSpec.describe GOVUKComponent::WarningTextHelpers, type: :helper do +RSpec.describe GovukComponent::WarningTextHelpers, type: :helper do include RSpecHtmlMatchers describe '#govuk_warning_text' do diff --git a/spec/support/capybara_extensions.rb b/spec/support/capybara_extensions.rb index a26f34abb6..d9e395b871 100644 --- a/spec/support/capybara_extensions.rb +++ b/spec/support/capybara_extensions.rb @@ -4,7 +4,7 @@ module CapybaraExtensions def self.extension_methods - (CapybaraExtensions::GOVUKComponent::Matchers.instance_methods - Object.instance_methods).uniq + (CapybaraExtensions::GovukComponent::Matchers.instance_methods - Object.instance_methods).uniq end end @@ -25,6 +25,6 @@ class Session end end - Node::Base.include CapybaraExtensions::GOVUKComponent::Matchers - Node::Simple.include CapybaraExtensions::GOVUKComponent::Matchers + Node::Base.include CapybaraExtensions::GovukComponent::Matchers + Node::Simple.include CapybaraExtensions::GovukComponent::Matchers end diff --git a/spec/support/capybara_extensions/govuk_component/matchers.rb b/spec/support/capybara_extensions/govuk_component/matchers.rb index 3d918e6245..1d3e619094 100644 --- a/spec/support/capybara_extensions/govuk_component/matchers.rb +++ b/spec/support/capybara_extensions/govuk_component/matchers.rb @@ -2,7 +2,7 @@ # rubocop:disable Naming/PredicateName module CapybaraExtensions - module GOVUKComponent + module GovukComponent module Matchers def has_govuk_link?(options) href = options.delete(:href) From d88303afd2d7e852ef5a34ce89c9414a6145b0ec Mon Sep 17 00:00:00 2001 From: Joe Haig Date: Fri, 12 Jan 2024 17:34:43 +0000 Subject: [PATCH 2/9] (wip) Move MAAT connection into service --- .../case_workers/representation_order.rb | 6 +----- app/services/maat_service.rb | 13 +++++++++++++ app/services/maat_service/connection.rb | 15 +++++++++++++++ 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 app/services/maat_service.rb create mode 100644 app/services/maat_service/connection.rb diff --git a/app/presenters/case_workers/representation_order.rb b/app/presenters/case_workers/representation_order.rb index 80c3091ab1..331236128a 100644 --- a/app/presenters/case_workers/representation_order.rb +++ b/app/presenters/case_workers/representation_order.rb @@ -2,10 +2,6 @@ module CaseWorkers class RepresentationOrder < BasePresenter presents :representation_order - def maat_details - connection = Faraday.new('http://localhost:8090/api/internal/v1') - data = JSON.parse(connection.get("assessment/rep-orders/#{representation_order.maat_reference}").body) - { case_number: data['caseId'] } - end + def maat_details = MaatService.call(maat_reference:) end end \ No newline at end of file diff --git a/app/services/maat_service.rb b/app/services/maat_service.rb new file mode 100644 index 0000000000..35ce8b7623 --- /dev/null +++ b/app/services/maat_service.rb @@ -0,0 +1,13 @@ +class MaatService + def self.call(...) = new(...).call + + def initialize(**kwargs) + @connection = MaatService::Connection.instance + @maat_reference = kwargs[:maat_reference] + end + + def call + data = @connection.fetch(@maat_reference) + { case_number: data['caseId'] || '???' } + end +end diff --git a/app/services/maat_service/connection.rb b/app/services/maat_service/connection.rb new file mode 100644 index 0000000000..835d37e8dc --- /dev/null +++ b/app/services/maat_service/connection.rb @@ -0,0 +1,15 @@ +class MaatService + class Connection + include Singleton + + def fetch(maat_reference) + JSON.parse(client.get("assessment/rep-orders/#{maat_reference}").body) + rescue Faraday::ConnectionFailed + {} + end + + private + + def client = @client ||= Faraday.new('http://localhost:8090/api/internal/v1', request: { timeout: 2 }) + end +end From ccf476b275d6d18e100b118613fd80bbc9e4fd7c Mon Sep 17 00:00:00 2001 From: Joe Haig Date: Tue, 16 Jan 2024 13:03:43 +0000 Subject: [PATCH 3/9] Add representation order date --- app/presenters/case_workers/representation_order.rb | 2 +- app/services/maat_service.rb | 6 +++++- app/views/shared/_representation_order_details.html.haml | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/presenters/case_workers/representation_order.rb b/app/presenters/case_workers/representation_order.rb index 331236128a..06c4e0b35e 100644 --- a/app/presenters/case_workers/representation_order.rb +++ b/app/presenters/case_workers/representation_order.rb @@ -2,6 +2,6 @@ module CaseWorkers class RepresentationOrder < BasePresenter presents :representation_order - def maat_details = MaatService.call(maat_reference:) + def maat_details = @maat_details ||= MaatService.call(maat_reference:) end end \ No newline at end of file diff --git a/app/services/maat_service.rb b/app/services/maat_service.rb index 35ce8b7623..924930c1b8 100644 --- a/app/services/maat_service.rb +++ b/app/services/maat_service.rb @@ -8,6 +8,10 @@ def initialize(**kwargs) def call data = @connection.fetch(@maat_reference) - { case_number: data['caseId'] || '???' } + + { + case_number: data['caseId'] || '???', + representation_order_date: data['crownRepOrderDate'] || '???' + } end end diff --git a/app/views/shared/_representation_order_details.html.haml b/app/views/shared/_representation_order_details.html.haml index b33d8f47d4..fabb26eb16 100644 --- a/app/views/shared/_representation_order_details.html.haml +++ b/app/views/shared/_representation_order_details.html.haml @@ -5,3 +5,7 @@ - body.with_row do |row| - row.with_cell(header: true, text: 'Case number') - row.with_cell(text: representation_order.maat_details[:case_number]) + + - body.with_row do |row| + - row.with_cell(header: true, text: 'Date') + - row.with_cell(text: representation_order.maat_details[:representation_order_date]) From be665110ac04c0de94862e4087818eae56aa2dd2 Mon Sep 17 00:00:00 2001 From: Katy McCann Date: Tue, 5 Mar 2024 16:41:37 +0000 Subject: [PATCH 4/9] wip: Add FaradayMiddleware::OAuth2Refresh as a gem and edit docs with correct variables --- Gemfile | 1 + Gemfile.lock | 1 + .../case_workers/representation_order.rb | 15 +++++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 7b6a169cfb..315cbcf681 100644 --- a/Gemfile +++ b/Gemfile @@ -63,6 +63,7 @@ gem 'laa-fee-calculator-client', '~> 1.4' gem 'active_storage_validations' gem 'faraday', '~> 1.10' gem 'faraday_middleware', '~> 1.2' +gem 'faraday_middleware-oauth2_refresh' gem 'puma' group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index 80d11dc65b..9c13dc55cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -705,6 +705,7 @@ DEPENDENCIES faker (~> 3.2.3) faraday (~> 2.0) faraday-follow_redirects (~> 0.3) + govuk-components govuk_design_system_formbuilder (~> 5.2) govuk_notify_rails (~> 2.2.0) grape (~> 2.0.0) diff --git a/app/presenters/case_workers/representation_order.rb b/app/presenters/case_workers/representation_order.rb index 06c4e0b35e..736f09969d 100644 --- a/app/presenters/case_workers/representation_order.rb +++ b/app/presenters/case_workers/representation_order.rb @@ -1,7 +1,18 @@ module CaseWorkers class RepresentationOrder < BasePresenter presents :representation_order + def maat_details + client = OAuth2::Client.new(ENV['OAUTH_CLIENT_ID'], ENV['OAUTH_CLIENT_SECRET'], site: ENV['OAUTH_SCOPE']) + token = client.password.get_token('username', 'password', { headers: { 'Authorization' => 'Basic my_api_key' } }) - def maat_details = @maat_details ||= MaatService.call(maat_reference:) + conn = Faraday.new(url: ENV['OAUTH_URL']) do |builder| + builder.request :oauth2_refresh, token + builder.adapter Faraday.default_adapter + end + + conn.get "/maat-cd-api/standard" + end + + # def maat_details = @maat_details ||= MaatService.call(maat_reference:) end -end \ No newline at end of file +end From 670d29f2a1fa81a614adfac4eae550c1992e03ab Mon Sep 17 00:00:00 2001 From: Katy McCann Date: Thu, 7 Mar 2024 12:27:23 +0000 Subject: [PATCH 5/9] This commit implements the credentials for CCCD to access the MAAT API client. It creates a client in the MaatService::Connection which authenticates with the MAAT API. This means MaatService is now able to fetch data from the MAAT API to use in the service. --- Gemfile | 1 - Gemfile.lock | 12 +++++++++++ app/assets/builds/.keep | 0 .../case_workers/representation_order.rb | 14 +------------ app/services/maat_service/connection.rb | 20 ++++++++++++++++++- 5 files changed, 32 insertions(+), 15 deletions(-) delete mode 100644 app/assets/builds/.keep diff --git a/Gemfile b/Gemfile index 315cbcf681..7b6a169cfb 100644 --- a/Gemfile +++ b/Gemfile @@ -63,7 +63,6 @@ gem 'laa-fee-calculator-client', '~> 1.4' gem 'active_storage_validations' gem 'faraday', '~> 1.10' gem 'faraday_middleware', '~> 1.2' -gem 'faraday_middleware-oauth2_refresh' gem 'puma' group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index 9c13dc55cd..6fe348bce7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -390,6 +390,7 @@ GEM msgpack (1.7.2) multi_json (1.15.0) multi_test (1.1.0) + multi_xml (0.6.0) multipart-post (2.4.0) mustermann (3.0.0) ruby2_keywords (~> 0.0.1) @@ -417,6 +418,13 @@ GEM racc (~> 1.4) notifications-ruby-client (5.4.0) jwt (>= 1.5, < 3) + oauth2 (2.0.9) + faraday (>= 0.17.3, < 3.0) + jwt (>= 1.0, < 3.0) + multi_xml (~> 0.5) + rack (>= 1.2, < 4) + snaky_hash (~> 2.0) + version_gem (~> 1.1) orm_adapter (0.5.0) pagy (6.3.0) paper_trail (15.1.0) @@ -611,6 +619,9 @@ GEM site_prism-all_there (> 2, < 5) site_prism-all_there (3.0.3) smart_properties (1.17.0) + snaky_hash (2.0.1) + hashie + version_gem (~> 1.1, >= 1.1.1) sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) @@ -735,6 +746,7 @@ DEPENDENCIES net-smtp net-ssh (~> 7.2) nokogiri (~> 1.16) + oauth2 paper_trail (~> 15.1.0) parallel_tests pg (~> 1.5.6) diff --git a/app/assets/builds/.keep b/app/assets/builds/.keep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/app/presenters/case_workers/representation_order.rb b/app/presenters/case_workers/representation_order.rb index 736f09969d..98a1d769e5 100644 --- a/app/presenters/case_workers/representation_order.rb +++ b/app/presenters/case_workers/representation_order.rb @@ -1,18 +1,6 @@ module CaseWorkers class RepresentationOrder < BasePresenter presents :representation_order - def maat_details - client = OAuth2::Client.new(ENV['OAUTH_CLIENT_ID'], ENV['OAUTH_CLIENT_SECRET'], site: ENV['OAUTH_SCOPE']) - token = client.password.get_token('username', 'password', { headers: { 'Authorization' => 'Basic my_api_key' } }) - - conn = Faraday.new(url: ENV['OAUTH_URL']) do |builder| - builder.request :oauth2_refresh, token - builder.adapter Faraday.default_adapter - end - - conn.get "/maat-cd-api/standard" - end - - # def maat_details = @maat_details ||= MaatService.call(maat_reference:) + def maat_details = @maat_details ||= MaatService.call(maat_reference:) end end diff --git a/app/services/maat_service/connection.rb b/app/services/maat_service/connection.rb index 835d37e8dc..7db155d5e4 100644 --- a/app/services/maat_service/connection.rb +++ b/app/services/maat_service/connection.rb @@ -10,6 +10,24 @@ def fetch(maat_reference) private - def client = @client ||= Faraday.new('http://localhost:8090/api/internal/v1', request: { timeout: 2 }) + def client + @client ||= Faraday.new(ENV['MAAT_API_DEV_URL'], request: { timeout: 2 }) do |conn| + conn.authorization :Bearer, oauth_token + end + end + + def oauth_token + response = Faraday.post( + ENV['OAUTH_URL'], + { + client_id: ENV['OAUTH_CLIENT_ID'], + client_secret: ENV['OAUTH_CLIENT_SECRET'], + scope: ENV['OAUTH_SCOPE'], + grant_type: 'client_credentials' + }, + { content_type: 'application/x-www-form-urlencoded' } + ) + JSON.parse(response.body)['access_token'] + end end end From 801dd472203842c33c6e584bbd324236f8d96a8a Mon Sep 17 00:00:00 2001 From: Katy McCann Date: Thu, 7 Mar 2024 14:03:56 +0000 Subject: [PATCH 6/9] Fix rubocop errors --- .../case_workers/claims_controller.rb | 2 +- .../case_workers/defendant_presenter.rb | 4 +++- .../external_users/defendant_presenter.rb | 4 +++- .../external_users/representation_order.rb | 2 +- app/services/maat_service/connection.rb | 24 ++++++++++--------- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/app/controllers/case_workers/claims_controller.rb b/app/controllers/case_workers/claims_controller.rb index 597d076676..a5e2548321 100644 --- a/app/controllers/case_workers/claims_controller.rb +++ b/app/controllers/case_workers/claims_controller.rb @@ -10,7 +10,7 @@ class ClaimsController < CaseWorkers::ApplicationController respond_to :html # callback order is important (must set claims before filtering and sorting) - before_action :set_claims, only: %i[index archived] + before_action :set_claims, only: %i[index archived] before_action :set_presenters before_action :filter_current_claims, only: [:index] before_action :filter_archived_claims, only: [:archived] diff --git a/app/presenters/case_workers/defendant_presenter.rb b/app/presenters/case_workers/defendant_presenter.rb index 766b8f49dc..94bbf5a47e 100644 --- a/app/presenters/case_workers/defendant_presenter.rb +++ b/app/presenters/case_workers/defendant_presenter.rb @@ -2,6 +2,8 @@ module CaseWorkers class DefendantPresenter < BasePresenter presents :defendant - def representation_orders = defendant.representation_orders.map { |rep_order| RepresentationOrder.new(rep_order, @view) } + def representation_orders + defendant.representation_orders.map { |rep_order| RepresentationOrder.new(rep_order, @view) } + end end end diff --git a/app/presenters/external_users/defendant_presenter.rb b/app/presenters/external_users/defendant_presenter.rb index b827664602..0a2b561f40 100644 --- a/app/presenters/external_users/defendant_presenter.rb +++ b/app/presenters/external_users/defendant_presenter.rb @@ -2,6 +2,8 @@ module ExternalUsers class DefendantPresenter < BasePresenter presents :defendant - def representation_orders = defendant.representation_orders.map { |rep_order| RepresentationOrder.new(rep_order, @view) } + def representation_orders + defendant.representation_orders.map { |rep_order| RepresentationOrder.new(rep_order, @view) } + end end end diff --git a/app/presenters/external_users/representation_order.rb b/app/presenters/external_users/representation_order.rb index c7d57bb62a..b34c19d19f 100644 --- a/app/presenters/external_users/representation_order.rb +++ b/app/presenters/external_users/representation_order.rb @@ -6,4 +6,4 @@ def maat_details { case_number: '???' } end end -end \ No newline at end of file +end diff --git a/app/services/maat_service/connection.rb b/app/services/maat_service/connection.rb index 7db155d5e4..b587f46aa9 100644 --- a/app/services/maat_service/connection.rb +++ b/app/services/maat_service/connection.rb @@ -11,23 +11,25 @@ def fetch(maat_reference) private def client - @client ||= Faraday.new(ENV['MAAT_API_DEV_URL'], request: { timeout: 2 }) do |conn| + @client ||= Faraday.new(ENV.fetch('MAAT_API_DEV_URL'), request: { timeout: 2 }) do |conn| conn.authorization :Bearer, oauth_token end end def oauth_token - response = Faraday.post( - ENV['OAUTH_URL'], - { - client_id: ENV['OAUTH_CLIENT_ID'], - client_secret: ENV['OAUTH_CLIENT_SECRET'], - scope: ENV['OAUTH_SCOPE'], - grant_type: 'client_credentials' - }, - { content_type: 'application/x-www-form-urlencoded' } - ) + response = Faraday.post(maat_credentials) JSON.parse(response.body)['access_token'] end + + def maat_credentials + ENV.fetch('OAUTH_URL') + { + client_id: ENV.fetch('OAUTH_CLIENT_ID'), + client_secret: ENV.fetch('OAUTH_CLIENT_SECRET'), + scope: ENV.fetch('OAUTH_SCOPE'), + grant_type: 'client_credentials' + } + { content_type: 'application/x-www-form-urlencoded' } + end end end From 09d7723513be5272cb34118dfc983afb404c36dd Mon Sep 17 00:00:00 2001 From: Katy McCann Date: Thu, 7 Mar 2024 15:34:58 +0000 Subject: [PATCH 7/9] Remove code that hides error output --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 42dc7a0a68..a4c1d887b2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -34,7 +34,7 @@ COPY . $APP_HOME/ RUN SECRET_KEY_BASE=a-real-secret-key-is-not-needed-here \ RAILS_ENV=production \ -bundle exec rails assets:precompile 2> /dev/null +bundle exec rails assets:precompile RUN rm -rf node_modules From 71e11d7a2882fd10b71919eac90cfc2dd95703ac Mon Sep 17 00:00:00 2001 From: Katy McCann Date: Thu, 7 Mar 2024 16:07:44 +0000 Subject: [PATCH 8/9] Temporary fix - downgrade the govuk-components gem Change Gemfile --- Gemfile.lock | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6fe348bce7..a42ed6cc0b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -258,10 +258,10 @@ GEM raabro (~> 1.4) globalid (1.2.1) activesupport (>= 6.1) - govuk-components (5.0.2) + govuk-components (4.1.2) html-attributes-utils (~> 1.0.0, >= 1.0.0) pagy (~> 6.0) - view_component (>= 3.9, < 3.10) + view_component (>= 3.3, < 3.7) govuk_design_system_formbuilder (5.2.0) actionview (>= 6.1) activemodel (>= 6.1) @@ -390,7 +390,6 @@ GEM msgpack (1.7.2) multi_json (1.15.0) multi_test (1.1.0) - multi_xml (0.6.0) multipart-post (2.4.0) mustermann (3.0.0) ruby2_keywords (~> 0.0.1) @@ -418,15 +417,8 @@ GEM racc (~> 1.4) notifications-ruby-client (5.4.0) jwt (>= 1.5, < 3) - oauth2 (2.0.9) - faraday (>= 0.17.3, < 3.0) - jwt (>= 1.0, < 3.0) - multi_xml (~> 0.5) - rack (>= 1.2, < 4) - snaky_hash (~> 2.0) - version_gem (~> 1.1) orm_adapter (0.5.0) - pagy (6.3.0) + pagy (6.5.0) paper_trail (15.1.0) activerecord (>= 6.1) request_store (~> 1.4) @@ -619,9 +611,6 @@ GEM site_prism-all_there (> 2, < 5) site_prism-all_there (3.0.3) smart_properties (1.17.0) - snaky_hash (2.0.1) - hashie - version_gem (~> 1.1, >= 1.1.1) sprockets (4.2.1) concurrent-ruby (~> 1.0) rack (>= 2.2.4, < 4) @@ -746,7 +735,6 @@ DEPENDENCIES net-smtp net-ssh (~> 7.2) nokogiri (~> 1.16) - oauth2 paper_trail (~> 15.1.0) parallel_tests pg (~> 1.5.6) From edf34dfc8f9569700d6f45486bcef8a0f21ef0e1 Mon Sep 17 00:00:00 2001 From: Katy McCann Date: Tue, 12 Mar 2024 14:50:38 +0000 Subject: [PATCH 9/9] Add keep file back --- app/assets/builds/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 app/assets/builds/.keep diff --git a/app/assets/builds/.keep b/app/assets/builds/.keep new file mode 100644 index 0000000000..e69de29bb2