Browse Source

change jwtId to rowid for paging within a derivative/cached table

kb/add-usage-guide
Trent Larson 1 year ago
parent
commit
ea95382fdf
  1. 8
      src/views/ProjectsView.vue

8
src/views/ProjectsView.vue

@ -131,7 +131,7 @@ interface ProjectData {
/** /**
* The Identier of the project * The Identier of the project
**/ **/
jwtId: string; rowid: string;
} }
@Component({ @Component({
@ -163,8 +163,8 @@ export default class ProjectsView extends Vue {
if (resp.status === 200) { if (resp.status === 200) {
const plans: ProjectData[] = resp.data.data; const plans: ProjectData[] = resp.data.data;
for (const plan of plans) { for (const plan of plans) {
const { name, description, handleId = plan.fullIri, jwtId } = plan; const { name, description, handleId = plan.fullIri, rowid } = plan;
this.projects.push({ name, description, handleId, jwtId }); this.projects.push({ name, description, handleId, rowid });
} }
} }
} catch (error) { } catch (error) {
@ -179,7 +179,7 @@ export default class ProjectsView extends Vue {
async loadMoreData(payload: boolean) { async loadMoreData(payload: boolean) {
if (this.projects.length > 0) { 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.jwtId}`; const url = `${this.apiServer}/api/v2/report/plansByIssuer?beforeId=${latestProject.rowid}`;
const token = await accessToken(this.current); const token = await accessToken(this.current);
await this.dataLoader(url, token); await this.dataLoader(url, token);
} }

Loading…
Cancel
Save