mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-08 04:47:22 +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
|
cell.destroy if cell
|
||||||
@new_cell_value = create_new_cell_value(asset)
|
@new_cell_value = create_new_cell_value(asset)
|
||||||
@new_cell_value.save
|
@new_cell_value.save
|
||||||
|
log_activity
|
||||||
end
|
end
|
||||||
|
|
||||||
def error_messages
|
def error_messages
|
||||||
|
@ -107,6 +108,18 @@ module ReportActions
|
||||||
return content unless content.blank?
|
return content unless content.blank?
|
||||||
I18n.t('projects.reports.new.no_content_for_PDF_html')
|
I18n.t('projects.reports.new.no_content_for_PDF_html')
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
RepositoryPermissionError = Class.new(StandardError)
|
RepositoryPermissionError = Class.new(StandardError)
|
||||||
|
|
Loading…
Add table
Reference in a new issue