Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pdfconfig #1203

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ data class FeltMap(
val label: String,
@field:NotNull(message = "Verdiliste kan ikke være null")
val verdiliste: List<VerdilisteElement>,
val pdfConfig: PdfConfig? = null,
)

marcuasc marked this conversation as resolved.
Show resolved Hide resolved
@JsonInclude(JsonInclude.Include.NON_NULL)
Expand All @@ -18,3 +19,13 @@ data class VerdilisteElement(
val verdiliste: List<VerdilisteElement>? = null,
val alternativer: String? = null,
)

data class PdfConfig(
val harInnholdsfortegnelse: Boolean,
val språk: Språk,
)

enum class Språk {
NB,
EN,
}
Original file line number Diff line number Diff line change
Expand Up @@ -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<VerdilisteElement> {
Expand Down
3 changes: 2 additions & 1 deletion src/test/resources/json/pdf_generated_barnetilsyn.json
Original file line number Diff line number Diff line change
Expand Up @@ -592,5 +592,6 @@
}
]
}
]
],
"pdfConfig" : null
}
Original file line number Diff line number Diff line change
Expand Up @@ -594,5 +594,6 @@
}
]
}
]
],
"pdfConfig" : null
}
3 changes: 2 additions & 1 deletion src/test/resources/json/pdf_generated_ettersending.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
}
]
}
]
],
"pdfConfig" : null
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"label" : "Vedlegg",
"verdi" : "Lærlingkontrakt\n\nUtgifter til pass av barn"
} ]
} ]
} ],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sjekk om det fungerer med dagens løsning

"pdfConfig" : null
}
3 changes: 2 additions & 1 deletion src/test/resources/json/pdf_generated_overgangsstønad.json
Original file line number Diff line number Diff line change
Expand Up @@ -620,5 +620,6 @@
}
]
}
]
],
"pdfConfig" : null
}
Original file line number Diff line number Diff line change
Expand Up @@ -624,5 +624,6 @@
}
]
}
]
],
"pdfConfig" : null
}
3 changes: 2 additions & 1 deletion src/test/resources/json/pdf_generated_skolepenger.json
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,6 @@
}
]
}
]
],
"pdfConfig" : null
}
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,6 @@
"label" : "Vedlegg",
"verdi" : "Utgifter til utdanning"
} ]
} ]
} ],
"pdfConfig" : null
}
Loading