scinote-web/app/services/reports/docx/table_helper.rb
ajugo dc8b147282
Add handson table metadata to reports [SCI-7835] (#4956)
* Add handson table metadata to reports [SCI-7835]

* Fix step table loading for empty metadata [SCI-7835]
2023-02-13 11:32:18 +01:00

20 lines
380 B
Ruby

# frozen_string_literal: true
module Reports
class Docx
module TableHelper
def table_cell_alignment(cell_class)
if cell_class.include?('htCenter')
:center
elsif cell_class.include?('htRight')
:right
elsif cell_class.include?('htJustify')
:both
else
:left
end
end
end
end
end