Skip to content

Commit

Permalink
legger på mottaks-tidspunkt av klagen for klageinstans til json
Browse files Browse the repository at this point in the history
  • Loading branch information
RamziAbuQassim committed Aug 26, 2024
1 parent b558d7b commit bdeb406
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import no.nav.su.se.bakover.common.infrastructure.persistence.hentListe
import no.nav.su.se.bakover.common.infrastructure.persistence.insert
import no.nav.su.se.bakover.common.infrastructure.persistence.oppdatering
import no.nav.su.se.bakover.common.infrastructure.persistence.tidspunkt
import no.nav.su.se.bakover.common.infrastructure.persistence.tidspunktOrNull
import no.nav.su.se.bakover.common.journal.JournalpostId
import no.nav.su.se.bakover.common.persistence.TransactionContext
import no.nav.su.se.bakover.domain.klage.KlageinstanshendelseRepo
Expand Down Expand Up @@ -162,7 +163,7 @@ internal class KlageinstanshendelsePostgresRepo(
opprettet = opprettet,
klageId = klageId,
oppgaveId = oppgaveId,
mottattKlageinstans = row.tidspunkt("utlest_mottattKlageinstans"),
mottattKlageinstans = row.tidspunktOrNull("utlest_mottattKlageinstans"),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ sealed interface ProsessertKlageinstanshendelse {
override val id: UUID,
override val opprettet: Tidspunkt,
override val klageId: KlageId,
val mottattKlageinstans: Tidspunkt,
val mottattKlageinstans: Tidspunkt?,
override val oppgaveId: OppgaveId,
) : ProsessertKlageinstanshendelse
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ internal data class KlageJson(
data class VedtattUtfallJson(
val utfall: String?,
val opprettet: String,
val klageinstansMottok: String?,
)
}

Expand Down Expand Up @@ -554,5 +555,6 @@ internal fun ProsessertKlageinstanshendelse.toJson(): KlageJson.VedtattUtfallJso
null -> null
},
opprettet = this.opprettet.toString(),
klageinstansMottok = (this as? ProsessertKlageinstanshendelse.AnkebehandlingOpprettet)?.mottattKlageinstans?.toString(),
)
}

0 comments on commit bdeb406

Please sign in to comment.