-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/informasjon om saksbehandlingstid ut #1221
Merged
Merged
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
8bcdf71
Lagt ny brevkode UT_INFORMASJON_OM_SAKSBEHANDLINGSTID til Pesysbrevko…
e136581 619558e
Bumped apiModelVersion til 118
e136581 3f72ea7
Opprettet data class InformasjonOmSaksbehandlingstidUtDto i Informasj…
e136581 ed2feb0
Opprettet brevmal InformasjonOmSaksbehandlingstidUT.kt
e136581 89ad259
Opprettet brevmal InformasjonOmSaksbehandlingstidUT.kt
e136581 bdd5d32
Opprettet brevmal InformasjonOmSaksbehandlingstidUT.kt
e136581 28d9bdd
Oppdaterte InformasjonOmSaksbehandlingstidUT.kt
e136581 1652e62
Oppdaterte InformasjonOmSaksbehandlingstidUT.kt med tekster for forle…
e136581 cc140de
Oppdaterte InformasjonOmSaksbehandlingstidUtTest.kt
e136581 3ca8236
Lagt InformasjonOmSaksbehandlingstidUT til ProductionTemplates.kt
e136581 a408c89
Lagt InformasjonOmSaksbehandlingstidUT til ProductionTemplates.kt
e136581 ac2e586
Oppdaterte InformasjonOmSaksbehandlingstidUtDto
e136581 0673758
Merge branch 'refs/heads/main' into feature/InformasjonOmSaksbehandli…
e136581 2cd32af
Testet ok - uten og med forlengetSaksbehandlingstid
e136581 a0e1fe6
Oppdaterte tekst i InformasjonOmSaksbehandlingstidUT.kt
e136581 7201e8e
Oppdaterte InformasjonOmForlengetSaksbehandlingstidUT.kt
e136581 43847ee
Oppdaterte apiModelVersion til 119
e136581 85416fc
Oppdaterte displayTitle i InformasjonOmSaksbehandlingstidUT.kt
e136581 db89519
Merge branch 'main' into feature/InformasjonOmSaksbehandlingstidUT
e136581 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ plugins { | |
} | ||
|
||
group = "no.nav.pensjon.brev" | ||
version = "116" | ||
version = "118" | ||
|
||
java { | ||
withSourcesJar() | ||
|
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
15 changes: 15 additions & 0 deletions
15
...otlin/no/nav/pensjon/brev/api/model/maler/redigerbar/InformasjonOmSaksbehandlingstidUT.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,15 @@ | ||
package no.nav.pensjon.brev.api.model.maler.redigerbar | ||
|
||
import no.nav.pensjon.brev.api.model.maler.BrevbakerBrevdata | ||
import no.nav.pensjon.brev.api.model.maler.EmptyBrevdata | ||
import no.nav.pensjon.brev.api.model.maler.RedigerbarBrevdata | ||
|
||
@Suppress("unused") | ||
data class InformasjonOmSaksbehandlingstidUtDto( | ||
override val saksbehandlerValg: SaksbehandlerValg, | ||
override val pesysData: EmptyBrevdata | ||
) : RedigerbarBrevdata<InformasjonOmSaksbehandlingstidUtDto.SaksbehandlerValg, EmptyBrevdata> { | ||
data class SaksbehandlerValg( | ||
val forlengetSaksbehandlingstid: Boolean = false, | ||
) : BrevbakerBrevdata | ||
} |
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
121 changes: 121 additions & 0 deletions
121
...src/main/kotlin/no/nav/pensjon/brev/maler/redigerbar/InformasjonOmSaksbehandlingstidUT.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,121 @@ | ||
package no.nav.pensjon.brev.maler.redigerbar | ||
|
||
import no.nav.pensjon.brev.api.model.Sakstype | ||
import no.nav.pensjon.brev.api.model.TemplateDescription | ||
import no.nav.pensjon.brev.api.model.maler.Pesysbrevkoder | ||
import no.nav.pensjon.brev.api.model.maler.redigerbar.InformasjonOmSaksbehandlingstidUtDto | ||
import no.nav.pensjon.brev.api.model.maler.redigerbar.InformasjonOmSaksbehandlingstidUtDtoSelectors.SaksbehandlerValgSelectors.forlengetSaksbehandlingstid | ||
import no.nav.pensjon.brev.api.model.maler.redigerbar.InformasjonOmSaksbehandlingstidUtDtoSelectors.saksbehandlerValg | ||
import no.nav.pensjon.brev.maler.fraser.common.Felles | ||
import no.nav.pensjon.brev.template.Language.* | ||
import no.nav.pensjon.brev.template.RedigerbarTemplate | ||
import no.nav.pensjon.brev.template.dsl.createTemplate | ||
import no.nav.pensjon.brev.template.dsl.expression.expr | ||
import no.nav.pensjon.brev.template.dsl.expression.plus | ||
import no.nav.pensjon.brev.template.dsl.helpers.TemplateModelHelpers | ||
import no.nav.pensjon.brev.template.dsl.languages | ||
import no.nav.pensjon.brev.template.dsl.text | ||
import no.nav.pensjon.brev.template.dsl.textExpr | ||
import no.nav.pensjon.brevbaker.api.model.LetterMetadata | ||
|
||
@TemplateModelHelpers | ||
object InformasjonOmSaksbehandlingstidUT : RedigerbarTemplate<InformasjonOmSaksbehandlingstidUtDto> { | ||
|
||
// MF 000130 (AP_INFO_STID_MAN) | ||
override val kode = Pesysbrevkoder.Redigerbar.UT_INFORMASJON_OM_SAKSBEHANDLINGSTID | ||
override val kategori = TemplateDescription.Brevkategori.INFORMASJONSBREV | ||
override val brevkontekst = TemplateDescription.Brevkontekst.SAK | ||
override val sakstyper = setOf(Sakstype.UFOREP) | ||
|
||
override val template = createTemplate( | ||
name = kode.name, | ||
letterDataType = InformasjonOmSaksbehandlingstidUtDto::class, | ||
languages = languages(Bokmal, Nynorsk, English), | ||
letterMetadata = LetterMetadata( | ||
displayTitle = "Informasjon om saksbehandlingstid", | ||
isSensitiv = false, | ||
distribusjonstype = LetterMetadata.Distribusjonstype.VIKTIG, | ||
brevtype = LetterMetadata.Brevtype.INFORMASJONSBREV, | ||
) | ||
) { | ||
title { | ||
showIf(saksbehandlerValg.forlengetSaksbehandlingstid) { | ||
text( | ||
Bokmal to "Informasjon om forlenget saksbehandlingstid", | ||
Nynorsk to "Informasjon om forlenget saksbehandlingstid", | ||
English to "Information about application processing delay", | ||
) | ||
}.orShow { | ||
text( | ||
Bokmal to "Informasjon om saksbehandlingstiden vår", | ||
Nynorsk to "Informasjon om saksbehandlingstida vår", | ||
English to "Information about our application processing time", | ||
) | ||
} | ||
} | ||
outline { | ||
paragraph { | ||
val mottattDato = fritekst("dato") | ||
|
||
showIf(saksbehandlerValg.forlengetSaksbehandlingstid) { | ||
val aarsak = fritekst("årsak til forsinkelse") | ||
textExpr( | ||
Bokmal to "Vi har ".expr() + mottattDato + " mottatt din søknad om uføretrygd. " | ||
+ "Det vil dessverre ta oss lengre tid enn antatt å behandle kravet. " | ||
+ "Forsinkelsen skyldes ".expr() + aarsak + ".".expr(), | ||
Nynorsk to "Vi har ".expr() + mottattDato + " fått søknaden din om uføretrygd. " | ||
+ "Det vil dessverre ta oss lengre tid enn venta å behandle kravet. " | ||
+ "Forsinkinga skuldast ".expr() + aarsak + ".".expr(), | ||
English to "We have received your application for disabilty benefit on the ".expr() + mottattDato + ". " | ||
+ "Due to delays in ".expr() + aarsak + ", " | ||
+ "the processing of your case will take longer than we anticipated.".expr() | ||
) | ||
}.orShow { | ||
textExpr( | ||
Bokmal to "Vi har ".expr() + mottattDato + " mottatt søknaden din om uføretrygd fra folketrygden.", | ||
Nynorsk to "Vi har ".expr() + mottattDato + " fått søknaden din om uføretrygd frå folketrygda.", | ||
English to "We have received your application for disability benefit from the Norwegian National Insurance Scheme on ".expr() + mottattDato + ".", | ||
) | ||
} | ||
} | ||
showIf(saksbehandlerValg.forlengetSaksbehandlingstid) { | ||
title1 { | ||
text( | ||
Bokmal to "Ny svartid", | ||
Nynorsk to "Ny svartid", | ||
English to "New estimated date for completion", | ||
) | ||
} | ||
paragraph { | ||
val svartid = fritekst("svartid") | ||
textExpr( | ||
Bokmal to "Vi antar at kravet ditt kan bli ferdigbehandlet innen ".expr() + svartid + ".", | ||
Nynorsk to "Vi reknar med at kravet ditt kan bli ferdigbehandla innan ".expr() + svartid + ".", | ||
English to "Without further delays, we assume the processing of your case to be completed within ".expr() + svartid + "." | ||
) | ||
} | ||
}.orShow { | ||
paragraph { | ||
val svartid = fritekst("svartid") | ||
textExpr( | ||
Bokmal to "Saksbehandlingstiden vår er vanligvis ".expr() + svartid + ".", | ||
Nynorsk to "Saksbehandlingstida vår er vanlegvis ".expr() + svartid + ".", | ||
English to "Our processing time is usually ".expr() + svartid + ".", | ||
) | ||
} | ||
} | ||
paragraph { | ||
text( | ||
Bokmal to "Dersom vi trenger flere opplysninger fra deg, vil du høre fra oss.", | ||
Nynorsk to "Dersom vi treng fleire opplysningar frå deg, vil du høyre frå oss.", | ||
English to "We will contact you if we need you to provide more information." | ||
) | ||
} | ||
includePhrase(Felles.MeldeFraEndringer) | ||
includePhrase(Felles.HarDuSpoersmaal.ufoeretrygd) | ||
} | ||
} | ||
} | ||
|
||
|
||
|
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
13 changes: 13 additions & 0 deletions
13
...aker/src/test/kotlin/no/nav/pensjon/brev/fixtures/InformasjonOmSaksbehandlingstidUtDto.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,13 @@ | ||
package no.nav.pensjon.brev.fixtures | ||
|
||
import no.nav.pensjon.brev.api.model.maler.EmptyBrevdata | ||
import no.nav.pensjon.brev.api.model.maler.redigerbar.InformasjonOmSaksbehandlingstidUtDto.SaksbehandlerValg | ||
import no.nav.pensjon.brev.api.model.maler.redigerbar.InformasjonOmSaksbehandlingstidUtDto | ||
|
||
fun createInformasjonOmSaksbehandlingstidUtDto() = | ||
InformasjonOmSaksbehandlingstidUtDto( | ||
saksbehandlerValg = SaksbehandlerValg( | ||
forlengetSaksbehandlingstid = false, | ||
), | ||
pesysData = EmptyBrevdata | ||
) |
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
45 changes: 45 additions & 0 deletions
45
...test/kotlin/no/nav/pensjon/brev/maler/redigerbar/InformasjonOmSaksbehandlingstidUtTest.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,45 @@ | ||
package no.nav.pensjon.brev.maler.redigerbar | ||
|
||
import no.nav.pensjon.brev.Fixtures | ||
import no.nav.pensjon.brev.TestTags | ||
import no.nav.pensjon.brev.api.model.maler.EmptyBrevdata | ||
import no.nav.pensjon.brev.api.model.maler.redigerbar.InformasjonOmSaksbehandlingstidUtDto | ||
import no.nav.pensjon.brev.api.toLanguage | ||
import no.nav.pensjon.brev.renderTestPDF | ||
import no.nav.pensjon.brev.template.Letter | ||
import no.nav.pensjon.brevbaker.api.model.LanguageCode.* | ||
import org.junit.jupiter.api.Tag | ||
import org.junit.jupiter.api.Test | ||
|
||
@Tag(TestTags.MANUAL_TEST) | ||
class InformasjonOmSaksbehandlingstidUtTest { | ||
|
||
private val data = InformasjonOmSaksbehandlingstidUtDto( | ||
saksbehandlerValg = InformasjonOmSaksbehandlingstidUtDto.SaksbehandlerValg( | ||
forlengetSaksbehandlingstid = false | ||
), | ||
pesysData = EmptyBrevdata | ||
) | ||
|
||
@Test | ||
fun `uten forlengetSaksbehandlingstid`() { | ||
writeAllLanguages("uten-forlenget-saksbehandlingstid", data) | ||
} | ||
|
||
@Test | ||
fun `med forlengetSaksbehandlingstid`() { | ||
writeAllLanguages("med-forlengset-saksbehandlingstid", data.copy(saksbehandlerValg = data.saksbehandlerValg.copy(forlengetSaksbehandlingstid = true))) | ||
} | ||
|
||
private fun writeAllLanguages(testNavn: String, data: InformasjonOmSaksbehandlingstidUtDto) { | ||
listOf(BOKMAL, NYNORSK, ENGLISH).forEach { lang -> | ||
Letter( | ||
InformasjonOmSaksbehandlingstidUT.template, | ||
data, | ||
lang.toLanguage(), | ||
Fixtures.felles | ||
).renderTestPDF("000130-$testNavn-${lang.name}") | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pirk, men du treng kun .expr() etter den første stringen i ein textExpr, så det er feks unødvendig her etter "Forsinkelsen skyldes" og "."