Merge pull request #7579 from rekonder/aj_SCI_10726

Fix moving of multiple tasks [SCI-10726]
This commit is contained in:
ajugo 2024-05-22 11:47:26 +02:00 committed by GitHub
commit 3f40c77047
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View file

@ -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(() => {

View file

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

View file

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

View file

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