mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-04 02:45:53 +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',
|
text I18n.t('projects.reports.elements.step_checklist.user_time',
|
||||||
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
|
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
|
||||||
end
|
end
|
||||||
@docx.ul do
|
if items.any?
|
||||||
items.each do |item|
|
@docx.ul do
|
||||||
li do
|
items.each do |item|
|
||||||
text SmartAnnotations::TagToText.new(user, team, item.text).text
|
li do
|
||||||
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue