From a2cd0b20750187a014472727a4d82d13f4f0903a Mon Sep 17 00:00:00 2001 From: Giga Chubinidze Date: Thu, 18 Jan 2024 04:41:57 +0400 Subject: [PATCH 1/2] Remove archive confirmation modals from all tables [SCI-9989]" --- app/javascript/vue/experiments/list.vue | 22 ++++++---------------- app/javascript/vue/my_modules/list.vue | 22 ++++++---------------- app/javascript/vue/projects/list.vue | 22 ++++++---------------- 3 files changed, 18 insertions(+), 48 deletions(-) diff --git a/app/javascript/vue/experiments/list.vue b/app/javascript/vue/experiments/list.vue index 4bbf7e8fd..81caa2d23 100644 --- a/app/javascript/vue/experiments/list.vue +++ b/app/javascript/vue/experiments/list.vue @@ -26,13 +26,6 @@ - row.id) }).then((response) => { - this.reloadingTable = true; - HelperModule.flashAlertMsg(response.data.message, 'success'); - }).catch((error) => { - HelperModule.flashAlertMsg(error.response.data.error, 'danger'); - }); - } + axios.post(event.path, { experiment_ids: rows.map((row) => row.id) }).then((response) => { + this.reloadingTable = true; + HelperModule.flashAlertMsg(response.data.message, 'success'); + }).catch((error) => { + HelperModule.flashAlertMsg(error.response.data.error, 'danger'); + }); }, restore(event, rows) { axios.post(event.path, { experiment_ids: rows.map((row) => row.id) }).then((response) => { diff --git a/app/javascript/vue/my_modules/list.vue b/app/javascript/vue/my_modules/list.vue index 6f95d98c2..359ef77e1 100644 --- a/app/javascript/vue/my_modules/list.vue +++ b/app/javascript/vue/my_modules/list.vue @@ -33,13 +33,6 @@ :assignedUsersUrl="assignedUsersUrl" @create="updateTable" @close="newModalOpen = false" /> - row.id) }).then((response) => { - this.reloadingTable = true; - HelperModule.flashAlertMsg(response.data.message, 'success'); - }).catch((error) => { - HelperModule.flashAlertMsg(error.response.data.error, 'danger'); - }); - } + axios.post(event.path, { my_modules: rows.map((row) => row.id) }).then((response) => { + this.reloadingTable = true; + HelperModule.flashAlertMsg(response.data.message, 'success'); + }).catch((error) => { + HelperModule.flashAlertMsg(error.response.data.error, 'danger'); + }); }, restore(event, rows) { axios.post(event.path, { my_modules_ids: rows.map((row) => row.id), view: 'table' }).then((response) => { diff --git a/app/javascript/vue/projects/list.vue b/app/javascript/vue/projects/list.vue index 804c80692..83121a7e4 100644 --- a/app/javascript/vue/projects/list.vue +++ b/app/javascript/vue/projects/list.vue @@ -28,13 +28,6 @@ - row.id) }).then((response) => { - this.reloadingTable = true; - HelperModule.flashAlertMsg(response.data.message, 'success'); - }).catch((error) => { - HelperModule.flashAlertMsg(error.response.data.error, 'danger'); - }); - } + axios.post(event.path, { project_ids: rows.map((row) => row.id) }).then((response) => { + this.reloadingTable = true; + HelperModule.flashAlertMsg(response.data.message, 'success'); + }).catch((error) => { + HelperModule.flashAlertMsg(error.response.data.error, 'danger'); + }); }, restore(event, rows) { axios.post(event.path, { project_ids: rows.map((row) => row.id) }).then((response) => { From 05b1e906bb0eee2bd455812f8d1f921c33b03f56 Mon Sep 17 00:00:00 2001 From: Giga Chubinidze Date: Fri, 19 Jan 2024 13:46:34 +0400 Subject: [PATCH 2/2] removed archive confirm locales --- config/locales/en.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index d1bf38dc8..47833e7e5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -552,8 +552,6 @@ en: delete_button: "Delete" edit_option: "Edit" archive_option: "Archive" - archive_confirm_title: "Archive project" - archive_confirm: "Are you sure you want to archive this project?" restore_option: "Restore" project_members_access: "Access" comments_option: "Comments" @@ -1469,8 +1467,6 @@ en: clone_option: "Duplicate" move_option: "Move" archive_option: "Archive" - archive_confirm_title: "Archive experiment" - archive_confirm: "Are you sure you want to archive this experiment?" restore_option: "Restore" more_link: "More" experiment_access: "Access" @@ -1541,8 +1537,6 @@ en: assigned_html: 'Assigned to' tags_html: 'Tags' comments_html: 'Comments' - archive_confirm_title: "Archive task" - archive_confirm: "Are you sure you want to archive this task?" modal_move_modules: title: "Move task(s) to experiment" confirm: "Move"