Merge pull request #6970 from G-Chubinidze/gc_SCI_9989

Remove archive confirmation modals from all tables [SCI-9989]
This commit is contained in:
aignatov-bio 2024-01-22 10:07:19 +01:00 committed by GitHub
commit 35774441f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 54 deletions

View file

@ -26,13 +26,6 @@
</template>
</DataTable>
<ConfirmationModal
:title="i18n.t('experiments.index.archive_confirm_title')"
:description="i18n.t('experiments.index.archive_confirm')"
:confirmClass="'btn btn-primary'"
:confirmText="i18n.t('general.archive')"
ref="archiveModal"
></ConfirmationModal>
<DescriptionModal
v-if="descriptionModalObject"
:experiment="descriptionModalObject"
@ -224,15 +217,12 @@ export default {
this.reloadingTable = true;
},
async archive(event, rows) {
const ok = await this.$refs.archiveModal.show();
if (ok) {
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');
});
}
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) => {

View file

@ -33,13 +33,6 @@
:assignedUsersUrl="assignedUsersUrl"
@create="updateTable"
@close="newModalOpen = false" />
<ConfirmationModal
:title="i18n.t('experiments.table.archive_confirm_title')"
:description="i18n.t('experiments.table.archive_confirm')"
:confirmClass="'btn btn-primary'"
:confirmText="i18n.t('general.archive')"
ref="archiveModal"
></ConfirmationModal>
<EditModal v-if="editModalObject"
:my_module="editModalObject"
@close="editModalObject = null"
@ -269,15 +262,12 @@ export default {
this.moveModalObject = null;
},
async archive(event, rows) {
const ok = await this.$refs.archiveModal.show();
if (ok) {
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');
});
}
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) => {

View file

@ -28,13 +28,6 @@
</DataTable>
<a href="#" ref="commentButton" class="open-comments-sidebar hidden"
data-turbolinks="false" data-object-type="Project" data-object-id=""></a>
<ConfirmationModal
:title="i18n.t('projects.index.archive_confirm_title')"
:description="i18n.t('projects.index.archive_confirm')"
:confirmClass="'btn btn-primary'"
:confirmText="i18n.t('general.archive')"
ref="archiveModal"
></ConfirmationModal>
<ConfirmationModal
:title="i18n.t('projects.index.modal_delete_folders.title')"
:description="folderDeleteDescription"
@ -251,15 +244,12 @@ export default {
};
},
async archive(event, rows) {
const ok = await this.$refs.archiveModal.show();
if (ok) {
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');
});
}
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) => {

View file

@ -555,8 +555,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"
@ -1472,8 +1470,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"
@ -1544,8 +1540,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"