From 4c0fff2e93ead2f133e890ff42074c4817372e4c Mon Sep 17 00:00:00 2001 From: Anne Haley Date: Thu, 23 Jun 2022 11:22:58 -0400 Subject: [PATCH] Refresh the status of all projects after a global import (#531) --- client/src/components/DataImportExport.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/src/components/DataImportExport.vue b/client/src/components/DataImportExport.vue index 6f1d9135..547d692d 100644 --- a/client/src/components/DataImportExport.vue +++ b/client/src/components/DataImportExport.vue @@ -19,6 +19,7 @@ export default defineComponent({ }, setup() { const currentProject = computed(() => store.state.currentProject); + const projects = computed(() => store.state.projects); const loadProject = (project: Project) => store.dispatch.loadProject(project); const isGlobal = computed(() => store.getters.isGlobal); @@ -54,6 +55,13 @@ export default defineComponent({ if (!isGlobal.value) { await loadProject(currentProject.value); + } else { + projects.value.forEach( + async (project: Project) => { + const taskOverview = await djangoRest.projectTaskOverview(project.id); + store.commit.setTaskOverview(taskOverview); + }, + ); } } catch (ex) { const text = ex || 'Import failed due to server error.';