This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jørgen Tu Sveli
committed
Sep 1, 2021
1 parent
9ca8fe6
commit b4ade71
Showing
3 changed files
with
22 additions
and
36 deletions.
There are no files selected for viewing
36 changes: 0 additions & 36 deletions
36
src/main/java/no/nav/fo/veilarbregistrering/db/registrering/UtdanningUtils.java
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
src/main/java/no/nav/fo/veilarbregistrering/db/registrering/UtdanningUtils.kt
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package no.nav.fo.veilarbregistrering.db.registrering | ||
|
||
import no.nav.fo.veilarbregistrering.besvarelse.UtdanningSvar | ||
|
||
internal object UtdanningUtils { | ||
|
||
private val nuskodeMap: Map<UtdanningSvar, String> = mapOf( | ||
UtdanningSvar.INGEN_UTDANNING to "0", | ||
UtdanningSvar.GRUNNSKOLE to "2", | ||
UtdanningSvar.VIDEREGAENDE_GRUNNUTDANNING to "3", | ||
UtdanningSvar.VIDEREGAENDE_FAGBREV_SVENNEBREV to "4", | ||
UtdanningSvar.HOYERE_UTDANNING_1_TIL_4 to "6", | ||
UtdanningSvar.HOYERE_UTDANNING_5_ELLER_MER to "7", | ||
UtdanningSvar.INGEN_SVAR to "9", | ||
) | ||
|
||
fun mapTilNuskode(utdanning: UtdanningSvar): String? = nuskodeMap[utdanning] | ||
|
||
fun mapTilUtdanning(nuskode: String): UtdanningSvar? = | ||
nuskodeMap.filterValues { it == nuskode }.keys.firstOrNull() | ||
} |
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