added possibility for IDK

Co-authored-by: haraldnilsen <harald_998@hotmail.com>
Signed-off-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
Sindre Kjelsrud 2024-01-14 12:07:55 +01:00
parent 4bbe1ed389
commit 91b027a64d
Signed by untrusted user who does not match committer: sidski
GPG key ID: D2BBDF3EDE6BA9A6
2 changed files with 7 additions and 1 deletions

View file

@ -71,6 +71,6 @@
<div class="flex flex-col justify-start items-center gap-6">
<UserFormInput formData={knowledge} on:update={(e) => {knowledge = e.detail; handleFormUpdate()}} inputType="radio" label="Kunnskap" options={["Veldig dårlig", "Dårlig", "Nøytral", "Bra", "Veldig bra"]}/>
<UserFormInput formData={empathy} on:update={(e) => {empathy = e.detail; handleFormUpdate()}} inputType="radio" label="Empati" options={["Veldig dårlig", "Dårlig", "Nøytral", "Bra", "Veldig bra"]}/>
<UserFormInput formData={helpfulness} on:update={(e) => {helpfulness = e.detail; handleFormUpdate()}} inputType="radio" label="Hjelpsomhet" options={["Veldig dårlig", "Dårlig", "Nøytral", "Bra", "Veldig bra"]}/>
<UserFormInput formData={helpfulness} on:update={(e) => {helpfulness = e.detail; handleFormUpdate()}} inputType="radio" label="Hjelpsomhet" options={["Veldig dårlig", "Dårlig", "Nøytral", "Bra", "Veldig bra", "Vet ikke"]}/>
</div>
</div>

View file

@ -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;
}