show owner info in acquired media release table
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
<%= fa_icon("warning", text: t(".no_media"), class: "text-danger") %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= contact_info_for(acquired_media_release.contact_person) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= notes_preview acquired_media_release.notes.order_by_recent %>
|
||||
</td>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<th><%= t '.table_headers.approved'%></th>
|
||||
<th><%= AcquiredMediaRelease.human_attribute_name(:name) %></th>
|
||||
<th><%= t(".table_headers.file_infos_count") %></th>
|
||||
<th><%= t(".table_headers.owner_info") %></th>
|
||||
<th><%= t(".table_headers.notes") %></th>
|
||||
<th><%= t(".table_headers.tags") %></th>
|
||||
<th><%= t(".table_headers.signed_at") %></th>
|
||||
|
||||
@@ -67,6 +67,7 @@ en:
|
||||
notes: Notes
|
||||
signed_at: Date Signed
|
||||
tags: Tags
|
||||
owner_info: Owner Info
|
||||
new:
|
||||
heading: Import Acquired Media Release
|
||||
update:
|
||||
|
||||
@@ -21,6 +21,7 @@ es:
|
||||
notes: Notes (ES)
|
||||
signed_at: Date Signed (ES)
|
||||
tags: Tags (ES)
|
||||
owner_info: Owner Info (ES)
|
||||
activerecord:
|
||||
attributes:
|
||||
appearance_release:
|
||||
|
||||
@@ -4,6 +4,22 @@ FactoryBot.define do
|
||||
|
||||
name "Test Acquired Media Release"
|
||||
|
||||
trait :with_address do
|
||||
person_address_street1 "St1"
|
||||
person_address_street2 "St2"
|
||||
person_address_city "City"
|
||||
person_address_state "State"
|
||||
person_address_zip "123"
|
||||
person_address_country "US"
|
||||
end
|
||||
|
||||
trait :with_owner_info do
|
||||
person_first_name "Jane"
|
||||
person_last_name "Doe"
|
||||
person_phone "100-555-1001"
|
||||
person_email "owner@email.com"
|
||||
end
|
||||
|
||||
trait :native do
|
||||
signature do
|
||||
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
||||
|
||||
@@ -165,6 +165,24 @@ feature "User managing acquired_media releases" do
|
||||
sign_in current_user
|
||||
end
|
||||
|
||||
scenario "index table shows owner info" do
|
||||
release = create(:acquired_media_release, :with_owner_info, :with_address, project: project)
|
||||
|
||||
visit project_acquired_media_releases_path(project)
|
||||
|
||||
expect(page).to have_content owner_info_table_header
|
||||
|
||||
expect(page).to have_content release.person_first_name
|
||||
expect(page).to have_content release.person_last_name
|
||||
expect(page).to have_content release.person_phone
|
||||
expect(page).to have_content release.person_email
|
||||
expect(page).to have_content release.person_address_street1
|
||||
expect(page).to have_content release.person_address_city
|
||||
expect(page).to have_content release.person_address_state
|
||||
expect(page).to have_content release.person_address_zip
|
||||
expect(page).to have_content release.person_address_country
|
||||
end
|
||||
|
||||
scenario "creating a release for an adult", js: true do
|
||||
visit new_project_acquired_media_release_path(project)
|
||||
|
||||
@@ -836,4 +854,8 @@ feature "User managing acquired_media releases" do
|
||||
def successful_import_message
|
||||
t 'acquired_media_releases.create.notice'
|
||||
end
|
||||
|
||||
def owner_info_table_header
|
||||
t 'acquired_media_releases.index.table_headers.owner_info'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user