mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 09:42:46 +08:00
Fix issues with BioEddie integration [SCI-5982]
This commit is contained in:
parent
d0f8544075
commit
861be4bb35
4 changed files with 9 additions and 7 deletions
|
@ -21,7 +21,8 @@
|
|||
}
|
||||
|
||||
.create-wopi-file-btn,
|
||||
.new-marvinjs-upload-button {
|
||||
.new-marvinjs-upload-button,
|
||||
.new-bio-eddie-upload-button {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ class BioEddieAssetsController < ApplicationController
|
|||
create_create_bio_eddie_activity(asset, current_user)
|
||||
|
||||
if asset && bio_eddie_params[:object_type] == 'Step'
|
||||
log_registration_activity(asset) if bio_eddie_params[:schedule_for_registration] == 'true'
|
||||
render json: {
|
||||
html: render_to_string(partial: 'assets/asset.html.erb', locals: {
|
||||
asset: asset,
|
||||
|
@ -31,7 +32,7 @@ class BioEddieAssetsController < ApplicationController
|
|||
end
|
||||
|
||||
def update
|
||||
asset = BioEddieService.update_molecule(bio_eddie_params, current_user, current_team)
|
||||
asset = BioEddieService.update_molecule(bio_eddie_params, current_team)
|
||||
|
||||
create_edit_bio_eddie_activity(asset, current_user, :finish_editing)
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ module BioEddieActions
|
|||
|
||||
message_items[:action] = action if action
|
||||
Activities::CreateActivityService
|
||||
.call(activity_type: "#{activity}_molecule_on_step_on_result".to_sym,
|
||||
.call(activity_type: "#{activity}_molecule_on_result".to_sym,
|
||||
owner: current_user,
|
||||
subject: result,
|
||||
team: my_module.experiment.project.team,
|
||||
|
|
|
@ -16,20 +16,20 @@ class BioEddieService
|
|||
asset = Asset.new(created_by: current_user,
|
||||
last_modified_by: current_user,
|
||||
team_id: current_team.id)
|
||||
attach_file(asset.file, file, params, current_user)
|
||||
attach_file(asset.file, file, params)
|
||||
asset.save!
|
||||
asset.post_process_file(current_team)
|
||||
connect_asset(asset, params, current_user)
|
||||
end
|
||||
|
||||
def update_molecule(params, current_user, current_team)
|
||||
def update_molecule(params, current_team)
|
||||
asset = current_team.assets.find(params[:id])
|
||||
attachment = asset&.file
|
||||
|
||||
return unless attachment
|
||||
|
||||
file = image_io(params)
|
||||
attach_file(attachment, file, params, current_user)
|
||||
attach_file(attachment, file, params)
|
||||
asset
|
||||
end
|
||||
|
||||
|
@ -51,7 +51,7 @@ class BioEddieService
|
|||
asset: asset,
|
||||
last_modified_by: current_user)
|
||||
end
|
||||
asset
|
||||
asset.reload
|
||||
end
|
||||
|
||||
def image_io(params)
|
||||
|
|
Loading…
Reference in a new issue