DB restructure, print page

This commit is contained in:
Jason Jordan
2026-03-13 08:47:13 -04:00
parent 6a068243f4
commit 8c885b3e76
73 changed files with 1362 additions and 325 deletions
@@ -19,10 +19,9 @@ module BenefitsWordDoc
filename = @employer.name_to_logo_filename(file_extension)
logo = CardLogoFile.find_or_create_by(filename: filename) do |clf|
logo = IdCard::EmployerLogo.find_or_create_by(filename: filename) do |clf|
clf.image_data = image_binary
clf.content_type = meme_type
clf.logo_type = "employer"
end
# new_logo = CardLogoFile.create!(
@@ -32,16 +31,16 @@ module BenefitsWordDoc
# logo_type: "employer"
# )
image_io = StringIO.new(image_binary)
width, height = FastImage.size(image_io)
image_ratio = width.to_f / height
if (0.8..1.2).cover?(image_ratio)
@employer.single_card_template = "FairosRxIDCard-Half"
else
@employer.single_card_template = "FairosRxIDCard"
end
# image_io = StringIO.new(image_binary)
# width, height = FastImage.size(image_io)
# image_ratio = width.to_f / height
# if (0.8..1.2).cover?(image_ratio)
# @employer.single_card_template = "FairosRxIDCard-Half"
# else
# @employer.single_card_template = "FairosRxIDCard"
# end
@employer.employer_logo_filename = logo.filename
@employer.id_card_configuration.employer_logo = logo
end
end
@employer