<% content_for :title, "Check your answers before creating this scheme" %> <% content_for :before_content do %> <%= govuk_back_link( text: "Back", href: "/schemes/#{@scheme.id}/support", ) %> <% end %> <%= render partial: "organisations/headings", locals: { main: "Check your changes before updating this scheme", sub: @scheme.service_name } %> <%= govuk_tabs(title: "Check your answers before creating this scheme") do |component| %> <% component.tab(label: 'Scheme') do %> <%= govuk_summary_list do |summary_list| %> <% @scheme.check_details_attributes.each do |attr| %> <% next if current_user.data_coordinator? && attr[:name] == ("Managed by") %> <%= summary_list.row do |row| %> <% row.key { attr[:name].to_s } %> <% row.value { details_html(attr) } %> <% row.action( text: "Change", href: scheme_details_path(scheme_id: @scheme.id, check_answers: true), ) %> <% end %> <% end %> <% @scheme.check_primary_client_attributes.each do |attr| %> <%= summary_list.row do |row| %> <% row.key { attr[:name].to_s } %> <% row.value { details_html(attr) } %> <% row.action( text: "Change", href: scheme_primary_client_group_path(scheme_id: @scheme.id, check_answers: true), ) %> <% end %> <% end %> <% @scheme.check_secondary_client_attributes.each do |attr| %> <%= summary_list.row do |row| %> <% row.key { attr[:name].to_s } %> <% row.value { details_html(attr) } %> <% row.action( text: "Change", href: scheme_secondary_client_group_path(scheme_id: @scheme.id, check_answers: true), ) %> <% end %> <% end %> <% @scheme.check_support_attributes.each do |attr| %> <%= summary_list.row do |row| %> <% row.key { attr[:name].to_s } %> <% row.value { details_html(attr) } %> <% row.action( text: "Change", href: scheme_support_path(scheme_id: @scheme.id, check_answers: true), ) %> <% end %> <% end %> <% end %> <% end %> <% end %> <%= govuk_button_link_to "Create scheme", scheme_update_path, html: { method: :get } %>