Reload navigator on archive and restore in PET tables [SCI-10384] (#7237)

This commit is contained in:
wandji 2024-03-12 13:59:47 +01:00 committed by GitHub
parent 7d083f149d
commit 351aa695d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 0 deletions

View file

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

View file

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

View file

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