2019-07-01 16:14:16 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-09-17 16:50:01 +08:00
|
|
|
module Reports::Docx::DrawMyModuleProtocol
|
2020-07-21 20:11:42 +08:00
|
|
|
def draw_my_module_protocol(_subject, my_module)
|
2019-07-01 16:14:16 +08:00
|
|
|
return unless my_module
|
|
|
|
|
|
|
|
protocol = my_module.protocol
|
2020-07-21 20:11:42 +08:00
|
|
|
return false if protocol.description.blank?
|
2019-07-01 16:14:16 +08:00
|
|
|
|
|
|
|
@docx.p I18n.t 'projects.reports.elements.module.protocol.user_time',
|
|
|
|
timestamp: I18n.l(protocol.created_at, format: :full)
|
|
|
|
@docx.hr
|
|
|
|
html = custom_auto_link(protocol.description, team: @report_team)
|
|
|
|
html_to_word_converter(html)
|
|
|
|
@docx.p
|
|
|
|
@docx.p
|
|
|
|
end
|
|
|
|
end
|