mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-16 05:42:13 +08:00
Reload navigator on archive and restore in PET tables [SCI-10384] (#7237)
This commit is contained in:
parent
7d083f149d
commit
351aa695d7
3 changed files with 12 additions and 0 deletions
|
|
@ -218,10 +218,14 @@ export default {
|
|||
this.descriptionModalObject = null;
|
||||
this.reloadingTable = true;
|
||||
},
|
||||
updateNavigator(withExpanedChildren = false) {
|
||||
window.navigatorContainer.reloadNavigator(withExpanedChildren);
|
||||
},
|
||||
async archive(event, rows) {
|
||||
axios.post(event.path, { experiment_ids: rows.map((row) => row.id) }).then((response) => {
|
||||
this.reloadingTable = true;
|
||||
HelperModule.flashAlertMsg(response.data.message, 'success');
|
||||
this.updateNavigator(false);
|
||||
}).catch((error) => {
|
||||
HelperModule.flashAlertMsg(error.response.data.error, 'danger');
|
||||
});
|
||||
|
|
@ -230,6 +234,7 @@ export default {
|
|||
axios.post(event.path, { experiment_ids: rows.map((row) => row.id) }).then((response) => {
|
||||
this.reloadingTable = true;
|
||||
HelperModule.flashAlertMsg(response.data.message, 'success');
|
||||
this.updateNavigator(false);
|
||||
}).catch((error) => {
|
||||
HelperModule.flashAlertMsg(error.response.data.error, 'danger');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -267,10 +267,14 @@ export default {
|
|||
this.editModalObject = null;
|
||||
this.moveModalObject = null;
|
||||
},
|
||||
updateNavigator(withExpanedChildren = false) {
|
||||
window.navigatorContainer.reloadNavigator(withExpanedChildren);
|
||||
},
|
||||
async archive(event, rows) {
|
||||
axios.post(event.path, { my_modules: rows.map((row) => row.id) }).then((response) => {
|
||||
this.reloadingTable = true;
|
||||
HelperModule.flashAlertMsg(response.data.message, 'success');
|
||||
this.updateNavigator(true);
|
||||
}).catch((error) => {
|
||||
HelperModule.flashAlertMsg(error.response.data.error, 'danger');
|
||||
});
|
||||
|
|
@ -279,6 +283,7 @@ export default {
|
|||
axios.post(event.path, { my_modules_ids: rows.map((row) => row.id), view: 'table' }).then((response) => {
|
||||
this.reloadingTable = true;
|
||||
HelperModule.flashAlertMsg(response.data.message, 'success');
|
||||
this.updateNavigator(true);
|
||||
}).catch((error) => {
|
||||
HelperModule.flashAlertMsg(error.response.data.error, 'danger');
|
||||
});
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@ export default {
|
|||
axios.post(event.path, { project_ids: rows.map((row) => row.id) }).then((response) => {
|
||||
this.reloadingTable = true;
|
||||
HelperModule.flashAlertMsg(response.data.message, 'success');
|
||||
this.updateNavigator(false);
|
||||
}).catch((error) => {
|
||||
HelperModule.flashAlertMsg(error.response.data.error, 'danger');
|
||||
});
|
||||
|
|
@ -280,6 +281,7 @@ export default {
|
|||
axios.post(event.path, { project_ids: rows.map((row) => row.id) }).then((response) => {
|
||||
this.reloadingTable = true;
|
||||
HelperModule.flashAlertMsg(response.data.message, 'success');
|
||||
this.updateNavigator(false);
|
||||
}).catch((error) => {
|
||||
HelperModule.flashAlertMsg(error.response.data.error, 'danger');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue