From 48acf55d6b41e19e7674ac8cddbeeb5d2d15881a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 12 Apr 2022 15:42:37 +0200 Subject: [PATCH] Web: document cohesion of JobsTable and JobDetails components --- web/app/src/components/JobDetails.vue | 5 ++++- web/app/src/components/JobsTable.vue | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/web/app/src/components/JobDetails.vue b/web/app/src/components/JobDetails.vue index 567323c1..cbec1b23 100644 --- a/web/app/src/components/JobDetails.vue +++ b/web/app/src/components/JobDetails.vue @@ -72,7 +72,10 @@ export default { jobSummary(newSummary, oldSummary) { console.log("Updating job details:", JSON.parse(JSON.stringify(newSummary))); this.jobData = newSummary; - // TODO: Fetch the rest of the job. + // TODO later: Fetch the rest of the job. This isn't necessary now, + // because the jobs table already performs the fetch and the "summary" is + // actually the entire job. If this changes, this is the place to trigger + // an actual fetch. }, }, methods: { diff --git a/web/app/src/components/JobsTable.vue b/web/app/src/components/JobsTable.vue index 6088c3a0..6c1587af 100644 --- a/web/app/src/components/JobsTable.vue +++ b/web/app/src/components/JobsTable.vue @@ -88,7 +88,10 @@ export default { }, processNewJob(jobUpdate) { console.log("processNewJob:", jobUpdate); - // The update doesn't have all the info we need, so just fetch the job via an API call. + // The update doesn't have all the info we need, so just fetch the job via + // an API call. If this is ever changed, and the jobUpdate does have + // everything needed for this table, JobDetails.vue also needs to be + // adjusted for this. const jobsApi = new JobsApi(this.apiClient); jobsApi.fetchJob(jobUpdate.id).then((job) => { console.log('API called successfully. Returned data: ' + job);