Skip to content

Commit

Permalink
Refresh the status of all projects after a global import (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley authored Jun 23, 2022
1 parent 25e293d commit 4c0fff2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/src/components/DataImportExport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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.';
Expand Down

0 comments on commit 4c0fff2

Please sign in to comment.