mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-16 05:42:13 +08:00
Remove archive confirmation modals from all tables [SCI-9989]"
This commit is contained in:
parent
003990993d
commit
a2cd0b2075
3 changed files with 18 additions and 48 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -261,15 +254,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) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue