diff --git a/src/views/ProjectsView.vue b/src/views/ProjectsView.vue index 83bae2a83..b69817e7d 100644 --- a/src/views/ProjectsView.vue +++ b/src/views/ProjectsView.vue @@ -139,13 +139,9 @@ interface ProjectData { }) export default class ProjectsView extends Vue { apiServer = ""; - projects: { - handleId: string; - name: string; - description: string; - rowid: number; - }[] = []; + projects: ProjectData[] = []; current: IIdentifier; + isLoading = false; /** * Core project data loader @@ -159,6 +155,7 @@ export default class ProjectsView extends Vue { }; try { + this.isLoading = true; const resp = await this.axios.get(url, { headers }); if (resp.status === 200) { const plans: ProjectData[] = resp.data.data; @@ -169,6 +166,8 @@ export default class ProjectsView extends Vue { } } catch (error) { console.error("Got error loading projects:", error); + } finally { + this.isLoading = false; } } @@ -177,6 +176,7 @@ export default class ProjectsView extends Vue { * @param payload is the flag from the InfiniteScroll indicating if it should load **/ async loadMoreData(payload: boolean) { + console.log(payload); if (this.projects.length > 0) { const latestProject = this.projects[this.projects.length - 1]; const url = `${this.apiServer}/api/v2/report/plansByIssuer?beforeId=${latestProject.rowid}`;