Commit 0680928d authored by Tugce Nur Tas's avatar Tugce Nur Tas
Browse files

add additional info if available for involved authority

parent a5ff5091
......@@ -43,6 +43,11 @@ class Assignment < ApplicationRecord
involved_authority&.contact
end
def involved_authority_organization
department = involved_authority&.user&.department&.first&.contact
[department&.last_name, department&.full_address].reject(&:blank?).join(', ')
end
def involved_authority
if client.involved_authority
client.involved_authority.profile
......
......@@ -90,7 +90,7 @@ h4.m-b-10= t('assignment_pdf.creator_title')
.col-xs-7.col-input= @assignment.involved_authority_contact.last_name
.row
.col-xs-5= t('assignment_pdf.function')
.col-xs-7.col-input
.col-xs-7.col-input= @assignment.involved_authority&.profession
.row
.col-xs-5= t('assignment_pdf.email')
.col-xs-7.col-input= @assignment.involved_authority_contact.primary_email
......@@ -100,7 +100,7 @@ h4.m-b-10= t('assignment_pdf.creator_title')
.col-xs-7.col-input= @assignment.involved_authority_contact.first_name
.row
.col-xs-5= t('assignment_pdf.organization')
.col-xs-7.col-input
.col-xs-7.col-input= @assignment.involved_authority_organization
.row
.col-xs-5= t('assignment_pdf.telephone')
.col-xs-7.col-input= @assignment.involved_authority_contact.primary_phone
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment