Employer form mostly working with persist to db

This commit is contained in:
Jason Jordan
2025-12-10 13:22:33 -05:00
parent 78ce415b94
commit 0464ba8929
68 changed files with 3071 additions and 365 deletions
+27
View File
@@ -0,0 +1,27 @@
module SampleCard
class PdfPrinter
def initialize(process, sample_cards)
@process = process
@sample_cards = sample_cards
end
def call
group_cards_pdf = CombinePDF.new
@sample_cards.each do |sample_card|
url = SampleCard::JasperUrlGenerator.new(@process, sample_card.family_id).call
puts url
sample_card_pdf = SampleCard::JasperPdfGenerator.new(url).call
group_cards_pdf << sample_card_pdf
end
employer_name = @process.employer_name.downcase.tr(" ", "_")
todays_date = Date.today.strftime("%m-%d-%Y")
group_cards_pdf.save("tmp/#{employer_name}_sample_cards_#{todays_date}.pdf")
group_cards_pdf
end
end
end