diff --git a/app/models/project.rb b/app/models/project.rb index 9856e3e5a..104925380 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1,4 +1,7 @@ class Project < ApplicationRecord + ID_PREFIX = 'PR' + + include PrefixedIdModel include ArchivableModel include SearchableModel include SearchableByNameModel diff --git a/app/services/reports/docx/draw_my_module.rb b/app/services/reports/docx/draw_my_module.rb index c377af53c..b5d9b4415 100644 --- a/app/services/reports/docx/draw_my_module.rb +++ b/app/services/reports/docx/draw_my_module.rb @@ -16,7 +16,7 @@ module Reports::Docx::DrawMyModule end @docx.p do - text I18n.t('projects.reports.elements.module.user_time', + text I18n.t('projects.reports.elements.module.user_time', code: my_module.code, timestamp: I18n.l(my_module.created_at, format: :full)), color: color[:gray] if my_module.archived? text ' | ' diff --git a/app/services/reports/docx/draw_my_module_protocol.rb b/app/services/reports/docx/draw_my_module_protocol.rb index a9523373c..f712817c9 100644 --- a/app/services/reports/docx/draw_my_module_protocol.rb +++ b/app/services/reports/docx/draw_my_module_protocol.rb @@ -12,7 +12,7 @@ module Reports::Docx::DrawMyModuleProtocol end if @settings.dig('task', 'protocol', 'description') && protocol.description.present? - @docx.p I18n.t('projects.reports.elements.module.protocol.user_time', + @docx.p I18n.t('projects.reports.elements.module.protocol.user_time', code: protocol.code, timestamp: I18n.l(protocol.created_at, format: :full)), color: @color[:gray] html = custom_auto_link(protocol.description, team: @report_team) Reports::HtmlToWordConverter.new(@docx, { scinote_url: @scinote_url, diff --git a/app/services/reports/docx/draw_project_header.rb b/app/services/reports/docx/draw_project_header.rb index e311e1848..12852214c 100644 --- a/app/services/reports/docx/draw_project_header.rb +++ b/app/services/reports/docx/draw_project_header.rb @@ -16,7 +16,7 @@ module Reports::Docx::DrawProjectHeader end @docx.p do - text I18n.t('projects.reports.elements.project_header.user_time', + text I18n.t('projects.reports.elements.project_header.user_time', code: project.code, timestamp: I18n.l(project.created_at, format: :full)), color: color[:gray] br br diff --git a/app/views/reports/elements/_my_module_element.html.erb b/app/views/reports/elements/_my_module_element.html.erb index bbd06a841..b7181256d 100644 --- a/app/views/reports/elements/_my_module_element.html.erb +++ b/app/views/reports/elements/_my_module_element.html.erb @@ -10,7 +10,7 @@ <% end %>
<% if my_module.started_on.present? %> diff --git a/app/views/reports/elements/_my_module_protocol_element.html.erb b/app/views/reports/elements/_my_module_protocol_element.html.erb index b53628d4b..a3e84d710 100644 --- a/app/views/reports/elements/_my_module_protocol_element.html.erb +++ b/app/views/reports/elements/_my_module_protocol_element.html.erb @@ -10,7 +10,7 @@ <% end %>