From ef537ab3ffe1a76049fefba8ca8890e0e8f1b598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20Cserv=C3=A1k?= Date: Tue, 14 Nov 2023 16:21:37 +0100 Subject: [PATCH] [GUI] Update reviewData when switching between reports There was a bug when the report was loaded. The value of the review status dropdown menu did not change when switching to a report with a different status. Now every time when the report changes, the reviewData is updated as a computed property. --- web/server/vue-cli/src/components/Report/Report.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/web/server/vue-cli/src/components/Report/Report.vue b/web/server/vue-cli/src/components/Report/Report.vue index b2ba25b63d..d2dce7b47f 100644 --- a/web/server/vue-cli/src/components/Report/Report.vue +++ b/web/server/vue-cli/src/components/Report/Report.vue @@ -348,7 +348,6 @@ export default { step: null, editor: null, sourceFile: null, - reviewData: new ReviewData(), jsPlumbInstance: null, lineMarks: [], lineWidgets: [], @@ -386,6 +385,12 @@ export default { return this.showComments ? maxCols - this.commentCols : maxCols; + }, + + reviewData() { + return this.report && this.report.reviewData + ? this.report.reviewData + : new ReviewData(); } }, @@ -531,8 +536,6 @@ export default { this.report = report; - this.reviewData = report.reviewData; - await this.setSourceFileData(report.fileId); await this.drawBugPath();