From 023a6fe0a8b3f20fcd9eeb6f748deb5494b5562b Mon Sep 17 00:00:00 2001 From: Ivan Kljun Date: Thu, 24 Aug 2023 08:31:07 +0200 Subject: [PATCH] Update 'Not started' button for reports [SCI-9007] --- app/services/reports/docx/draw_my_module.rb | 2 +- app/views/reports/elements/_my_module_element.html.erb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/services/reports/docx/draw_my_module.rb b/app/services/reports/docx/draw_my_module.rb index 7f0f5380e..6b72a03f6 100644 --- a/app/services/reports/docx/draw_my_module.rb +++ b/app/services/reports/docx/draw_my_module.rb @@ -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 diff --git a/app/views/reports/elements/_my_module_element.html.erb b/app/views/reports/elements/_my_module_element.html.erb index bb6c1c479..34db825d1 100644 --- a/app/views/reports/elements/_my_module_element.html.erb +++ b/app/views/reports/elements/_my_module_element.html.erb @@ -25,7 +25,8 @@

<% status = my_module.my_module_status %> <%= t('projects.reports.elements.module.status') %> - + <%= status.name %> <% if my_module.completed? %>