From 91b027a64da96f41353d1f330e5ea0154e48818e Mon Sep 17 00:00:00 2001 From: Sindre Kjelsrud Date: Sun, 14 Jan 2024 12:07:55 +0100 Subject: [PATCH] :sparkles: added possibility for IDK Co-authored-by: haraldnilsen Signed-off-by: Sindre Kjelsrud --- frontend/src/components/form/answerbox/AnswerBox.svelte | 2 +- frontend/src/lib/convertAnswerData.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/form/answerbox/AnswerBox.svelte b/frontend/src/components/form/answerbox/AnswerBox.svelte index 033c4e8..983d022 100644 --- a/frontend/src/components/form/answerbox/AnswerBox.svelte +++ b/frontend/src/components/form/answerbox/AnswerBox.svelte @@ -71,6 +71,6 @@
{knowledge = e.detail; handleFormUpdate()}} inputType="radio" label="Kunnskap" options={["Veldig dårlig", "Dårlig", "Nøytral", "Bra", "Veldig bra"]}/> {empathy = e.detail; handleFormUpdate()}} inputType="radio" label="Empati" options={["Veldig dårlig", "Dårlig", "Nøytral", "Bra", "Veldig bra"]}/> - {helpfulness = e.detail; handleFormUpdate()}} inputType="radio" label="Hjelpsomhet" options={["Veldig dårlig", "Dårlig", "Nøytral", "Bra", "Veldig bra"]}/> + {helpfulness = e.detail; handleFormUpdate()}} inputType="radio" label="Hjelpsomhet" options={["Veldig dårlig", "Dårlig", "Nøytral", "Bra", "Veldig bra", "Vet ikke"]}/>
\ No newline at end of file diff --git a/frontend/src/lib/convertAnswerData.ts b/frontend/src/lib/convertAnswerData.ts index a4d87c6..74d0f50 100644 --- a/frontend/src/lib/convertAnswerData.ts +++ b/frontend/src/lib/convertAnswerData.ts @@ -17,6 +17,9 @@ export const convertAnswerDataToNumeric = (value: string): number => { case "Veldig bra": result = 5; break; + case "Vet ikke": + result = 6; + break; default: result = 0; break; @@ -44,6 +47,9 @@ export const convertAnswerDataToString = (value: number): string => { case 5: result = "Veldig bra"; break; + case 6: + result = "Vet ikke"; + break; default: break; }