mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
POC for instruction of inventory export [SCI-8865]
This commit is contained in:
parent
9a05c154d0
commit
c17c15f3ad
2 changed files with 10 additions and 1 deletions
BIN
app/assets/images/import_instruction.png
Normal file
BIN
app/assets/images/import_instruction.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 549 KiB |
|
@ -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 = []
|
||||
|
|
Loading…
Reference in a new issue