Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
norrismei committed Aug 18, 2024
1 parent 41f55bb commit 69135be
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions app/pdfs/picklists_pdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ class PicklistsPdf
include ItemsHelper

def initialize(organization, requests)
@requests = requests # does this need to be Request.includes(XXX).etc? Investigate.
@organization = organization# temporary for single picklist only
@requests = requests
@organization = organization
end

def compute_and_render
Expand All @@ -16,10 +16,10 @@ def compute_and_render

@requests.each do |request|
logo_image = if @organization.logo.attached?
StringIO.open(@organization.logo.download)
else
Organization::DIAPER_APP_LOGO
end
StringIO.open(@organization.logo.download)
else
Organization::DIAPER_APP_LOGO
end

# Bounding box containing non-footer elements
bounding_box [bounds.left, bounds.top], width: bounds.width, height: bounds.height - footer_height do
Expand Down Expand Up @@ -90,8 +90,8 @@ def compute_and_render
# Line item table
table(data) do
self.header = true
self.cell_style = { padding: [5, 10, 5, 10]}
self.row_colors = %w(dddddd ffffff)
self.cell_style = {padding: [5, 10, 5, 10]}
self.row_colors = %w[dddddd ffffff]

cells.borders = []

Expand All @@ -100,7 +100,7 @@ def compute_and_render
row(0).border_width = 2
row(0).font_style = :bold
row(0).size = 10
row(0).column(1..-1).borders = %i(bottom left)
row(0).column(1..-1).borders = %i[bottom left]
end
end

Expand All @@ -125,9 +125,9 @@ def compute_and_render
end

number_pages "Page <page> of <total>",
start_count_at: 1,
at: [bounds.right - 130, 22],
align: :right
start_count_at: 1,
at: [bounds.right - 130, 22],
align: :right

render
end
Expand Down Expand Up @@ -166,5 +166,3 @@ def data_no_units(items)
end
end
end


0 comments on commit 69135be

Please sign in to comment.