{
}"
>
@@ -214,7 +261,7 @@ const mapAnswerToColor = (answer: string | UserAnswerEnum) => {
'grid-row': 2 * questionIndex + 3,
}"
>
-
+
{{
candidateAnswers.filter(
@@ -233,11 +280,12 @@ const mapAnswerToColor = (answer: string | UserAnswerEnum) => {
diff --git a/frontend/src/stores/electionStore.ts b/frontend/src/stores/electionStore.ts
index a7d680fda..375b2bf37 100644
--- a/frontend/src/stores/electionStore.ts
+++ b/frontend/src/stores/electionStore.ts
@@ -58,6 +58,7 @@ export const useElectionStore = defineStore('election', {
resultsId: null as null | string,
resultsUpdateToken: null as null | string,
encodedResults: null as null | string,
+ uniqueQuestionTags: new Set(),
};
},
getters: {
@@ -111,6 +112,7 @@ export const useElectionStore = defineStore('election', {
},
async loadCalculator(electionId: string, districtId: string) {
this.calculator = undefined;
+ this.uniqueQuestionTags.clear();
let calculator = undefined;
try {
calculator = await fetchCalculator(electionId, districtId);
@@ -121,6 +123,9 @@ export const useElectionStore = defineStore('election', {
if (calculator !== undefined) {
this.calculator = calculator;
this.answers = calculator.questions.map((x) => {
+ x.tags?.forEach((tag) => {
+ this.uniqueQuestionTags.add(tag);
+ });
return {
answer: UserAnswerEnum.undefined,
flag: false,