Skip to content

Commit

Permalink
render secondary qualifications with subjects and awarding body
Browse files Browse the repository at this point in the history
  • Loading branch information
starswan committed Jan 9, 2025
1 parent 6821f62 commit 6d114af
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions app/helpers/pdf_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@ def add_secondary_qualification_details(pdf, qualification)
pdf.move_down 5
pdf.text "Secondary Qualification", size: 12, style: :italic

secondary_qualification_data = [
["Name:", qualification.name],
["Grade:", qualification.grade],
["Year Awarded:", qualification.year],
].reject { |row| row[1].blank? }

render_table(pdf, secondary_qualification_data)
qualification.qualification_results.each do |result|
secondary_qualification_data = [
["Subject:", result.subject],
["Grade:", result.grade],
(["Awarding Body:", result.awarding_body] unless result.awarding_body.blank?),
["Year Awarded:", qualification.year],
].compact
render_table(pdf, secondary_qualification_data)
end
end

def add_general_qualification_details(pdf, qualification)
Expand Down

0 comments on commit 6d114af

Please sign in to comment.