Skip to content

Commit

Permalink
fix multipage page (#18312)
Browse files Browse the repository at this point in the history
* fix multipage page

* fix additional line
  • Loading branch information
cloudmagic80 authored Sep 6, 2024
1 parent 82de279 commit d042946
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 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,18 @@ 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

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 d042946

Please sign in to comment.