-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
summerer antall svar for tema fra spørsmål
- Loading branch information
Showing
5 changed files
with
44 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,34 @@ | ||
import { z } from "zod"; | ||
export const kartleggingSvarAlternativ = z.object({ | ||
export const svaralternativResultatSchema = z.object({ | ||
svarId: z.string(), | ||
tekst: z.string(), | ||
antallSvar: z.number(), | ||
}); | ||
|
||
export const kartleggingSpørsmål = z.object({ | ||
export const spørsmålResultatSchema = z.object({ | ||
spørsmålId: z.string(), | ||
tekst: z.string(), | ||
flervalg: z.boolean(), | ||
svarListe: z.array(kartleggingSvarAlternativ), | ||
antallDeltakereSomHarSvart: z.number(), | ||
svarListe: z.array(svaralternativResultatSchema), | ||
}); | ||
|
||
export const spørsmålMedSvarPerTema = z.object({ | ||
export type SpørsmålResultatDto = z.infer<typeof spørsmålResultatSchema>; | ||
|
||
export const temaResultatSchema = z.object({ | ||
navn: z.string(), | ||
spørsmålMedSvar: z.array(kartleggingSpørsmål), | ||
spørsmålMedSvar: z.array(spørsmålResultatSchema), | ||
}); | ||
|
||
export const iaSakKartleggingResultatSchema = z.object({ | ||
export type TemaResultatDto = z.infer<typeof temaResultatSchema>; | ||
|
||
export const behovsvurderingResultatSchema = z.object({ | ||
kartleggingId: z.string(), | ||
antallUnikeDeltakereMedMinstEttSvar: z.number(), | ||
antallUnikeDeltakereSomHarSvartPåAlt: z.number(), | ||
spørsmålMedSvarPerTema: z.array(spørsmålMedSvarPerTema), | ||
spørsmålMedSvarPerTema: z.array(temaResultatSchema), | ||
}); | ||
|
||
export type IASakKartleggingResultat = z.infer< | ||
typeof iaSakKartleggingResultatSchema | ||
typeof behovsvurderingResultatSchema | ||
>; |