Skip to content

Commit

Permalink
fix multipage page
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudmagic80 committed Sep 4, 2024
1 parent a8fc909 commit f451381
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/ivc_champva/app/models/ivc_champva/vha_10_10d.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,19 @@ def initial_stamps
def applicant_stamps
stamps = []
applicants = @data.fetch('applicants', [])

applicants.each_with_index do |applicant, index|
next if index.zero?

coords_y = 470 - (116 * index)
applicant_country = applicant.dig('applicant_address', 'country')
stamps << { coords: [520, coords_y], text: applicant_country, page: 0 } if applicant_country

Check failure on line 116 in modules/ivc_champva/app/models/ivc_champva/vha_10_10d.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Layout/TrailingWhitespace: Trailing whitespace detected.

if applicant_country && stamps.count { |stamp| stamp[:text] == applicant_country } < 2
stamps << { coords: [520, coords_y], text: applicant_country, page: 0 }
end
end

stamps
end
end
Expand Down

0 comments on commit f451381

Please sign in to comment.