mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-10 08:21:37 +08:00
Merge pull request #7579 from rekonder/aj_SCI_10726
Fix moving of multiple tasks [SCI-10726]
This commit is contained in:
commit
3f40c77047
4 changed files with 6 additions and 6 deletions
|
|
@ -302,8 +302,9 @@ export default {
|
||||||
edit(_e, rows) {
|
edit(_e, rows) {
|
||||||
[this.editModalObject] = rows;
|
[this.editModalObject] = rows;
|
||||||
},
|
},
|
||||||
move(_e, rows) {
|
move(event, rows) {
|
||||||
[this.moveModalObject] = rows;
|
[this.moveModalObject] = rows;
|
||||||
|
this.moveModalObject.movePath = event.path;
|
||||||
},
|
},
|
||||||
duplicate(event, rows) {
|
duplicate(event, rows) {
|
||||||
axios.post(event.path, { my_module_ids: rows.map((row) => row.id) }).then(() => {
|
axios.post(event.path, { my_module_ids: rows.map((row) => row.id) }).then(() => {
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,8 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
submit() {
|
submit() {
|
||||||
axios.post(this.my_module.urls.move, {
|
axios.post(this.my_module.movePath, {
|
||||||
to_experiment_id: this.targetExperiment,
|
to_experiment_id: this.targetExperiment
|
||||||
my_module_ids: [this.my_module.id]
|
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
this.$emit('move');
|
this.$emit('move');
|
||||||
HelperModule.flashAlertMsg(response.data.message, 'success');
|
HelperModule.flashAlertMsg(response.data.message, 'success');
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,6 @@ module Lists
|
||||||
assigned_tags: assigned_tags_my_module_my_module_tags_path(object),
|
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),
|
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),
|
experiments_to_move: experiments_to_move_experiment_path(object.experiment),
|
||||||
move: move_modules_experiment_path(object.experiment),
|
|
||||||
update: my_module_path(object),
|
update: my_module_path(object),
|
||||||
show_access: access_permissions_my_module_path(object),
|
show_access: access_permissions_my_module_path(object),
|
||||||
provisioning_status: provisioning_status_my_module_url(object)
|
provisioning_status: provisioning_status_my_module_url(object)
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,8 @@ module Toolbars
|
||||||
name: 'move',
|
name: 'move',
|
||||||
label: I18n.t('experiments.table.toolbar.move'),
|
label: I18n.t('experiments.table.toolbar.move'),
|
||||||
icon: 'sn-icon sn-icon-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
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue