|
@ -176,8 +176,7 @@ export default class ProjectsView extends Vue { |
|
|
* @param payload is the flag from the InfiniteScroll indicating if it should load |
|
|
* @param payload is the flag from the InfiniteScroll indicating if it should load |
|
|
**/ |
|
|
**/ |
|
|
async loadMoreData(payload: boolean) { |
|
|
async loadMoreData(payload: boolean) { |
|
|
console.log(payload); |
|
|
if (this.projects.length > 0 && payload) { |
|
|
if (this.projects.length > 0) { |
|
|
|
|
|
const latestProject = this.projects[this.projects.length - 1]; |
|
|
const latestProject = this.projects[this.projects.length - 1]; |
|
|
const url = `${this.apiServer}/api/v2/report/plansByIssuer?beforeId=${latestProject.rowid}`; |
|
|
const url = `${this.apiServer}/api/v2/report/plansByIssuer?beforeId=${latestProject.rowid}`; |
|
|
const token = await accessToken(this.current); |
|
|
const token = await accessToken(this.current); |
|
@ -202,7 +201,6 @@ export default class ProjectsView extends Vue { |
|
|
* @param identity of the user |
|
|
* @param identity of the user |
|
|
**/ |
|
|
**/ |
|
|
async LoadProjects(identity: IIdentifier) { |
|
|
async LoadProjects(identity: IIdentifier) { |
|
|
console.log("LoadProjects"); |
|
|
|
|
|
const url = `${this.apiServer}/api/v2/report/plansByIssuer`; |
|
|
const url = `${this.apiServer}/api/v2/report/plansByIssuer`; |
|
|
const token: string = await accessToken(identity); |
|
|
const token: string = await accessToken(identity); |
|
|
await this.dataLoader(url, token); |
|
|
await this.dataLoader(url, token); |
|
@ -228,6 +226,7 @@ export default class ProjectsView extends Vue { |
|
|
if (!identity) { |
|
|
if (!identity) { |
|
|
throw new Error("No identity found."); |
|
|
throw new Error("No identity found."); |
|
|
} |
|
|
} |
|
|
|
|
|
this.current = identity; |
|
|
this.LoadProjects(identity); |
|
|
this.LoadProjects(identity); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|