From 8500e405f4fc6fd42763d4ba77b9d7c6b08724ba Mon Sep 17 00:00:00 2001 From: Kenneth Seet Date: Tue, 2 Jul 2024 10:42:09 +0800 Subject: [PATCH] Standardize mcq and msq --- .../msq-question-statistics.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/web/app/components/question-types/question-statistics/msq-question-statistics.component.ts b/src/web/app/components/question-types/question-statistics/msq-question-statistics.component.ts index dbe7bc638b0..4e1343c31ab 100644 --- a/src/web/app/components/question-types/question-statistics/msq-question-statistics.component.ts +++ b/src/web/app/components/question-types/question-statistics/msq-question-statistics.component.ts @@ -63,7 +63,7 @@ export class MsqQuestionStatisticsComponent extends MsqQuestionStatisticsCalcula { header: 'Recipient Email', sortBy: SortBy.RECIPIENT_EMAIL }, ...Object.keys(this.weightPerOption).map((key: string) => { return { - header: `${key} [${this.weightPerOption[key]}]`, + header: `${key} [${(this.weightPerOption[key]).toFixed(2)}]`, sortBy: SortBy.MSQ_OPTION_SELECTED_TIMES, }; }), @@ -84,8 +84,8 @@ export class MsqQuestionStatisticsComponent extends MsqQuestionStatisticsCalcula value: this.perRecipientResponses[key].responses[option], }; }), - { value: this.perRecipientResponses[key].total }, - { value: this.perRecipientResponses[key].average }, + { value: (this.perRecipientResponses[key].total).toFixed(2) }, + { value: (this.perRecipientResponses[key].average).toFixed(2) }, ]; }); }