mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 14:44:26 +08:00
Fix moving of multiple tasks [SCI-10726]
This commit is contained in:
parent
b7ce9d0493
commit
51ffbe30fa
4 changed files with 6 additions and 6 deletions
|
@ -302,8 +302,9 @@ export default {
|
|||
edit(_e, rows) {
|
||||
[this.editModalObject] = rows;
|
||||
},
|
||||
move(_e, rows) {
|
||||
move(event, rows) {
|
||||
[this.moveModalObject] = rows;
|
||||
this.moveModalObject.movePath = event.path;
|
||||
},
|
||||
duplicate(event, rows) {
|
||||
axios.post(event.path, { my_module_ids: rows.map((row) => row.id) }).then(() => {
|
||||
|
|
|
@ -52,9 +52,8 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
submit() {
|
||||
axios.post(this.my_module.urls.move, {
|
||||
to_experiment_id: this.targetExperiment,
|
||||
my_module_ids: [this.my_module.id]
|
||||
axios.post(this.my_module.movePath, {
|
||||
to_experiment_id: this.targetExperiment
|
||||
}).then((response) => {
|
||||
this.$emit('move');
|
||||
HelperModule.flashAlertMsg(response.data.message, 'success');
|
||||
|
|
|
@ -61,7 +61,6 @@ module Lists
|
|||
assigned_tags: assigned_tags_my_module_my_module_tags_path(object),
|
||||
users_list: search_my_module_user_my_module_path(object, my_module_id: object.id),
|
||||
experiments_to_move: experiments_to_move_experiment_path(object.experiment),
|
||||
move: move_modules_experiment_path(object.experiment),
|
||||
update: my_module_path(object),
|
||||
show_access: access_permissions_my_module_path(object),
|
||||
provisioning_status: provisioning_status_my_module_url(object)
|
||||
|
|
|
@ -89,7 +89,8 @@ module Toolbars
|
|||
name: 'move',
|
||||
label: I18n.t('experiments.table.toolbar.move'),
|
||||
icon: 'sn-icon sn-icon-move',
|
||||
type: :emit
|
||||
type: :emit,
|
||||
path: move_modules_experiment_path(@my_modules.first.experiment, my_module_ids: @my_modules.pluck(:id))
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue