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") %>
|
<%= fa_icon("warning", text: t(".no_media"), class: "text-danger") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= contact_info_for(acquired_media_release.contact_person) %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= notes_preview acquired_media_release.notes.order_by_recent %>
|
<%= notes_preview acquired_media_release.notes.order_by_recent %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
<th><%= t '.table_headers.approved'%></th>
|
<th><%= t '.table_headers.approved'%></th>
|
||||||
<th><%= AcquiredMediaRelease.human_attribute_name(:name) %></th>
|
<th><%= AcquiredMediaRelease.human_attribute_name(:name) %></th>
|
||||||
<th><%= t(".table_headers.file_infos_count") %></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.notes") %></th>
|
||||||
<th><%= t(".table_headers.tags") %></th>
|
<th><%= t(".table_headers.tags") %></th>
|
||||||
<th><%= t(".table_headers.signed_at") %></th>
|
<th><%= t(".table_headers.signed_at") %></th>
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ en:
|
|||||||
notes: Notes
|
notes: Notes
|
||||||
signed_at: Date Signed
|
signed_at: Date Signed
|
||||||
tags: Tags
|
tags: Tags
|
||||||
|
owner_info: Owner Info
|
||||||
new:
|
new:
|
||||||
heading: Import Acquired Media Release
|
heading: Import Acquired Media Release
|
||||||
update:
|
update:
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ es:
|
|||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
signed_at: Date Signed (ES)
|
signed_at: Date Signed (ES)
|
||||||
tags: Tags (ES)
|
tags: Tags (ES)
|
||||||
|
owner_info: Owner Info (ES)
|
||||||
activerecord:
|
activerecord:
|
||||||
attributes:
|
attributes:
|
||||||
appearance_release:
|
appearance_release:
|
||||||
|
|||||||
@@ -4,6 +4,22 @@ FactoryBot.define do
|
|||||||
|
|
||||||
name "Test Acquired Media Release"
|
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
|
trait :native do
|
||||||
signature do
|
signature do
|
||||||
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
||||||
|
|||||||
@@ -165,6 +165,24 @@ feature "User managing acquired_media releases" do
|
|||||||
sign_in current_user
|
sign_in current_user
|
||||||
end
|
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
|
scenario "creating a release for an adult", js: true do
|
||||||
visit new_project_acquired_media_release_path(project)
|
visit new_project_acquired_media_release_path(project)
|
||||||
|
|
||||||
@@ -836,4 +854,8 @@ feature "User managing acquired_media releases" do
|
|||||||
def successful_import_message
|
def successful_import_message
|
||||||
t 'acquired_media_releases.create.notice'
|
t 'acquired_media_releases.create.notice'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def owner_info_table_header
|
||||||
|
t 'acquired_media_releases.index.table_headers.owner_info'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user