diff --git a/src/main/kotlin/no/nav/familie/ef/mottak/repository/domain/FeltMap.kt b/src/main/kotlin/no/nav/familie/ef/mottak/repository/domain/FeltMap.kt index c1bb9a471..585be6d01 100644 --- a/src/main/kotlin/no/nav/familie/ef/mottak/repository/domain/FeltMap.kt +++ b/src/main/kotlin/no/nav/familie/ef/mottak/repository/domain/FeltMap.kt @@ -8,6 +8,7 @@ data class FeltMap( val label: String, @field:NotNull(message = "Verdiliste kan ikke være null") val verdiliste: List, + val pdfConfig: PdfConfig = PdfConfig(harInnholdsfortegnelse = true, språk = Språk.NB), ) @JsonInclude(JsonInclude.Include.NON_NULL) @@ -18,3 +19,13 @@ data class VerdilisteElement( val verdiliste: List? = null, val alternativer: String? = null, ) + +data class PdfConfig( + val harInnholdsfortegnelse: Boolean, + val språk: Språk, +) + +enum class Språk { + NB, + EN, +} diff --git "a/src/main/kotlin/no/nav/familie/ef/mottak/service/S\303\270knadTilFeltMap.kt" "b/src/main/kotlin/no/nav/familie/ef/mottak/service/S\303\270knadTilFeltMap.kt" index e77882660..d6d72d06e 100644 --- "a/src/main/kotlin/no/nav/familie/ef/mottak/service/S\303\270knadTilFeltMap.kt" +++ "b/src/main/kotlin/no/nav/familie/ef/mottak/service/S\303\270knadTilFeltMap.kt" @@ -92,7 +92,7 @@ object SøknadTilFeltMap { ), ) val vedleggMap = mapTilVedlegg(vedleggTitler, "Dokumenter vedlagt") - return FeltMap("Ettersending", listOf(infoMap, vedleggMap)) + return FeltMap("Ettersending", verdiliste = listOf(infoMap, vedleggMap)) } private fun finnFelter(entitet: Any): List { diff --git a/src/test/resources/json/pdf_generated_barnetilsyn.json b/src/test/resources/json/pdf_generated_barnetilsyn.json index 0738bf553..671a2c36d 100644 --- a/src/test/resources/json/pdf_generated_barnetilsyn.json +++ b/src/test/resources/json/pdf_generated_barnetilsyn.json @@ -592,5 +592,9 @@ } ] } - ] + ], + "pdfConfig" : { + "harInnholdsfortegnelse" : true, + "språk" : "NB" + } } \ No newline at end of file diff --git a/src/test/resources/json/pdf_generated_barnetilsyn_med_typer.json b/src/test/resources/json/pdf_generated_barnetilsyn_med_typer.json index 82da98f84..eda4c1579 100644 --- a/src/test/resources/json/pdf_generated_barnetilsyn_med_typer.json +++ b/src/test/resources/json/pdf_generated_barnetilsyn_med_typer.json @@ -594,5 +594,9 @@ } ] } - ] + ], + "pdfConfig" : { + "harInnholdsfortegnelse": true, + "språk": "NB" + } } diff --git a/src/test/resources/json/pdf_generated_ettersending.json b/src/test/resources/json/pdf_generated_ettersending.json index 58df1d25b..5e1f5fc48 100644 --- a/src/test/resources/json/pdf_generated_ettersending.json +++ b/src/test/resources/json/pdf_generated_ettersending.json @@ -26,5 +26,9 @@ } ] } - ] + ], + "pdfConfig" : { + "harInnholdsfortegnelse" : true, + "språk" : "NB" + } } \ No newline at end of file diff --git a/src/test/resources/json/pdf_generated_ettersending_med_typer.json b/src/test/resources/json/pdf_generated_ettersending_med_typer.json index ce9ab53ca..55de2630f 100644 --- a/src/test/resources/json/pdf_generated_ettersending_med_typer.json +++ b/src/test/resources/json/pdf_generated_ettersending_med_typer.json @@ -19,5 +19,9 @@ "label" : "Vedlegg", "verdi" : "Lærlingkontrakt\n\nUtgifter til pass av barn" } ] - } ] + } ], + "pdfConfig" : { + "harInnholdsfortegnelse": true, + "språk": "NB" + } } \ No newline at end of file diff --git "a/src/test/resources/json/pdf_generated_overgangsst\303\270nad.json" "b/src/test/resources/json/pdf_generated_overgangsst\303\270nad.json" index d036b2909..9c5bb2643 100644 --- "a/src/test/resources/json/pdf_generated_overgangsst\303\270nad.json" +++ "b/src/test/resources/json/pdf_generated_overgangsst\303\270nad.json" @@ -620,5 +620,9 @@ } ] } - ] + ], + "pdfConfig" : { + "harInnholdsfortegnelse" : true, + "språk" : "NB" + } } \ No newline at end of file diff --git "a/src/test/resources/json/pdf_generated_overgangsst\303\270nad_med_typer.json" "b/src/test/resources/json/pdf_generated_overgangsst\303\270nad_med_typer.json" index c684c42be..a2204b061 100644 --- "a/src/test/resources/json/pdf_generated_overgangsst\303\270nad_med_typer.json" +++ "b/src/test/resources/json/pdf_generated_overgangsst\303\270nad_med_typer.json" @@ -624,5 +624,9 @@ } ] } - ] + ], + "pdfConfig" : { + "harInnholdsfortegnelse": true, + "språk": "NB" + } } diff --git a/src/test/resources/json/pdf_generated_skolepenger.json b/src/test/resources/json/pdf_generated_skolepenger.json index 43cb37665..238d1cf2a 100644 --- a/src/test/resources/json/pdf_generated_skolepenger.json +++ b/src/test/resources/json/pdf_generated_skolepenger.json @@ -386,5 +386,9 @@ } ] } - ] + ], + "pdfConfig" : { + "harInnholdsfortegnelse" : true, + "språk" : "NB" + } } \ No newline at end of file diff --git a/src/test/resources/json/pdf_generated_skolepenger_med_typer.json b/src/test/resources/json/pdf_generated_skolepenger_med_typer.json index 104ba8a6a..14873892a 100644 --- a/src/test/resources/json/pdf_generated_skolepenger_med_typer.json +++ b/src/test/resources/json/pdf_generated_skolepenger_med_typer.json @@ -271,5 +271,9 @@ "label" : "Vedlegg", "verdi" : "Utgifter til utdanning" } ] - } ] + } ], + "pdfConfig" : { + "harInnholdsfortegnelse": true, + "språk": "NB" + } } \ No newline at end of file