mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 06:36:27 +08:00
Merge pull request #2231 from biosistemika/SCI-4108-bug-at-report-generation
SCI-4108 Docx report error because of checklist does not have any item
This commit is contained in:
commit
d74cad3b8c
1 changed files with 7 additions and 5 deletions
|
@ -21,11 +21,13 @@ module Reports::Docx::DrawStepChecklist
|
|||
text I18n.t('projects.reports.elements.step_checklist.user_time',
|
||||
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
|
||||
end
|
||||
@docx.ul do
|
||||
items.each do |item|
|
||||
li do
|
||||
text SmartAnnotations::TagToText.new(user, team, item.text).text
|
||||
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
|
||||
if items.any?
|
||||
@docx.ul do
|
||||
items.each do |item|
|
||||
li do
|
||||
text SmartAnnotations::TagToText.new(user, team, item.text).text
|
||||
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue