Add activity to save_pdf_to_inventory_item

This commit is contained in:
Jure Grabnar 2019-03-29 16:01:36 +01:00
parent 6533368763
commit 3a79f7ca01

View file

@ -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)