POC for instruction of inventory export [SCI-8865]

This commit is contained in:
Anton 2024-07-02 10:39:03 +02:00
parent 9a05c154d0
commit c17c15f3ad
2 changed files with 10 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 KiB

View file

@ -10,6 +10,8 @@ module RepositoryXlsxExport
sheet.add_row prepare_header(repository, column_ids, false)
end
add_instruction(workbook)
package.to_stream.read
end
@ -63,10 +65,17 @@ module RepositoryXlsxExport
end
end
add_instruction(workbook)
package.to_stream.read
end
private
def self.add_instruction(workbook)
workbook.add_worksheet(name: 'Instruction') do |sheet|
image = File.expand_path('app/assets/images/import_instruction.png')
sheet.add_image(image_src: image, start_at: 'A1', width: 1260, height: 994)
end
end
def self.prepare_header(repository, column_ids, add_consumption)
header = []