show owner info in material release table
This commit is contained in:
@@ -18,6 +18,9 @@
|
|||||||
<td>
|
<td>
|
||||||
<%= material_release.name %>
|
<%= material_release.name %>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= contact_info_for(material_release.contact_person) %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= notes_preview material_release.notes.order_by_recent %>
|
<%= notes_preview material_release.notes.order_by_recent %>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -29,10 +29,10 @@
|
|||||||
<th><%= t '.table_headers.approved'%></th>
|
<th><%= t '.table_headers.approved'%></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th><%= MaterialRelease.human_attribute_name(:name) %></th>
|
<th><%= MaterialRelease.human_attribute_name(:name) %></th>
|
||||||
|
<th><%= t(".table_headers.owner_info") %>
|
||||||
<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>
|
||||||
|
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@@ -903,6 +903,7 @@ en:
|
|||||||
approved: Approved
|
approved: Approved
|
||||||
name: Name
|
name: Name
|
||||||
notes: Notes
|
notes: Notes
|
||||||
|
owner_info: Owner Info
|
||||||
signed_at: Date Signed
|
signed_at: Date Signed
|
||||||
tags: Tags
|
tags: Tags
|
||||||
material_release:
|
material_release:
|
||||||
|
|||||||
@@ -436,6 +436,7 @@ es:
|
|||||||
table_headers:
|
table_headers:
|
||||||
name: Name (ES)
|
name: Name (ES)
|
||||||
notes: Notes (ES)
|
notes: Notes (ES)
|
||||||
|
owner_info: Owner Info
|
||||||
signed_at: Date Signed (ES)
|
signed_at: Date Signed (ES)
|
||||||
tags: Tags (ES)
|
tags: Tags (ES)
|
||||||
medical_releases:
|
medical_releases:
|
||||||
|
|||||||
@@ -9,20 +9,6 @@ SET xmloption = content;
|
|||||||
SET client_min_messages = warning;
|
SET client_min_messages = warning;
|
||||||
SET row_security = off;
|
SET row_security = off;
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
|
|
||||||
--
|
|
||||||
|
|
||||||
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -
|
-- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -
|
||||||
--
|
--
|
||||||
@@ -1479,6 +1465,7 @@ CREATE TABLE public.settings (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE SEQUENCE public.settings_id_seq
|
CREATE SEQUENCE public.settings_id_seq
|
||||||
|
AS integer
|
||||||
START WITH 1
|
START WITH 1
|
||||||
INCREMENT BY 1
|
INCREMENT BY 1
|
||||||
NO MINVALUE
|
NO MINVALUE
|
||||||
@@ -1514,6 +1501,7 @@ CREATE TABLE public.taggings (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE SEQUENCE public.taggings_id_seq
|
CREATE SEQUENCE public.taggings_id_seq
|
||||||
|
AS integer
|
||||||
START WITH 1
|
START WITH 1
|
||||||
INCREMENT BY 1
|
INCREMENT BY 1
|
||||||
NO MINVALUE
|
NO MINVALUE
|
||||||
@@ -1544,6 +1532,7 @@ CREATE TABLE public.tags (
|
|||||||
--
|
--
|
||||||
|
|
||||||
CREATE SEQUENCE public.tags_id_seq
|
CREATE SEQUENCE public.tags_id_seq
|
||||||
|
AS integer
|
||||||
START WITH 1
|
START WITH 1
|
||||||
INCREMENT BY 1
|
INCREMENT BY 1
|
||||||
NO MINVALUE
|
NO MINVALUE
|
||||||
|
|||||||
@@ -4,10 +4,20 @@ FactoryBot.define do
|
|||||||
|
|
||||||
name "Test Materials"
|
name "Test Materials"
|
||||||
|
|
||||||
|
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 :native do
|
trait :native do
|
||||||
person_first_name "Jane"
|
person_first_name "Jane"
|
||||||
person_last_name "Doe"
|
person_last_name "Doe"
|
||||||
person_phone "100-555-1001"
|
person_phone "100-555-1001"
|
||||||
|
person_email "owner@email.com"
|
||||||
|
|
||||||
signature do
|
signature do
|
||||||
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
path = Rails.root.join("spec", "fixtures", "files", "signature.png")
|
||||||
|
|||||||
@@ -185,6 +185,24 @@ feature "User managing material releases" do
|
|||||||
sign_in current_user
|
sign_in current_user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scenario "index table shows owner info" do
|
||||||
|
release = create(:material_release, :native, :with_address, project: project)
|
||||||
|
|
||||||
|
visit project_material_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 and adult", js: true do
|
scenario "creating a release for and adult", js: true do
|
||||||
visit new_project_material_release_path(project)
|
visit new_project_material_release_path(project)
|
||||||
|
|
||||||
@@ -813,4 +831,8 @@ feature "User managing material releases" do
|
|||||||
def signature_field
|
def signature_field
|
||||||
'material_release_signature_base64'
|
'material_release_signature_base64'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def owner_info_table_header
|
||||||
|
t 'material_releases.index.table_headers.owner_info'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user