Skip to content

Commit

Permalink
✨ Send InntektHentetFraAOrdningen til Speil
Browse files Browse the repository at this point in the history
  • Loading branch information
chsko committed Nov 7, 2024
1 parent c5ffd25 commit a590c3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ data class InntektHentetFraAOrdningen(
val mottattDato: LocalDateTime,
) : Hendelse

internal fun GraphQLHendelse.tilHendelse(): Hendelse? =
internal fun GraphQLHendelse.tilHendelse(): Hendelse =
when (this) {
is GraphQLInntektsmelding ->
Inntektsmelding(
Expand Down Expand Up @@ -176,9 +176,12 @@ internal fun GraphQLHendelse.tilHendelse(): Hendelse? =
tom = tom,
rapportertDato = rapportertDato,
)

// Midlertidig for at Spleiselaget skal kunne pushe kode som sender disse til oss
is GraphQLInntektFraAOrdningen -> null
is GraphQLInntektFraAOrdningen ->
InntektHentetFraAOrdningen(
id = UUID.fromString(id),
type = Hendelsetype.INNTEKT_HENTET_FRA_AORDNINGEN,
mottattDato = mottattDato,
)

else -> throw Exception("Ukjent hendelsestype ${javaClass.name}")
}
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ data class UberegnetPeriode(

override fun skjaeringstidspunkt(): LocalDate = periode.skjaeringstidspunkt

override fun hendelser(): List<Hendelse> = periode.hendelser.mapNotNull { it.tilHendelse() }
override fun hendelser(): List<Hendelse> = periode.hendelser.map { it.tilHendelse() }

override fun varsler(): List<VarselDTO> =
if (skalViseAktiveVarsler) {
Expand Down Expand Up @@ -503,7 +503,7 @@ data class BeregnetPeriode(
}
}

override fun hendelser(): List<Hendelse> = periode.hendelser.mapNotNull { it.tilHendelse() }
override fun hendelser(): List<Hendelse> = periode.hendelser.map { it.tilHendelse() }

fun notater(): List<Notat> = notater(notatDao, vedtaksperiodeId())

Expand Down

0 comments on commit a590c3f

Please sign in to comment.