Update 'Not started' button for reports [SCI-9007]

This commit is contained in:
Ivan Kljun 2023-08-24 08:31:07 +02:00
parent 28adb4956d
commit 023a6fe0a8
2 changed files with 3 additions and 2 deletions

View file

@ -42,7 +42,7 @@ module Reports::Docx::DrawMyModule
@docx.p do
text I18n.t('projects.reports.elements.module.status')
text ' '
text "[#{status.name}]", color: status.color.delete('#')
text "[#{status.name}]", color: (status.name == 'Not started' ? '000000' : status.color.delete('#'))
if my_module.completed?
text " #{I18n.t('my_modules.states.completed')} #{I18n.l(my_module.completed_on, format: :full)}"
end

View file

@ -25,7 +25,8 @@
<p class="module-status">
<% status = my_module.my_module_status %>
<%= t('projects.reports.elements.module.status') %>
<span class="status-block" style="background: <%= status.color %>">
<span class="status-block" style="background: <%= status.color %>;
<%= 'color: #000000;' if status.name == 'Not started' %>">
<%= status.name %>
</span>
<% if my_module.completed? %>