mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
Add link to generated report preview in notifications [SCI-5553]
This commit is contained in:
parent
ac97f38247
commit
f5eea49116
2 changed files with 4 additions and 2 deletions
|
@ -22,7 +22,8 @@ module Reports
|
|||
docx.save
|
||||
report.docx_file.attach(io: file, filename: 'report.docx')
|
||||
report.update!(docx_file_processing: false)
|
||||
report_path = Rails.application.routes.url_helpers.reports_path
|
||||
report_path = Rails.application.routes.url_helpers
|
||||
.reports_path(team: report.team.id, preview_report_id: report.id, preview_type: :docx)
|
||||
notification = Notification.create(
|
||||
type_of: :deliver,
|
||||
title: I18n.t('projects.reports.index.generation.completed_docx_notification_title'),
|
||||
|
|
|
@ -53,7 +53,8 @@ module Reports
|
|||
report.pdf_file.attach(io: file, filename: 'report.pdf')
|
||||
report.update!(pdf_file_processing: false)
|
||||
|
||||
report_path = Rails.application.routes.url_helpers.reports_path
|
||||
report_path = Rails.application.routes.url_helpers
|
||||
.reports_path(team: report.team.id, preview_report_id: report.id, preview_type: :pdf)
|
||||
notification = Notification.create(
|
||||
type_of: :deliver,
|
||||
title: I18n.t('projects.reports.index.generation.completed_pdf_notification_title'),
|
||||
|
|
Loading…
Reference in a new issue