<% if !FeatureToggle.new_data_protection_confirmation? || @organisation.data_protection_confirmation.&confirmed? %>
<% if !FeatureToggle.new_data_protection_confirmation? || @organisation.data_protection_confirmation&.confirmed? %>
<% if current_page?(controller: 'organisations', action: 'lettings_logs') %>
<%= govuk_button_to "Create a new lettings log for this organisation", lettings_logs_path(lettings_log: { owning_organisation_id: @organisation.id }, method: :post) %>
<%= org_name_for_data_sharing_agreement(@data_sharing_agreement, current_user) %> and Department for Levelling Up, Housing and Communities
<%= org_name_for_data_sharing_agreement(@data_protection_confirmation, current_user) %> and Department for Levelling Up, Housing and Communities
</h2>
<p class="govuk-body-m">
<% if @data_sharing_agreement&.confirmed? %>
This agreement is made the <%= @data_sharing_agreement.created_at.day.ordinalize %> day of <%= @data_sharing_agreement.created_at.strftime("%B") %> <%= @data_sharing_agreement.created_at.year %>
<% if @data_protection_confirmation&.confirmed? %>
This agreement is made the <%= @data_protection_confirmation.created_at.day.ordinalize %> day of <%= @data_protection_confirmation.created_at.strftime("%B") %> <%= @data_protection_confirmation.created_at.year %>
<% elsif current_user.is_dpo? %>
This agreement is made the <%= Time.zone.now.day.ordinalize %> day of <%= Time.zone.now.strftime("%B") %> <%= Time.zone.now.year %>
<p class="govuk-body-m">12.1. CORE data providers and DLUHC will each appoint an Authorised Representative to be the primary point of contact in all day-to-day matters relating to this Agreement:</p>
<p class="govuk-body-m">16.1. The Parties shall comply with all relevant legislation, regulations, orders, statutory instruments and any amendments or re-enactments thereof from the commencement of this agreement.</p>
<p class="govuk-body-m">As witness of which the parties have set their hands on the day and year first above written
signed for and on behalf of the Data Protection Officer for <%= org_name_for_data_sharing_agreement(@data_sharing_agreement, current_user) %>, by:</p>
signed for and on behalf of the Data Protection Officer for <%= org_name_for_data_sharing_agreement(@data_protection_confirmation, current_user) %>, by:</p>
<p class="govuk-body-m">SIGNED for and on behalf of the deputy director of the data, analytics & statistics in the Department for Levelling Up, Housing and Communities, by:</p>
@ -134,7 +134,7 @@
<li>Title: Deputy Director</li>
</ul>
<% if current_user.is_dpo? && !(@organisation.data_sharing_agreement&.confirmed?) %>
<% if current_user.is_dpo? && !(@organisation.data_protection_confirmation&.confirmed?) %>
expect(fragment).tohave_content("#{data_sharing_agreement.organisation_name} of #{data_sharing_agreement.organisation_address} (“CORE Data Provider”)")
expect(fragment).tohave_content("#{organisation.name} of #{organisation.address_row} (“CORE Data Provider”)")
# header
expect(fragment).tohave_css("h2",text:"#{data_sharing_agreement.organisation_name} and Department for Levelling Up, Housing and Communities")
expect(fragment).tohave_css("h2",text:"#{organisation.name} and Department for Levelling Up, Housing and Communities")
# does not show action buttons
expect(fragment).not_tohave_button(text:"Accept this agreement")
expect(fragment).tohave_content("#{data_sharing_agreement.organisation_name} of #{data_sharing_agreement.organisation_address} (“CORE Data Provider”)")
expect(fragment).tohave_content("#{organisation.name} of #{organisation.address_row} (“CORE Data Provider”)")
# header
expect(fragment).tohave_css("h2",text:"#{data_sharing_agreement.organisation_name} and Department for Levelling Up, Housing and Communities")
expect(fragment).tohave_css("h2",text:"#{organisation.name} and Department for Levelling Up, Housing and Communities")
# does not show action buttons
expect(fragment).not_tohave_button(text:"Accept this agreement")