mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-21 22:33:13 +08:00
Refactor step activities using position_plus_one
Closes SCI-3273
This commit is contained in:
parent
26848ecaef
commit
f00f4d39af
3 changed files with 4 additions and 4 deletions
app
|
@ -190,7 +190,7 @@ class StepCommentsController < ApplicationController
|
|||
message_items: {
|
||||
my_module: @step.my_module.id,
|
||||
step: @step.id,
|
||||
step_position: { id: @step.id, value_for: 'position' }
|
||||
step_position: { id: @step.id, value_for: 'position_plus_one' }
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
|
@ -275,7 +275,7 @@ class StepsController < ApplicationController
|
|||
my_module: @my_module.id,
|
||||
step: @chk_item.checklist.step.id,
|
||||
step_position: { id: @chk_item.checklist.step.id,
|
||||
value_for: 'position' },
|
||||
value_for: 'position_plus_one' },
|
||||
checkbox: text_activity,
|
||||
num_completed: completed_items.to_s,
|
||||
num_all: all_items.to_s)
|
||||
|
@ -609,7 +609,7 @@ class StepsController < ApplicationController
|
|||
|
||||
def log_activity(type_of, project = nil, message_items = {})
|
||||
default_items = { step: @step.id,
|
||||
step_position: { id: @step.id, value_for: 'position' } }
|
||||
step_position: { id: @step.id, value_for: 'position_plus_one' } }
|
||||
message_items = default_items.merge(message_items)
|
||||
|
||||
Activities::CreateActivityService
|
||||
|
|
|
@ -82,7 +82,7 @@ module WopiUtil
|
|||
type_of = :edit_wopi_file_on_step_in_repository
|
||||
default_step_items =
|
||||
{ step: @asset.step.id,
|
||||
step_position: { id: @asset.step.id, value_for: 'position' },
|
||||
step_position: { id: @asset.step.id, value_for: 'position_plus_one' },
|
||||
asset_name: { id: @asset.id, value_for: 'file_file_name' },
|
||||
action: action }
|
||||
message_items = { protocol: @protocol.id }
|
||||
|
|
Loading…
Reference in a new issue