mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 19:24:10 +08:00
Add activity to save_pdf_to_inventory_item
This commit is contained in:
parent
6533368763
commit
3a79f7ca01
1 changed files with 13 additions and 0 deletions
|
@ -17,6 +17,7 @@ module ReportActions
|
|||
cell.destroy if cell
|
||||
@new_cell_value = create_new_cell_value(asset)
|
||||
@new_cell_value.save
|
||||
log_activity
|
||||
end
|
||||
|
||||
def error_messages
|
||||
|
@ -107,6 +108,18 @@ module ReportActions
|
|||
return content unless content.blank?
|
||||
I18n.t('projects.reports.new.no_content_for_PDF_html')
|
||||
end
|
||||
|
||||
def log_activity
|
||||
Activities::CreateActivityService
|
||||
.call(activity_type: :edit_item_inventory,
|
||||
owner: @user,
|
||||
subject: @repository,
|
||||
team: @team,
|
||||
message_items: {
|
||||
repository_row: @repository_item.id,
|
||||
repository: @repository.id
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
RepositoryPermissionError = Class.new(StandardError)
|
||||
|
|
Loading…
Reference in a new issue